# Making an oddly shaped booklet with pdfpages. Unsuccess

Hello [typesetting] world. I've enjoyed using pdfpages to make booklets from A4 paper wherein each page is an A6 size. Recently, however, I've tried, without success, to make booklets from A4 paper wherein each page would be 297mm by 105mm. This is for each individual page that would like to be in the booklet :

\documentclass[17pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{extsizes}
%extsizes allows 8pt, 9pt, 10pt, 11pt, 12pt, 14pt, 17pt, 20pt.
\usepackage[paperwidth=297mm, paperheight=105mm, margin=1cm]{geometry}
\pagenumbering{gobble}

\begin{document}

\newpage
This is the first page

\newpage
This is the second page

\newpage
Third

\newpage
Fourth

\newpage
Fifth

\newpage
Sixth

\newpage
Seventh

\newpage
Eighth  Last page

\end{document}


This is to assemble the pages :

\documentclass[]{article}
\usepackage[a4paper, landscape, margin=0cm]{geometry}
\usepackage{pdfpages}

\begin{document}
\includepdf[pages=-, nup=1x2, landscape, angle=270, signature=8]{[inputfile]}
\end{document}


It doesn't work. What I would like is for the above pages to be assembled in such as way as to make a very long booklet wherein the text would be rotated 90° to the left. I'm attaching an (awfully made) drawing that may help explain what I have in mind.

Would anyone know how to do this? I tried changing the nup parameter, but this didn't help anything...

type(up)settingly yours,

uio

PS - I think that Symbol 1's solution works (I have yet to print it). How do I indicate this? Thanks Symbol 1 and everyone else! I'm quite impressed by this fine little forum.

• Do you mind extending your explanation on what exactly it is you want? I do not quite understand it – daleif Dec 28 '16 at 14:31
• By signature the layout is hard-coded and nup does not work. You have to somehow hack into the source code. – Symbol 1 Dec 29 '16 at 1:02
• It looks like you've got two separate accounts, which means you cannot edit your original post or leave comments. The Stack Exchange staff can merge them together for you. – CarLaTeX Dec 29 '16 at 12:03

Replace the second document by the following:

\documentclass{article}
\usepackage[a4paper,landscape,margin=0cm]{geometry}
\usepackage{pdfpages}

\begin{document}
\makeatletter
\def\AM@xnup{\@ne}\def\AM@ynup{\tw@}
}
\includepdf[pages=-,signature=8]{346036.pdf}
\end{document}


# Explanation

Initially at the end of \AM@prepare@signature, the nup is reset by a if-clause

  \ifdim\AM@pagewidth<\AM@pageheight
\def\AM@xnup{\@ne}\def\AM@ynup{\tw@}%
\else
\def\AM@xnup{\tw@}\def\AM@ynup{\@ne}%
\fi


so the 2 is always assigned to 297-side, while you want 2 on 210-side.