I would like to set the page size to the European A5. I wrote the following:


And process it with:

xelatex main.tex

The PDF that comes out doesn't look right. The actual printed area appears to be A5 but the size of the physical page is the US letter page.

Any ideas on what I'm doing wrong?



Use geometry:


In this way the package will not make any modification to the standard settings, and will only tell the compiler the physical page size.

A more complicated way, that requires knowing the page dimensions, but that can be useful with non standard page sizes, is to say


This works in all engines except for latex+dvips+ps2pdf.

  • Do these settings \documentclass{article}\usepackage[a4paper]{geometry} produce the same effect as your answer does? – xport Jul 13 '11 at 3:10
  • @xport: no; geometry applies its own settings. – egreg Jul 13 '11 at 7:21
  • @egreg: Without using geometry package, we can use \special{papersize=...,...} right? – xport Jul 13 '11 at 7:36
  • 1
    @xport: the \special trick works with "(la)tex+dvips" or "xe(la)tex", but not with "pdf(la)tex" or "lua(la)tex". – egreg Jul 13 '11 at 7:43
  • Without knowing the dimensions, you can set \pdfpagewidth=\paperwidth \pdfpageheight=\paperheight (tex.stackexchange.com/a/65032/1340). Setting the PDF dimensions to different values won't work well - not without updating LaTeX margins and the rest of the layout. – Blaisorblade Mar 16 '13 at 18:26

Since you are using xelatex, you can use \special{papersize=<width>,<height>} instead of using \usepackage[pass]{geometry} as follows.

\special{papersize=148mm,210mm}% it is A5 paper size, I got from Wikipedia.
Hi, I am xport !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.