Section 2.2 of Robert Bringhurst's The Elements of Typographic Style deals with vertical rhythm. I want to try out some of his lessons in scrbook, to hone my LaTeX skills. Specifically, I want to define the leading of headings and spacing before and after them. For a text set 11/13, that is 11pt type and 13pt leading, Bringhurst lists four possible heading styles:
% A) 11/13 small caps, 13pt above, 13pt below
% B) 11/13 bold u&lc, 8pt above, 5pt below
% C) 11/13 caps, 26pt above, 13pt below
% D) 14/13 italic u&lc, 16pt above, 10pt below
With KOMA scripts, the use of the titlesec
package is discouraged. The documentation of the sectsty
package says:
"If you just want to change the fount used for all sectional headings, you shouldn’t use sectsty with any of the KOMA-script classes. Instead, you should redefine the \sectfont command provided by the KOMA-script classes. If you’d like different sectional headings to be printed with different styles of type to each other, or if you’d like to underline sectional headings or play other games that you can’t do with the KOMA-script \sectfont command, then sectsty might be of use with the KOMA-script classes."
Therefore I tried using this package. In a MWE (KOMA v. 3.18) I had
\documentclass[a4paper,11pt]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[]{blindtext}
\listfiles
\usepackage{sectsty}
\setkomafont{disposition}{\normalfont}
\sectionfont{\scshape\fontsize{11pt}{13pt}\selectfont} % A
\subsectionfont{\bfseries\fontsize{11pt}{13pt}\selectfont} % B
% C: \uppercase makes errors
\subsubsectionfont{\itshape\fontsize{14pt}{13pt}\selectfont} % D
\begin{document}
\chapter{Bringhurst heading examples}
\blindtext
\section{Typography Exists To Honor Content}
\blindtext
\subsection{Good Typography Is Like Bread}
\blindtext
\subsubsection{Ready to be admired, appraised and dissected before it is consumed}
\blindtext
\end{document}
I didn't know how to make all characters of a heading uppercase.
With \fontsize
I took care of the leading, but only the vertical space before the heading is affected.
I have read one should use \RedeclareSectionCommand
. However, using these commands after the sectsty commands overrides them. Moreover, an unwanted ident is added to the paragraph right after the heading. Instead, I found the combination of \RedeclareSectionCommand
and \addtokomafont
does (I think) what I want.
\documentclass[a4paper,11pt]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[]{blindtext}
\setkomafont{disposition}{\normalfont}
\RedeclareSectionCommand[
beforeskip=13pt,
afterskip=13pt]{section}
\RedeclareSectionCommand[
beforeskip=8pt,
afterskip=5pt]{subsection}
\RedeclareSectionCommand[
beforeskip=16pt,
afterskip=10pt]{subsubsection}
\addtokomafont{section}{\scshape\fontsize{11pt}{13pt}\selectfont}
\addtokomafont{subsection}{\bfseries\fontsize{11pt}{13pt}\selectfont}
\addtokomafont{subsubsection}{\itshape\fontsize{14pt}{13pt}\selectfont}
\begin{document}
\chapter{Bringhurst heading examples}
\blindtext
\section{Typography Exists To Honor Content}
\blindtext
\subsection{Good Typography Is Like Bread}
\blindtext
\subsubsection{Ready to be admired, appraised and dissected before it is consumed}
\blindtext
\end{document}
Still the indent remains. My questions for you are:
- How do I remove the indent?
- When using sectsty, the space before the chapter number and the chapter name dissapears. Also the vertical space above it, even when I haven't assigned any commands to change Chapter. Why?
- Is there a better way to accomplish these heading styles?
Thank you for reading!
titlesec
with the Koma classes apply equally, as far as I know, to any similar package, which would includesectsty
. That is, you'll lose functionality in the same way. I'm guessing thatsectsty
redefines e.g.\chapter{}
, probably to resemble the defaults, but those defaults are not Koma's defaults. In general, I think for this kind of experimentation, you would be better using a standard class since you don't want the constraints Koma imposes.