2

How can I replace Chapter 1 with Chapter One in the table of contents when using the memoir class? I tried the following but it does not work:

\documentclass[12pt,a4]{memoir}
\usepackage[centertags]{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{setspace}
\usepackage{graphicx}
\usepackage{morefloats}
\usepackage[scriptsize]{subfigure}
\usepackage[table,xcdraw]{xcolor}
%\usepackage{caption}
\usepackage{epsfig}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{setspace}
%\usepackage[compact]{titlesec}
\usepackage{wrapfig}
\usepackage[left=3cm,top=2.5cm,right=2.5cm,bottom=2.5cm]{geometry}
\usepackage[square]{natbib}
\usepackage{soul}
\usepackage{afterpage}


\makeatletter
\renewcommand\@biblabel[1]{#1.}
\makeatother


\newif\ifendLOF

\newcommand*{\lofheader}{
\ifendLOF\else\hbox to \linewidth%
  {{~\ul{Figure}}~\hfill{\ul{Description}}~\hfill{\ul{Page}}}\par%
  \vspace{12pt}%
  \afterpage{\lofheader}
\fi}%

\newif\ifendLOT

\newcommand*{\lotheader}{
\ifendLOT\else\hbox to \linewidth%
  {{~\ul{Table}}~\hfill{\ul{Description}}~\hfill{\ul{Page}}}\par%
  \vspace{12pt}%
  \afterpage{\lotheader}
\fi}%

 \renewcommand\cftchaptername{\chaptername~}

\begin{document}
\DoubleSpacing
\chapterstyle{brotherton}
\renewcommand\bibname{References}
Title page goes here
\newpage
\pagestyle{plain}
\pagenumbering{roman}
\addcontentsline{toc}{chapter}{Dedication}
Dedication goes here
\newpage
\addcontentsline{toc}{chapter}{Acknowledgment}
Acknowledgment goes here
\newpage
\tableofcontents
\newpage
\addcontentsline{toc}{chapter}{List of Figures}
\listoffigures
\addtocontents{lof}{\protect\lofheader}
\endLOFtrue
\newpage
\addcontentsline{toc}{chapter}{List of Tables}
\listoftables
\addtocontents{lot}{\protect\lotheader}
\endLOTtrue
\newpage
\addcontentsline{toc}{chapter}{Abstract}
Abstract goes here
\newpage
\pagenumbering{arabic} \setcounter{page}{1}
\chapter{Test1} 
This is the first chapter.
\section{this is section 1.1}
This is a test
\chapter{Test2} 
This is the second chapter.
\section{this is section 2.1}
This is a test
\chapter{Test3} 
This is the third chapter.
\section{this is section 3.1}
This is a test

\SingleSpacing
\setlength{\bibsep}{\baselineskip}
\newpage

\bibliography{Thesis}
\bibliographystyle{ieeetr}

\end{document}
5
  • 1
    Welcome to TeX.SE. The memoir class emulates tocloft already. Please post a compilable document, not just fragments
    – user31729
    May 11, 2017 at 6:57
  • Here is the File:
    – khaleel
    May 12, 2017 at 3:12
  • 1
    Please edit your question to include your example. Big code chunks in comments are pointless.
    – Johannes_B
    May 12, 2017 at 4:57
  • Dear Johannes_B . I have done so
    – khaleel
    May 12, 2017 at 7:12
  • See section 9.2.2 (page 151 and 152) of memoir's manual (Memmanual.pdf) and look for the macro \NumToName{}, to express in letters the chapter's number.
    – djnavas
    May 12, 2017 at 7:52

1 Answer 1

1

Try the following:

\documentclass[article,twocolumn,12pt]{memoir}

\renewcommand*{\cftchaptername}{Chapter\space}% p. 151, memmanual
\renewcommand*{\chapternumberline}[1]{%
\cftchaptername\protect\NumToName{#1}\space--\space}% p. 152, memmanual

\title{Document Title}
\author{First Name and Surname}
\date{\today}

\renewcommand{\maketitlehookd}[1]{\tableofcontents*}
% Show the toc in one-column after the date.

\begin{document}

\maketitle

\chapter{Capítulo primero}
xx\dotfill xx

\section{Sección 1.1}
xx\dotfill xx

\subsection{Sub--sección 1.1.1}
xx\dotfill xx

\subsubsection{Sub--sub--sección 1.1.1.1}
xx\dotfill xx

\chapter{Capítulo segundo}
xx\dotfill xx

\section{Sección 2.1}
xx\dotfill xx

\subsection{Sub--sección 2.1.1}
xx\dotfill xx

\subsubsection{Sub--sub--sección 2.1.1.1}
xx\dotfill xx

\end{document}
2
  • It works. Many thanks. I really appreciate it
    – khaleel
    May 12, 2017 at 12:09
  • @khaleel Can you mark this answer as accepted by you. The help stats: "When a user receives a good answer to his or her question, that user has the option to "accept" an answer. Acceptance is indicated by a colored checkmark next to the answer that has been accepted by the original author of the question."
    – djnavas
    May 15, 2017 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.