I am using KOMA-class. Let's say I want my chapter titles to look like this:
However the closest thing I can get is this:
The code I used is this:
\documentclass{scrbook}
\usepackage{kantlipsum} %providing dummy text
\usepackage{adforn} %providing ornaments
\RedeclareSectionCommand[style=section,indent=0pt,beforeskip=2\baselineskip]{chapter}
\setkomafont{chapter}{\normalfont\large\scshape}
\renewcommand*{\raggedsection}{\centering}
\renewcommand*{\chapterformat}{\adforn{36}\enskip\thechapter.\ }
\begin{document}
\kant[1]
\chapter{An Interesting Chapter Title}
\kant[2]
\begin{center}
\vspace{\baselineskip}
\scshape\large \adforn{36}\enskip 1. An Interesting Chapter Title\enskip\adforn{36}
\\
\rule{2em}{1pt}
\end{center}
\noindent\kant[3]
\end{document}
Things I already modified:
- The font for the chapter title.
- Centering.
- Not starting a new page.
- Vertical space before the title.
But I don't know how to add characters or even a new line after the actual chapter title is printed.
I would also like to know about further ways than those I already used, KOMA-classes provide to change chapter titles (whether it makes sense to use them is another thing).
Edit: As schtandard remarked, one has to make a decision how the title should look when it takes several lines. So let's see for example if we can get the following to work:
My code (which is certainly terrible):
\begin{center}
\vspace{\baselineskip}
\scshape\large
\adforn{36}\hspace{-1em}
\parbox{11cm}{\centering 1. An Interesting Chapter Title Which is Way Too Long to Fit in One Line}
\hspace{-1em}\adforn{36}
\\[\baselineskip]
\rule{2em}{1pt}
\end{center}
Note that here the box has a fixed length of 11cm
which is fine for taking the picture, but in practice, one should be able to specify a maximal width so that the box becomes shorter if the title is short.