I already have found the solution to define a new environment without the additional space above the paragraph. But why does the "vanilla" way of defining this not work?


enter image description here





%%% the GOOD definition

%%% the PROBLEMATIC definition


    bad vertical spacing


  • 3
    AFAIK \begin{center}...\end{center} adds space. See tex.stackexchange.com/q/23650/35864. So if you don't want additional space (which together with a minipage could add up), \begin{center}...\end{center} is probably not your weapon of choice.
    – moewe
    Dec 22, 2018 at 20:21
  • 2
    As for the error: In the MWE \singlespacing is undefined. LaTeX throws an error (which should not be ignored!), but continues pretending \singlespacing wasn't there.
    – moewe
    Dec 22, 2018 at 20:24
  • 1
    I'm not sure if you need the \ignorespaces at the beginning of the environment definition. It seems somewhat pointless to suppress spaces there, since they would have to come from the macro definition itself and there aren't any. I'm also not sure if the \ignorespacesafterend is needed here.
    – moewe
    Dec 22, 2018 at 20:36
  • 3
    It's a bit later for me now, but I will write up an answer tomorrow if no one complains about what I commented here.
    – moewe
    Dec 22, 2018 at 20:56
  • 2
    also \ignorespaces\par is the same as \par as there are no spaces between \ignorespaces and \par. Dec 22, 2018 at 21:02

1 Answer 1


As explained in When should we use \begin{center} instead of \centering? \begin{center}...\end{center} is implemented via a list (\trivlist) and causes vertical space before and after the centred text. \centering on the other hand will not add additional vertical space.

That means that your asdf environment gets the 'usual' vertical spacing of a display environment, while goodgood just gets the spacing one gets when moving on to the next paragraph (due to the \par).

You don't need the \ignorespaces at the beginning of goodgood: \ignorespaces\par is the same as \par as David Carlisle pointed out in the comments. Since the environment ends with a \par I also don't think the \ignorespacesafterend is required.

  • To add some evenly divided space above and below, is it good practice to simply add \vspace{2.0ex} at the beginning and end? Like this: -> \newenvironment{specialnote}{\vspace{2ex}\par\centering\begin{minipage}{0.8\linewidth}\small\sffamily}{\end{minipage}\par\vspace{2ex}} (You switched asdf and goodgood, btw.)
    – henry
    Dec 31, 2018 at 16:18
  • @henry Thanks for catching the name confusion (I hope the edit fixed it). I'm not sure about best practices with \vspace. I'd have thought it would be more natural to use \trivlist or a \list, but I'm not sure what one would have to do to get what you wanted then. Maybe you should ask a new question about that.
    – moewe
    Dec 31, 2018 at 16:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .