13

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?

2 Answers 2

19

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}
2
  • Is there a way to set up the margin size in KOMA script, i.e. if I need the following margin sizes top=2.5cm,bottom=2.5cm,left=2cm,right=2cm ? I use to divide the paper surface with typearea, but I don't know if I can replace it.
    – Aradnix
    Commented Jul 7, 2016 at 0:59
  • @Aradnix: This would be another question (and answer would be: use geometry). Commented Mar 7, 2017 at 10:26
3

Since KOMA-Script 3.17 option pagesize=auto is default. So the original example:

\documentclass[a5paper]{scrbook}

\usepackage{lipsum}

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

already produces A5 sized pages.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .