A \fill is 0pt plus 1fill by definition (in LaTeX kernel), but why 1.5\fill gives 0.0pt (the same for other multipliers)?



\skip_log:n {       \fill }
\skip_log:n { 1     \fill }
\skip_log:n { 1.5   \fill }
\skip_log:n { 1pt + \fill }


> \fill =0.0pt plus 1.0fill.
> 1\fill =0.0pt.
> 1.5\fill =0.0pt.
> 1pt+\fill =1.0pt plus 1.0fill.

Suppose \foo is a skip register; then the operation <factor>\foo can be performed, but since it's only defined on \dimen registers, the <skip> is converted to a <dimen> by removing the stretch and shrink components.

Look at the syntax for <dimen> and for <glue> on pages 270 and 271 of the TeXbook.

The \skip_log:n operation allows for operations on glue internally using \glueexpr (which is essentially an unnamed skip register) and finally using \showthe (which doesn't care about the nature of the following token).

If you do instead \skip_log:n { \fill*3/2 } you will get

> \fill *3/2=0.0pt plus 1.5fill.

because scaling (with integers) is allowed in a <glue expr>.

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.