The 13th Counter



I was asked today if one could make LaTeX skip all occurances of the value 13, in all counters, as some buildings do. Well, of course you can:
\let\stepc\stepcounter\renewcommand{\stepcounter}[1]{%
\ifthenelse{\equal{\value{#1}}{12}}{\stepc{#1}}{}\stepc{#1}}
Here, we first save the \stepcounter macro in \stepc, then we renew its definition by stepping the counter twice if its current value equals 12, therefore effectively omitting the 13th occurance. Also, you should watch the thirteenth floor, it's a nice movie if you're into scifi.

Tags: -

Leave a Reply

Your email address will not be published.