[texhax] Splitting 2-up pages

Peter Flynn peter at silmaril.ie
Mon Feb 25 19:28:53 CET 2019


Or just use one of the utilities like psbook or psnup which are designed 
specifically for this kind of task.

Just use pdf2ps beforehand to convert the document to PostScript, and then 
use ps2pdf to convert the result back to PDF afterwards.

Peter

On 25 February 2019 18:08:38 Mike Marchywka <marchywka at hotmail.com> wrote:

> I'm not entirely sure I understand what you are doing and the loop below
> is probably a great solution but for "repetitive error prone "
> I've started to generate a lot of latex with either bash scripts or c++.
>
>
> If you know all the features of latex there are probably lots of nice 
> things like
> the loop but if you only want simple latex and have some natural
> reason to use another lanaguage, I don;t know
> where your PDF or other inputs are created,  that may make more sense.
>
>
> For example, with data table I don't think it is uncommon to be able
> to get output right in latex format similar to maybe html snippets.
> When I get a new bibtex entry I generate code to reference it
> and make sure it is acceptable to  bibtex.
>
>
>
>
> note new address
> Mike Marchywka 306 Charles Cox Drive Canton, GA 30115
> 2295 Collinworth  Drive Marietta GA 30062.  formerly 487 Salem Woods Drive 
> Marietta GA 30067 404-788-1216 (C)<- leave message 989-348-4796 (P)<- emergency
>
>
>
>
> ________________________________________
> From: texhax <texhax-bounces+marchywka=hotmail.com at tug.org> on behalf of 
> Philip Taylor <P.Taylor at Rhul.Ac.Uk>
> Sent: Monday, February 25, 2019 10:46 AM
> To: Joel C. Salomon; ΤeXhax
> Subject: Re: [texhax] Splitting 2-up pages
>
>
> I have a PDF document “printed” 2-up, so that on each 11″×8½″ page there
> are two 5½″×8½″ pages I’d like to extract. How do I go about this?
>
>
> Is there a way to do this automatically for the entire book?
>
>
> Maybe something along the lines of the following (replace "100" by the 
> maximum page number)
>
>
> \documentclass{minimal}
>
>
> \usepackage[papersize={5.5in,8.5in}, margin=0pt, ignoreall]{geometry}
>
>
> \setlength{\parindent}{0pt}
>
>
> \usepackage{graphicx}
>
>
> \begin{document}
>
>
> \count 254 = 0
>
>
> \loop
>
>
>  \includegraphics[viewport= 0 0 396 612, page=\count 254]{two-up.pdf}
>
>
>  \includegraphics[viewport= 396 0 792 612, page=\count 254]{two-up.pdf}
>
>
>  \includegraphics[viewport= 0 0 396 612, page=\count 254]{two-up.pdf}
>
>
>  \includegraphics[viewport= 396 0 792 612, page=\count 254]{two-up.pdf}
>
>
> \ifnum \count 254 < 100 %%% maximum page number
>
>
>   \advance \count 254 by 1
>
>
> \repeat
>
>
> \end{document}
>
>
> Philip Taylor
>
>
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
>
>
> Automated subscription management: https://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org





More information about the texhax mailing list