[Fwd: Re: [tex-live] [Fwd: [OS X TeX] Bug in latest pdfTeX (and/or teTeX) with respect to \magnification?]]

Gerben Wierda Gerben.Wierda at rna.nl
Tue Dec 21 03:21:58 EST 2004


Retry playing post office, the previous was cut short.

---------------------------- Original Message ----------------------------
Subject: Re: [tex-live] [Fwd: [OS X TeX] Bug in latest pdfTeX (and/or
teTeX) with respect to \magnification?] From:    "Hartmut Henkel"
<hartmut_henkel at gmx.de>
Date:    Tue, December 21, 2004 1:16
To:      "Gerben Wierda" <Gerben.Wierda at rna.nl>
Cc:      texlive at tug.org
--------------------------------------------------------------------------

On Mon, 20 Dec 2004, Gerben Wierda wrote:

> I saw this message on the TeX on Mac OS X list. Not being a pdfTeX
expert (I just redistribute) I wondered what is going on. Can someone
educate me?

will try... :-)

> G
> ---------------------------- Original Message
---------------------------- Subject: [OS X TeX] Bug in latest pdfTeX
(and/or teTeX) with respect to \magnification? From:    "Bruno Voisin"
<bvoisin at mac.com>
> Date:    Mon, December 20, 2004 10:26
> To:      "TeX on Mac OS X Mailing List" <MacOSX-TeX at email.esm.psu.edu>
--------------------------------------------------------------------------
> Hello,
> I've just noticed something odd, when typesetting a letter in plain TeX
for a change:
> - The setup is TL2004, installed via i-Installer with A4 selected as the
default paper size.
> - When \magnification is not altered, in pdfTeX the paper size is A4 as
it should.
> - When \magnification is changed (for example
> \magnification=\magstep1), the page size (ie the width and height of
text) remains A4 but the paper size (ie the size of the physcal sheet of
paper) is affected by the magnification.

The \magnification macro (not a primitive!) does not only set the
magnification factor, it also sets the \hsize and \vsize to true
dimensions with letter default, see plain.tex. So in the general
non-letter case one should say \mag=\magstep1 instead of using
\magnification.

> It seems that in TL2004 the file pdftex.cfg has vanished and is
> replaced by
> /usr/local/teTeX/share/texmf.local/tex/generic/config/pdftexconfig.tex,
which contains all the proper settings:
> 	\pdfpagewidth=594.99 true bp
> 	\pdfpageheight=841.99 true bp
> 	\pdfhorigin=1 true in
> 	\pdfvorigin=1 true in
> - When this file is not read, the above result is obtained.
> - When this file is explicitly read (by \input pdftexconfig) after
setting the magnification, namely:
> 	\magnification=\magstep1
> 	\input pdftexconfig
> then the paper size is brought back to A4 as it should.
> - When this file is read before setting the magnification, namely:
> 	\input pdftexconfig
> 	\magnification=\magstep1
> then an error is produced:
> 	(/usr/local/teTeX/share/texmf.local/tex/generic/config/
> pdftexconfig.tex)
> 	! Incompatible magnification (1200);
> 	 the previous value will be retained (1000).
> 	\m at g ->\mag \count@ \hsize 6.5true
> 	                                  in\vsize 8.9truein\dimen \footins
> 8truein
> 	<to be read again>
> 	                   \relax
> 	l.3 \magnification=\magstep1

The \hsize stuff in the error message is from the \m at g macro of
plain.tex. The error is caused by a TeX feature: After a \dimen has been
set to a "true" dimension in a certain \mag environment, the \mag is
frozen and can't be changed any more. Now, when the file
pdftexconfig.tex is read, some \dimen are set to true dimensions, like
\pdfpagewidth, so \mag=1000 is frozen. Then comes a new \mag (1200), and
then \hsize6.5truein from the \magnification helper macro \m at g triggers
the error message. Other examples:

\vsize=297truemm \mag=\magstep1 \hsize=210truemm \bye

gives a similar error message in TeX. It's nothing special with pdftex. And

\vsize=297truemm \mag=\magstep1 \hsize=210mm \bye

is ok, as is this:

\vsize=297mm \mag=\magstep1 \hsize=210truemm \bye

A try on a few hints to avoid this true dimensions weirdness:

* Set \mag early.

* If you set anything to true dimensions _before_ setting \mag, you can't
do _after_ setting \mag. Vice versa.

* Set all necessary \dimen to true dimensions after \mag, even when they
already have had non-true values before \mag -- just to be sure, that
everything comes out right. For pdftex don't forget to set
\pdfpagewidth/height, \pdfhorigin, and \pdfvorigin to the wished true
dimensions.

* Or, prescale the \dimen to a non-true dimension so that it comes out
right after the \mag has been set to a new value.

> Is there something obvious I've done wrong? Or is this a bug in pdfTeX?

It should be inline with how TeX's \mag is supposed to work.

> I've verified the same occurs with
> /usr/local/teTeX/share/texmf.tetex/tex/plain/base/story.tex, thus it
doesn't seem specific to my TeX input file.
> Bruno Voisin

Regards, Hartmut






--------------------- 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