[comp.text.tex] @startsection in book styles

news@afit.af.mil (News System Account) (03/02/91)

The @startsection macro in latex.tex has a BEFORESKIP parameter which does 2
things.  1. Its absolute value gives the amount of space to leave before
the section header, and 2. If is negative the following text has its paragraph
indent suppressed.

I wanted to not suppress this indent mentioned in item 2 so I made my own
.sty file with a revised version of \section and \subsection (from bk10.sty)
as follows:

\def\section{\@startsection {section}{1}{\z@}{3.5ex plus -1ex minus
 -.2ex}{2.3ex plus .2ex}{\Large\bf}}
 \def\subsection{\@startsection{subsection}{2}{\z@}{3.25ex plus -1ex minus
  -.2ex}{1.5ex plus .2ex}{\large\bf}}

The only difference from bk10.sty is the 4th parameter of \@startsection
which used to be negative.

This change caused major problems in my document where the sections started.
The section header appeared further down overlapped with the text, and text
later on the page was also overlapped.

Using \renewcommand made no difference.

Can anybody help?

Mark Roth
mroth@afit.af.mil

ogawa@orion.arc.nasa.gov (Arthur Ogawa) (03/02/91)

In article <1991Mar01.190233.5731@afit.af.mil> news@afit.af.mil (News System Account) writes:
|The @startsection macro in latex.tex has a BEFORESKIP parameter which does 2
|things.  1. Its absolute value gives the amount of space to leave before
|the section header, and 2. If is negative the following text has its paragraph
|indent suppressed.
|
|I wanted to not suppress this indent mentioned in item 2 so I made my own
|.sty file with a revised version of \section and \subsection (from bk10.sty)
|as follows:
|
|\def\section{\@startsection {section}{1}{\z@}{3.5ex plus -1ex minus
| -.2ex}{2.3ex plus .2ex}{\Large\bf}}
| \def\subsection{\@startsection{subsection}{2}{\z@}{3.25ex plus -1ex minus
|  -.2ex}{1.5ex plus .2ex}{\large\bf}}
|
|The only difference from bk10.sty is the 4th parameter of \@startsection
|which used to be negative.
|
|This change caused major problems in my document where the sections started.
|The section header appeared further down overlapped with the text, and text
|later on the page was also overlapped.
|
|Using \renewcommand made no difference.
|
|Can anybody help?
|
|Mark Roth
|mroth@afit.af.mil

Bravo to Mark for deciding to delve into and change a .sty file! I hope that
others will amke the plunge--it just isn't all that hard.

Mark, your problem is obvious: you needed to change the glue specification:

-3.5ex plus -1ex minus -.2ex

to:

3.5ex plus 1ex minus .2ex

In your code, you've changed only the sign of the glue's natural length.

Keep at it,
Art Ogawa