I'm trying to make a booklet in A7 size but my printer only work with A4 so I need to make a pdf that look more or less like this:
Sheet 1 (Front)
+—–+—–+—–+—–+
|–40–|–1–|–38–|–3–|
+—–+—–+—–+—–+
|–36–|–5–|–34–|–7–|
+—–+—–+—–+—–+
Sheet 1 (Back)
+—–+—–+—–+—–+
|–39–|–2–|–37–|–4–|
+—–+—–+—–+—–+
|–35–|–6–|–33–|–8–|
+—–+—–+—–+—–+
Where the numbers represent the number of the page and the number of pages is 40.
The question is what commands I have to use to make it a reality.
Sorry for my poor english
Best Answer
This does not order the pages automatically, but it does seem to work.
Here's an A7 document with 40 pages. Call the result
a7-40.pdf
.Now use
pdfpages
to create the A4 pages:EDIT EDIT
Note that EDIT follows EDIT EDIT, which is logical but non-chronological.
To answer a query in comments, here is one way to add horizontal and vertical rules to divide the page evenly into quarters.
EDIT
To make this more convenient, it would be nice to have TeX figure out the page order and automatically add blank pages, if necessary, to produce a complete signature.
This solution uses expl3 and a little help from egreg to achieve just this.
will include the first
<no. of pages>
from<pdf filename>
, arranging them in the appropriate order and applying<other pdfpages options>
.Complete code with examples:
This produces 4 booklets:
EDIT EDIT EDIT
Here's a (mostly) expl3 version with dividing lines: