Skip to content

Set dynamic users-guide TOC spacing (fixes #18554)

Tim Barnes requested to merge timbobbarnes/ghc:userguide-pdf-toc-spacing into master

First time contributor here, I thought I'd try a documentation fix to get a feel for merge requests.

Some section numbers in The User's Guide PDF are long enough that they run into the adjacent text in the Table of Contents. I added a quick fix that replaces a fixed-width section box with plain text followed by a non-breaking space.

This also changes the heading spacing in the section heading text itself. If it's important to preserve the professional spacing of large section headings, one alternative would be to simply expand the box width just for level 4/5 headings. This case seems small enough to opt for the simplest solution, however.

Is the comment in the Sphinx configuration enough, or should I add the above alternatives / explanation in as well?

Thanks!

Merge request reports