7

I want to add some space before the chapters titles in classicthesis to get an effect like this thesis so I have modified the classicthesis.sty in this manner:


% chapters
\ifthenelse{\boolean{@linedheaders}}%
{% lines above and below, number right
\titleformat{\chapter}[display]%             
    {\relax}{\vspace*{0.125\textheight}{\raggedleft{\color{Maroon}\chapterNumber\thechapter} \\ }}{0pt}%
    {\titlerule\vspace*{.9\baselineskip}\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule]%
}{% something like Bringhurst  
\titleformat{\chapter}[display]%
    {\relax}{\vspace*{0.25\textheight}{\mbox{}\oldmarginpar{\vspace*{-3\baselineskip}\color{Maroon}\chapterNumber\thechapter}}}{0pt}%
    {\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule]% 
}

I want to ask you if this is the right manner to put that space and if the space is put in the right quantity.

10

It's never a good idea to modify directly a .sty file; that said, classicthesis uses the titlesec package to format the sectional unit headings and, in particular, it uses

\titlespacing*{\chapter}{0pt}{1\baselineskip}{1.2\baselineskip}

to control the space before and after chapter titles, so you can simply change the third (space after) and fourth (space after) arguments according to your needs; you can do this in the preamble of your document without changing classicthesis.sty. A simple example:

\documentclass[11pt,a5paper,footinclude=true,headinclude=true]{scrbook}
\usepackage[linedheaders,parts,pdfspacing]{classicthesis} % ,manychapters
\usepackage{lipsum}

\titlespacing*{\chapter}{0pt}{*12}{*7}

\begin{document}

\tableofcontents 

\chapter{Test Chapter One}
\section{A Section}
\lipsum[1-6]
\chapter{Test Chapter One}
\lipsum[1]
\section{A Section}
\lipsum[1]

\end{document}

Of course, instead of the values I used (refer to the documentation for titlesec) you can use any valid length.

enter image description here

If the changes in spacing must apply only to numbered chapters, instead of using \titlespacing, a solution using \titleformat to discriminate between numbered and unnumbered chapters (with the help of the numberless key) can be used; in the following code I illustrate this approach in the case of the lineheaders option; for numbered chapters a space of 8\baselineskip was added before the title and 2\baselineskip was added after the tile; unnumbered chapters maintain their original settings:

\documentclass[11pt,a5paper,footinclude=true,headinclude=true]{scrbook}
\usepackage[linedheaders,parts,pdfspacing]{classicthesis} % ,manychapters
\usepackage{lipsum}

\titleformat{\chapter}[display]%             
  {\vspace*{8\baselineskip}}{\raggedleft{\color{halfgray}\chapterNumber\thechapter} \\ }
  {0pt}{\titlerule\vspace*{.9\baselineskip}\raggedright\spacedallcaps}
  [\normalsize\vspace*{.8\baselineskip}\titlerule\vspace*{2\baselineskip}]
\titleformat{name=\chapter,numberless}[display]%             
  {\relax}{}
  {0pt}{\titlerule\vspace*{.9\baselineskip}\raggedright\spacedallcaps}
  [\normalsize\vspace*{.8\baselineskip}\titlerule]

\begin{document}

\tableofcontents 

\chapter{Test Chapter One}
\section{A Section}
\lipsum[1-6]
\chapter{Test Chapter One}
\lipsum[1]
\section{A Section}
\lipsum[1]

\end{document}
  • at how much correspond *12 or *7 in fraction of \baselineskip or in fraction of \textheight or in pt ? and what kind of measurement is it? – Aurelius Aug 16 '12 at 10:22
  • @FormlesCloud \titlespacing*{\chapter}{0pt}{*12}{*7} means 12 times 1ex plus .3ex minus .06ex and 7 times 1ex plus .1ex (see Section 3.2. Spacing of the documentation, specially page 5). – Gonzalo Medina Aug 16 '12 at 11:55
  • to make your spacing quantity in fraction of \textheight i have put \titlespacing*{\chapter}{0pt}{.1622\textheight}{.085\textheight} is right? where can i read some tips to put a space typographically correct, before and after the chapters titles? or can you give me that tips? and another things, how much difference there is in vertical spacing between the normal chapters and the linedheaders option ? – Aurelius Aug 16 '12 at 16:38
  • @FormlessCloud First question: yes. Second question: correct spacing before and after chapter titles is a very subjective matter and depends on many other attributes of the overall layout (something that is correct in some cases might not be in other); a professional typographer might give you some hints. Third question: you can chech classicthesis.sty to see the difference (see comment below). – Gonzalo Medina Aug 16 '12 at 20:24
  • @FormlessCloud linedheaders: \titleformat{\chapter}[display] {\relax}{\raggedleft{\color{halfgray}\chapterNumber\thechapter} \\ }{0pt}{\titlerule\vspace*{.9\baselineskip}\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule] without linedheaders: \titleformat{\chapter}[display] {\relax}{\mbox{}\oldmarginpar{\vspace*{-3\baselineskip}\color{halfgray}\chapterNumber\thechapter}}{0pt} {\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule]. Basically there's a small difference due to the rules. – Gonzalo Medina Aug 16 '12 at 20:26

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.