I've been writing my PhD thesis using the classicthesis
template with the arsclassica
style package. My university requires that I double-space the body of the thesis, so I'm using \doublespacing
for most of the document. This has the annoying effect of double-spacing my chapter and section headings as well. I could manually insert \singlespacing
before and \doublespacing
after every chapter/section/subsection heading, but this would be very tedious.
I'm aware of several previous answers on this topic, in particular this one from @GonzaloMedina, which suggests two possible remedies:
Use
etoolbox
to insert\singlespacing
before, and\doublespacing
after, each sectional unit:\usepackage{etoolbox} \makeatletter \pretocmd{\@sect}{\singlespacing}{}{} \pretocmd{\@ssect}{\singlespacing}{}{} \apptocmd{\@sect}{\doublespacing}{}{} \apptocmd{\@ssect}{\doublespacing}{}{} \makeatother
Unfortunately this doesn't seem to have any effect for
classicthesis
documents.Use
titlesec
to specify the formatting of the headings directly:\usepackage{titlesec} \titleformat{\section} {\singlespacing\normalfont\Large\bfseries}{\thesection}{1em}{} \titleformat{\subsection} {\singlespacing\normalfont\large\bfseries}{\thesubsection}{1em}{} \titleformat{\subsubsection} {\singlespacing\normalfont\normalsize\bfseries}{\thesubsubsection}{1em}{}
However, this overrides the nice default formatting provided by
arsclassica
/classicthesis
.
In the comments section under that question, @PeterGrill suggests using
\let\OldSection\section
\renewcommand*{\section}[1]{\singlespace\OldSection{#1}\doublespace}
This is the closest I currently have to a working solution, but it unfortunately prevents me from using the optional \section[Short title]{Long title}
syntax, which would be useful for some of my long section headings. He also suggested another variant to address this:
\usepackage{letltxmacro}
\LetLtxMacro\OldSection\section
\renewcommand*{\section}[2][]{\singlespace\OldSection[#1]{#2}\doublespace}
But, as Gonzalo pointed out, this prevents the TOC from being generated correctly.
In short, I'd like to know whether there is a better way to specifically enforce single spacing for chapter/section/subsection headings within an otherwise double-spaced document that uses classicthesis
/arsclassica
.
Below is a simple test-case:
\documentclass[headinclude, oneside]{scrbook}
\usepackage[eulerchapternumbers,beramono,pdfspacing]{classicthesis}
\usepackage{setspace}
\usepackage{lipsum}
\begin{document}
\doublespacing
\section[A short section name]{A long section name that spans multiple lines within the document but should be single-spaced}
\lipsum[1]
\section[Another short section name]{Another long section name that spans multiple lines within the document but should be single-spaced}
\lipsum[2]
\end{document}