# Fmtcount and Australian Babel

How can I get fmtcount to work when babel is loaded with the Australian option?

Consider the following code which doesn't compile, due to babel australian not being supported:

\documentclass{minimal}

\usepackage[australian]{babel}
\usepackage{fmtcount}

\begin{document}
\numberstringnum{100}

\end{document}

• Unrelated to your problem, but generally good practice: Why should the minimal class be avoided? – doncherry Jun 20 '13 at 12:02
• Actually this is the first time I have used it, I copied and pasted from another question in order to produce a MWE for the purposes of this question. ;-) – Nicholas Hamilton Jun 20 '13 at 13:19
• The simplest thing to do is to create a file fc-australian.def by modifying the existent fc-british.def – egreg Jun 20 '13 at 13:36

If you load fmtcount before babel (or don't load babel at all), fmtcount will fall back to english language strings.

\documentclass{article}

\usepackage{fmtcount}
\usepackage[australian]{babel}

\begin{document}

The current language: \languagename

\numberstringnum{100}

\end{document}


EDIT: Here's my file list produced by adding \listfiles to the MWE (I'm using TeXLive 2012 with babel updated to v3.9c):

 *File List*
article.cls    2007/10/19 v1.4h Standard LaTeX document class
size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
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
babel.sty    2013/04/08 v3.9c The Babel package
english.ldf    2005/03/30 v3.3o English support from the babel system
***********

• Thanks, I actuall tried that before, it still throws error: Missing number, treated as zero \adddialect\l@australian\l@british – Nicholas Hamilton Jun 20 '13 at 10:28
• @ADP Does my MWE work for you? If yes, there must be something else going on, and you should update your question with a new example. – lockstep Jun 20 '13 at 10:30
• The document gets produced, however, the error gets thrown as per my previous comment. Copied and pasted from your MWE. Tried to build using lualatex and pdflatex. – Nicholas Hamilton Jun 20 '13 at 10:32
• @ADP Works for me with pdflatex. Did you delete all auxiliary files? – lockstep Jun 20 '13 at 10:33
• Yes, no change. – Nicholas Hamilton Jun 20 '13 at 10:37

Create this file and name it fc-australian.def. Put it in the same directory as your test file for experimenting with it; if the tests are successful, move it in some place where TeX looks for input.

% File name: fc-australian.def
% This file has been obtained by modifying
% fc-british.def in the fmtcount bundle
\ProvidesFCLanguage{australian}[2013/06/20]
\let\@ordinalMaustralian\@ordinalMenglish
\let\@ordinalFaustralian\@ordinalMenglish
\let\@ordinalNaustralian\@ordinalMenglish
\let\@numberstringMaustralian\@numberstringMenglish
\let\@numberstringFaustralian\@numberstringMenglish
\let\@numberstringNaustralian\@numberstringMenglish
\let\@NumberstringMaustralian\@NumberstringMenglish
\let\@NumberstringFaustralian\@NumberstringMenglish
\let\@NumberstringNaustralian\@NumberstringMenglish
\let\@ordinalstringMaustralian\@ordinalstringMenglish
\let\@ordinalstringFaustralian\@ordinalstringMenglish
\let\@ordinalstringNaustralian\@ordinalstringMenglish
\let\@OrdinalstringMaustralian\@OrdinalstringMenglish
\let\@OrdinalstringFaustralian\@OrdinalstringMenglish
\let\@OrdinalstringNaustralian\@OrdinalstringMenglish
\endinput
%%
%% End of file fc-australian.def'.


Now the example file

\documentclass{article}

\usepackage[australian]{babel}
\usepackage{fmtcount}

\begin{document}
\numberstringnum{100}

\end{document}


runs.

Note This will give errors with LuaLaTeX on TeX Live 2013, but it's not related to fmtcount. The problem is probably related to the recent changes in babel management. It should be reported to the people in charge. It disappears if I modify the entry in language.dat.lua for ukenglish with the addition of the synonym australian.

    ['ukenglish'] = {
`