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
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
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?
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis