0

I have been reading about vertical spacing commands in LaTeX and have come upon the command \vspace{\fill} which is similar to the command \vfill. My question is this: what does the \fill command do? Can it be placed outside the argument to some other command like \vspace? If not, is this because it defines a kind of "variable" version of a length like \baselineskip?

3

\fill is defined as \skip20 (well allocated with \newskip\fill, so the number might differ in different formats and builds), so it calls the skip register 20, which's value is 0pt plus 1fill. So \fill can be used anywhere where TeX expects a skip value or skip register, e.g. after \vspace or \hspace or after the primitives which are called by those (\vskip and \hskip). It is the same as anything defined with \newlength\foo and then \setlength\foo{0pt plus 1fill}.

A skip of 1fill means 1 of the second order of infinity, TeX has three orders of infinity fil, fill and filll, each being infinitely smaller than the following but infinitely larger than a finite value such as \maxdimen (which in turn is set to 16383.99998pt, being the largest dimension representable by TeX). The infinite units fil, fill and filll can only be used in the stretchable or shrinkable part of a skip, so after plus or minus (a skip is something like <len> plus <stretch> minus <shrink> with both the stretch and shrink being optional).

  • and fi units in luatex and ptex:-) – David Carlisle Nov 1 '19 at 0:19
  • @DavidCarlisle yes, but those weren't part of Knuthian TeX, feel free to edit if you want to add it, or write your own answer (which will most likely be better than mine anyways). – Skillmon Nov 1 '19 at 9:06
  • No, I was only being awkward, they are fairly useless: I only noticed them recently as they broke one of our test files. – David Carlisle Nov 1 '19 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.