TeX - LaTeX Asked by ojirobe on June 25, 2021
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]
{normalfontLargebfseriescentering}{centeringchaptertitlename 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}
Do not redefine thechapter
, but use Numberstring{chapter}
in the argument of titleformat
:
usepackage{titlesec}
usepackage{fmtcount}
%renewcommand{thechapter}{Numberstring{chapter}}
titleformat{chapter}[display]
{normalfontLargebfseriescentering}
{centeringchaptertitlename 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]
{normalfontLargebfseriescentering}
{centeringchaptertitlename 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}
Answered by esdd on June 25, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP