[comp.text.tex] LaTeX Headings and Indentation

geyer@galton.uchicago.edu (06/05/91)

In article <1991Jun4.182659.6683@serval.net.wsu.edu>
rdubey@yoda.eecs.wsu.edu asks how to change chapter and section headings
in LaTeX:

Depends on the documentstyle style, say it is 12pt book.  Then these
headings are defined in /usr/lib/tex/inputs/bk12.sty (or some such path).

Copy the definitions into your own style file, say foo.sty and change
them to suit.  For example the default (bk12) definition of \section is

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

If you change the \Large\bf to say \large\bf, this reduces the size of
the type.  If you change it to just \large (no \bf) it won't be bold
face.

The -3.5ex plus -1ex minus -.2ex specifies the space above the
heading (a rubber length 3.5 ex's, 1 ex being the height of a lowercase
"x", stretchable to 4.5 or compressable to 3.3.  Its being negative specifies
no indentation of the first paragraph of the section (which several people
have been asking about in another thread).  Changing it to

  -2.0ex plus -.5ex minus -.2ex

would give smaller spacing.  Changing it to

   3.5ex plus  1ex minus  .2ex

would make the first paragraph of every section have normal paragraph
indentation.

The 2.3ex plus .2ex is the space after the heading.

Note that this only changes the behavior of \section, you need to do
similar things for \chapter, \subsection, and \subsubsection.

To use the new style just include this style file in your documentstyle

  \documentstyle[12pt,foo]{book}

Moral of the story.  Don't bitch about the way LaTeX looks by default.
If you don't like it, it is easy enough to change.  

Moral of the story, #2.  Don't futz around with sticking \noindent all
over your document or \vspace{-2ex} and the like.  Make a special style
file changing the definitions you want changed.  Then all of the changes
are made at once and consistently.

Charles Geyer
Department of Statistics
University of Chicago
geyer@galton.uchicago.edu