[Tex/LaTex] How to customize chapter heading in a fancy way

sectioning

I was studying a Master's thesis on functional analysis and I was attracted by the novel-like heading used by the author for the chapters. enter image description here

How can I replicate it?

Best Answer

Here is an example of what can be done with titlesec (and xrfill + xcolor):

\documentclass{book}
\usepackage[svgnames]{xcolor} 
\usepackage{titlesec}
\usepackage{xhfill}
\colorlet{rulecolor}{Gainsboro!40!Lavender}
\usepackage{lipsum} 

\titleformat{\chapter}[display]
{\filcenter}{\mbox{}\xrfill[0.4ex]{3pt}[rulecolor]\textsc{\large\enspace\chaptername \thechapter}\enspace\xrfill[0.4ex]{3pt}[rulecolor]\mbox{}}{0.3ex} {{\color{rulecolor}\titlerule[1pt]}\vskip3ex\huge\bfseries}[\medskip{\color{rulecolor}\titlerule[1pt]}]

\begin{document}

\chapter{The General Structure of\\ von Neumann Algebras}
\lipsum[2]

\end{document

enter image description here

Related Question