Salta al contenuto principale


Printing a 2965 lines text file


Let us image I have a reason to print a text file that is 2965 lines long, is encoded in utf-8 (so a2ps and enscript don't work) and I don't want to destroy a whole forest for it.

I've started by using xelatex to get a nicely typeset A5 page with my file in a monospaced font: partecipants.tex

\documentclass[a5paper]{article}
\usepackage{fontspec}
\usepackage[left=1cm,right=1cm,top=0.8cm,bottom=1cm,foot=0.2cm]{geometry}
\usepackage{listings}

\lstset{ %
  basicstyle=\ttfamily\scriptsize,
  frame=none,
  keepspaces=true,
}

\begin{document}
\lstinputlisting{ksp-dc15.txt}
\end{document}


This gets compiled into partecipants.pdf with

$ xelatex partecipants.tex


And resulted in 44 pages, 4 less than the 48 needed by a2ps, and printable on just 11 A4 sheets.

I wanted it to be easily manageable while walking around, taking notes into it while standing, so I decided to arrange it in booklet form:

$ pdfbook partecipants.pdf


The result, partecipants-book.pdf was printed (two sided, of course) folded and stitched in the middle.

I could have arranged it into signatures, but this would have required an additional sheet to bring the number of pages to a multiple of 16.

I know that there are electronic alternatives around, and I've also considered just carrying around the file and adding notes (to a copy?) with vim, but I'd trust a paper copy more.
blog (x)

Questo sito utilizza cookie per riconosce gli utenti loggati e quelli che tornano a visitare. Proseguendo la navigazione su questo sito, accetti l'utilizzo di questi cookie.