[OS X TeX] pdftex paper size

Bruno Voisin bvoisin at mac.com
Thu May 18 17:34:47 CEST 2006


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.

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.

Hope this helps,

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 macostex-archives mailing list