[pdftex] How to produce individual pdf chapters...

Irene Sendiña Nadal irene at fmmeteo.usc.es
Thu Mar 15 19:16:32 CET 2001


"Jaime E . Villate" wrote:

> On Thu, Mar 15, 2001 at 02:21:02PM +0100, Irene Sendiña Nadal wrote:
> >     Is it possible from a main file (with the several
> > \include{chapter1}...)
> > to obtain separate chapters in individual pdf files when you compile
> > with pdflatex?.
> Sure, that's a LaTeX, rather than pdflatex issue. I do it this way:
>
> typein[\chaps]{Which sections (or all)?}
> \ifthenelse{\equal{\chaps}{all}}{}{\includeonly{\chaps}}
>
> \begin{document}
> \include{chap1}
> \include{chap2}
> \include{chap3}
> ...
>
> when I process the file with pdflatex, I answer to the prompt "\chaps=" with
> the list of chapters that I want to process and pdftex produces a pdf file of
> those chapters.
> I hope this helps.
>
> Jaime Villate

    Ok, I try to do what you say:

    \typein[\chaps]{all}
    \ifthenelse{\equal{\chaps}{all}}{}{\includeonly{\chaps}}

    \begin{document}
    \include{cap1}
    \include{cap2}

    \end{document}

    with two files named cap1.tex and cap2.tex. When I process the main.tex
    appears the prompt \chap=  and.... what it is supposed I should type. I
    tried with the names cap1,cap2, etc.and then it comes out a message
    "!undefined control sequence" about the input line
    \ifthenelse{\equal{\chaps}{all}}{}{\includeonly{\chaps}}. Do you know what
     happens?.

    irene




More information about the pdftex mailing list