Friday, January 15, 2010

TeX month name

While making my CV, I needed the name of the current month. I found the trick here. Basically, you just have to create a switch:

    \newcommand{\monthname}{%
    \ifcase\number\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}

After you've added this to the top of your TeX source, you can get the month name with \monthname.

0 comments: