I have a counter that I want to use for the beamer \onslide
command.
Using
\newcounter{coun}
%....
%
\onslide<\coun ->{ ....}
doesn't work. What is the correct way to do this?
beamercountersoverlays
I have a counter that I want to use for the beamer \onslide
command.
Using
\newcounter{coun}
%....
%
\onslide<\coun ->{ ....}
doesn't work. What is the correct way to do this?
Best Answer
Use
\value{coun}
instead:In general, with LaTeX counters then
\value{<counter name>}
expands to the value of the counter. The counter name itself is not a macro so there's some magic under the bonnet that links the counter name (in this casecoun
) with a macro that displays its value.(Note: In the original, I had
\thecoun
in place of\value{coun}
. As Matthew pointed out in the comments,\value{coun}
is the correct one to have here.)