LaTeX Table of Contents Overlap

642 views
Skip to first unread message

Jahrme Risner

unread,
Jul 6, 2016, 3:00:02 AM7/6/16
to MathBook XML Support
In some circumstances (simplest example, 100 chapters) the table of contents structural numbers will collide with the chapter/section titles.
(see attached pdf page)

Searching for a solution turned up SE post about such collisions recommending the use of the "tocloft" package.

I'm not sure if/how this should be approached by MBX (e.g., condition on the length of the longest structural number, always add space, etc.), but I thought it should at least be given some discussion.
collision.pdf

Rob Beezer

unread,
Jul 6, 2016, 1:25:21 PM7/6/16
to mathbook-x...@googlegroups.com
Thanks, Jahrme. I had the same problem in FCLA with the acronymns in place of
numbers, with up to 5 characters and often several wide ones like "M". Looks
like my solution was the tocloft package (that I used extensively) and then

\cftsetpnumwidth{3em}

But I'm a bit reluctant to add a wide-ranging package to fix this little
problem, especially when a search on "tocloft conflict" turns up the "subfigure"
package several times (and I'm working now on figures inside sidebyside).

I do have lots of control over the "shorttitle" that gets sent to the table of
contents, so could maybe routinely prefix it with extra space.

If somebody has a straightfoward fix to this, I'd love to hear about it.
Otherwise, I might send this to the issues for work when it becomes more urgent.
Did you encounter this in something you are doing now?

Rob
> --
> You received this message because you are subscribed to the Google Groups
> "MathBook XML Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to mathbook-xml-sup...@googlegroups.com
> <mailto:mathbook-xml-sup...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Jahrme Risner

unread,
Jul 6, 2016, 5:08:48 PM7/6/16
to MathBook XML Support, bee...@ups.edu
It is not urgent for me as I was simply looking back at a project I started in January and may pick up at some point if I ever have "extra" time. That project, creating a more accessible version of Euler's "Letters to a German Princess", could also benefit from other improvements. For instance, as the work is organized as a collection of letters in two or three volumes (English versus French versions respectively), having some sort of support for epistolary documents would be quite helpful. When I toyed with the project in January I simply renamed <chapter> to <letter> (as well as <part> to <volume>) and it was workable, though not ideal.

Yesterday I was more just looking back and seeing how "sloppy" my xml was six months ago compared to today, and I just happened to notice the table of contents collision.
Reply all
Reply to author
Forward
0 new messages