ascherer / web

Literate Programming in Pascal
8 stars 0 forks source link

Table of contents in `xetex.pdf` unable to paginate #24

Closed muzimuzhi closed 5 months ago

muzimuzhi commented 5 months ago
xetex.pdf pdftex.pdf
ToC unable to paginate ToC paginates
image image
ascherer commented 5 months ago

Funny that you bring this up. Just today I made notes to compare the tables-of-contents of

in conjunction with pdfwebtocfront.tex in knuth-pdf.

ascherer commented 5 months ago

It started only yesterday: https://tug.org/pipermail/metapost/2024-May/003564.html ;o)

ascherer commented 5 months ago

The aim is to have a uniform layout for these ToCs including the \title{PROGRAM} on top.

ascherer commented 5 months ago

After makeall -f "tex mf pdftex xetex hitex mp" -npt pdftex you can replace xetex.toc with pdftex.toc and rerun xetex xetex to get a two-page ToC. I have no clue what's different in the various preambles.

See also issue #25 for a broader picture.

muzimuzhi commented 5 months ago

makeall -f "tex mf pdftex xetex hitex mp" -npt pdftex only compiled tex.tex for me. I use a non-full TeX Live installation. Would that matter?

It seems the ToC in tex.pdf has a similar problem (maybe that's intentional behavior since there's no "Overfull \vbox" in loading CONTENTS.tex): image

xetex.pdf has more chapters so the problem is more visually obvious, as the last ToC entry "55. Index" is missing.

Since xewebmac.tex loads webmac.tex (if \botofcontents is undefined), the difference may come from the differences between pdfwebmac.tex and webmac.tex.

ascherer commented 5 months ago

makeall -f "tex mf pdftex xetex hitex mp" -npt pdftex only compiled tex.tex for me. I use a non-full TeX Live installation. Would that matter?

In order to use the makeall script you need the source tree for TeX Live. (If you want to commit code, submit patches to tex-k@tug.org.)

It seems the ToC in tex.pdf has a similar problem

Yes, TeX's ToC is tight. It runs to two pages for the TeX Live version.

Since xewebmac.tex loads webmac.tex (if \botofcontents is undefined), the difference may come from the differences between pdfwebmac.tex and webmac.tex.

If you run makeall -f tex -npt pdftex, the outdated macros xewebmac.tex and pdfwebmac.tex are not used, but the modern pwebmac.tex(and that's the only version of "PDF macros for WEB" I use).

ascherer commented 5 months ago

Another facet of this issue is that tex-changes.pdf has a two-page ToC and the main code starts on page 4 instead of 3. Will have to adapt pdfwebtocfront.tex.

ascherer commented 5 months ago

The most recent pdfwebtocfront.tex addresses this issue: \pdfpageheight is increased by half an inch for the long programs (TeX, Metafont, pdfTeX, and XeTeX). Also the default header title “WEB output” is replaced with “Table of Contents” on the second page of the ToC.

ascherer commented 5 months ago

Samples for the upcoming knuth-pdf package can be studied in this release.

ascherer commented 3 months ago

Home at last: https://ctan.org/tex-archive/info/knuth-pdf/xetex