# Print eight A6 pages on one two-sided A4 sheet in a book folding order

What I'm trying to achieve might be a little too-much. Although I have to admit that TeX never let me down, so I thought, let's give it a spin here.

I have a document like this:

\documentclass[9pt,twoside]{article}
\usepackage[dutch]{babel}
\usepackage[a6paper]{geometry}
\begin{document}
% my document
\end{document}


That works perfectly nice and generates several A6 pages. Now, what I want is this: I want to print eight A6 pages on one A4 portrait page (i.e. four A6 pages on one A4 side).

Now, the hard part is this: when these A4 sheets are printed, I want to cut them in half. Then, I'd like to put the upper and bottom halves of the A4 sheets on top of each other and fold them vertically, so I've got myself a little A6 book.

I think the ASCII-art below helps in understanding what I'm trying to do. In the end, I'd like my printer to print this:

A4 sheet #1 - back   A4 sheet #1 - front   A4 sheet #2 - back  A4 sheet #2 - front
+--------|--------+  +--------|--------+  +--------|--------+  +--------|--------+
|        |        |  |        |        |  |        |        |  |        |        |
|        |        |  |        |        |  |        |        |  |        |        |
| page 8 | page 1 |  | page 2 | page 7 |  | page 6 | page 3 |  | page 4 | page 5 |
|        |        |  |        |        |  |        |        |  |        |        |
+--------|--------+  +--------|--------+  +--------|--------+  +--------|--------+
|        |        |  |        |        |  |        |        |  |        |        |
| page 8 | page 1 |  | page 2 | page 7 |  | page 6 | page 3 |  | page 4 | page 5 |
|        |        |  |        |        |  |        |        |  |        |        |
|        |        |  |        |        |  |        |        |  |        |        |
+--------|--------+  +--------|--------+  +--------|--------+  +--------|--------+


So in short: how can I make this work?

• Instead of cutting A4s in half, why don't you print to A5s? see tex.stackexchange.com/questions/60934/… Aug 14, 2015 at 21:14
• Possibly this answer of mine might be of some help. @JohnKormylo Although that question is ConTeXt and the OP plans to cut the pages, which makes it a bit different.
– cfr
Aug 14, 2015 at 22:02
• Off-topic but you can delete 9pt from your class options: it is having no effect and will just trigger a warning as there's no such option.
– cfr
Aug 14, 2015 at 22:03
• So you are making 2 copies? You want the top and bottom to be identical?
– cfr
Aug 15, 2015 at 2:01
• @JohnKormylo: printing A5 would be an option -- although I already bought the A4 paper in a nice color ;]. Aug 15, 2015 at 16:42

First, I use the auxiliary document from cfr to create an example 8 page A6 document:

\documentclass[a6paper,twoside]{article}
\usepackage{geometry}
\usepackage{graphicx}
\pagestyle{empty}
\begin{document}
\centering
\scalebox{30}{1}\newpage
\scalebox{30}{2}\newpage
\scalebox{30}{3}\newpage
\scalebox{30}{4}\newpage
\scalebox{30}{5}\newpage
\scalebox{30}{6}\newpage
\scalebox{30}{7}\newpage
\scalebox{30}{8}
\end{document}


After compilation, this gives a file called a6.pdf which contains 8 pages with 8 large numbers.

To assemble the pages as requested, you may use the raster library of tcolorbox. There is not much boxing of any kind here, but with a few lines of code you get your document:

\documentclass[a4paper]{article}
\usepackage[margin=0pt]{geometry}
\usepackage[skins,raster]{tcolorbox}
\pagestyle{empty}
\begin{document}
\begin{tcbraster}[raster height=\textheight,raster equal skip=0pt,blank,
graphics pages={8,1,8,1,  2,7,2,7,  6,3,6,3,  4,5,4,5}]
\tcbincludepdf{a6.pdf}% <-- The A6 document with 8 pages
\end{tcbraster}
\end{document}


The result is a A4 document with 4 pages:

The process of arranging several pages on a sheet of paper is called imposition, and it is such a common task for printing shops that there is special software to achieve this.

While I am sure that this can be achieved with LaTeX (and that someone more experienced than me will come up with a good solution soon ;-), let me suggest an alternative way. You could use a small Java programme called Multivalent.

1. You need to have Java installed on your computer.
3. Create a normal A6 pdf document with 8 pages via LaTeX and move it to the same directory.
4. Multivalent is a command line tool, so open a command line in this directory.
5. Type (everything in one long line)

java tool.pdf.Impose -paper A4 -dim 2x2 -page 8,1,8,1,2,7,2,7,6,3,6,3,4,5,4,5
nameofyoursourcedocument.pdf


For details what is happening here, have a look at the documentation of Multivalent.

6. Find the result in the same directory – a pdf file named nameofyoursourcedocument-im.pdf

7. Print the result using the »long edge« setting in the options of your printer concerning double sided printing.

Hope this helps. Unfortunately, I cannot test it myself right now. So please report back if it does not work.

Start by creating the A6 pages (which you've already done):

\documentclass[a6paper,twoside]{article}
\usepackage{geometry}
\usepackage{graphicx}
\pagestyle{empty}
\begin{document}
\centering
\scalebox{30}{1}\newpage
\scalebox{30}{2}\newpage
\scalebox{30}{3}\newpage
\scalebox{30}{4}\newpage
\scalebox{30}{5}\newpage
\scalebox{30}{6}\newpage
\scalebox{30}{7}\newpage
\scalebox{30}{8}
\end{document}


Let's say that the resulting PDF is a6.pdf.

\documentclass[a5paper,twoside]{article}
\usepackage{pdfpages,geometry}
\begin{document}
\includepdf[pages=-,nup=1x2,landscape,signature=8]{a6}
\end{document}


You are then ready to create the final version. Assuming that the A5 pages are in a5.pdf:

\documentclass[a4paper,twoside]{article}
\usepackage{pdfpages,geometry}
\begin{document}
\includepdf[pages=-,nup=1x2,landscape,doublepagestwist*,turn=false]{a5}
\end{document}


• So, we end up with two identical A6 books/booklets, isn't it? Mar 31 at 9:56

The Imposition of A6 pages over A4 size paper and folding them to get a book is explained in TUG Article please refer to https://tug.org/pracjourn/2006-3/venugopal-pocketbook/venugopal-pocketbook.pdf

Logic is as follows if you have a book.pdf of A4 size then

\documentclass[a4paper]{article}
\usepackage[final]{pdfpages}
\begin{document}
\includepdf[pages=-,nup=1x2,landscape,signature=48]{book.pdf}
\end{document}


will make it foldable by half ie A5 using A4 paper Another two iterations would make it foldable by required size.

I do not know how to put all this in a loop but this is one quick way.