[Tugindia] Using conditionals

Kannan Moudgalya kannan at iitb.ac.in
Mon Sep 15 20:04:52 CEST 2008


S. venkataraman wrote:
> See if the followingwing will help.
> \documentclass{article}
> \usepackage{ifthenelse}
> \newboolean{multcolson}
> \setboolean{multcolson}{false}%default value is false
> \newlength{\myfigwidth}
> \ifthenelse{\boolean{multcolson}}%
> {%if the boolean is true
> \setlength{\myfigwidth}{0.5\linewidth}
> }
> {%if the boolean is false
> \setlength{\myfigwidth}{\linewidth}
> }
> \begin{document}
>   
Thanks, this works for me.  I just had to download ifthen.sty - I have 
not used the conditionals in latex, until now.  Nina thanks for your 
solutions as well.  Regards.

Kannan


More information about the tugindia mailing list