TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
\monthname[10] \ordinaldate{10}

produces October 10th, as expected. But once I put it into a section, I get this error:

! Argument of \@ordinalnum has an extra }.
<inserted text> 
l.11 \section*{\monthname[10] \ordinaldate{10}}

What is happening and why?



\section*{\monthname[10] \protect\ordinaldate{10}}

works just fine for displaying the date like I want to, I suddenly get a new error from the main file that I am including this 2006-10.tex file from:

! Extra \else.
\@include ...ediate \closeout \@partaux \fi \else 
                                                  \deadcycles \z@ \@nameuse ...
l.89 \include{Years/2006-10}

I am not using \if or \else statements anywhere in either the main document, or this included document. The error goes away if I remove \protect\ordinaldate{10}.

Weirdly enough, adding other things like \protect\dayofweekname{10}{10}{2006} doesn't produce such an error. Only putting in \protect\ordinaldate{10} causes the include error.


\protect\ordinalnum{10} doesn't cause such an error, despite \protect\ordinaldate{10} doing so, so I guess I will just use \ordinalnum for now

share|improve this question
up vote 3 down vote accepted

You need to \protect \ordinaldate:


\section{\monthname[10] \protect\ordinaldate{10}}


enter image description here

share|improve this answer
It worked! Thank you, and I wonder if you could take a stab at the new problem I'm having now? – wrongusername Sep 10 '13 at 5:23
@wrongusername you need to \protect it only in sectional units (such as in \section, \chapter...) and maybe also in \caption. No need to \protect it in other contexts. – Gonzalo Medina Sep 10 '13 at 5:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.