Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

    

1 Answer 1

up vote 8 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.