[OS X TeX] Book class tweaks

Ross Moore ross at ics.mq.edu.au
Mon Jan 15 06:43:00 CET 2007


Hi David,

On 15/01/2007, at 4:02 PM, david craig wrote:

>
> I'm using the book class to produce a laboratory manual.  (This may  
> not be the best choice, but I don't have time to switch right now.   
> For the record, is there a notably better choice?  Nothing I found  
> on CTAN seemed especially compelling.  The documentation for memoir  
> and my inability to find an appropriately reasonable template kept  
> me away from it for now.)
>
> Anyway ... I'd like to tweak some of the formatting parameters.  
> Perusing book.cls shows me how to fiddle with some of them, but I  
> find myself at a loss to adjust some list properties such as the  
> spacing between list items and their indentation.  (In the latter  
> case, what seemed like the obvious choices did not have the  
> expected effect, so I'm hoping for moreexpert advice.)

Some parameters need to be adjusted *after* the environment starts;
others need to be done *before* entering the environment.
In the latter case, for list-like environments, sometimes you need
to know also what level of nested list is to be adjusted.

For example, adjusting the item-separation can be done inside
the environment:

   \begin{enumerate}
    \addtolength{\itemsep}{-3pt}
    \item
      ...
      ...

But  \topsep  and  \partopsep  need to occur before it:

   \begingroup
    \addtolength{\topsep}{-3pt}
    \addtolength{\partopsep}{-3pt}
    \begin{enumerate}
     \addtolength{\itemsep}{-3pt}
     \item
       ...
       ...
    \end{enumerate}
   \endgroup


One way to simplify the coding for this is to define
your own environment;  e.g.

\newenvironment{numberedlist}{%
    \begingroup
    \addtolength{\topsep}{-3pt}%
    \addtolength{\partopsep}{-3pt}%
   }{%
    \end{enumerate}%
    \endgroup
   }

and use simply:

  \begin{numberedlist}
  \item ...
  \item ...
   ...
  \end{numberedlist}


But beware that you cannot nest these {numberedlist}
environments, else the \itemsep will be further
reduced for the nested instances.


For item indents, you need to adjust the \leftmargin .
But there are many of these; e.g. (from book.cls )

\setlength\leftmargini  {2.5em}
\setlength\leftmarginii  {2.2em}
\setlength\leftmarginiii {1.87em}
\setlength\leftmarginiv  {1.7em}
\setlength\leftmarginv  {.5em}
\setlength\leftmarginvi {.5em}

That is, \leftmargin  is actually a variable whose value is
determined at the start of the environment. It is determined by
the above 6 values, which show how much to add for each new level
of nesting (from i to vi).

Simply adding to \leftmargin  before entering the list-environment
certainly will *not* work. You must adjust the appropriate one of
the above, according to the nesting-level.



>
> Thanks,
> David Craig


Hope this helps,

	Ross

------------------------------------------------------------------------
Ross Moore                                         ross at maths.mq.edu.au
Mathematics Department                             office: E7A-419
Macquarie University                               tel: +61 +2 9850 8955
Sydney, Australia  2109                            fax: +61 +2 9850 8114
------------------------------------------------------------------------



------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the macostex-archives mailing list