<span class="gmail_quote"></span><br>Hello Hugo,<br><br>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:<br><br>\InputIfFileExists{filename}{then part}{else part}
<br><br>If teh file exists it gets loaded, _and_ the {then part} gets executed. If it doesn't exits, the {else part} gets executed.
<br><br>This info comes straigth from appendix A.4 oif teh LaTeX Companion. In the second edition it's on page 884.<br><br>Good luck,<br>Yuri.<br><br><div><div><span class="e" id="q_10e10093009cd029_1"><span class="gmail_quote">
On 10/3/06, <b class="gmail_sendername">
Hugo Esquivel</b> &lt;<a href="mailto:hresquivelo10@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">hresquivelo10@gmail.com</a>&gt; wrote:</span></span></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><span class="e" id="q_10e10093009cd029_3">
<div>Hello, how are you.<div><br></div><div><br></div><div>How can I make the following condition in a .tex (main) document: <b><font color="#ff00ff">if..., then..., else...</font></b>?</div><div>For example, I have this:
</div><div><br></div><div><font color="#996633"><b>%...</b></font></div><div><font color="#996633"><b>\input{pack.tex}&nbsp;</b></font></div><div><font color="#996633"><b>%...</b></font></div><div><br></div><div><span>But, the problem it never will available. So, I pretend use 
<b><font color="#ff00ff">if..., then,... else...</font></b> for no allowing LaTeX to make an error as follow as:&nbsp;</span></div><div><font color="#0000ff"><br></font></div><div><font color="#0000ff"><b>if &quot;pack.tex&quot; exists, then input (include) it, else ignore it.
</b></font></div><div><font color="#0000ff"><br></font></div><div><font color="#000000"><br></font></div><div>I hope an answer as soon as you read this, please.</div><div><br></div><div><font color="#000000">Thank you, very much.
</font></div><div><font color="#000000">Have a good day.</font></div><div><font color="#000000"><br></font></div><div><font color="#000000">-HREsquivelO</font></div></div></span></div>
<br>_______________________________________________<br>TeX FAQ: <a href="http://www.tex.ac.uk/faq" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.tex.ac.uk/faq</a><br>Mailing list archives: 
<a href="http://tug.org/pipermail/texhax/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://tug.org/pipermail/texhax/</a><br>More links: <a href="http://tug.org/begin.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

http://tug.org/begin.html</a><br><br>Automated subscription management: <a href="http://tug.org/mailman/listinfo/texhax" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://tug.org/mailman/listinfo/texhax
</a><br>Human mailing list managers: <a href="mailto:postmaster@tug.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">postmaster@tug.org</a><br><br></blockquote></div><br>