I've found a thesis with really beautiful chapter headings that I would like to use. What package am I going to need and how would I go about creating a heading that looks like the one below. Also, if you have or know of any nice headings do please share!

Asked
Active
Viewed 5,860 times
5
1 Answers
9
Here's an option using the titlesec package:

I've used the general format of the titleformat command:
% from the titlesec package
%\titleformat{ command }
% [ shape ]
% { format }{ label }{ sep }{ before-code }[ after-code ]
You can find more information by studying the documentation, and by viewing other similar questions on this site.
Here's a complete MWE to play with:
% arara: pdflatex
\documentclass{report}
\usepackage{lipsum}
\usepackage[explicit]{titlesec}
% title format for the chapter
\titleformat{\chapter}
{\bfseries\large}
{}
{0pt}
{\titlerule[3pt]~\raisebox{-1.5pt}{\sc{\chaptername}~\thechapter}~\titlerule[3pt]%
\\\vspace{.05cm}\titlerule\\\filcenter #1 \\\vspace{.25cm}\titlerule}
\begin{document}
\chapter{First chapter}
\lipsum[1]
\chapter{Second chapter}
\lipsum[2]
\end{document}
You mention that you might like to see other ideas; here's another one, again using the titlesec package but without the explicit option - I have used the tcolorbox package to put a box around the chapter number. I don't know if I'd recommend it for a thesis, but it might give you some further ideas:

Here's the code:
% arara: pdflatex
% !arara: indent: {overwrite: yes}
\documentclass{report}
\usepackage{lipsum}
\usepackage{titlesec}
\usepackage{tcolorbox}
\tcbuselibrary{skins}
% title format for the chapter
% custom chapter
\titleformat{\chapter}
{\normalfont\Large\filleft\bfseries} % format applied to label+text
{} % label
{1pc} % horizontal separation between label and title body
{%
% draw a box around the chapter number
\begin{tcolorbox}[
enhanced,flushright upper,
boxrule=1.4pt,
colback=white,colframe=black!50!yellow,
drop fuzzy midday shadow=black!50!yellow,
width=2.8cm]
\resizebox{2cm}{!}{\color{gray!80}\thechapter}%
\end{tcolorbox}\Huge} % before the title body
[] % after the title body
\begin{document}
\chapter{First chapter}
\lipsum[1]
\chapter{Second chapter}
\lipsum[2]
\end{document}
Martin Argerami
- 315
cmhughes
- 100,947
-
Good, but this adds numbering to the preface, contents, and index by default. What should I do? – albo Feb 16 '21 at 23:48
-
@albo I'd recommend a new question, with a small, complete minimal example that demonstrates the problem – cmhughes Feb 17 '21 at 15:37
-
\documentclass{...}and ending with\end{document}. – Henri Menke Aug 03 '14 at 10:46