We want the dance cards to be double-sided. That gives the following cases. Cards with
- 1 page:
- Layout first page on front.
- Empty on back
- 2 pages:
- Layout first page on front
- Second on back
- 3 pages:
- Layout first page on front of first card,
- second page on front of second card,
- third page on back of first card.
- empty on back of second card.
- ...
Generic:
- a dance with n pages needs to be layouted on
ceil(n/2)
cards. - Given that there a
ceil(n/2)
cards. The target sides are- front 1
- front ...
- front n
- back 1
- back ...
- back n
- Compile single-pdfs
- Get page numbers from single pdfs
- Concat page numbers to whole document page numbers
(we need to have all pages in one document since pdfpages (latex package for nupping) only supports a single source document) - Arrange the dances according to page count
- write the tex file
- compile tex file