[OS X TeX] pdftex paper size
Ross Moore
ross at ics.mq.edu.au
Fri May 19 03:47:01 EDT 2006
Hi again Bruno,
On 19/05/2006, at 5:25 PM, Bruno Voisin wrote:
>> Looks like a bug in the color package, don't you think ?
>
> No, it's just a consequence of the way the color and graphics/
> graphicx packages work (and a demonstration of the blunder made in
> pdfLaTeX when deciding not to set \pdfpagewidth and \pdfpageheight
> to \pagewidth and \pageheight, respectively, automatically).
But it does do this, at least on my setup.
This coding comes from pdftex.def (maybe not the latest version)
\ProvidesFile{pdftex.def}[2001/11/29 v0.03i graphics/color for pdftex]
...
% Are we running under PDFTeX?
\ifx\pdfpageheight\@undefined
\PackageWarningNoLine{%
\@ifundefined{@currname}{pdftex.def}{\@currname}%
}{%
pdftex option does not work with standard TeX%
}%
\else
\ifx\paperwidth\@undefined
\else
\ifdim\paperheight=0pt\relax
\else
\pdfpageheight\paperheight
\fi
\ifdim\paperwidth=0pt\relax
\else
\pdfpagewidth\paperwidth
\fi
\fi
\pdfoutput=1
\fi
In my previous message, I didn't mention that
\usepackage{graphicx} was in my test document.
The \pdfpage... sizes had been set once this
package had been loaded. So the reference to
\begin{document} was a red-herring.
Sorry for the mis-information.
\usepackage{color} would have the same effect.
> Specifically, LaTeX by default is set for US Letter paper. Using
> the [a4paper] option changes this setting to A4 paper. However,
> this only affects \pageheight and \pagewidth. For pdfLaTeX,
> \pdfpageheight and \pdfpagewidth are set completely independently,
> in the file pdftexconfig.tex (namely, to A4 paper for you owing to
> the choice made when installing the TeX i-Package).
>
> Now, the color, graphics and graphicx packages include some code to
> set \pdfpageheight and \pdfpagewidth to \pageheight and \pagewidth,
> respectively. The geometry package does the same.
Yep. As above.
>
> Accordingly, here's what your tests should yield:
>
>> I have made some trials :
>>
>> ==1==
>> \documentclass{book}
> -> \pageheight and \pagewidth for US Letter
>> \usepackage{color}
> -> \pdfpageheight and \pdfpagewidth to \pageheight and \pagewidth -
> > US Letter
>> \begin{document}
>> Essai
>> \end{document}
Agreed. See above.
>> =====
>>
>> yields (using Adobe Acrobat 7.0 Professional, French, to find out
>> the properties of the output)
>>
>> Propriétés du document... (cmd-D)
>> Format de page : 215,9 x 279,4 mm
> means \pdfpagewidth and \pdfpageheight set for US Letter (8.5 in x
> 11 in)
>> Imprimer... (cmd-P)
>> Document : 215,9 x 279,4 mm
> means the same
>> Papier : 209,9 x 297,0 mm
> independent, corresponds to the OS X Page Setup ("Format
> d'impression") setting
>>
>> ==2==
>> \documentclass[a4paper]{book}
> -> \pageheight and \pagewidth for A4
>> \usepackage{color}
> -> \pdfpageheight and \pdfpagewidth to \pageheight and \pagewidth -
> > A4
>> \begin{document}
>> Essai
>> \end{document}
>> =====,
>>
>> ==3==
>> \documentclass{book}
> -> \pageheight and \pagewidth for US Letter
>> %%%%%\usepackage{color}
> -> \pdfpageheight and \pdfpagewidth as defined in pdftexconfig.tex -
> > A4
Yes. This happens when there is no driver file loaded
for pdftex-specific stuff (e.g. color or graphics)
>> \begin{document}
>> Essai
>> \end{document}
>> ===== and
>>
>> ==4==
>> \documentclass{book}
> -> \pageheight and \pagewidth for US Letter
>> \usepackage{color}
> -> \pdfpageheight and \pdfpagewidth to \pageheight and \pagewidth -
> > US Letter
>> \input pdftexconfig
> -> \pdfpageheight and \pdfpagewidth as defined in pdftexconfig.tex -
> > A4
Ouch.
Now LaTeX and pdfTeX can have a different idea about what
is the page/paper-size for this document.
>> \begin{document}
>> Essai
>> \end{document}
>> =====
>>
>> all three yields the expected result:
>>
>> Propriétés du document... (cmd-D)
>> Format de page : 210 x 297 mm
> means \pdfpagewidth and \pdfpageheight set for A4 (21 cm x 29.7 cm)
>> Imprimer... (cmd-P)
>> Document : 209,9 x 296,7 mm
> means more or less the same
>> Papier : 209,9 x 297,0 mm
> means Page Setup set in OS X to A4
>
> Hope this makes sense,
>
> Bruno Voisin
Hope this helps,
(and sorry for my earlier mistake)
Cheers,
Ross
------------------------------------------------------------------------
Ross Moore ross at maths.mq.edu.au
Mathematics Department office: E7A-419
Macquarie University tel: +61 +2 9850 8955
Sydney, Australia 2109 fax: +61 +2 9850 8114
------------------------------------------------------------------------
------------------------- 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 Archive: http://tug.org/pipermail/macostex-archives/
More information about the MacOSX-TeX
mailing list