[tex-k] Error in answer to exercise 23.2 in TeXbook

Igor Liferenko igor.liferenko at gmail.com
Fri Oct 6 12:23:14 CEST 2023


Hi all,

The answer to Exercise 23.2 in TeXbook reads:

    \headline={\ifnum\pageno=1 \hss\tenbf R\'ESUM\'E\hss
    \else\tenrm R\'esum\'e of A. U. Thor \dotfill\ Page \folio\fi}

Let's measure the height of headline on first page:

    \setbox0=\hbox{\tenbf R\'ESUM\'E}
    \showthe\ht0 % 9.36111pt

The definition of \makeheadline (see page 255) is:

    \vbox to0pt{\vskip-22.5pt
    \line{\vbox to8.5pt{}\the\headline}\vss}
    \nointerlineskip

This moves our headline 9.36111-8.5=0.86111pt lower from where
it ought to be. Therefore the proper answer should be:

    \headline={\vbox to8.5pt{\vss\line{\ifnum...\fi}}}

Regards,
Igor

P.S. Please help me to understand why \makeheadline was not
implemented this way:

    \vbox to0pt{\vskip-14pt
    \vbox to0pt{\vss\line{\the\headline}}\vss}
    \nointerlineskip


More information about the tex-k mailing list.