I need to prevent commands from reprocessing a parameter.
Is there the way to exit command before end if condition is met just like return in JavaScript functions:
function calculateSomething(param) {
if (!param) {
return // <---- leave the function
}
// go on with the function
}
So in LaTeX I imagine something like this:
\newcommand{\mycommand}[1] {
\ifthenelse{\equal{#1}{what I want}}
{
%%%exit%%% <--- stop processing and out
}
{
\color{red}{#1}
}
}