TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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.

    
up vote 9 down vote accepted

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

share|improve this answer
    
Many thanks! That's perfect. – Michael Norrish Jan 18 '13 at 9:09

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