# “Foldable” “Booklet” like Toodledo's one (pocketmod)

How to achieve in pdfLaTeX foldable booklets similar to those provided by Toodledo ?

(to make question usable to others LuaTex, ConTeX and other systems answers are highly welcome)

Note: look, how many pages can fit on one paper sheet.

-
Please retag question appropriately – Grzegorz Wierzowiecki Feb 24 '12 at 10:28
This is also called a 'pocketmod' – Uwe Ziegenhagen Feb 24 '12 at 17:13
leaflet is not exactly what you want, is it? – Speravir Feb 24 '12 at 23:19
– Speravir Feb 24 '12 at 23:26

this topic was addressed in a "glisterings" article in tugboat by peter wilson (31:3, 2010, pp.177-183). the layout shown in the original posting appears as figure 5 in the "glisterings" article; there are many others as well.

-

To make a booklet (8, 16, 32 pages), I use pdfpages. I use the following 3 steps:

1. I create an ordinary 8 pages PDF.

2. I use the following document as a first-pass (adapt for your type of composition):

\documentclass[letterpaper]{article}
\usepackage[pdftex]{color,graphicx,epsfig}
\usepackage[final]{pdfpages}
\begin{document}
\includepdf[pages=4]{LivretHuit}
\includepdf[pages=5]{LivretHuit}
\includepdf[pages=8]{LivretHuit}
\includepdf[pages=1]{LivretHuit}
\includepdf[pages=3, angle=180]{LivretHuit}
\includepdf[pages=6, angle=180]{LivretHuit}
\includepdf[pages=7, angle=180]{LivretHuit}
\includepdf[pages=2, angle=180]{LivretHuit}
\end{document}

3. I use the following (second) file for the second-pass.

\documentclass[letterpaper]{article}
\usepackage[pdftex]{color,graphicx,epsfig}
\usepackage[final]{pdfpages}
\begin{document}
\includepdf[pages=-, nup=2x4, landscape, delta=0.75in 0, frame=false]{LivretHuitA}
\end{document}


I have made version for 16 and 32 pages and for others compositions. I have made a little VBScript to automatise the operation.

My students like the little booklet quite a lot. Enjoy!

-

A while ago I created my pocketmod with pgfpages (see http://uweziegenhagen.de/?p=909). This has the advantage to require only one LaTeX-run.

\documentclass[21pt]{scrartcl}
\usepackage[]{forloop}
\usepackage[]{blindtext}
\setlength{\parindent}{0pt}
\usepackage[]{lmodern}
\newcounter{ct}
\usepackage{pgfpages}

\edef\pgfpageoptionheight{\the\paperwidth} % landscaped by default
\edef\pgfpageoptionwidth{\the\paperheight}
\def\pgfpageoptionborder{0pt}
\def\pgfpageoptionfirstshipout{1}

\pgfpagesphysicalpageoptions
{%
logical pages=8,%
physical height=\pgfpageoptionheight,%
physical width=\pgfpageoptionwidth,%
current logical shipout=\pgfpageoptionfirstshipout%
}

\pgfpageslogicalpageoptions{1}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
border code=\pgfusepath{stroke},%
resized height=0.5\pgfphysicalheight,%
center=\pgfpoint{.875\pgfphysicalwidth}{.75\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{2}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
border code=\pgfusepath{stroke},%
rotation=180,%
resized height=0.5\pgfphysicalheight,%
center=\pgfpoint{.875\pgfphysicalwidth}{.25\pgfphysicalheight}%
}%

\pgfpageslogicalpageoptions{3}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
border code=\pgfusepath{stroke},%
rotation=180,%
resized height=0.5\pgfphysicalheight,%
center=\pgfpoint{.625\pgfphysicalwidth}{.25\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{4}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
border code=\pgfusepath{stroke},%
rotation=180,%
resized height=0.5\pgfphysicalheight,%
center=\pgfpoint{.375\pgfphysicalwidth}{.25\pgfphysicalheight}%
}%

\pgfpageslogicalpageoptions{5}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
border code=\pgfusepath{stroke},%
rotation=180,%
resized height=0.5\pgfphysicalheight,%
center=\pgfpoint{.125\pgfphysicalwidth}{.25\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{6}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
border code=\pgfusepath{stroke},%
resized height=0.5\pgfphysicalheight,%
center=\pgfpoint{.125\pgfphysicalwidth}{.75\pgfphysicalheight}%
}%

\pgfpageslogicalpageoptions{7}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
border code=\pgfusepath{stroke},%
resized height=0.5\pgfphysicalheight,%
center=\pgfpoint{.375\pgfphysicalwidth}{.75\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{8}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
border code=\pgfusepath{stroke},%
resized height=0.5\pgfphysicalheight,%
center=\pgfpoint{.625\pgfphysicalwidth}{.75\pgfphysicalheight}%
}%

\begin{document}

\forloop{ct}{1}{\value{ct} < 9}{%
\blindtext
\clearpage

}
\end{document}


Be aware that the pgfpages.styI had at that time was buggy.

% original code, not working
%\expandafter\ifx\csname pgfpages@p@\the\pgf@cpn @rotation\endcsname\relax%
% \pgfscope%
%\else%
% \pgflowlevel{\pgftransformrotate{\csname pgfpages@p@\the\pgf@cpn @rotation\endcsname}}%
%\fi%

\pgfscope% I used this change to make it work
\expandafter\ifx\csname pgfpages@p@\the\pgf@cpn @rotation\endcsname\relax%
\else%
\pgflowlevel{\pgftransformrotate{\csname pgfpages@p@\the\pgf@cpn @rotation\endcsname}}%
\fi%

-

I would like to present a ConTeXt solution. It makes use of the built-in Imposition capabilities.

To create a pocketmod layout you need to add the following two lines to your setup area:

\setuppapersize [A7] [A4]
\setuparranging [1*8, rotated]


That's all. Here a complete example:

% these two lines do the whole magic
\setuppapersize [A7] [A4]
\setuparranging [1*8, rotated]

% the following lines are just added to create
% a more pleasant looking screen shot
\setuppagenumbering [location=]
\setupbackgrounds   [page] [background=color, backgroundcolor=gray]
\setupbodyfont      [sans, 58pt]
\setuplayout        [page]
\showframe

\starttext
% let's generate some pages
\dorecurse{8}
{\null\vfill\centerline\recurselevel\vfill\null\page}
\stoptext


The result:

The \setuppapersize command instructs ConTeXt to print pages of the size A7 on an A4 paper and \setuparranging sets up the desired imposition scheme (how the individual pages are placed on the paper). More examples can be found in the chapter about page design in the manual.

Note: I put the fold at the bottom of the page, not at the top, like shown in your illustration. If you really want the fold at the top, you need to create a custom imposition scheme, which is not hard:

\installpagearrangement pocketmod
{\dosetuparrangement{4}{2}{8}{5}{3}
\pusharrangedpagePOCKETMOD\poparrangedpagesTWO\relax}

\def\pusharrangedpagePOCKETMOD#1%
\reportarrangedpage\arrangedpageN
\ifcase\arrangedpageN
\or \handlearrangedpageXandY{#1}100\arrangedpageA
\or \handlearrangedpageXandY{#1}001\arrangedpageA
\or \handlearrangedpageXandY{#1}011\arrangedpageA
\or \handlearrangedpageXandY{#1}021\arrangedpageA
\or \handlearrangedpageXandY{#1}031\arrangedpageA
\or \handlearrangedpageXandY{#1}130\arrangedpageA
\or \handlearrangedpageXandY{#1}120\arrangedpageA
\or \handlearrangedpageXandY{#1}110\arrangedpageA
\poparrangedpages
\fi}


Replace \setuparranging[1*8, rotated] with \setuparranging[pocketmod, rotated] and the imposition is exactly as in the illustration with the fold at the top.

-

Does the booklet package suit your needs?

-
"they can be printed as four pages per physical sheet of paper, two pages per side." does not sound like presented 8 pages per side. – Grzegorz Wierzowiecki Feb 24 '12 at 10:54