8
votes
2answers
266 views

Why are some macros undefined inside an if case?

I'm trying to check if a string is only of one char, and I ran into this problem: LaTeX complains that \StrLeft in the comparison takes and additional argument: ! Argument of \@secondoftwo has an ...
7
votes
2answers
1k views

LaTeX: Use command argument in conditional?

I'm in the process of writing a command that outputs a certain text only if its argument is a nonzero number. I'd like to be able to write something like: \newcommand{mycommand}[1]{ \if{#1 != 0} Some ...