[OS X TeX] strange pdflatex behaviour

Bruno Voisin bvoisin at mac.com
Wed May 18 17:37:51 CEST 2005

Le 18 mai 05 à 17:20, Alessandro Languasco a écrit :

> Typesetting using pdflatex an easy file like this
> \magnification=2000
> this is a trial file
> \end
> instead of obtaining a magnification of the fonts,
> I had a shrinking of the page in the upper left corner.
> It was as the \magnification command was used as a magnification
> factor of the page instead of the fonts.

I don't think that's connected with Tiger. It arises because of a  
change in the design of TeXLive 2004: pdfTeX takes additional  
parameters in addition to the \hsize and \vsize of TeX, namely  
\pdfpageheight and \pdfpagewidth defining the MediaBox of the PDF  
document, and the ways these are affected by \mag and \magnification  
have changed with TL2004.

There's been a thread "Réexp : [tex-live] [Fwd: [OS X TeX] Bug in  
latest pdfTeX (and/or teTeX) with respect to \magnification?]" about  
these issues on 21-22 December 2004, to which one of the developers  
of pdfTeX (Hartmut Henkel) contributed.

After re-reading very rapidly some of the messages in this thread, I  
think what should be done is replacing



     \input pdftexconfig

Also, it's not advised to use \mag or \magnification with LaTeX. It's  
supposed to be a plain-TeX-specific thing, told incompatible with  
LaTeX in the LaTeX manual.

Following is one message from the original thread (with email  
addresses removed).


Bruno Voisin

> From: Hartmut Henkel
> Date: 21 December 2004 01:16:00 GMT+01:00
> To: Gerben Wierda
> Subject: Re: [tex-live] [Fwd: [OS X TeX] Bug in latest pdfTeX (and/ 
> or teTeX) with respect to \magnification?]
> 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"
>> Date:    Mon, December 20, 2004 10:26
>> To:      "TeX on Mac OS X Mailing List"
>> --------------------------------------------------------------------- 
>> -----
>> 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 macostex-archives mailing list