Monday, July 25, 2011

LaTeX: Change Format of a Custom Counter

I just spent more time that I would like to admit trying to figure out how to change the display format of a custom counter. Specifically, I was trying to get the counter to display as a capital letter. I found several examples that
  1. claimed that this is done with the \Alph command and
  2. gave an example on how to change a NON-custom counter.
What took me forever to figure out is that the command for a counter called CounterName is \theCounterName. Thus, the command I was looking for is:
\renewcommand{\theCounterName}{\Alph{CounterName}}
I hope this post can help others.