# a5paper setting not taking effect

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

\documentclass[a5paper]{article}
\usepackage{fontspec}
\begin{document}
...


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?

Thanks

-

Use geometry:

\usepackage[pass]{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

\pdfpageheight=210mm
\pdfpagewidth=148mm


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

-
Perfect, thanks a lot! –  Honza Pokorny Jul 13 '11 at 0:23
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
@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

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

\documentclass[a5paper]{article}
\special{papersize=148mm,210mm}% it is A5 paper size, I got from Wikipedia.
\usepackage{fontspec}
\begin{document}
Hi, I am xport !
\end{document}

-