[Tex/LaTex] Printing a double-sided A5 document on A4 paper

double-sidedpdfpagesprinting

I have a doubled-sided A5 landscape document with the following page order:

page order: page 1 front, page 1 back, page 2 front, page 2 back, page 3 front, page 3 back, ...

As my printer supports only A4 paper, I want to print two of these pages on one portrait A4 paper so that I can cut it in half to get sheets of the original size. In other words, what I need is the following page layout:

desired result

(The line separating the two pages is for demonstration purposes only, it is not part of the final result.)

How can I achieve this layout with pdfpages?


The "naive" approach

\documentclass[a4paper]{article}
\usepackage{pdfpages}
\begin{document}
    \includepdf[pages=-,nup=1x2]{a5-document}
\end{document}

yields

naive approach

so the front and back side of each page are one the same side of the paper, instead of appearing on opposite faces.


At the moment, I'm using the following manual solution, which is quite tedious and error-prone, especially for large documents:

\documentclass[a4paper]{article}
\usepackage{pdfpages}
\begin{document}
    \includepdf[pages={1,3,2,4,5,7,6,8,...},nup=1x2]{a5-document}
\end{document}

Best Answer

Here is a way how to do this in ConTeXt:

\setuppagenumbering [location=]

\setuppapersize [A5, landscape] [A4]
\setuparranging [2TOPSIDE]

\starttext
    \dorecurse{8}{%
        \centerline{\definedfont[Serif at 256pt]\recurselevel}\page}
\stoptext

The result looks like this:

result

The \setuppapersize command states, that you want to write an A5 landscape document that should be printed on an A4 paper. \setuparranging is used to arrange the pages in the way you wish. Many more schemes are possible.