Article View: comp.text.tex
Article #10097LaTeX Headings and Indentation
From: geyer
Date: Wed, 05 Jun 1991 03:04
Date: Wed, 05 Jun 1991 03:04
54 lines
2505 bytes
2505 bytes
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
Technical Details
Message-ID:
<1991Jun5.030456.12968@midway.uchicago.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!midway!newsShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!midway!news From: geyer@galton.uchicago.edu Newsgroups: comp.text.tex Subject: LaTeX Headings and Indentation Summary: Style files to change headings and 1st para noindent Message-ID: <1991Jun5.030456.12968@midway.uchicago.edu> Date: 5 Jun 91 03:04:56 GMT Sender: news@midway.uchicago.edu (NewsMistress) Organization: University of Chicago Lines: 54