I've been trying to google and this seems like a silly thing that should be obvious, but everywhere I look is answering how to use counter values inside a conditional statement, which I can do fine.
Basically I want to set a counter value, but inside the section where the value goes, put a if/then/else hierarchy. I know I can do it by reversing the order (putting an if/then/else hierarchy and in each result putting a new set-count command) but for both ease of reading and some programming structure reasons I'd rather have it the other way.
Basically I want to do something like the following;
\newcounter{TestCounter}
\setcounter{TestCounter}
{
\ifthenelse{5 > 6}{7}{2}
}
Is such a thing possible, or do I need to reorder it the other way?
Thanks!
For a more explicit MWE:
I want to use the following;
\documentclass{article}
\usepackage{xifthen}
\begin{document}
\newcounter{TestCounter}
\setcounter{TestCounter}{
\ifthenelse{5 > 6}{7}{2}}
\end{document}
Where (ideally) the above would result in assigning to the count "TestCounter" the value "2" (since 5 < 6).
In practice I would be using more complicated code, but it would all resolve to checking to see if one number is bigger than another, where one of those would be stored in a counter. For example
\documentclass{article}
\usepackage{xifthen}
\begin{document}
\newcounter{Temp}
\newcounter{TestCounter}
\setcounter{Temp}{5}
\setcounter{TestCounter}{
\ifthenelse{\arabic{Temp} > 2}{4}{7}
}
\end{document}