[Tex/LaTex] the difference between \newenvironment and \newenvironment*

environmentsstarred-version

I vaguely seem to recall reading that \newenvironment* gives better spacing than \newenvironment, but I don't recall any details and I can't seem to find a reference by searching. What is the difference between these two, and when should one be used rather than the other?

[Note: I'll be happy for this to be closed as a duplicate, as long as someone can point to the question of which it is a duplicate; I cannot seem to locate such a question.]

Best Answer

The relation is the same as that between \newcommand and \newcommand*, which is covered in What's the difference between \newcommand and \newcommand*?

There's no influence on the environment's behavior, except as regards to the arguments to \begin{envname}.

Specifically, if you say

\newenvironment{foo}[1]
 {something with #1}
 {something else}

you're allowed to say

\begin{foo}{An argument 

  with a blank line}
The environment's contents

With perhaps a blank line
\end{foo}

while \newenvironment*{foo} wouldn't allow this and the argument should not contain any blank line (or \par command), but the environment's contents has no limitation (other than those possibly imposed by its definition).