# [texhax] Counters as ordinal numbers

Tom Sgouros tomfool at as220.org
Mon Sep 19 15:11:21 CEST 2011

There is code to do this (or something similar) in the memoir class.

-tom

On Sun, Sep 18, 2011 at 9:43 PM, VAFA KHALIGHI <vafaklg at gmail.com> wrote:

> Hello
>
> I need to have a counter that counts like "first, second, third, fourrth,
> ...".  (say up to ten thousandth). I can create a counter and put all of
> these in it just like:
>
> \def\@mycounter#1{%
>   \ifcase#1\or First\or Second\or Third\or ...\else\@ctrerr\fi}
>
> \def\mycounter#1{\expandafter\@mycounter\csname c@#1\endcsname}
>
> But it will be  very annoying to put each single of these in \@mycounter. I
> was wondering if you know a better solution.
>
> Thanks
>
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/