[OS X TeX] Default paper size problem

Gerben Wierda Gerben.Wierda at rna.nl
Thu Jul 29 15:46:01 CEST 2004

> Hi,
> I'm using TexShop with an i-installer version of TeX and I can't get
> the default page size to be A4. Using 'a4paper' in the documentclass
> arguments works so this isn't a major problem but I can't work out how
> to get A4 by default. I have tried re-configuring through i-installer
> but, despite choosing 'A4', I'm still getting US Letter pdf files by
> default. The System Preferences page size is set to A4.
> If I use the terminal to use a DVI to postscript route, then I get an
> A4 postscript document. If I put the postscript through ps2pdf then I
> end up with US Letter again, even though the mediabox lines in the pdf
> suggest A4. If I use pdflatex from the terminal, I get US Letter. (see
> below for the terminal output for all this)
> It looks like US letter size is getting in via ghostscript for the
> ps2pdf - does pdftex use ghostscript or rely on a ghostscript config
> file?
> Any suggestions?

Let me try to explain this one in some detail.

First let's take the normal TeX route (TeX - dvips - ghostscript/ps2pdf)
to get from .tex to .pdf
- TeX itself is unaware of a paper size setting. When TeX is at work,
there still is no paper or output device, it produces DVI which is
device-independent. That does not mean TeX does not produces pages in a
certain size, it does. But the LaTeX classes themselves have Letter as the
default size. So you do need the option a4paper to produce a4-sized DVI.
- dvips produces PS which has a page size value. dvips takes the pages
from DVI and *places* them on the pages it creates in PS. Setting A4 in
the TeX i-Package's configuration phase sets the default PS page size for
dvips to A4.
- ghostscript/ps2pdf don't do anything with paper size, they just turn PS
into PDF and the page size of the PS document is kept.

So, if you have a LaTeX document that does not have a4paper, you end up
with something that is formatted (by TeX) for Letter and then (by dvips)
*placed* on an A4 page. Turning it into PDF does not change anything,
hence your result has the "mediabox lines in the pdf suggest A4". Think of
the TeX produced page *placed* on the standard set for dvips.

With pdfTeX, this happens in one go. pdfTeX is an hybrid, it has both
TeX's idea of a page (influenced by the a4paper option) and the PDF idea
of a page and it places the TeX result on the PDF page. Setting A4 in the
TeX i-Package's configuration phase sets the default PDF page size for
pdfTeX to A4.

In summary:
1. TeX needs to be told the format and the LaTeX classes are default US
Letter, hence you need a4paper as an option in every LaTeX document.
2. The i-Package configuration A4 setting only influences what dvips and
pdfTeX take as page size on which the TeX result is *placed* (and out of
the box the default is A4 because that is the default for TeX Live).
3. ps2pdf/ghostscript have nothing to do with the effect.

If you want another example of the effect, try using a5paper in LaTeX and
you'll see you get an A4 sized PDF file with an A5 sized TeX-formatted
page placed on it.

--------------------- 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