[texhax] Counting letters

klists at saphor.de klists at saphor.de
Fri Oct 15 18:40:00 CEST 2004


> -----------------
> 
> \newcount\footnotecounter
> \newcount\footnotetmp
> \def\lettercounter#1{\message{#1}\footnotecounter=#1
>   \footnotetmp=\footnotecounter
>   \divide\footnotetmp by 25 
>   \multiply\footnotetmp by 25 
>   \advance\footnotecounter by -\footnotetmp
> 
>   \ifnum\footnotecounter < 25 \message{hallo}\fi
> 
>   \ifcase\footnotecounter \or a\or b\or
>   c\or d\or e \or f \or g \or h \or i \or k \or l \or m \or n \or o
>   \or p \or q \or s \or t \or u \or v \or w \or x \or y \or z\fi}
> 

Ross Moore kindly pointed out the problem -- the blanks in the macro
definition cause the havoc.

Best regards,

Marc



More information about the texhax mailing list