[texhax] Superscript ordinal indicators in dates?

Uwe Lueck uwe.lueck at web.de
Fri Jun 5 10:00:52 CEST 2009


Yannis Haralambous <yannis.haralambous at telecom-bretagne.eu> schrieb am 05.06.2009 09:34:43:
> I would suggest not to use \hbox but \text instead (using the amstext  
> package), so that you get the right font in the right size everywhere:

1. Why not even keep \textsuperscript in place of ^, as posted originally? 

"Joel C. Salomon" <joelcsalomon at gmail.com> schrieb am 04.06.2009 19:03:27:
> I'm using XeLaTeX, so I can manually get the effect I want via "July
> 4\textsuperscript{th}, 1776"; I'd like to know how to get the effect
> automatically.

2. Or type "ordinal" into the field for "Search the package descriptions" on

    http://ctan.tug.org/search.html

there are several packages for ordinal numbers in dates. 

HTH -- Uwe. 

Yannis Haralambous <yannis.haralambous at telecom-bretagne.eu> schrieb am 05.06.2009 09:34:43:
> I would suggest not to use \hbox but \text instead (using the amstext  
> package), so that you get the right font in the right size everywhere:
> 
> \def\mydate{\ifcase\day\or
>    1$^{\text{st}}$\or 2$^{\text{nd}}$\or 3$^{\text{rd}}$\or
>    4$^{\text{th}}$\or 5$^{\text{th}}$\or 6$^{\text{th}}$\or
>    7$^{\text{th}}$\or 8$^{\text{th}}$\or 9$^{\text{th}}$\or
>    10$^{\text{th}}$\or 11$^{\text{th}}$\or 12$^{\text{th}}$\or
>    13$^{\text{th}}$\or 14$^{\text{th}}$\or 15$^{\text{th}}$\or
>    16$^{\text{th}}$\or 17$^{\text{th}}$\or 18$^{\text{th}}$\or
>    19$^{\text{th}}$\or 20$^{\text{th}}$\or 21$^{\text{st}}$\or
>    22$^{\text{nd}}$\or 23$^{\text{rd}}$\or 24$^{\text{th}}$\or
>    25$^{\text{th}}$\or 26$^{\text{th}}$\or 27$^{\text{th}}$\or
>    28$^{\text{th}}$\or 29th$^{\text{\or}}$ 30$^{\text{th}}$\or
>    31$^{\text{st}}$\fi~\ifcase\month\or
>    January\or February\or March\or April\or May\or June\or
>    July\or August\or September\or October\or November\or
>    December\fi,\space \number\year}
> 
> Le 5 juin 09 à 01:42, E. Krishnan a écrit :
> 
> > On Thu, 4 Jun 2009, Joel C. Salomon wrote:
> >
> >> How can I get the date in my LaTeX article to display the ordinal
> >> indicator in superscript?  E.g., July 4<sup>th</sup>, 1776
> >> ...............................
> >> I'd like to know how to get the effect automatically.
> >
> > Please try
> >
> > \def\mydate{\ifcase\day\or
> >   1$^{\hbox{st}}$\or 2$^{\hbox{nd}}$\or 3$^{\hbox{rd}}$\or
> >   4$^{\hbox{th}}$\or 5$^{\hbox{th}}$\or 6$^{\hbox{th}}$\or
> >   7$^{\hbox{th}}$\or 8$^{\hbox{th}}$\or 9$^{\hbox{th}}$\or
> >   10$^{\hbox{th}}$\or 11$^{\hbox{th}}$\or 12$^{\hbox{th}}$\or
> >   13$^{\hbox{th}}$\or 14$^{\hbox{th}}$\or 15$^{\hbox{th}}$\or
> >   16$^{\hbox{th}}$\or 17$^{\hbox{th}}$\or 18$^{\hbox{th}}$\or
> >   19$^{\hbox{th}}$\or 20$^{\hbox{th}}$\or 21$^{\hbox{st}}$\or
> >   22$^{\hbox{nd}}$\or 23$^{\hbox{rd}}$\or 24$^{\hbox{th}}$\or
> >   25$^{\hbox{th}}$\or 26$^{\hbox{th}}$\or 27$^{\hbox{th}}$\or
> >   28$^{\hbox{th}}$\or 29th$^{\hbox{\or}}$ 30$^{\hbox{th}}$\or
> >   31$^{\hbox{st}}$\fi~\ifcase\month\or
> >   January\or February\or March\or April\or May\or June\or
> >   July\or August\or September\or October\or November\or
> >   December\fi,\space \number\year}



More information about the texhax mailing list