Pdf shuffling in LaTeX
Pdfpages is a LaTeX package that lets you drop individual pages of other pdfs into your LaTeX documents. Put it together with the \foreach
command provided by pgf/TikZ, and you can get quite a bit done very simply.
For instance, you can scan in somebody’s photocopy of a paper from 1978 using the office printer, which emails you a pdf of the scan, and run it through this file to get a single page of the original on each page of the pdf:
\documentclass{article} \usepackage{pgffor} \usepackage{pdfpages} \begin{document} % Paper starts on a right-hand page of the original book, % we don't need the final page of the paper before it. \includepdf[pages=1, angle=90, trim={0 0 0 135mm} ]{Kamp78SemanticsVersusPragmatics.pdf} % For each double-page spread, rip out the left hand then % the right hand side. The trim was set by eye. \foreach \page in {2,...,17} { \includepdf[pages=\page, angle=90, trim={0 135mm 0 0} ]{Kamp78SemanticsVersusPragmatics.pdf} \includepdf[pages=\page, angle=90, trim={0 0 0 135mm} ]{Kamp78SemanticsVersusPragmatics.pdf} } \end{document} |
(This also gives me a chance to show off try out my new code-formatting plugin. Pretty!)