f



amsbook and tocloft

Hi all,

I have found an (undocumented) incompatibility between tocloft and
amsbook. As example, try to compile the following file:

\documentclass{amsbook}
\usepackage{tocloft}
\begin{document}
\tableofcontents
\chapter{Governing equations and numerical schemes}
blah blah
\end{document}

In my case I get the following error:
....
) (./test.aux) (/usr/share/texmf/tex/latex/amsfonts/umsa.fd)
(/usr/share/texmf/tex/latex/amsfonts/umsb.fd) [1] [2]
! Missing } inserted.
<inserted text>
                }
l.7 \tableofcontents

?

If you change the class declaration:

\documentclass{book}

this example compiles w/o problems and gives expected results.
I would like to use tocloft to fine-tune the \listoffigure command
(more space for fig numbers),
if you have some alternative approaches I will be happy!

0
iprmaster (15)
11/23/2006 9:07:53 AM
comp.text.tex 39027 articles. 3 followers. Post Follow

1 Replies
549 Views

Similar Articles

[PageSpeed] 19

Max <iprmaster@gmail.com> wrote:

> Hi all,
> 
> I have found an (undocumented) incompatibility between tocloft and
> amsbook. As example, try to compile the following file:
> ...

You found out that tocloft is incompatible with the AMS classes, yes,
because they rely on a different mechanism than the standard classes
for typesetting the table of contents and the other "lists of".

You can do by redefining \l@figure, which is responsible for the 
typesetting of the list of figures entries:

\makeatletter
\renewcommand{\l@figure}{\@tocline{0}{3pt plus2pt}{0pt}{1.5pc}{}}
\makeatother

This, actually, is the default definition; you can change the fourth
argument to \@tocline to suit, maybe 2pc or 2.5pc, or whatever.

The arguments to \@tocline are, in order:

#1: the sectioning level
#2: the vertical space before the entry
#3: the indent of the entry
#4: the space reserved for the number
#5: commands to apply to the entry (e.g., font selection)

For example, in amsbook we have that \l@part is defined as

\@tocline{-1}{12pt plus2pt}{0pt}{}{\bfseries}

so that the part title is typeset in bold face; \l@section is

\@tocline{1}{0pt}{1pc}{}{}

Ciao
Enrico
0
gregorio (1367)
11/23/2006 12:58:45 PM
Reply: