6

According to latexref.xyz:

The \baselineskip is a rubber length

but also

The \baselineskip’s value is reset every time a font change happens and so any direct change to \baselineskip would vanish the next time there was a font switch.

Now if I do \showthe\baselineskip in an empty article I see 12.0pt, without plus and minus component. Would it make sense to use these components? In what situations, and how does one use these components if the value gets reset? If it does not make sense, why is it specifically a rubber length?

1 Answer 1

11

You almost never want variable baseline spacing in normal running text, but it can be useful in some display contexts, eg to adjust the line spacing to make a paragraph match the height of an adjacent image.

enter image description here

\documentclass{article}

\usepackage{graphicx}

\begin{document}


\includegraphics[height=6cm, width=3cm]{example-image}
\parbox[b][6cm][b]{3cm}{%
A paragraph of text alongside an image.
A paragraph of text alongside an image.
A paragraph of text alongside an image.
A paragraph of text alongside an image.
A paragraph of text alongside an image.
A paragraph of text alongside an image.
}

\bigskip

\includegraphics[height=6cm, width=3cm]{example-image}
\parbox[b][6cm][s]{3cm}{%
\setlength\baselineskip{12pt plus 5pt minus 1pt}
A paragraph of text alongside an image.
A paragraph of text alongside an image.
A paragraph of text alongside an image.
A paragraph of text alongside an image.
A paragraph of text alongside an image.
A paragraph of text alongside an image.
}


\end{document}

You must log in to answer this question.

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