2

I'm using a working template containing this line below and am wondering what unit is used? I'd expect at least e.g. 3.18pt to be necessary.

\vspace{3.18\baselineskip}
jjk
  • 285
  • 5
    \baselineskip is already a "length" and contains the units inside it! If you use something else like a number or a variable that is a number you HAVE to include the units too inside the \vspace command as you expect. PS:You can print its value by using the command \the\baselineskip – koleygr Jul 15 '19 at 12:07

2 Answers2

7

The control sequence \baselineskip in that context denotes “whatever value is currently stored in the parameter \baselineskip”.

Internally this is just a number, but it's convenient to think it as expressed in unit pt.

So you are asking TeX to multiply that length by the factor 3.18; if \baselineskip happens to be 12pt, the result will be a vertical space of 38.16pt.

egreg
  • 1,121,712
  • In conclusion I understood if only a digit is used, pt is the (default) unit, is that correct? Grepping through the complete file didn't reveal any baselineskip <> pt relation – jjk Jul 15 '19 at 13:46
  • 3
    @AikenCura No, pt is not implied as a default: \baselineskip refers to a length and it's immaterial if it is stored in points, millimeters or yards. You're just multiplying that length by 3.18. – egreg Jul 15 '19 at 14:02
1

Inspired by egreg's perfect answer, maybe the following code is useful to you (using the printlen package).

\documentclass{article}

% https://ctan.org/pkg/printlen \usepackage{printlen}

\begin{document}

\begin{description} \item[textwidth (mm)] \uselengthunit{mm}\printlength{\textwidth} \item[textwidth (in)] \uselengthunit{in}\printlength{\textwidth} \item[baselineskip (pt)] \uselengthunit{pt}\printlength{\baselineskip} \end{description}

\end{document}

enter image description here


enter image description here

(Taken from the printlen manual, version 2009-09-03).