9to5
Science
Topics
Calculators
Search
About
Home
LaTeX & TikZ
Conditionals
Tag
Conditionals
How to Add Conditional Formatting in a \newcommand
Use \ifthenelse and \equal inside a \newcommand to compare an argument, then put the desired formatting in the true and false branches.