# How can I use something like \vspace{\baselineskip plus 10pt}

Is it possible to use \baselineskip with some extra glue inside of \vspace?

\documentclass{scrartcl}

\begin{document}
Text

\vspace{\baselineskip}
Works

\vspace{12pt plus 10pt minus 5pt}
Works

\vspace{\baselineskip plus 10pt minus 5pt}
Fails \dots
\end{document}

-
 On last line try \vspace{\the\baselineskip plus 10pt minus 5pt} – Yiannis Lazarides Jan 2 '12 at 19:00 @YiannisLazarides This won't work if \baselineskip has a non zero stretch or shrink component. Usually \baselineskip hasn't, but other glue parameter could. – egreg Jan 2 '12 at 20:42 @egreg Thanks. I guess is better to be conservative and use dimexpr, although most classes fix it in order to set \textheight to be a multiple of \baseline. – Yiannis Lazarides Jan 2 '12 at 20:48 @YiannisLazarides It's \glueexpr, anyway. – egreg Jan 2 '12 at 20:50

Since \vspace wants a "glue" as its argument and \baselineskip is a glue parameter, \vspace{\baselineskip plus 10pt minus 5pt} is incorrect; the easiest way is to say

\vspace{1\baselineskip plus 10pt minus 5pt}


as 1\baselineskip will make it into a simple dimension, discarding its possible plus and minus components.

Usually \baselineskip has zero stretching and shrinking components. If one wants to be on the safe side and add 10pt to the stretch and 5pt to the shrink components whatever they are, the "correct" way is

\vspace{\glueexpr\baselineskip + 0pt plus 10pt minus 5pt\relax}


Note: \vspace{\dimexpr\baselineskip plus 10pt minus 5pt\relax} works because when TeX scans for the \dimexpr it arrives to the p that cannot be part of a dimension expression and stops the scanning, having already converted \baselineskip to a dimension discarding the stretch and shrink components. So the final \relax is not the delimiter of \dimexpr and will go into the input stream (where it probably does no harm).

-
 Thanks for the \glueexpr.;) – Yiannis Lazarides Jan 2 '12 at 20:53 Thank’s for your detailed answer! – Tobi Jan 2 '12 at 20:55

use dimexpr for adding the skips

\vspace{\dimexpr\baselineskip plus 10pt minus 5pt\relax}

-
Thank you! Works fine :-) – Tobi Jan 2 '12 at 19:15
The \relax terminating \dimexpr should go after \baselineskip, but then 1\baselineskip is easier. – egreg Jan 2 '12 at 20:44