Graphics, Figures & Tables ⇒ PDF Pages Alternating
PDF Pages Alternating
I'm looking to do something a little tricky using the pdfpages package. I have two pdfs and I'm trying to combine them alternately (e.g, make a new pdf using p1-doc1, p1-doc2, p2-doc1,p2-doc2, p3-doc1,p3-doc2,etc.). Is there a trick for this, or perhaps a different package?
Thanks,
YP
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
PDF Pages Alternating
You could, however, make use of whiledo from if the ifthen package to loop through all the page numbers, e.g.:
Code: Select all
\documentclass{article}
\usepackage{ifthen}
\usepackage{pdfpages}
\begin{document}
\newcounter{incpages}%
\setcounter{incpages}{0}%
\whiledo{\theincpages < 9}%
{%
\stepcounter{incpages}%
\includepdf[pages=\theincpages]{doc1.pdf}%
\includepdf[pages=\theincpages]{doc2.pdf}%
}
\end{document}
While some creativity, you could probably figure out a way past these problems, however, but it would mean knowing a bit more about what you know about these documents and when you know them.
There are of course other tools you could use to do this too besides the package. I could find some if you're interested.