8

Possible Duplicate:
Spacing issue for newenvironment wrapper of equation environment

I have

\newenvironment{mymath}{\begin{displaymath}\begin{array}{l}}{\end{array}\end{displaymath}}

but when I write

\begin{mymath}
 f(x) = 10
\end{mymath}
and some following text

there is an odd piece of horizontal space inserted before and some following text that is not there if I just write the begin and end commands for the environments out by hand.

marked as duplicate by egreg, Stefan Kottwitz Jan 18 '13 at 16:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

9

add \ignorespacesafterend as the last thing in your end code.

Not the answer you're looking for? Browse other questions tagged or ask your own question.