[texhax] if related def
E. Krishnan
ekmath at md5.vsnl.net.in
Wed Aug 27 09:26:33 CEST 2003
On Wed, 27 Aug 2003, Popescu Cezar wrote:
> i got a small problem: i have a counter, let's say ``Cap'',
> and a command that uses this counter, let's say \parte. the
> Cap is stepped externally. what i want is this:
> - if counter Cap equals 1 then \parte should typeset
> ``Partea I'';
> - if counter Cap greater than 1, then \parte should
> typeset ''Partea a~\Roman{Cap}-a''.
> any suggestion about how to define \parte, please?
\usepackage{ifelse}
\newcounter{Cap}
\newcommand{\parte}{%
\ifthenelse{\value{Cap}=1}{Partea I}{}%
\ifthenelse{\value{Cap}>1}{Partea a~\Roman{Cap}-a}{}}
--
Krishnan
More information about the texhax
mailing list