[texhax] How to make the following condition: if... then... else...?

Yuri Robbers yuri.robbers at gmail.com
Tue Oct 3 23:20:03 CEST 2006

Hello Hugo,

This question has been asked and answered on this list just a few days ago.
For more details check the archive, but my solution is:

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

If teh file exists it gets loaded, _and_ the {then part} gets executed. If
it doesn't exits, the {else part} gets executed.

This info comes straigth from appendix A.4 oif teh LaTeX Companion. In the
second edition it's on page 884.

Good luck,

On 10/3/06, HRE <hre> wrote:

> Hello, how are you.
> How can I make the following condition in a .tex (main) document: *if...,
> then..., else...*?
> For example, I have this:
> *%...*
> *\input{pack.tex} *
> *%...*
> But, the problem it never will available. So, I pretend use *if...,
> then,... else...* for no allowing LaTeX to make an error as follow as:
> *if "pack.tex" exists, then input (include) it, else ignore it. *
> I hope an answer as soon as you read this, please.
> Thank you, very much.
> Have a good day.
> -HRE
> _______________________________________________
> 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/20061003/daa06d75/attachment.html 

More information about the texhax mailing list