I am far from expert and I am hoping that somebody will have a better answer. However, I have spent quite some time on this problem and, as far as I can tell, the use of geometry
just does not agree with the use of booklet
no matter what. I know the documentation explains how to work around this using noprint
and then print
with \nofiles
but it has never worked for me. I therefore cannot answer your question since I have no idea how to do this 'properly' if that means 'in a way which both works and uses the method in booklet
's documentation.
In fact, I can't even answer it if you mean 'in a way which uses booklet
'. I used to have a solution which did that but unfortunately it broke some time ago and things don't seem to have changed since. In case it is useful, I'll explain that solution before explaining what I have found works now. This solution, unfortunately, dispenses with booklet
altogether. But it does work.
Solution 1: Use booklet
without geometry
Currently broken - used to work
The way I did this was to initially load geometry
with the verbose
option and then retrieve the settings it used from the output when I compiled. (These should also be in the log I expect.) I then took geometry
out and set the dimensions manually. Then booklet
worked fine.
Running your code, for example, the output from geometry
you would be looking for would be:
*geometry* verbose mode - [ preamble ] result:
* driver: pdftex
* paper: a5paper
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* modes:
* h-part:(L,W,R)=(63.16576pt, 294.76926pt, 63.16577pt)
* v-part:(T,H,B)=(71.70166pt, 418.25368pt, 107.55254pt)
* \paperwidth=421.10078pt
* \paperheight=597.50787pt
* \textwidth=294.76926pt
* \textheight=418.25368pt
* \oddsidemargin=-9.10423pt
* \evensidemargin=-9.10423pt
* \topmargin=-37.56833pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=12.0pt
* \footskip=30.0pt
* \marginparwidth=44.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.8pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
I would then explicitly define the relevant dimensions, dispense with geometry
, add a5paper
to the class options and proceed. However, this no longer seems to work and last time I needed to do this I could not make it work no matter what. (Right now, the compilation just seems to ignore the paper size settings. So I think you could do it on A4 and then have booklet
scale the pages but I haven't tried. I gave up on booklet
.)
Solution 2: Use pdfpages
- avoid booklet
This solution is dead simple. The only downside is that you need a second file. All you do is prepare your initial file on A5 paper, ignoring for now the fact that you plan to make a booklet:
\documentclass[12pt]{article}
\usepackage[a5paper,verbose]{geometry}
\usepackage{lipsum} % this package is for creating filler text
\author{N.~N}
\title{The booklet}
\begin{document}
\maketitle
\tableofcontents
\section{Europe}
\subsection{Berlin}
\lipsum[4]
\subsection{Paris}
\lipsum[1-3]
\subsection{Vienna}
\lipsum[10]
\subsection{Rome}
\lipsum[15]
\section{Africa}
\lipsum[1-4]
\subsection{Accra}
\lipsum[5-8]
\subsection{Johannesburg}
\lipsum[9-11]
\subsection{Casablanca}
\lipsum[11-12]
\lipsum[5-6]
\section{Asia}
\lipsum[1-4]
\subsection{Tokyo}
\lipsum[5-8]
\subsection{Beijing}
\lipsum[9-11]
\subsection{Mumbai}
\lipsum[11-12]
\lipsum[5-6]
\end{document}
Let's say that the pdf produced is prebooklet.pdf
. Then you just need this:
\documentclass[12pt]{article}
\usepackage[a4paper]{geometry}
\usepackage{pdfpages}
\includepdfset{pages=-}
\author{N.~N}
\title{The booklet}
\begin{document}
\includepdf[pages=-,nup=1x2,landscape]{prebooklet.pdf}
\end{document}
This works perfectly with no trouble at all:

The only problem is the pages are not arranged correctly for printing the booklet. But this is easily fixed: just add the signature
option:
\documentclass[12pt]{article}
\usepackage[a4paper]{geometry}
\usepackage{pdfpages}
\includepdfset{pages=-}
\author{N.~N}
\title{The booklet}
\begin{document}
\includepdf[pages=-,nup=1x2,landscape,signature=20]{prebooklet.pdf}
\end{document}
produces, for example:

I used 20 since you presumably want some multiple of 4 and have 17 actual pages of text.