# Make the chapter number to appear as text in the TOC

I am using the Memoir class to develop a thesis template and I have a problem that I am not able to solve. I want the chapter number to be displayed as text in the TOC. I already made the number to appear as text in the actual chapter but a haven't been able to do it in the TOC. Basically this is what I want to do:

Chapter One: Introduction

1.1 Why

1.2 XXXX

Chapter Two: Experiment

2.1 XXX

2.2 XXX

If you can help me with this problem I will really appreciate your help.

-

It turns out to be quite easy:

``````\renewcommand{\chapternumberline}[1]{\chaptername\ \numtoName{#1}: }
``````

Easy, of course, after some experiments trying to figure out what the documentation says wrong about this topic.

When there are also appendices the code becomes slightly more complicated as we probably want "Appendix A: Title", so we must change the interpretation of `\chapternumberline`

``````\usepackage{etoolbox}
\renewcommand{\chapternumberline}[1]{\chaptername\ \numtoName{#1}: }
At `\appendix` we register in the `.toc` file a command whose effect is to modify what `\chapternumberline` does.
...because of all the hooks `memoir` provides. It's just a case of finding them! :) –  Werner Nov 9 '11 at 23:11
@Werner No: the typesetting of chapters in toc is completely different from that of lower levels and doesn't use `\cftchapteraftersnumb` which was the hook I thought to use at first. –  egreg Nov 9 '11 at 23:13
@Werner If you try and define `\cftchapteraftesnumb` to `\ddt`, you'll get no error, which means that it's never used. And so I discovered that the chapter number is not typeset in a box `\cftchapternumwidth` wide. Which indeed makes sense, but should be mentioned. –  egreg Nov 9 '11 at 23:28