[OS X TeX] pdftex paper size
André Bellaïche
abellaic at math.jussieu.fr
Thu May 18 19:37:19 CEST 2006
Dear Bruno, dear Franck [Pastor],
You both were right. But see at the end of this message.
Le 18 mai 06 à 17:34, Bruno Voisin a écrit :
> Le 18 mai 06 à 16:26, André Bellaïche a écrit :
>
>> I am using tetex + TeXShop, and I have selected the a4 option when
>> installing the TeX i-package (expert installation). I didn't
>> notice until now, but I have got PDF files of size 200,1 x 284,7
>> mm, or 205,0 x 265,3 mm, or 194 x 251,2 mm, and no a4.
>>
>> I didn't use the geometry package, nor am I willing to use it for
>> the present purpose. I only want to have a4 as a default.
>
> What does "kpsewhich pdftexconfig.tex" returns? The default I guess
> is:
>
> $ kpsewhich pdftexconfig.tex
> /usr/local/teTeX/share/texmf.gwtex/tex/generic/config/pdftexconfig.tex
>
> and the file so found should contain, for A4 paper:
>
> \pdfpagewidth=210 true mm
> \pdfpageheight=297 true mm
>
> If it doesn't, then that's probably the cause of your problem.
pdftexconfig.tex is OK
>
> These parameters are different from LaTeX's \paperwidth and
> \paperheight: they are specific to pdfTeX and relate to the
> "physical" sheet of paper (or screen) pdfTeX ships out to, whereas
> \paperwidth and \paperheight relate to the logical page size TeX
> considers when breaking text into lines and pages. For those
> knowledgeable in the PDF format, I think \pdfpagewidth etc. refer
> to something called the MediaBox.
>
> Another issue arises if you're using plain TeX: in that case, \mag
> and \magnification interact in unexpected ways with the definition
> inside pdftexconfig.tex (the "true" in "true mm" above isn't taken
> into account when creating the pdftex format, apparently). In case
> you altered \mag, then it's safer to re-read pdftexconfig.tex
> afterwards to redefine \pdfpagewidth etc. as dimensions in true
> units, not affected by \mag, e.g.
>
> \mag=\magstepone
> \input pdftexconfig
>
> If you look, for example, at the definition of \magnification in /
> usr/local/teTeX/share/texmf.tetex/tex/plain/base/plain.tex, you'll
> see that Knuth redefines \hsize and \vsize (to their US Letter
> paper defaults) after setting the \mag:
>
> \def\magnification{\afterassignment\m at g\count@}
> \def\m at g{\mag\count@
> \hsize6.5truein\vsize8.9truein\dimen\footins8truein}
>
> So the same should go for A4 paper, and in pdfTeX one should add
> the redefinition of \pdfpagewidth and \pdfpageheight as well.
So, you were right, \mag (or should I say pdftex ?) puts everything
into a mess. Similar problems arise when using the geometry package
(they are partially acknowledged in the doc of this package).
But this is not the end of the story. Because suppressing every use
of magnification did not cure the disease. Some packages may put some
mess also.
I have made some trials :
==1==
\documentclass{book}
\usepackage{color}
\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
Imprimer... (cmd-P)
Document : 215,9 x 279,4 mm
Papier : 209,9 x 297,0 mm
==2==
\documentclass[a4paper]{book}
\usepackage{color}
\begin{document}
Essai
\end{document}
=====,
==3==
\documentclass{book}
%%%%%\usepackage{color}
\begin{document}
Essai
\end{document}
===== and
==4==
\documentclass{book}
\usepackage{color}
\input pdftexconfig
\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
Imprimer... (cmd-P)
Document : 209,9 x 296,7 mm
Papier : 209,9 x 297,0 mm
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 ?
Software used : This is pdfeTeX, Version 3.141592-1.30.4-2.2 (Web2C
7.5.5) (format=pdflatex 2006.5.18)
Thank you both for your help,
André
------------------------- 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 macostex-archives
mailing list