# French chapter numbers

This question led to a new feature in a package:
impnattypo

French typography recommends that chapters be numbered in uppercase roman numbers, except for chapter 1 which should be called "Chapitre premier", so it should be:

• Chapitre premier
• Chapitre II
• Chapitre III
• etc.

Trying to implement that, I've come up so far with:

\usepackage{ifthen}
\renewcommand{\thechapter}{%
\ifthenelse{\value{chapter}=1}{premier}{\Roman{chapter}}
}


However, when compiling with this, I get:

! Use of \@chapter doesn't match its definition.
\new@ifnextchar ...served@d = #1\def \reserved@a {
#2}\def \reserved@b {#3}\f...
l.1 \chapter{\A la recherche de la r\'eponse}


Where is the problem?

-
This chapter numbering messes up the table of contents big time! –  doncherry Jul 19 '11 at 21:58
Right. I've checked a few books though, and it is indeed in use. –  ℝaphink Jul 20 '11 at 5:16
Note that French typography recommends to put the ToC at the end of the book (that's right, even after the index actually), so hardly anyone gets to see it anyway. –  ℝaphink Jul 20 '11 at 5:40
My solution would be "Don't use such a crazy typesetting convention"! Those crazy French... –  Seamus Jul 20 '11 at 10:30
@Raphink any people who speak a language that insists "ninety" should be said "four-twenty-ten" should probably not be trusted to come up with sane typographical conventions... –  Seamus Jul 20 '11 at 10:35

Here's a solution using \ifnum, without ifthen:

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\renewcommand{\thechapter}{%
\ifnum\value{chapter}=1
premier%
\else
\Roman{chapter}%
\fi
}
\begin{document}
\chapter{One}
\chapter{Two}
\end{document}

-
Thank you. Is there a way do to it without affecting the ToC, so that only the chapter headings is modified, but the arabic number is still used elsewhere? –  ℝaphink Jul 20 '11 at 5:49
@Raphink: in that case don't redefine \thechapter, customize the chapter headings instead, for example using the titlesec package. –  Stefan Kottwitz Jul 20 '11 at 6:58
If I were to do a CTAN package to make it easier for all thriving French TeXnicians, which solution would you recommend? –  ℝaphink Jul 20 '11 at 7:21
@Raphink: Some classes implement chapter headings differently, so it might be hard to produce a general headings-only solution. You could redefine \@makechapterhead though it's not guaranteed that classes other than the base classes use it. –  Stefan Kottwitz Jul 20 '11 at 8:03

I guess that ifthen somehow fails at proper expansion. Use etoolbox instead.

\documentclass{book}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage{blindtext}

\usepackage{etoolbox}
\renewcommand{\thechapter}{%
\ifnumequal{\value{chapter}}{1}{premier}{\Roman{chapter}}%
}

\begin{document}

\chapter{foo}

\blindtext

\chapter{bar}

\blindtext

\end{document}
`
-