[texhax] Splitting 2-up pages
Reinhard Kotucha
reinhard.kotucha at web.de
Mon Feb 25 22:04:40 CET 2019
On 2019-02-25 at 15:46:47 +0000, Philip Taylor wrote:
> \count 254 = 0
I suppose that we have to start with page 1.
> \ifnum \count 254 < 100 %%% maximum page number
Assuming that you are using pdftex, you can determine the number of
pages in advance (before \loop):
\pdfximage page 1 {two-up.pdf}
\count253=\pdflastximagepages
\count 254 = 1
[...]
\ifnum \count 254 < \count 253
You can try this with plain pdftex:
\pdfximage page 1 {two-up.pdf}
\count253=\pdflastximagepages
\message{^^Jlast page=\the\count253.^^J}
\bye
Regards,
Reinhard
--
------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover mailto:reinhard.kotucha at web.de
------------------------------------------------------------------
More information about the texhax
mailing list