4

I get this warning:

No support for \ordinal for language 'UKenglish' on input line xxx

The input line refers to the generated *.toc file:

\contentsline {chapter}{Bibliography}{117}{hiddenchapter.2}

There are lots of similar lines in that file, only this one (it is the last line of the file) causes the warning. So I am unsure whether it is directly caused by this line, of the referenced input line is incorrect...

I tried looking around on the Internet for clues, but could not any details about this warning.

So, what does this warning exactly mean? What might be the cause of it? And how can I prevent it? (I do not like having warnings, so I would really like to get rid of it, if possible!)

A minimal example that triggers the warning is:

\documentclass[UKenglish]{book}

\listfiles
\usepackage{babel,datetime,fancyhdr}
\fancyfoot[CO,CE]{\today}
\pagestyle{fancy}
\let\monthnameUKenglish\monthnameenglish
\let\dayofweeknameUKenglish\dayofweeknameenglish
\let\dayofweeknameidUKenglish\dayofweeknameidenglish

\begin{document}

\newpage
\today

\end{document}

The \listfiles output of this minimal example is:

 *File List*
    book.cls    2007/10/19 v1.4h Standard LaTeX document class
    bk10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
   babel.sty    2013/05/16 v3.9f The Babel package
 english.ldf    2012/08/20 v3.3p English support from the babel system
datetime.sty    2010/09/21 v2.58 Date Time Package
fmtcount.sty    2012/10/24 v2.02
  ifthen.sty    2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
etoolbox.sty    2011/01/03 v2.1 e-TeX tools for LaTeX
    etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)
fcprefix.sty    2012/09/28
fcnumparser.sty    2012/09/28
  amsgen.sty    1999/11/30 v2.0
fc-english.def    2012/06/18
dt-UKenglish.def    2010/07/07
fancyhdr.sty    
fc-UKenglish.def    2012/06/18

pdfTeX is version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)

Additional notes:

  • Not using the datetime package seems to get rid of the warning..?
  • Specifying the language in \documentclass instead of \usepackage{babel} and using english instead of UKenglish solves the warning. But obviously, I would like to use the UKenglish or british settings.
11
  • 5
    Please add a minimal working example (MWE) telling us which documentclass and packages you are using. Jun 21, 2013 at 8:33
  • @AndrewSwann As explained, this is part of my problem: I cannot exactly pin-point the problem, hence I am not able to create a minimal example (besides sending half of my thesis...) I'll add some details about the class and packages that are in use.
    – Veger
    Jun 21, 2013 at 8:45
  • 3
    \ordinal is not a command defined by the latex kernel, so you need to load some package that defines it, e.g. fmtcount or same class that defines it, e.g. memoir. The usage and syntax of these commands is different, so we need to know what your code looks like to be able to answer the question. Jun 21, 2013 at 8:56
  • datetime loads fmtcount Jun 21, 2013 at 9:06
  • I pin-pointed the problem to the table of contents: when I remove the \tableofcontents command the warning disappears as well. It looks like it has also something to do with the amount of pages as well: I can 'solve' the warning by removing any of the chapters..?!
    – Veger
    Jun 21, 2013 at 9:08

2 Answers 2

5

A minimal example producing your warnings is:

\documentclass[british]{book}

\usepackage{babel,datetime}

\begin{document}

\today

\end{document}

However, note that it also produces correct output. To suppress the warnings add the following two lines to your preambel after loading the datetime package:

\let\monthnamebritish\monthnameenglish
\let\dayofweeknamebritish\dayofweeknameenglish

The datetime package defaults to the English definitions anyway when items are not defined for a given language. For the case of british this is fine: the correct settings are made, and falling back to english for the defaults words is the right behaviour. The package just fails to suppress the warnings.

Original

This is really a comment, but I can't post enough code that way.

It still difficult know where your problem lies. You have the latest fmtcount. The following document compiles fine for me:

\documentclass[british]{book}

\usepackage{babel,datetime,fancyhdr}
\fancyfoot[CO,CE]{Draft version, \author, \today}
\pagestyle{fancy}

\usepackage{blindtext} %To generate text of document

\begin{document}

\tableofcontents
\blinddocument

\end{document}

I specified british and babel because your error message referes to UKenglish.

3
  • Using your exact example, I still get the warning No support for \ordinal for language 'british' on inp ut line 12. Additionally I got warnings like No week day names defined for language 'british', defaulting to English on input line 14. So I changed the language to english myself and all warnings are gone..!? Obviously, this is not preferred as the document is written in UKenglish. Any ideas why UKenglish/british might be broken?
    – Veger
    Jun 21, 2013 at 16:00
  • Can you place \listfiles at the beginning of this sample document and show what it writes in the log file for the version/date information on the packages at the bottom of your question. Also add the top part of the log file that will contain information about which hyphenation patterns are loaded. Jun 21, 2013 at 16:12
  • Thanks! Your answer fixes the No week day names defined for language 'british' warnings. The updated minimal example does not produce the No support for \ordinal for language 'british' warning. It seems to be triggered by the combination of fancyhdr and datetime. (See my updated question for a minimal example that triggers the warning for me). Any ideas how to get rid of the \ordinal-error?
    – Veger
    Jun 26, 2013 at 8:01
3

After the answer of Andrew Swann, it became clear to me that multi-lingual support for the fmtcount package is not (completely) working/finished. (I do not know exactly)

So, I checked the documentation and found the \fc@multiling command which throws the warning after performing checks whether a certain command (depending on the given arguments) is available or not. After (sort of) reverse-engineering I figured the \@ordinal{gender}UKenglish command was missing for the UKenglish and british languages and the package throws the warning before substituing with the english langauge.

This piece of code adds the missing command and fixes the warning for me:

\let\@ordinalMUKenglish\@ordinalMenglish
\let\@ordinalFUKenglish\@ordinalFenglish
\let\@ordinalNUKenglish\@ordinalNenglish

(It additionally needs the \makeatletter / \makeatother combo, if you are defining these commands in the preamble instead of a package, as I did)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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