0

I am trying to include A3 pages in an A4 LaTeX document (following this answer) but get the following when I run pdflatex:

Chapter 1.
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2]
! Undefined control sequence.
\AP@ ->{ \clearpage \KOMAoptions 
                             {paper=a3,paper=landscape} \recalctypearea ...
l.27 \end{document}

?

SSCCE below:

\documentclass[11pt,twoside,a4paper,pagesize]{report}
\usepackage{pslatex,palatino,avant,graphicx,color,nextpage,afterpage,comment}
\usepackage[margin=2cm]{geometry}
\usepackage[absolute]{textpos}
\usepackage[hyphens]{url}
\PassOptionsToPackage{hyphens}{url}

\begin{document}
\chapter{Introduction}
foo
\clearpage
bar

\afterpage{ % Insert after the current page
\clearpage
\KOMAoptions{paper=a3,paper=landscape}
\recalctypearea
A3 stuff goes here ...
\clearpage
\KOMAoptions{paper=A4,pagesize}
\recalctypearea
}


\end{document}

I understand that "undefined control sequence" means I've forgotten to use some package on my document preamble. However it is not clear to me what's wrong in this case.

1 Answers1

1

The preamble of LaTeX files usually starts with \documentclass. You use the documentclass report, which is included in LaTeX. The KOMA-script bundle offers its own documentclasses: scrartcl instead of article, screprt instead of report and scrbook instead of book.

So please switch from report to screprt for using KOMA-script commands. You don't need to load typearea, if you do this. In case you just need some features of KOMAscript, have a look at the package scrextend.

I did not test your example regarding the size of the included page. But it is a bad idea to mix geometry and typearea. Choose one of them and stick to it.

Keks Dose
  • 30,892