2

This question was revised on the basis of the comments.

I use the KOMA script to create the style of my textbook based on the instructions of the typesetter (who never used LaTeX but has designed many textbooks in Indesign).

The requirements for the vertical spacing are:

  • smaller font for figure and table captions
  • 1.35 times the font size for line spacing
  • half line spacing between paragraphs

Below you can see my implementation of the requirements, which is also MWE:

\documentclass[10pt,parskip=half-]{scrbook}
\usepackage{setspace}
\usepackage{lipsum}

\setkomafont{captionlabel}{\fontsize{9pt}{9pt}\selectfont\bfseries}
\setkomafont{caption}{\fontsize{9pt}{12.15pt}\selectfont\normalfont}
\setstretch{1.125}

\begin{document}

\lipsum[1]

\lipsum[2]

\begin{figure}
\caption{\lipsum[3]}
\end{figure}

\end{document}

As you have probably noticed, the implementation is quite confusing. I found that the KOMA 10pt option probably set \fontsize{10pt}{12pt}\selectfont as the default font. So to get 13.5pt for line spacing, I use the package setspace and \setstretch{1.125} (12*1.125=1.35).

On the other hand, I cannot use the same procedure for captions, because all my attempts to use the analogous procedure \fontsize{9pt}{10.8pt}\selectfont (9*1.2=10.8) and \setstretch{1.125} over it failed. So I specified \fontsize{9pt}{12.15pt}\selectfont instead (9*1.35=12.15).

This is quite inconsistent and probably should not be done this way. Could you please tell me how this should be done with the KOMA script?

enter image description here

9
  • In KOMA you can use \addtokomafont{disposition}{\setstretch{1.125}} to change the line spacing in headings, and \addtokomafont{caption}{\setstretch{1.125}} to change the line spacing in figure/table captions.
    – Skillmon
    Jun 27, 2023 at 4:35
  • @Skillmon This isn't working well, because I already use command \setkomafont{caption}{\fontsize{9pt}{9pt}\selectfont\normalfont}. If I add \setstretch{1.125} at the end, then font reverts back to 10pt. If I add \setstretch{1.125} in the beginning, then stretch reverts back to 1. How can I do both?
    – Pygmalion
    Jun 27, 2023 at 7:50
  • 1
    You force the line spacing with your \fontsize{9pt}{9pt}, the latter value is the line spacing. Maybe the size-reset can be fixed by loading scrhack before setspace (but I didn't test).
    – Skillmon
    Jun 27, 2023 at 8:05
  • 2
    Would you post a minimal working example, please? Otherwise all comments here are guesses. Skillmons first comment was a waste of time, because you already had some settings in your code.
    – Keks Dose
    Jun 27, 2023 at 12:40
  • 1
    BTW: KOMA-Script does not have options singlespacing, onehalfspacing or doublespacing. IMHO these are options of package setspace. Package setspace is completely independent from KOMA-Script.
    – cabohah
    Jun 28, 2023 at 11:29

1 Answer 1

1

This seems to be the easiest way:

\documentclass[10pt,parskip=half-]{scrbook}
\usepackage{setspace}
\usepackage{lipsum}

\usepackage[font={small, stretch=1.35}, labelfont=bf]{caption}

\setstretch{1.35}

\begin{document}

\lipsum[1]

\lipsum[2]

\begin{figure}
\caption{\lipsum[3]}
\end{figure}

\end{document}

Instead of \setstretch you could use

\AtBeginEnvironment{document}{\begin{spacing}{1.35}}
  \AtEndEnvironment{document}{\end{spacing}}

However, this factor of 1.35 may be or may be not what your typesetter had in mind. Should the linespread between lines in the caption be exactly like in normal text or a little bit less because the font is smaller?

3
  • Well, to be precise, the book designer just told me that they normally use a line spacing of 1.5 times the font size, but I should print different spacings and see for myself. 1.2x (LateX default ) does indeed look too dense, but 1.5x looks too sparse, so I went for the compromise 1.35x. I think this should be the same for all fonts used. So the spacing for caption text should be 9/10 of the spacing for normal text.
    – Pygmalion
    Jun 30, 2023 at 14:42
  • @Pygmalion That's how it is.
    – Keks Dose
    Jun 30, 2023 at 18:04
  • Actually, I tested your solution and you should have used 1.125 instead of 1.35, because the starting point is 1.2. What I like about your solution is that it has the same multiplication number for regular and caption text. What I don't like is that it uses additional package and it does not produce exactly the same result (the difference is about 1% in caption text spacing). The big question is, which solution will give more consistent results when LaTeX will try to stretch or compress the page vertically? Or is it the same?
    – Pygmalion
    Jun 30, 2023 at 18:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .