[texhax] Making a condition in LaTeX (if..., then..., else)

Yuri Robbers yuri.robbers at gmail.com
Mon Oct 2 22:28:50 CEST 2006


It might be even easier to use

  \InputIfFileExists{filename}{then part}{else part}

If filename exists, this commands loads it and executes the {then part}
(which you coul probably even leave empty), if it doesn't exists it executes
the {else part} (which again you can probably leave empty). See
Appendix A.4of the LaTeX Companion by Mittelback et al. (which is
where I got my info).

Cheers,
Yuri.



On 10/2/06, Martin Heller < mr_heller at yahoo.dk> wrote:
>
> HRE skrev:
>
> > If the Package " pack.sty" exists, then include it in the main document
> > .tex "\include{pack.sty }".
> > Else, ignore it.
>
> \IfFileExists{pack.sty}
>    {\usepackage{pack}}
>    {\message{Package pack.sty was not found.}}
>
>
> _______________________________________________
> 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: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/texhax/attachments/20061002/3f535a20/attachment.html 


More information about the texhax mailing list