Tell me more ×
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.

Maybe I am just too tired, but I simply can't explain what is going on.

The file

\documentclass[a5paper]{scrbook}

\usepackage{lipsum}

\begin{document}
\lipsum
\end{document}

produces A4 sized pdf pages (when run with pdflatex) with text only in the upper left corner, while

\documentclass[a5paper]{scrbook}

\usepackage{tikz}
\usepackage{lipsum}

\begin{document}
\lipsum
\end{document}

produces the proper A5 pages. Why is that?

share|improve this question

1 Answer

up vote 14 down vote accepted

Use the option pagesize:

\documentclass[paper=a5,pagesize]{scrbook}

You may specify pagesize=pdftex or set it to dvips or auto. This option takes care of setting either pdf lengths or putting \special commands into the dvi file, see the manual.

Even without, in such cases (other classes for instance ) you don't need TikZ.

\usepackage{geometry}

takes care of the correct paper size, as well as \usepackage{hyperref}. Apparently the pdf paper size has not been correctly set (or use the default of the distribution) but geometry and hyperref fix that.

Alternatively, without any option or package this would fix it for pdfLaTeX:

\setlength{\pdfpagewidth}{\paperwidth}
\setlength{\pdfpageheight}{\paperheight}
share|improve this answer
Weird that koma doesn't do this automatically like memoir and geometry (and tikz!) all do. – Will Robertson Nov 24 '10 at 10:03
@Will: koma can do it automatically, but the user has to activate this feature (pagesize or pagesize=auto). I'm sure this option is not set by default because of backwards compatibility. Notes of the author, unfortunately in German: komascript.de/node/1268#comment-3259 links to komascript.de/faq-voreinstellung . – Stefan Kottwitz Nov 24 '10 at 14:08
@Stefan: you mean koma does it automatically if the feature is manually activated by the user? :) I'm certainly sympathetic to the backwards compatibility problem, however—I was just surprised to learn this. – Will Robertson Nov 24 '10 at 14:18
@Will: I was too. The KOMA manual section where paper=X is explained doesn't mention pagesize at all. – Caramdir Nov 24 '10 at 18:24
@Caramdir: In the KOMA manual version 2010-01-05 I see paper=X explained in 2.6. Paper Format Selection, immediately followed by the pagesize option within the same section. Perhaps you've got an older version of the manual? – Stefan Kottwitz Nov 25 '10 at 1:12
show 1 more 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.