Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I built & used a complex command \qd this spring who requires datetime package and therefore fmtcount. I start again to use my command these days, but occurred some changes. I suspect updates of fmtcount package. Problems :

  1. Though I put frenchb option in babel package, results of numberstringnum& ordinalnum commands are in english…
  2. Now, I can't use this form for my command : \numberstringnum{{#1}0}, & it's very troublesome.

I put here a minimal exemple :

% !TEX encoding = UTF-8 Unicode
% !TEX TS-program = arara
\documentclass{scrbook}
\usepackage[frenchb]{babel} 
\usepackage[quiet]{fontspec}                    
\usepackage[automark,headsepline]{scrpage2}         
\usepackage[babel,french=guillemets*]{csquotes}
\usepackage[dayofweek]{datetime}

\setmainfont[Mapping=tex-text, Ligatures={Common, Rare}, Numbers={OldStyle}]{Adobe Garamond Pro}
\addtokomafont{disposition}{\normalfont}
\newcommand{\qd}[1]{années~\numberstringnum{{#1}0}}

\begin{document}
\numberstringnum{300}, \ordinalnum{3}[m], \formatdate{1}{1}{2000}…
%\qd{8}.
\end{document}
% arara: xelatex

And the result :s

enter image description here

I put above the second problem in grey (%\qd{8}.), but if I active the \qd command, error messages in the console are :

! Missing number
…
! Missing = inserted for \ifnum
…
! Package fmtcount error: Out of range

I have the 3.00 version of fmtcount package manual. Thank you for your help.

share|improve this question
1  
Load \usepackage[french]{fmtcount} before datetime. –  egreg Aug 21 at 11:11
    
@egreg Cool ! it works. –  Zouib Aug 21 at 11:15

1 Answer 1

up vote 5 down vote accepted

You can either put the french (or frenchb) option as a global option to \documentclass or load

\usepackage[french]{fmtcount}

before datetime. The problem, apparently, is that the fmtcount package doesn't look at the default babel language when it's loaded.

So, either

\documentclass[frenchb]{scrbook}
\usepackage{babel}
\usepackage[quiet]{fontspec}
\usepackage[automark,headsepline]{scrpage2}
\usepackage[babel,french=guillemets*]{csquotes}
\usepackage[dayofweek]{datetime}

%\setmainfont[Mapping=tex-text, Ligatures={Common, Rare}, Numbers={OldStyle}]{Adobe Garamond Pro}
\addtokomafont{disposition}{\normalfont}
\newcommand{\qd}[1]{années~\numberstringnum{{#1}0}}

\begin{document}
\numberstringnum{300}, \ordinalnum{3}[m], \formatdate{1}{1}{2000}…
\qd{8}.
\end{document}

or

\documentclass{scrbook}
\usepackage[french]{babel}
\usepackage[quiet]{fontspec}
\usepackage[automark,headsepline]{scrpage2}
\usepackage[babel,french=guillemets*]{csquotes}
\usepackage[french]{fmtcount}
\usepackage[dayofweek]{datetime}

%\setmainfont[Mapping=tex-text, Ligatures={Common, Rare}, Numbers={OldStyle}]{Adobe Garamond Pro}
\addtokomafont{disposition}{\normalfont}
\newcommand{\qd}[1]{années~\numberstringnum{{#1}0}}

\begin{document}
\numberstringnum{300}, \ordinalnum{3}[m], \formatdate{1}{1}{2000}…
\qd{8}.
\end{document}

(I commented the font selection as I don't have that font.)

share|improve this answer
    
Thank you ! All works. I're my latex teacher ;) –  Zouib Aug 21 at 11:25

Your Answer

 
discard

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.