2

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:

  1. 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.

  2. 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}
1

Redo the relevant \titleformat command:

\documentclass[headinclude, oneside]{scrbook}
\usepackage[eulerchapternumbers,beramono,pdfspacing]{classicthesis}
\usepackage{arsclassica}
\usepackage{setspace}
\usepackage{lipsum}

\titleformat{\section}
  {\singlespacing}
  {\textsc{\MakeTextLowercase{\thesection}}}
  {1em}
  {\spacedlowsmallcaps}


\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}

With or without arsclassica is the same.

enter image description here

  • Nice! Out of interest, do you know why does the etoolbox approach doesn't work? – ali_m Nov 15 '15 at 16:18
  • @ali_m Since classicthesis uses titlesec, there are several layers added and \@sect is “almost unreachable”. – egreg Nov 15 '15 at 16:21
  • Ah, I see - so does that mean I have no option but to define my own \titleformat for each type of heading I want to use? What you've provided looks great, but I was hoping that there would be a more generic way to enforce single-spacing without having to specify anything else about the formatting. – ali_m Nov 15 '15 at 16:32
  • 1
    @ali_m As I said, classicthesis uses quite an involved method for setting the headings; just look in the code and add \singlespacing to the \titleformat instructions where there's \relax, similar to the code I showed. – egreg Nov 15 '15 at 16:45
  • Thanks - your comments pushed me towards trying to better understand how the template works, and I'm now convinced that the simplest option is probably just to add \singlespacing to arsclassica.sty where appropriate. – ali_m Nov 15 '15 at 19:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.