[tex-live] [Fwd: [OS X TeX] Bug in latest pdfTeX (and/or teTeX) with respect to \magnification?]
Bruno Voisin
bvoisin at mac.com
Tue Dec 21 06:48:53 EST 2004
Le 21 déc. 04, à 01:23, Gerben Wierda a écrit :
> I played post office with this question from Bruno:
Thanks for this, and to Hartmut for the clarification that followed.
So if I understood correctly, here is what happens:
- With previous versions of pdfTeX, up to TL2003, there were two ways
to set parameters: via TeX primitives in the TeX input file, and via
parameters in the configuration file pdftex.cfg. From the documentation
of TL2003:
> A typical pdftex.cfg file looks like this, setting up output for A4
> paper size and the standard TEX offset of 1 inch, and loading two map
> files for fonts:
>
> [...]
> page_width 210 true mm % A4 paper width
> page_height 297 true mm % A4 paper height
> horigin 1 true in % horizontal origin offset
> vorigin 1 true in % vertical origin offset
> [...]
>
> The configuration file sets default values for these parameters, and
> apart from the map entry, they all can be over--ridden in the TEX
> source file. Dimensions can be specified as true, which makes them
> immune for magnification (when set).
The corresponding TeX primitives were:
> Most parameters in the configuration file have a corresponding
> internal register. When not set during the TEX run, pdfTEX uses the
> values as specified in the configuration file.
>
> internal name parameters type
> [...]
> \pdfhorigin horigin dimension
> \pdfvorigin vorigin dimension
> \pdfpageheight page_height dimension
> \pdfpagewidth page_width dimension
> [...]
- With TL2004 the parameters have been suppressed, as well as the file
pdftex.cfg which is ignored, and all is set via the TeX primitives
which are initialized in the file pdftexconfig.tex read during the
creation of format files:
> % Set pdfTeX parameters for pdf mode (replacing pdftex.cfg file).
> % Thomas Esser, 2004. public domain.
> [...]
> \pdfpagewidth=594.99 true bp
> \pdfpageheight=841.99 true bp
> \pdfhorigin=1 true in
> \pdfvorigin=1 true in
> [...]
- Now comes the question of \magnification. With TL2003, putting in a
plain TeX input file, processed by pdfTeX, the line
\magnification=\magstep1
magnified the text by 1.2 and reinitialized the size of the output box
(= the width and height of text) to their plain TeX default (= US
Letter paper). The parameters page_width, page_height, horigin and
vorigin, which had been set in pdftex.cfg in true units, were not
affected by the magnification and remained unchanged (= A4 paper for
me).
- With TL2004, the line
\magnification=\magstep1
has the same effect on the size of text and output box as with TL2003.
It should also not affect the TeX primitives \pdfpagewidth,
\pdfpageheight, \pdfhorigin, \pdfvorigin, set in true units in the file
pdftexconfig.tex, but apparently it does: the page dimensions are also
multiplied by \magstep1 (= 1.2).
I verified in pdftex.log that the file pdftexconfig.tex has indeed been
read when creating pdftex.fmt. So what can be happening? Is this
normal, or a bug?
This behaviour might be a problem with respect to backwards
compatibility and compatibility with other TeX engines: take story.tex
and add at its beginning the single line
\magnification=\magstep1
That is a perfectly legitimate plain TeX file, not using any
dvips-specific or eTeX-specific or anything-specific extension, and
yielding a given output with TeX + dvips + GhostScript. Then process
the same file with pdfTeX, you'll get a different output. At least
that's what it does on my setup.
Or am I making a lot of fuss for nothing, and is the page size, as
displayed by Acrobat Reader, for example, irrelevant, given that when
you send the file to a printer only the size of the text and the
position of the origin will be taken into account, so that the printed
output will be the same for dvips and pdfTeX? (Assuming that you
disabled Acrobat's automatic rescaling to fit the page size specified
in the GUI printer driver.)
I had not noticed before the fact that \magnification reinitialized the
page size to US Letter, since I had always followed it by specification
of \hsize, \vsize, \hoffset and \voffset to fit with A4 paper. At least
now I understand why, in the letter example at the beginning of
Appendix E of the TeXbook, Knuth says
\magnification=\magstep1
\input letterformat
(letterformat.tex setting \hsize, \vsize and \voffset), and not
\input letterformat
\magnification=\magstep1
Thus the moral of the story seems to be: after setting \mag or
\magnification, always redefine TeX page size parameters (\hsize,
\vsize, \hoffset and \voffset) and pdfTeX page size parameters
(\pdfpagewidth, \pdfpageheight, \pdfhorigin and \pdfvorigin), in true
units. It's a pity these two sets of parameters are not made
transparently dependent on each other, as they are in LaTeX, so that
you don't have to set one and the other.
Bruno Voisin
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
More information about the MacOSX-TeX
mailing list