[OS X TeX] pdftex paper size

Bruno Voisin bvoisin at mac.com
Fri May 19 03:25:37 EDT 2006


Le 18 mai 06 à 19:37, André Bellaïche a écrit :

> You have three ways for getting the correct result : adding the  
> a4paper parameter in the call of the document class, suppressing  
> the call "\usepackage{color}", or re-inputinting pdftexconfig after  
> the call \usepackage{color}.
>
> 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).

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.

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}
> =====
>
> 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
> \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
> \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------------------------- 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