[pdftex] Using pdfpages with plain tex

Robin Fairbairns Robin.Fairbairns at cl.cam.ac.uk
Fri Aug 5 11:13:58 CEST 2005


> Can pdfpages be used with plain TeX?

looks like not; at least with plain tex unamended.

> I'm trying the following:
> 
> \input miniltx
> \makeatletter
> \input pdfpages.sty
> \resetatcatcode
> 
> \includepdf[pages=1-2,landscape,nup=1x2]{xxx.pdf}
> 
> \bye
> 
> --------------------------------- Output.
> 
> This is pdfTeXk, Version 3.141592-1.11a (Web2C 7.5.2) (format=pdftex 2005.4.13)  5 AUG 2005 08:25
>  %&-line parsing enabled.
>  ...
> 
> (/usr/TeX/texmf/tex/latex/pdfpages/pdfpages.sty
> pdfpages: 2003/06/21 v0.3a Insert pages of external PDF documents (AM)
> 
> (/usr/TeX/texmf/tex/latex/base/ifthen.sty
> ifthen: 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
> 
> Runaway definition?
> #1->\expandafter \@ifdefinable \csname if#1\endcsname {\expandafter
> ! Forbidden control sequence found while scanning definition of \newboolean.
> <inserted text>
>                 }
> <to be read again>
>                    \newif
> l.125     \expandafter\newif
>                             \csname if#1\endcsname}}

this is because plain tex (unlike latex) defines \newif as \outer.

this failure doesn't happen in a construct like

  \csname newif\expandafter\endscname\csname if#1\endcsname

but to use that, you would need to copy macros out of ifthen.sty, and
to hack them as necessary :-(



More information about the pdftex mailing list