Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

i am trying to use xelatex from the mactex 2012 package to build a paper at DIN A4 paper size. using any of the following commands does not do the trick, it keeps set at 21,59 × 27,94 cm which is us-letter format i guess. those are the commands i found by researching on the internet to change the paper size:

\documentclass[paper=a4]{report}

throws the error LaTeX Warning: Unused global option(s): [paper=a4]. same thing using just [a4]

\documentclass[a4paper]{report}

does not throw the error, but its not changing the paper size either. it simply does nothing. so my question is: how do i set the paper size to A4 = 21 × 29,7 cm correctly?

share|improve this question
4  
Welcome to TeX.SX! The correct option has always been a4paper; only the KoMa-Script classes (scrartcl, scrrprt and scrbook) accept paper=a4. –  egreg Jul 28 '12 at 8:28
    
You can use Tex Live Utility and in the menu Configure, you select Change Paper Size then for Paper size for all TeX programs you choice : A4. If you have a problem with a4paper and the class report, perhaps you can test with \usepackage[a4paper]{geometry}. –  Alain Matthes Jul 28 '12 at 8:43
    
thanks for the reply. since i was having other problems with that paper, too, i now switched from texworks to this latex-makefile at code.google.com/p/latex-makefile to build it. now that i am using that, the paper size is correctly set to 21×29,7 by using a4paper. this entire latex thing is way too much magic to me... ;) –  mcnesium Jul 28 '12 at 11:02
add comment

1 Answer

up vote 6 down vote accepted

To set the paper with for LaTeX use the option "a4paper" or "a5paper". But this option only set an internal LaTeX length. To change also the size of "pdf background" you must issue some special commands. Which ones depends on the engine. If you load a package like hyperref, geometry, graphics they will do the work for you. Without such a package you can use with xelatex this:

\documentclass[a5paper]{report}
\pdfpagewidth=\paperwidth
\pdfpageheight=\paperheight
\begin{document}
blub

\end{document}

(I'm using a5 paper to avoid that some default paper settings hide the effect.)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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