You are here: Foswiki>Computing Web>LaTeX (16 Oct 2009, TomRockwell)EditAttach


Letter and A4 paper

Europe and the US use different paper sizes. A lot of the Latex software and other open source document processing software is packaged in Europe and defaults to A4 paper. Often times when processing a Latex file on a new machine, the margins are messed up. If the bottom margin has moved by about 1" the problem is surely related to an A4 vs. letter paper switch. It is not unusual to find a document that has margin definitions that are setup to compensate for a mismatch of A4 processing and letter paper printing.

Looking at the top of a postscript file, you see a line like this for letter paper:

%%BoundingBox: 0 0 612 792

for A4 documents, the bounding box is:

%%BoundingBox: 0 0 596 842

Dividing by the unit of measurement in Postscript (72 per inch) we see that letter paper is 8.5x11" and A4 is 8.28x11.69".

For the dvips package, the default layout is specified in the file located at /usr/share/texmf/dvips/config/ in the widely used texmf package on Linux.

You can manually specify letter pager to dvips with the -t letter switch:

$ dvips -t letter

In, simply move the letterSize statement for 8.5 x 11 ahead of the A4 statements, so it looks like:

@ letterSize 8.5in 11in
@+ ! %%DocumentPaperSizes: Letter

@ A4size 594.99bp 841.99bp
@+ ! %%DocumentPaperSizes: a4
@+ %%PaperSize: A4

@ letter 8.5in 11in
@+ ! %%DocumentPaperSizes: Letter
@+ %%BeginPaperSize: Letter
@+ letter
@+ %%EndPaperSize

I also comment out the printer output statement so it is no longer the default:

%o |lpr

-- TomRockwell - 26 Sep 2006
Topic attachments
I Attachment Action Size Date Who Comment
config.psps manage 3.5 K 26 Sep 2006 - 03:20 TomRockwell Dvips config file for letter paper manage 3.5 K 26 Sep 2006 - 03:22 TomRockwell Dvips config file for letter paper
Topic revision: r5 - 16 Oct 2009, TomRockwell

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback