2

I'm working on my thesis, and I need my chapter titles to be centered so it says "CHAPTER " and then immediately under it the actual chapter title. Right now I have

\titleformat{\chapter}{\normalfont \center}{CHAPTER \thechapter}{}{}

but I can't figure out how to get the new line to work, as

\titleformat{\chapter}{\normalfont \center}{CHAPTER \thechapter \\}{}{}

fails to compile.

4

To center, the package offers you \filcenter; the fourth mandatory argument cannot be empty (it requires some length, even 0pt); this argument controls the vertical separation (since display format is used) between the label "Chapter #" and the actual title. No need to explicitly write "CHAPTER"; you can use \MakeUppercase{\chaptertitlename}. Adjust the settings according to your needs:

\documentclass{book}
\usepackage{titlesec}
\usepackage{lipsum}

\titleformat{\chapter}[display]
  {\normalfont\filcenter}{\MakeUppercase{\chaptertitlename}~\thechapter}{10pt}{}

\begin{document}

\chapter{Test Chapter}
\lipsum[1-4]

\end{document}

enter image description here

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.