[texhax] Stretchable line skip in scrartcl?

Ulrike Fischer news3 at nililand.de
Thu May 18 16:47:41 CEST 2017

Am Wed, 17 May 2017 19:13:38 +0000 schrieb Aleksandar Zec:

> Hi all,
> I have successfully used many times this method, provided by Heiko
> Oberdiek, to stretch line skip in cases of emergency:
> http://tug.org/pipermail/texhax/2010-October/015736.html

> However, it doesn't work with koma classes, say scrartcl.

KOMA redefines \baselinestretch from "nothing" to 1. 

This means that in the code somewhere the calculation

\baselineskip= 1\baselineskip

is done. And it this case TeX force the glue (with stretchable
space) into a dimen (without it). You would get the same effect with
article, if you would add a \renewcommand\baselinestretch{1} to your

You could try \renewcommand\baselinestretch{}, but it could fail if
KOMA uses the command in places where a number is expected. Or you
could use \glueexpr in \set at fontsize:


\patchcmd\set at fontsize{\baselineskip\f at linespread\baselineskip}{%
 \ifdefempty{\f at linespread}%
 {\baselineskip=\glueexpr \baselineskip *
\f at linespread\relax}}{}{\fail}

\let\org at set@fontsize\set at fontsize
\def\set at fontsize#1#2#3{%
  \advance\@tempskipa by 0pt\@plus 1pt\relax
  %\advance\@tempskipa by 0pt\@plus .2\@tempskipa\relax
  \expandafter\set at fontsize@i\the\@tempskipa\@nil{#1}{#2}%
\def\set at fontsize@i#1\@nil#2#3{%
  \org at set@fontsize{#2}{#3}{#1}%



\rule{1cm}{10cm} %to force a page break


Ulrike Fischer 

More information about the texhax mailing list