GeneralHow to give IF ELSE conditions for packages

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
gpn
Posts: 11
Joined: Thu Oct 15, 2009 11:22 am

How to give IF ELSE conditions for packages

Post by gpn »

Can anyone let me know how to give if else conditions for packages?

For example, in my application I use \usepackage[OT1,T1]{fontenc}, but this fontenc does not support for Vietnam. So I need to use \usepackage[T5]{fontenc} for Vietnam.

I tried by giving

\ifx\Vietnam\undefined
\usepackage[OT1,T1]{fontenc}
\else
\usepackage[T5]{fontenc}
\fi

But this does not works.

Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

adrian
Posts: 8
Joined: Thu Nov 12, 2009 5:24 pm

Re: How to give IF ELSE conditions for packages

Post by adrian »

Try using the ifthen package:

http://tug.ctan.org/tex-archive/help/Ca ... fthen.html

You can define a boolean value (for Vietnam, in your case) and then
conditionally include the lines you want. If you need an example,
let me know.

Adrian
Post Reply