0

im trying to get my chapter numbers printed as text, but on the way there i messed up my section numbers with text "ONE" and "TWO" an such, here is what i was doing,

This code centers, pull up and changes font to normal size the chapter headings, I needed to change chapter numbering to text i.e. "CHAPTER 1" becomes "CHAPTER ONE". So far, I have the digit to text part figured out, but how to make the stuff uppercase and stop it from tripping over the error in the appendix that says missing number treating as zero i can not figure out.

\usepackage{titlesec}
\usepackage{fmtcount}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\thechapter}{\NUMBERstring{chapter}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\titleformat{\chapter}[display]
  {\normalfont\normalsize\bfseries}
  {\filcenter\chaptertitlename\ \thechapter}{10pt}{\filcenter\normalsize\MakeUppercase}
\titlespacing*{\chapter}{0pt}{-50pt}{40pt}  %%%%  pull up chapter heading
\titleformat{\section}{\normalfont\normalsize\bfseries} {\thesection}{1em}{}
\titleformat{\subsection}{\normalfont\normalsize\bfseries} {\thesubsection}{1em}{}
\titleformat{\subsubsection}{\normalfont\normalsize\bfseries} {\thesubsubsection}{1em}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

how can i have uppercase "one" and such instead of chapter numbers in the chapter heading, without interfering with the table of contents and the section numbering? i got all this from this other question and other places

  • 3
    Don't redefine \thechapter, but rather say \NUMBERstring{chapter} in \titleformat. – egreg Nov 13 '13 at 14:21
1

From @egreg comment this was what needed to be changed:

  {\filcenter\chaptertitlename\ \NUMBERstring{\thechapter}}{10pt}{\filcenter\normalsize\MakeUppercase}

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.