.TL Creating Booklets .AU tropf .AB short guide to create A5 booklets with a regular (duplex) printer .AE .DA . .NH 1 Writing a Booklet .PP You can safely skip this section if you don't care and just want a booklet version of an already created document. The point of this is to create a PDF suited for an A5 booklet, as most documents you find in the wild are not. . .NH 2 Properties of your created file .PP For a nice booklet you want your file to have the following properties: .ULS .LI well supported format (PDF) .LI page is half the size of your printer size (e.g. if printing A4 you want your PDF pages to be A5) .LI even pages will be on left, odd ones on the right; I regularly use: cover, content 1, content 2, blank, preface, blank, first chapter... .ULE . .PP Use some form of typesetting software for this. I usually use groff with mom (see next section), Latex should also work. If you don't like yourself you could also use Libre Office Writer or MS Word. . .NH 2 Using Mom .PP If you want to use groff to write booklets (or even whole books), I can recommend mom. Using the .URL "http://www.schaffter.ca/mom/momdoc/toc.html" "mom doc" I regularly use this preset: .CBT .PAPER A5 . .TITLE "title" .SUBTITLE "subtitle" .AUTHOR "author" .MISC "Org 1" "Org 2" .COPYRIGHT "CC BY 4.0" .AUTO_RELOCATE_TOC . .DOCTYPE DEFAULT .PRINTSTYLE TYPESET .ATTRIBUTE_STRING "" .FINIS_STRING "" .FINIS_NO_DASHES .TOC_HEADER_STRING "Table Of Contents" .CHAPTER_STRING "Part" .COVER TITLE AUTHOR COPYRIGHT COVERTEXT MISC PDF_OUTLINE_LABEL "Cover: " .PAGENUM_POS BOTTOM RIGHT .PAGENUM_HYPHENS NO .RECTO_VERSO .FORCE_RECTO . .FAMILY A .FT R .PT_SIZE 10 .\e\[dq]SMARTQUOTES DE .START . .PP Preface text here . .EL .COLLATE .DOCTYPE CHAPTER .CHAPTER 1 .CHAPTER_TITLE "Getting Started" .PREFIX_CHAPTER_NUMBER .START . .HEADING 1 "Setup" .PP Chapter content . .FINIS .nr WAS_EVEN 0 .nr WAS_ODD 0 .if e .nr WAS_EVEN 1 .if o .nr WAS_ODD 1 .TOC_PAGE_SETTINGS \e!.if o .PAGENUM_POS BOTTOM LEFT .TOC_PAGE_SETTINGS END .TOC .HEADERS NO .if e .if \en[WAS_EVEN] .bp .if o .if \en[WAS_ODD] .bp .PAGINATE NO .FOOTERS NO ~CET . .PP To build a PDF file from that pipe it through . .CB preconv -eutf8 | pdfmom -Tpdf -c -R -p -t -mden -mom -m www .CE . .NH 1 Creating the printable version .NH 2 Compressing the pdf .PP When printing the booklet, you will send the entire PDF file to the printer. It makes sense to make the sent data as small as possible. To do that, we'll reencode the PDF file using ghostscript\[em]hoping that the ghostscript encoder is smarter (and more compatible) than the previous pdf encoder. .PP Execute on the terminal (this might take a short while): .CB gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -DBATCH -sOutputFile=doc-reencoded.pdf doc.pdf .CE . .NH 2 Formatting as a book .PP Now format the file as a book. By default the pages will be rearranged (margins added, resized etc.) such that the result is printable. But a good typesetting software has already done that for you, so if used a typesetting software to create an A5 PDF add .CW "-n" "." . .CB pdfbook2 -p a4paper -n doc-reencoded.pdf .CE . .PP This will create a file named .CW "doc-reencoded-book.pdf" "." The output file name can't be changed. . .NH 1 Printing .PP Print the resulting document .CW "doc-reencoded-book.pdf" using a double-sided printer, turning the page on the long edge. . When using a non-double-sided printer you are on your own. Good luck! . .PP Afterwards take the stack of paper out of the printer, just add staples (no reordering of pages etc.) and fold it. . .NH 1 See also .PP .ULS .LI .B "pdfbook2" "(1):" program to generate printable pdfs for booklets . .LI .B "gs" "(1):" powerful pdf tool (actually more library than binary) . .LI .URL "http://www.schaffter.ca/mom/momdoc/toc.html" "mom documentation" ":" groff macroset for typesetting . .ULE