chapter heading text in words and figures

by ojirobe   Last Updated May 22, 2020 23:23 PM - source

Please I wish to achieve a replica of exactly the result obtained with this code below except that I want the chapter one heading Instead of 1. when I used the following code `

\usepackage{fmtcount}
\renewcommand{\thechapter}{\Numberstring{chapter}}

it worked, but it disfigured my table of contents and I started seeing some numbering like one.1, three. 4 and so on. Is there any way I can maintain my figure numbering in the table of contents whilst also changing the chapter headings in the body of the document to text? Any assistance will be appreciated

\documentclass[a4paper,12pt]{report}
\usepackage[margin=1in, left=3.5cm, top=2.5cm, right=2.5cm, bottom=2.5cm]{geometry}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{lipsum}
\usepackage[titletoc]{appendix}
\usepackage [T1]{fontenc}
\usepackage{titletoc}
\titleformat{\chapter}[display]
{\normalfont\Large\bfseries\centering}{\centering\chaptertitlename\ \thechapter}{0pt}{\Large}
\titlespacing*{\chapter}
{0pt}{-60pt}{10pt}
\begin{document}
\begin{spacing}{1}
\tableofcontents
\end{spacing}
\addcontentsline{toc}{chapter}{\listtablename}
\listoftables
\cleardoublepage
\chapter{Introduction}
\section{Background of Study}
\lipsum[1-2]

\chapter{literature}
\section{Empirical Literature}
\lipsum[1-2]

\end{document}


Answers 1


Do not redefine \thechapter, but use \Numberstring{chapter} in the argument of \titleformat:

\usepackage{titlesec}
\usepackage{fmtcount}
%\renewcommand{\thechapter}{\Numberstring{chapter}}
\titleformat{\chapter}[display]
  {\normalfont\Large\bfseries\centering}
  {\centering\chaptertitlename\ \Numberstring{chapter}}% <- changed
  {0pt}{\Large}

Example:

\documentclass[a4paper,12pt]{report}
\usepackage[margin=1in, left=3.5cm, top=2.5cm, right=2.5cm, bottom=2.5cm]{geometry}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{lipsum}
\usepackage[titletoc]{appendix}
\usepackage [T1]{fontenc}
\usepackage{setspace}% <- added
\usepackage[nottoc]{tocbibind}% <- added
\usepackage{titletoc}
\usepackage{titlesec}% <- added
\usepackage{fmtcount}% <- added
\titleformat{\chapter}[display]
  {\normalfont\Large\bfseries\centering}
  {\centering\chaptertitlename\ \Numberstring{chapter}}% <- changed
  {0pt}{\Large}
\titlespacing*{\chapter}
{0pt}{-60pt}{10pt}
\begin{document}
\begin{spacing}{1}
\tableofcontents
\end{spacing}
%\addcontentsline{toc}{chapter}{\listtablename}% <- removed
\listoftables
\cleardoublepage
\chapter{Introduction}
\section{Background of Study}
\lipsum[1-2]
\chapter{literature}
\section{Empirical Literature}
\lipsum[1-2]
\end{document}
esdd
esdd
December 24, 2019 22:08 PM

Related Questions


How to modify chapter title with titlesec?

Updated October 02, 2017 08:23 AM



Title table of content spacing

Updated April 25, 2016 08:09 AM

Stop page break between title and contents

Updated June 05, 2015 23:10 PM