Is it possible to define a glue that TeX will not stretch any further than a given limit--under no circumstances?
In the following MWE, I want to set a piece of text apart from the rest by half a line, and in case that piece of text lies on a page break, that half line should be allowed to be stretched to one full line, so that the whole text stays on the baseline grid and fills the page. However, I never want the glue to stretch more than one line, no matter if the page would become underfull or not.
\documentclass{memoir}
\usepackage{tikz, lipsum, everypage}
% show the baseline grid
\makeatletter
\newcommand{\left@margin}{}
\AddEverypageHook{
\ifodd\value{page}\relax%
\renewcommand{\left@margin}{\spinemargin}
\else
\renewcommand{\left@margin}{\foremargin}
\fi
% + \trimtop because it is also "\trimbottom"
\tikz[overlay, remember picture, background rectangle/.style={fill=none},
shift={(current page.south west)},xshift={\left@margin + \trimedge},
yshift={\lowermargin + \trimtop}]%
{%
\draw[red!20!white,thin] (0,0) grid[step=\onelineskip] (\textwidth,
\textheight);%
\draw[red,thin] (0,0) rectangle (\textwidth,\textheight);
}%
}%
\makeatother
\parskip=0pt
\begin{document}
\lipsum*[1-2]
\vskip .5\baselineskip plus .5\baselineskip % HERE should be the .5 limit
This is a test line of text to show my case, and I needed a few words to fill the line.
\vskip .5\baselineskip plus .5\baselineskip % HERE should be the .5 limit
\lipsum*[1-2] Morbi auctor lorem non justo. Nam lacus libero, pretium at, lobortis
Morbi auctor lorem non justo. Nam lacus libero, pretium at, lobortis Morbi auctor
lorem non justo. Nam lacus libero, pretium at, lobortis Nam lacus libero, pretium at,
lobortis Morbi auctor lorem non justo. Nam
\section{Test}
\lipsum*[1]
\end{document}
The result looks like this:

You can see that the two lines including the space before and after it occupy 5 lines instead of just 4 lines.
plus 1mmif you will then end up with 1cm? – MiB Feb 01 '14 at 17:254pt plus 5and4pt plus 10to get glue that can stretch twice as fast as the other glue? – MiB Feb 01 '14 at 17:42\badnessof a line is (mostly) a measure of how far glue has stretched beyond its limits – David Carlisle Feb 01 '14 at 19:04