Text FormattingCHAPTER 1 into CHAPTER ONE without affecting Subsection

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
pradeep
Posts: 2
Joined: Mon Dec 12, 2011 1:54 pm

CHAPTER 1 into CHAPTER ONE without affecting Subsection

Post by pradeep »

Hi,

I use \renewcommand{\thechapter}{\NUMBERstring{chapter} to change my CHAPTER 1, 2, ... into CHAPTER ONE, TWO, ...

Code: Select all

\RequirePackage{titlesec}
\RequirePackage{fmtcount}
% chapters
%\renewcommand{\thechapter}{\NUMBERstring{chapter}}
\titleformat{\chapter}[display]{\filcenter\bfseries}{\Large\MakeUppercase{\chaptername{} \thechapter}}{-1.7pc}{\begin{singlespace}\bfseries\LARGE\MakeUppercase}[\end{singlespace}]
\titlespacing*{\chapter}{0pt}{*-4.5}{*6}
% section e.g. 4.1
\titleformat{\section}[hang]{\bfseries\Large}{\thesection}{6pt}{}
\titlespacing*{\section}{0pt}{*3}{*-3}
% subsection e.g. 4.1.1
\titleformat{\subsection}[hang]{\bfseries\large}{\thesubsection}{6pt}{}
\titlespacing*{\subsection}{0pt}{*3}{*-3}
% subsubsection e.g. 4.1.1(a)
\renewcommand\thesubsubsection{\thesubsection(\alph{subsubsection})}
\titleformat{\subsubsection}[hang]{\bfseries}{\thesubsubsection}{6pt}{}
\titlespacing*{\subsubsection}{0pt}{*3}{*-3}[/size]
But the problem now is, it also changes the entries in my ToC where my subsection 4.1 become FOUR.1 and this seriously mess my TOC. How to solve this?

Appreciate your kindness
Last edited by Stefan Kottwitz on Mon Dec 12, 2011 2:34 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: CHAPTER 1 into CHAPTER ONE without affecting Subsection

Post by Stefan Kottwitz »

Hi,

instead of modifying \thechapter, you could modify the place in \titleformat{\chapter}{...} where \thechapter appears.

Stefan
LaTeX.org admin
Post Reply