in many places, latex defines \par
(usually via \everypar
) to do a lot of non-obvious things, things which most ordinary users (and even some "experts") haven't investigated and aren't aware of. using \endgraf
in these situations can lead to unexpected results.
some places where \par
is much safer are
note that a blank line in these contexts is equivalent to \par
, not \endgraf
.
in certain situations, such as within a footnote in plain tex, \par
isn't accepted, and \endgraf
must be used instead. however, latex.ltx
contains the line \let\endgraf=\par
so i'm not really sure where \endgraf
would be required in latex. (i've been corrupted sufficiently by long years of using plain tex that i sometimes get these things confused.)
\endgraf
rather than\par
?\endgraf
than\par
when the code might be used within the argument of a non-\long
macro. My question is to know why anyone would use\par
rather than\endgraf
, since I thought that the definition of the latter is\def\endgraf{\par}
and as such most often behaves identically. David provides a case where\par
is correct but not\endgraf
.\endgraf
is, of course,\let\endgraf\par
. For some of us,\endgraf
comes to the mind from the old days of Plain TeX; it has to be the "primitive\par
" or\let\par\endgraf
would pose some small problems.;-)
And LaTeX uses it all the time in the form\let\par\@@par
. You use\@@par
(or\endgraf
, the same) when you are sure you want the primitive meaning of\par
.