2

I have a week to submit my Ph.D thesis, done in latex, and have ran into a strange difficulty. Before introducing {\usepackage[rm,tiny,compact, bf]{titlesec} } which was necessary in order to unify all titles in the entire thesis to document size as per university requirements, my chapters headings read CHAPTER ONE (etc). this was accomplished using

\usepackage{fmtcount,etoolbox}
\makeatletter
\patchcmd{\@makechapterhead}{\thechapter}{\Numberstring{chapter}}{}{}
\patchcmd{\chaptermark}{\thechapter}{\NUMBERstring{chapter}}{}{}
\makeatother

Now they read CHAPTER 1 (etc), which is unacceptable! So how can I retain the CHAPTER ONE (etc) format and still use titlesec? Urgent response will be highly appreciated, for obvious reasons.

5
  • 1
    Would you please provide a mock-up of your document in the form of a minimal working example (MWE) so we can replicate problem? Help us help you... Obviously titlesec doesn't use \@makechapterhead to set its titles...
    – Werner
    Commented Jul 18, 2015 at 17:44
  • You shall have to use the advanced interface of titlesec, at least for chapters, somrthing like \titleformat{\chapter}[display]{\bfseries}{\chaptername \Numberstring{chapter}}{…}{…}.
    – Bernard
    Commented Jul 18, 2015 at 17:49
  • Thanks Werner. This preamble produced CHAPTER ONE in my thesis: Commented Jul 18, 2015 at 17:57
  • \documentclass[12pt,a4paper]{report} \renewcommand{\contentsname}{\bfseries\footnotesize\center TABLE OF CONTENTS} \usepackage{fancyhdr} \renewcommand{\chaptername}{\center \small CHAPTER} \newcommand{\cchapter}[1]{\chapter[#1]{\centering #1}} \usepackage{fmtcount,etoolbox} \makeatletter \patchcmd{\@makechapterhead}{\thechapter}{\Numberstring{chapter}}{}{} \patchcmd{\chaptermark}{\thechapter}{\NUMBERstring{chapter}}{}{} \makeatother \usepackage[rm,tiny,compact, bf]{titlesec} Commented Jul 18, 2015 at 18:11
  • It produced the CHAPTER ONE format, until I introduced the \usepackage[rm,tiny,compact, bf]{titlesec} line of code. This reverted it to CHAPTER 1. Commented Jul 18, 2015 at 18:13

1 Answer 1

1

This code hopefully results in something close to what you want. I replaced loading fancyhdr with titleps, a sibling of titlesec which eases (re-)defining page styles :

\documentclass[12pt,a4paper, openright, twoside]{report}

\renewcommand{\contentsname}{TABLE OF CONTENTS}

\usepackage[pagestyles, clearempty]{titlesec}%
\usepackage{fmtcount,etoolbox}

\newpagestyle{Headings}{%
\sethead[][\sectiontitle][]{}{\MakeUppercase{\chaptername} \NUMBERstring{chapter}}{}
\setfoot{}{\thepage}{}
}
\usepackage{lipsum}

\titleformat{\chapter}[display]{\bfseries\normalsize\filcenter}{\chaptername \Numberstring{chapter}}{1\baselineskip}{}
\pagestyle{Headings}
\begin{document}

\tableofcontents\thispagestyle{empty}
\chapter{A first chapter}
\lipsum[1]

\section{A first section}
\lipsum[2-8]

\end{document}

enter image description here enter image description here enter image description here enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .