In the book documentclass how can you make the chapters be in capital letters?
For example:
Chapter 1 --> CHAPTER 1
etc...
In the book documentclass how can you make the chapters be in capital letters?
For example:
Chapter 1 --> CHAPTER 1
etc...
The book document class has a low-level macro named \chaptername, but what's used in the typesetting of chapter headers is \@chapapp. It's best to leave \chaptername alone and modify \@chapapp, by applying (a) \MakeUppercase to its argument and (b) a modest amount of letter-spacing to the all-caps string; without some letter-spacing, strings of all-caps letters can easily look very "blocky" and dense.
\documentclass{book}
\usepackage{microtype} % for '\textls' macro
\makeatletter % default is "\newcommand\@chapapp{\chaptername}"
\renewcommand\@chapapp{\textls[40]{\MakeUppercase{\chaptername}}}
\makeatletter
\begin{document}
\chapter{Good morning}
\end{document}
Addendum: If your document has one or more chapter-level appendices, and assuming you'll want the prefix string "Appendix" to be converted to uppercase letters as well, you will need to provide the following instructions after \appendix:
\makeatletter
\renewcommand\@chapapp{\textls[40]{\MakeUppercase{\appendixname}}}
\makeatletter
Package microtype Error: Letterspacing currently doesn't work with xetex.
– Adam
Feb 28 '16 at 21:15
microtype doesn't "do" letterspacing under XeLaTeX -- but it does work under LuaLaTeX; is that an option for you. If you're committed to XeLaTeX, I'm afraid letterspacing isn't available to you via the \textls macro.
– Mico
Feb 28 '16 at 21:34
A low level way of doing this is to simply have
\renewcommand\chaptername{CHAPTER}
In your preamble:
\documentclass{book}
\renewcommand\chaptername{CHAPTER}
\begin{document}
\chapter{Hello World}
\end{document}
microtypepackage. – Mico Feb 28 '16 at 19:49