Reputation: 113
I am trying to make the title CHAPTER 1 is aligned in the center and the title of the chapter is aligned to the left.
\titleformat{\chapter}[display]
{\large\bfseries}{\filcenter\chaptertitlename\ \thechapter}
{20pt}{\MakeUppercase{#1}}
\titlespacing*{\chapter}
{0pt}{0pt}{20pt} %controls vertical margins on title
But, then how can I change the font size? that is, for example, I need "CHAPTER 1" smaller than the title "Introduction".
Upvotes: 1
Views: 11655
Reputation: 218
You can change the font size by adding a command right before #1
, like so:
\documentclass{book}
\usepackage[explicit]{titlesec}
\titleformat{\chapter}[display]
{\large\bfseries}{\filcenter\chaptertitlename\ \thechapter}
{20pt}{\Huge\MakeUppercase{#1}}
\titlespacing*{\chapter}
{0pt}{0pt}{20pt} %controls vertical margins on title
\usepackage{lipsum}
\begin{document}
\chapter{Introduction}
\lipsum[1]
\end{document}
Upvotes: 5