10

In the Companion 2nd Edition Table 4.2 shows page geometry values for various font sizes of the letterpaper paper size. These differ sometimes substantially from current values of the standard classes. Is the Companion wrong here or did the values change over the years, if they did what prompted this change?

I took the liberty to take an image of the table for convenience which is shown below:

enter image description here

I also include a MWE for experimentation for those interested to print the values:

\documentclass[10pt]{book}
\usepackage{pgf}
\def\aspectratio{\pgfmathparse{\paperheight/\paperwidth} \pgfmathresult}
\def\printgeometryvalues{\leavevmode
  paperwidth \the\paperwidth\\
  paperheight \the\paperheight\\
  theheadheight \the\headheight\\
  theheadsep \the\headsep\\
  thetopmargin \the\topmargin\\
  theoddsidemargin \the\oddsidemargin\\
  theevensidemargin\the\evensidemargin\\
  thetextheight\the\textheight\\
  thetextwidth \the\textwidth\\
  themarginparsep \the\marginparsep\\
  themarginparwidth \the\marginparwidth\\
  themarginpush \the\marginparpush\\
  thevoffset \the\voffset
  thefootskip \the\footskip\\
  aspect ratio \aspectratio\\
  topskip \the\topskip\\
  voffset \the\voffset\\
  hoffset \the\hoffset\\
  topmargin \the\topmargin}
\parindent0pt
\begin{document}
\null\newpage
\printgeometryvalues
\end{document}

Of interest is the values of \topmargin, which other classes normally set to a negative value. Also IMHO the use of ditto in the table is very unusual.

2 Answers 2

8

I fear the table has been copied directly from the first edition to the second and nobody ever noticed that it was wrong until now. As David remarked it shows the LaTeX 2.09 values which are still being used with LaTeX2e if used in compatibility mode, i.e., with \documentstyle rather than \documentclass.

The first edition of the LaTeX Companion was written at the time 2e was being finalized and at that time the values may have been still correct even for 2e. But at some point (one would need to look through the rcs logs of that time) we decided to adjust the layout depending on the chosen paper size. Basically the code in size10.clo et al attempts to center the text body on the page and thus calculates \topmargin, \oddsidemargin and \evensidemargin based on the selected paper size option.

For the horizontal sizes this can be done in a precise way, but for the vertical positioning it is not so clear to what extend you want to could the running header and footer. The code is not fully counting in the footer (which is normally only holding a page number if anything) and I guess the "% this might be wrong" is probably just commenting on this. However, the default settings in the standard classes never tried to provide anything more than a "reasonable" way to get text on paper and as we all know aren't necessary examples of great design.

Anyway, this is worth an errata entry for the LaTeX Companion 2ed, and I will add it during the next days.

0
8

oooh, it's all a bit of a distant memory (both code and book) but size10.clo has

\if@compatibility
  \setlength\topmargin{27pt}
\else
  \setlength\topmargin{\paperheight}
  \addtolength\topmargin{-2in}
  \addtolength\topmargin{-\headheight}
  \addtolength\topmargin{-\headsep}
  \addtolength\topmargin{-\textheight}
  \addtolength\topmargin{-\footskip}     % this might be wrong!
  \addtolength\topmargin{-.5\topmargin}
  \@settopoint\topmargin
\fi

In other words the 27pt value you show in the table only applies in compatibility mode (ie compatibility with LaTeX 2.09) triggered by using \documentstyle rather than \documentclass

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .