21

Everywhere the usual word is that it is 0. But that is clearly wrong, it is 0 + some rubber length. But how is that rubber length defined?

In my search I found the following definition in the memoir source:

\setlength\parskip{0\p@ \@plus \p@}

Now what does that actually mean? How can I for example scale it down so the rubber length is half the size? Half of what by the way? There is no number there just a \p@ is that a length?

3 Answers 3

21

\p@ is a LaTeX2e kernel dimension, equal to 1 pt. It is used as this saves some tokens in the kernel, and also makes it possible to write thinks like 0\pt, which TeX interprets as 0 times 1 pt. So written out 'long hand' the definition is '1pt'. (That token-saving was really important when LaTeX2e was written: \p@ is one token, 1pt is three. Today, it is more confusing than anything else.)

1
18

Use the \showthe Tex primative to show the value + rubber if you are unsure what all the tokens mean

\documentclass{memoir}
\begin{document}
\showthe\parskip
\end{document}

and the output in the log file

> 0.0pt plus 1.0pt.
l.3     \showthe\parskip

You can use these values to set a length

3
  • Can you comment on what l.3 means in this context?
    – E.P.
    Commented Sep 6, 2016 at 15:34
  • 1.3 is file 1, line number 3
    – Danie Els
    Commented Sep 7, 2016 at 7:25
  • Actually that's an l (for line), not a 1, in case that helps to remember what it means :)
    – Luc
    Commented Nov 24, 2020 at 15:10
11

You can get such settings very easily using (la)texdef. (TeXLive doens't install the latexdef symlink at the moment, so you have to use texdef -t latex instead)

$ texdef -t latex -c memoir -v parskip

\the\parskip:
0.0pt plus 1.0pt


$ texdef -t latex p@ @plus

\p@:
\dimen11


\the\p@:
1.0pt


\@plus:
macro:->plus

The \p@ is a dimension with 1pt and can be also used to add the pt unit behind numbers. The \@plus simply stands for the string plus. This is done to save token space (\p@ is one token, pt are two), which was important in earlier (La)TeX versions. So 0\p@ is 0x1pt = 0pt. The plus 1.0pt is a positive stretch amount. So the parskip is normally 0pt but can stretch till 0+1pt=1pt if required.

Such macros are also explained by Documentation reference for LaTeX internal commands?.

3
  • Have you considered uploading a package to TLcontrib that does contain the symlink?
    – Sharpie
    Commented May 11, 2011 at 15:46
  • @Sharpie: I got in contact with the TeXLive maintainers and got told that the didn't included a latexdef symlink in order to keep the number or new executable short and to not favor it before e.g. contextdef (which is also supported). Commented May 11, 2011 at 16:30
  • Fair enough, pretty easy to write a bash alias or wrapper. Thanks for such a great tool!
    – Sharpie
    Commented May 11, 2011 at 17:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .