Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

up vote 15 down vote accepted

\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.)

share|improve this answer
    
It may seem mostly confusing, but it comes in handy if you want to use an alternate definition of pt. –  doncherry Dec 11 '11 at 16:39

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?.

share|improve this answer
    
Have you considered uploading a package to TLcontrib that does contain the symlink? –  Sharpie May 11 '11 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). –  Martin Scharrer May 11 '11 at 16:30
    
Fair enough, pretty easy to write a bash alias or wrapper. Thanks for such a great tool! –  Sharpie May 11 '11 at 17:54

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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