Is there a way to center align chapter titles?
This answer assumes you are using the report
or book
document classes. i.e. \documentclass[...]{report}
or \documentclass[...]{book}
is at the top of your document.
The Easy Way
The easiest way to achieve what you are looking for is to use the expanded form of the chapter command:
% ## Expanded \chapter command ##
% Format: \chapter[<shorttitle>]{<title>}
% where <shorttitle> is used in the ToC
\chapter[Chapter Title]{\centering Chapter Title}
Obviously, this must be used where you would use \chapter
.
This method is not recommended.
The titlesec
Way
The more professional way of doing what you ask is to use the titlesec
package.
This is more powerful and is defined as follows:
\titleformat{<command>}[<shape>]{<format>}{<label>}{<sep>}{<before-code>}[<after-code>]
This may look daunting at first, but is simple when you've read Page 4 of the titlesec Documentation.
The default layout
For the default look of the chapter number above the title, use the following snippet in the preamble. Makes the chapter number line the size 'huge', the actual title 'Huge', bolds it, centers it and prints "Chapter X:\\<1 line of space>\\Some Title" when used.
\titleformat{\chapter}[display]{\bfseries\centering}{\huge Chapter \thechapter}{1em}{\Huge #1}
The side-by-side layout
To have the chapter number adjacent to the title, use the following snippet in the preamble. It affects \chapter
and makes it the size 'Huge', bolds it, centers it and prints in the format "Chapter X:<1em of space>Some Title" when used.
\titleformat{\chapter}{\Huge\bfseries\centering}{Chapter \thechapter}{1em}{#1}
Further notes
- The sizes can be changed by substituting
\huge
and\Huge
. - Changing
<format>
affects the whole heading, whereas<label>
is only for the label and<before-code>
for the title. #1
is required in<before-code>
(it's the title text) when\usepackage[explicit]{titlesec}
is used.
Recommended Reading: titlesec Documentation
MWE
\documentclass{report}
\usepackage{lipsum}
\usepackage[explicit]{titlesec}
\titleformat{\chapter}[display]{\bfseries\centering}{\huge Chapter \thechapter}{1em}{\Huge #1}
\begin{document}
\chapter{Some Chapter}
\lipsum[1]
\chapter*{Unnumbered Chapter}
\lipsum[1]
\end{document}
Assuming you're using one of the "standard" document classes (i.e., article
, report
or book
) or a document class that's based on one of the standard classes, you could achieve your objective by adding the following instructions to the preamble:
\usepackage{sectsty}
\chapterfont{\centering}