[OS X TeX] Problems customizing report.cls

Herb Schulz herbs at wideopenwest.com
Fri Apr 15 18:44:40 CEST 2005


On 4/15/05 10:37 AM, "Daryl Basil Biberdorf" <darylb at pobox.com> wrote:

> I'm adapting report.cls to match thesis requirements
> where I am.
> 
> I'm trying to adjust chapter headings, specifically
> the skips before and after. Here's my own .cls file:
> 
> \NeedsTeXFormat{LaTeX2e}
> \ProvidesClass{dlb_report}
> \DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
> \ProcessOptions
> \LoadClass{report}
> \def\@makechapterhead#1{%
>  \vspace*{50 \p@}%
>  {\parindent \z@ \raggedright \normalfont
>    \ifnum \c at secnumdepth >\m at ne
>        % dlb SVS thesis center chapter headings
>        \begin{center}\huge\bfseries \thechapter \par
>        #1 \end{center}
>        \par\nobreak
>    \fi
>    %\interlinepenalty\@M
>    %\Huge \bfseries #1\par\nobreak
>    \vskip 28\p@
>    %\vskip 40\p@
>  }}
> \endinput
> 
> My questions:
> 1. What does \p@ do? I'm just not seeing what this does,
> and it's not discussed in the LaTeX Companion. Web searches
> are useless thus far.
> 
> 2. What's the best way to define this to get "3 spaces"
> (thesis clerk's text) between chapter heading and the top margin?
> I tried replacing the \vspace*{50 \p@} with \vspace*{ 0 \p@} in the
> course of working this out, but there's still a big gap. I'm missing
> something here. Ideally, the spaces should be expressed, IMHO,
> not in terms of absolute spaces but in terms of the \baselineskip
> for the document's \normal font. (In my case, that'd be about
> 14*3 = 42 pt, as I'm using the 12pt class option.)
> 
> 3. Likewise, what's the best way to get "3 spaces" between chapter
> heading and text of the chapter?
> 
> I've used LaTeX a lot in the past, but this is the first time
> I've had to modify the class file. Thanks for helping the
> lost find his way.
> 
> Basil

Howdy,

\p@ is a shorthand for a length of 1pt (i.e., it is a single token rather
than 3 tokens). Similarly, \z@ is shorthand for 0pt.

You should be able to use \baselineskip so the first \vspace* might be

\vspace*{2.4\baselineskip}

since the space is optically larger than a real 3 line skip (assuming that
is what is meant).

I'd also change the final \vskip to

\vskip{2.4\baselineskip}

also.

Give it a try and see how it looks.

Good Luck,

Herb Schulz
(herbs at wideopenwest.com)

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list