hi, I have a question about the following subsection style definition in one of the class file I am using right now. It seems when I use this file, it cannot break a line properly according to the margin setting for the whole document. It means some of the subsection sentences will exceeds into the right margin area of the paper. I am wondering how can I solve this problem. Thanks.
\def\subsection{%
\@startsection{subsection} % name of section and also name of
% the counter.
{2} % level, level 0 is chapter
% (for report.sty)
{0 pt} % Indentation from left margin.
% It can be negative -$>$ moved into
% the left margin.
{2 pt plus 3 pt minus 4 pt}
% Skip before heading is printed.
% see expl. above for neg. val.
{5 pt plus 1 pt minus 2 pt}
% After heading skip. If negative
% The text will be printed next
% to the heading text leaving
% the space (absolute value)
% indicated. Don't use
% zero as it will be printed on
% the same line without any space
% If negative remove stretch.
{\normalsize\bfseries}}
% \end{macrocode}
Document Classes ⇒ problem of the subsection style
problem of the subsection style
You'd better provide a minimal example showing the undesired behaviour of \subsection. Attach all the relevant files so as everybody can typeset it.
Re: problem of the subsection style
Hi, the attached picture show that the error of the subsection with the code:
\subsection{A Subsection}
Some chapters have subsections too! Cool!
This is a subsection to show the margin. This is a subsection to show the margin. This is a subsection to show the margin. This is a subsection to show the margin. This is a subsection to show the margin. This is a subsection to show the margin. This is a subsection to show the margin.
\subsection{This is a veryveryveryveryvery longlonglonglonglonglonglonglong subsections that error happens!}
This is a subsection to show the margin. This is a subsection to show the margin. This is a subsection to show the margin. This is a subsection to show the margin. This is a subsection to show the margin. This is a subsection to show the margin. This is a subsection to show the margin.
It seems that the when I use the subsection commend, the line-break cannot be finished by Latex and some sentences exceed to the right margin.
\subsection{A Subsection}
Some chapters have subsections too! Cool!
This is a subsection to show the margin. This is a subsection to show the margin. This is a subsection to show the margin. This is a subsection to show the margin. This is a subsection to show the margin. This is a subsection to show the margin. This is a subsection to show the margin.
\subsection{This is a veryveryveryveryvery longlonglonglonglonglonglonglong subsections that error happens!}
This is a subsection to show the margin. This is a subsection to show the margin. This is a subsection to show the margin. This is a subsection to show the margin. This is a subsection to show the margin. This is a subsection to show the margin. This is a subsection to show the margin.
It seems that the when I use the subsection commend, the line-break cannot be finished by Latex and some sentences exceed to the right margin.
- Attachments
-
- The subsection line-break error
- subsection error.jpg (42.72 KiB) Viewed 4710 times
Re: problem of the subsection style
Please, read carefully the link I provide to learn what a minimal example is and attach the required files. With no code, it is difficult to help. I conjecture however that the fact that the subsection title is underlined has some influence in the problem.