[Tex/LaTex] When is it better to use \par than \endgraf

macrospackage-writingparagraphstex-core

Just yesterday I had to patch a package file (changing the description to indicate that the file had changed) to replace some \par to \endgraf because the code had bad interactions with non-\long macros.

When writing a package, are there cases where it is better to use \par than \endgraf?

Best Answer

It depends whether the commands you are defining are ever going to be executed at a place where \par doesn't mean \endgraf. For example latex.ltx has

  \let\tabularnewline\\%
    \let\par\@empty

so if you might want to be evaluated in the scope of those definitions you have to decide whether you want the current definition of \par or of \endgraf.

Related Question