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.

In the following output, why do I get the undesired space before the (, and how to get rid of it globally?
Here is my code:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
&a=b\\
&\left(a\right)=b
\end{align*}
\end{document}

enter image description here

share|improve this question
1  
There's no need to use \left and \right there; it's a good example of why they should be used only when necessary. Can you give a more realistic example? –  egreg Jan 12 '13 at 18:49
    
@egreg this is just an example to show the space. –  Vahid Damanafshan Jan 12 '13 at 19:06
add comment

1 Answer

up vote 5 down vote accepted

The align enviroment always starts the second column (and all even numbered ones) with an empty object, because usually one starts these columns with a relation symbol and the empty object guarantees correct spacing.

The math mode spacing rules, however, tell that between an ordinary symbol (the empty object, in this case) and an Inner atom (the subformula delimited by \left and \right) a thin space is inserted.

This is a good example showing why \left and \right should not be used in general, but only when they really serve a purpose.

There is a workaround, anyway:

\documentclass{article}
\usepackage{amsmath,mleftright}
\begin{document}
\begin{align*}
&a=b\\
&\mleft(a\mright)=b
\end{align*}
\end{document}

enter image description here

This is however not a good reason to use indiscriminately \mleft and \mright. For instance,

\[
\mleft(\sum_{i=1}^{n} a_i\mright)
\]

is significantly worse than

\[
\biggl(\sum_{i=1}^{n} a_i\biggr)
\]

enter image description here

share|improve this answer
1  
@egreg thanks, but in your MWE, there is still a thin space before the (! One more thing: Why is \mleft worse than \biggl? –  Vahid Damanafshan Jan 12 '13 at 19:14
    
@egreg. I'm curious, you say your example with \mleft is significantly worse than that with \biggl. That's the opposite conclusion I was expecting from you (though I do agree with about not indiscriminately using \mleft). Do you care to explain why you feel your \mleft example is worse in your eyes? –  A.Ellett Jan 12 '13 at 19:19
    
@VahidDamanafshan and A.Ellet I don't know if this is what he means, but in my case is worse because it doesn't look good (it's too bigger, in that case, and the correct size, to my eyes, is the second one, which has to be written manually). –  Manuel Jan 12 '13 at 19:20
    
@VahidDamanafshan The tiny space is due to the shape of the parenthesis; just try without \mleft and \mright and you'll have the very same result. You can say \mleftright in the preamble; then \left will mean \mleft and \right will be \mright. –  egreg Jan 12 '13 at 20:10
    
@A.Ellett I think that just looking at the two typeset formulas shows that the \biggl-\biggr version is better than the \left-\right one, which has too tall delimiters. –  egreg Jan 12 '13 at 20:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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