0

I would like to make two changes to the the standard book class handling of \chapter:

  1. I would like to change the font, and
  2. I would like to change the chapter number from numeric (e.g., 1) to alpha (e.g., One).

The solution to the first is to use the titlesec package.

The solution to the second is shown in How to change the chapter number to display as text (One, Two, ...)? .

My difficulty is getting a solution that works for both. In my MWE, remove the comments from Preamble Option A to solve the first; remove the comments from Preamble Option B to solve the second. Remove the comments from both and you no longer solve the second. (I have tried changing the order and that doesn't help).

I am using LuaLaTex on Windows 10. If you don't have arial, substitute any font that will show a successful substitution.

\documentclass[11pt]{book}

\usepackage{fontspec}
\newfontface{\MyScriptFontChapter}[SizeFeatures={Size=40}]{arial}

%%%%%%%%%%%%%%%%%%%%%%%%%
% Preamble Option A
%%%%%%%%%%%%%%%%%%%%%%%%%

%\usepackage{titlesec}
%\titleformat{\chapter}[display]
%{\MyScriptFontChapter}{\chaptertitlename\ \thechapter}{20pt}{}
%\titlespacing*{\chapter} {0pt}{50pt}{40pt}

%%%%%%%%%%%%%%%%%%%%%%%%%
% Preamble Option B
%%%%%%%%%%%%%%%%%%%%%%%%%

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

\begin{document}

    \chapter {MyChapter}

\end{document}
1

1 Answer 1

1

Here's how to do without patching whatever: just titlesec and fmtcount:

\documentclass[11pt]{book}

\usepackage{fontspec}
\newfontface{\MyScriptFontChapter}[SizeFeatures={Size=40}]{Arial}

\usepackage[pagestyles]{titlesec}
\titleformat{\chapter}[display]
{\MyScriptFontChapter}{\chaptertitlename\ \Numberstring{chapter}}{20pt}{}
\titlespacing*{\chapter} {0pt}{50pt}{40pt}

\usepackage{fmtcount}

\newpagestyle{mystyle}{%
\sethead[\thepage][][\itshape\MakeUppercase{\chaptertitlename~\NUMBERstring{chapter}.\quad\chaptertitle}]%
{\itshape\MakeUppercase{\chaptertitlename~\NUMBERstring{chapter}.\quad\chaptertitle}}{}{\thepage}
\setfoot{}{}{}
}
\pagestyle{mystyle}
\usepackage{lipsum}

\begin{document}

    \chapter {MyChapter}

\lipsum[1-20]

\end{document} 

enter image description here

You must log in to answer this question.

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