Suppose I have a length \mylength, defined to be
\setlength{\mylength}{5pt plus 1pt minus 2pt}
I'd like to make \mylength a fixed length, but keep the default length. In this example, I'd like
\setlength{\mylength}{5pt}
But what if I didn't know the definition of \mylength? I know I can use \the\mylength to have it printed in the document, which I then can inspect, but I was wondering whether there is a simple way to strip out the glue of a length.
1\mylengththe stretch and shrink components are removed. – egreg Dec 03 '16 at 11:02