3

Why do some commands like

\titlespacing*{\section}{0pt}{5.5mm plus 1mm minus .2mm}{4.3mm plus .2mm}

have this strange adding and subtracting for length. I.e. why not write 6.3mm instead of 5.5+1-.2?

The prototype for this command is \titlespacing*{<command>}{<left>}{<before-sep>}{<after-sep>}

So the numbers clearly represent spaces.

Thanks so much!

Hirek
  • 333
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Those spaces are stretchy. They allow TeX to adjust the spacing as required to optimise the output according to its algorithm. This is the stretchiness which enables the algorithm to figure out (in many cases) good page breaks etc. – cfr Jan 17 '15 at 00:29
  • The difference between rigid (static) and stretchable lengths. – Gonzalo Medina Jan 17 '15 at 00:30
  • It's related for sure but the answer to my question is: "it is glue stretching" whereas the other asks directly about glue stretching. So my question will help another newbie who is confused by the adding and subtracting inside space commands. – Hirek Jan 17 '15 at 00:48

1 Answers1

3
5.5mm plus 1mm minus .2mm

does not mean 6.3mm it means a length of natural size 5.5mm that can stretch a further 1mm or shrink by .2mm to help fit surrounding material into a predefined space (typically here the page height. This is called glue in the TeXBook or a Rubber Length in the LaTeX book.

David Carlisle
  • 757,742
  • Oh wow thank you so much! So ignorant on my part and Tex never ceases to amaze me with all the things I don't know! Again, thank you very much! – Hirek Jan 17 '15 at 00:33