In the TeXbook Knuth set parameters for dimensions mostly as follows:
\parskip=3pt
Other package authors define such parameters without using the equal sign
\parskip30pt
Many later authors use the LaTeX \setlength
\setlength{\parskip}{30pt}
You can even define a constant somewhere and write:
\parskip\parsep
Even \parskip30PT or even \parskip10Pt works!
I favour \parskip30pt for macros in a package and \newlength for preamble commands in a document. Is there a right way to set a dimension parameter?
Note: here is a short minimal example of all the above commands for anyone wishing to try them out.
\documentclass[11pt]{article}
\usepackage{lipsum}
\begin{document}
\parskip30pt
\lipsum[1-2]
\parskip=3pt
\lipsum[1]
\setlength{\parskip}{30pt}
\lipsum[1]
\parskip\parsep
\lipsum[1]
\parskip25Pt
\lipsum[3]
\parskip30PT
\lipsum[4]
\texttt{\meaning\parsep}
\texttt{\the\parsep}
\end{document}
\setlengthof filelatex.ltxcontains the bug latex/3066 that is fixed by packagefixltx2e. It inserts a space between#1and#2. – Heiko Oberdiek Jan 20 '13 at 03:28\dimen0is not LaTeX syntax, so there is no reason (reading LaTeX: A Document Preparation System) to expect this to work. There was dicussion ages ago within the team about whetherexpl3(\dim_set:Nn, etc.) should support register numbers. We decided it should not, i.e. that anything that goes wrong if you do\dim_set:Nn { \dimen0 } { 10 pt }is not a bug. – Joseph Wright Jan 20 '13 at 09:23\letneeds an equal sign. – marczellm Jan 20 '13 at 13:41\let\foo==would be a trivial one! (Without the first=, you end up with\fooequal to whatever the next token is). – Joseph Wright Jan 20 '13 at 15:03