# “Literal” numbering of chapters but not in contents [duplicate]

Thanks to this macro

\makeatletter
\makeatother

\newcommand\words[1]{\expandafter\xwords\csname c@#1\endcsname}
\def\xwords#1{\ifcase#1\or
one\or
two\or
three\or
four\or
five\else
I need more words\fi}


which comes from this question "Literal" numbering of chapters

All feel well, and I obtain what I want in the first page of each chapter, "Chapter one", "Chapter two",...etc but in the table of contents, it uses the same numerotation of the chapters, so litteral, that I don't want, evidently. So how can I use the usual numbering (\arabic{chapter}) for the contents ?

• It seems truely a duplication... Thks for "alert" – Faouzi Bellalouna Jun 10 '14 at 20:31

It is best to use the package fmtcount to get the spelled out value of a counter. In this case you will need to use the tocstyle package to adjust the margins in the table of contents.

If you want to use this for chapters, just replace every occurrence of section by chapter.

\documentclass{article}
\pagestyle{empty}% for cropping
\usepackage{fmtcount,tocstyle}
\renewcommand\thesection{\Numberstring{section}}
\begin{document}
\tableofcontents
\section{First section}
\section{Second section}
\subsection{A subsection}
\section{Third section}
\end{document}


• Hello, I use the package titlesec and the solution you propose produces a conflict with this package. – Faouzi Bellalouna May 8 '14 at 13:16
• I don't get any conflicts, when I just \usepackage{titlesec}. Can you elaborate? – Henri Menke May 8 '14 at 13:53
• I give an example of file – Faouzi Bellalouna May 8 '14 at 19:19
• \documentclass[14pt,a4paper]{extbook} \usepackage{titlesec} \usepackage{titletoc} \usepackage{etoolbox} \usepackage{multicol} \usepackage{amsmath,amssymb} \usepackage[most]{tcolorbox} \usepackage{boxedminipage} \usepackage{slashbox} \usepackage{titlesec} \usepackage{enumitem} \usepackage{minitoc} \usepackage{rotating} \usepackage{fmultico} \setlength{\columnseprule}{0.1pt} \usepackage{fancyhdr} \pagestyle{fancy} \usepackage{pdflscape} \usepackage{array} – Faouzi Bellalouna May 8 '14 at 19:28
• \usepackage{polyglossia} \setmainlanguage[numerals=maghrib]{arabic} \setotherlanguage{english} \newfontfamily\arabicfont[Script=Arabic, AutoFakeSlant=-0.02]{Traditional Arabic} \setsansfont[Script=Arabic,Scale=1.5]{Traditional Arabic} \usepackage{MyBoxes} \usepackage{MyRoss} \gappto\captionsarabic{\renewcommand{\chaptername}{الباب}} % probably can use titlesec's \titleformat but I don't know that package:-} \makeatletter \let\old@makechapterhead\@makechapterhead \def\@makechapterhead{\def\thechapter{\words{chapter}}\old@makechapterhead} \makeatother – Faouzi Bellalouna May 8 '14 at 19:29