[OS X TeX] How to reformat a heading
Richard Burton
burtonr at nortelnetworks.com
Fri Jun 11 13:24:15 EDT 2004
I want to understand how to redefine a heading so that
* the heading starts at the top of a new page,
* and a horizontal rule is added below the heading title, running the
width of the text area and whose thickness is configurable.
I have just reviewed section 2.2.2 in The LaTeX Companion 2nd edition where
emphasis is placed on using the @startsection command to reformat headings.
Example 2-2-9 shows how to add a horizontal rule above the heading title
using the following.
\makeatletter
\newcommand\Hsub{\@startsection{subsection}{2}%
{0pt}{-\baselineskip}{.2\baselineskip}%
{hrule\medskip\itshape}}
\makeatother
It is not clear to me how I can force a pagebreak and add a horizontal rule
below the heading text using the @startsection command. Is this possible?
Would it be better to just create a new command by wrapping commands around
the existing heading command. For example,
\newcommand{\Mysection}[1]{%
\newpage%
\section{#1}%
\rule[\baselineskip]{\linewidth}{0.25pt}%
}
This new command works, but I am wondering if it is an advisable way to do
things. Any help would be appreciate. Thanks.
sincerely,
Richard Burton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://email.esm.psu.edu/pipermail/macosx-tex/attachments/20040611/78b5ca36/attachment.html>
More information about the MacOSX-TeX
mailing list