Code: Select all
\renewcommand{\thecounter}{\includegraphics[height=11pt]{image.png}}
Code: Select all
\newcommand{\showcounter}[0]{
\refstepcounter{counter}
{\thecounter}
}
Code: Select all
! Undefined control sequence.
\reserved@a ->\@nil
Code: Select all
\renewcommand{\thecounter}{\includegraphics[height=11pt]{image.png}}
Code: Select all
\newcommand{\showcounter}[0]{
\refstepcounter{counter}
{\thecounter}
}
Code: Select all
! Undefined control sequence.
\reserved@a ->\@nil
NEW: TikZ book now 40% off at Amazon.com for a short time.
From your description I infer that you want to change the included image depending on the counter value. You probably need to use expanding definitions somewhere. Please, provide a minimal working example so it's easier for us to come up with the right solution.error792 wrote:Wow, thanks! That fixed the errors. However, now I have a new problem: sometimes the icon used depends on the value of the counter. There is no problem with this dependency at the \label point, but when when I \ref the \label, it uses the current value of the counter instead of the value at the point where the \label was. I'm guessing this has to do with the \protect-induced robustness - can this be remedied, while still keeping the images intact?
NEW: TikZ book now 40% off at Amazon.com for a short time.