[Tex/LaTex] Replace (change) “Chapter 1” to “Chapter ONE”

chaptersformattingsectioningtable of contents

I am writing a lab report, and select report class provided by LyX. I use LyX 2.0.3 and MiKTeX 2.9.

My question is, how to change the chapter number to display as text?

eg:

CHAPTER ONE not CHAPTER 1;

Also the same to be appear in the TOC

eg.:

CHAPTER ONE 
1.1...............
   1.1.1.........................

Best Answer

Here's one possibility using the \Numberstring command from the fmtcount package to turn the number to its text string; the tocloft package was used to add the word "Chapter" before the chapter number in the ToC:

\documentclass{report}
\usepackage{tocloft}
\usepackage{fmtcount}

\renewcommand\thechapter{\Numberstring{chapter}}
\setlength\cftchapnumwidth{3em}
\renewcommand\cftchappresnum{Chapter~}
\newlength\mylen
\settowidth\mylen{\bfseries\cftchappresnum\cftchapaftersnum} % extra space
\addtolength\cftchapnumwidth{\mylen}

\begin{document}

\tableofcontents
\chapter{Test Chapter}

\end{document}

An image of the ToC:

enter image description here

An image of the first page of the chapter:

enter image description here

Related Question