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

Reinhard Kotucha reinhard.kotucha at web.de
Wed Oct 4 21:02:53 CEST 2006


>>>>> "Yuri" == Yuri Robbers <yuri.robbers at gmail.com> writes:

  > It might be even easier to use

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

It looks easier but it doesn't exactly the same as

   \IfFileExists{pack.sty}
	{\usepackage{pack}}
	{\typeout{Package pack.sty was not found.}}

Using \usepackage instead of \input is the preferred way to load .sty
files.  The LaTeX macros \usepackage and \RequirePackage make sure
that a package is not loaded twice.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha			              Phone: +49-511-4592165
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------




More information about the texhax mailing list