Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Table of contents gets overfull hbox.

1,026 views
Skip to first unread message

Michael Press

unread,
Jun 13, 2008, 4:05:39 PM6/13/08
to
Hello. I have an article with more than 99 consecutively
numbered sections. Table of contents entries numbered 100
and greater are jammed up, with the number and section
name overlapping. Is there a variable I can set to make
the correct box wide enough? Or do I have to renewcommand?
How? Thanks.

Here is an example tex file.

_________________________BEGIN _________________________
\documentclass{article}

\begin{document}
\tableofcontents

\setcounter{section}{98}
\section{abc}
\section{def}
\section{ghi}

\end{document}
__________________________END____________________________

and here are the console contents.

This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
\write18 enabled.
%&-line parsing enabled.
entering extended mode
(./toc_xxx.tex
LaTeX2e <2005/12/01>
Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, arabic, basque, bulgarian, coptic, welsh, czech, slovak, german, ng
erman, danish, esperanto, spanish, catalan, galician, estonian, farsi, finnish,
french, greek, monogreek, ancientgreek, croatian, hungarian, interlingua, ibyc
us, indonesian, icelandic, italian, latin, mongolian, dutch, norsk, polish, por
tuguese, pinyin, romanian, russian, slovenian, uppersorbian, serbian, swedish,
turkish, ukenglish, ukrainian, loaded.
(/usr/local/texlive/2007/texmf-dist/tex/latex/base/article.cls
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
(/usr/local/texlive/2007/texmf-dist/tex/latex/base/size10.clo)) (./toc_xxx.aux)
(./toc_xxx.toc
Overfull \hbox (2.2499pt too wide) detected at line 2
\OT1/cmr/bx/n/10 100

Overfull \hbox (2.2499pt too wide) detected at line 3
\OT1/cmr/bx/n/10 101
) [1{/usr/local/texlive/2007/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./toc_xxx.aux) )
(see the transcript file for additional information)</usr/local/texlive/2007/te
xmf-dist/fonts/type1/bluesky/cm/cmbx10.pfb></usr/local/texlive/2007/texmf-dist/
fonts/type1/bluesky/cm/cmbx12.pfb></usr/local/texlive/2007/texmf-dist/fonts/typ
e1/bluesky/cm/cmr10.pfb>
Output written on toc_xxx.pdf (1 page, 13414 bytes).
Transcript written on toc_xxx.log.

--
Michael Press

despo

unread,
Jun 18, 2008, 2:32:18 PM6/18/08
to
Hi Michael

I encountered the same problem
Does anybody know if this a bug of latex?
Is there a way that can be fixed?
I thought the problem would be solved if I change the documentclass to
one that is supposed to handle larger documents, such as book. But
this didn't work either.
Any ideas?

Despo

Heiko Oberdiek

unread,
Jun 18, 2008, 3:01:45 PM6/18/08
to
Michael Press <rub...@pacbell.net> wrote:

> Hello. I have an article with more than 99 consecutively
> numbered sections. Table of contents entries numbered 100
> and greater are jammed up, with the number and section
> name overlapping.

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=tocloft
The format of the Table of Contents, etc.

Yours sincerely
Heiko <ober...@uni-freiburg.de>

Heiko Oberdiek

unread,
Jun 18, 2008, 3:03:27 PM6/18/08
to
despo <des...@yahoo.gr> wrote:

> I encountered the same problem

Therefore you get the same answer ;-)

despo

unread,
Jun 18, 2008, 4:02:25 PM6/18/08
to
>
> Therefore you get the same answer ;-)
>
> http://www.tex.ac.uk/cgi-bin/texfaq2html?label=tocloft
> The format of the Table of Contents, etc.
>
> Yours sincerely
> Heiko <oberd...@uni-freiburg.de>

Thanks a lot!

despo

unread,
Jun 18, 2008, 7:34:12 PM6/18/08
to
Hey again

\makeatletter
\renewcommand{\@pnumwidth}{2em}
\renewcommand{\@tocrmarg}{3em}
\makeatother

(the makeatletter, makeatother commands are needed for the @
characters)

Apart from this the same result can be acheived with the use the
tocloft package
and then redefine
\cftsetpnumwidth{2em}

regards
despo

0 new messages