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.

I have some equations that don't fit in one line. In addition, they have different heights. I think it looks awful.

\documentclass{report}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\int_{E} \operatorname{Re}  ((Q f)(x) - g(x))^2 \mu(dx) &=
\int_{E} \left( \sum_{i=1}^n \operatorname{Re}(m_i) \,1_{A_i} (x)
- \operatorname{Re}(g(x))\right)^2 \mu(dx)\\
&=
\int_{E} \left( \sum_{i=1}^n  \operatorname{Re}(m_i) \,1_{A_i}(x) \right)^2
  -2 \sum_{i=1}^n  \operatorname{Re}(m_i)\,1_{A_i}(x)\, \operatorname{Re}(g(x)) \\
  & \quad +  \operatorname{Re}(g(x))^2 \mu(dx)\\
  &=
\int_{E}  \sum_{i=1}^n \operatorname{Re}(m_i)^2\, 1_{A_i}(x) 
  -2 \sum_{i=1}^n \operatorname{Re}(m_i) \,1_{A_i}(x)\, \operatorname{Re}(g(x))
  \\ 
  & \quad + \operatorname{Re}(g(x))^2 \mu(dx)\\
&=\sum_{i=1}^n  \int_{A_i}  \operatorname{Re}(m_i)^2 
  -2 \operatorname{Re}(m_i)\, \operatorname{Re}( g(x))\\
  & \quad + \operatorname{Re}(g(x))^2 \mu(dx)\\
&= \sum_{i=1}^n \int_{A_i}
(\operatorname{Re}(g(x) - m_i )^2 \mu(dx)
\end{align*}    

\end{document}

screenshot

Is there any chance to make it look better?

share|improve this question
    
You could start with replacing the first align*-line by &\hphantom{{}={}}\int_{E} \operatorname{Re} ((Q f)(x) - g(x))^2 \mu(dx) \\ , then the \\ & \quad can be removed. –  Stephen Nov 28 '12 at 18:26
add comment

1 Answer

How about this:

screenshot

\documentclass{report}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\int_{E} \operatorname{Re} &  ((Q f)(x) - g(x))^2 \mu(dx) =
\int_{E} \Big( \sum_{i=1}^n \operatorname{Re}(m_i) \,1_{A_i} (x)
- \operatorname{Re}(g(x))\Big)^2 \mu(dx)\\
&=
\int_{E} \Big( \sum_{i=1}^n  \operatorname{Re}(m_i) \,1_{A_i}(x) \Big)^2
  -2 \sum_{i=1}^n  \operatorname{Re}(m_i)\,1_{A_i}(x)\, \operatorname{Re}(g(x)) 
  +  \operatorname{Re}(g(x))^2 \mu(dx)\\
  &=
\int_{E}  \sum_{i=1}^n \operatorname{Re}(m_i)^2\, 1_{A_i}(x) 
  -2 \sum_{i=1}^n \operatorname{Re}(m_i) \,1_{A_i}(x)\, \operatorname{Re}(g(x))
   + \operatorname{Re}(g(x))^2 \mu(dx)\\
&=\sum_{i=1}^n  \int_{A_i}  \operatorname{Re}(m_i)^2 
  -2 \operatorname{Re}(m_i)\, \operatorname{Re}( g(x))
  + \operatorname{Re}(g(x))^2 \mu(dx)\\
&= \sum_{i=1}^n \int_{A_i}
(\operatorname{Re}(g(x) - m_i )^2 \mu(dx)
\end{align*}    

\end{document}

I hardly ever use \left / \right brackets, since they usually are too massive (unless you \smash{} the things inside). Better fine tune with \big, \Big and so on...

share|improve this answer
    
this is so awesome! Thanks a lot –  Adam Nov 28 '12 at 21:04
    
And \DeclareMathOperator\re{Re} in the preamble, using \re instead all of this \operatorname{Re} would be awesome. –  Manuel Nov 28 '12 at 23:16
    
I thought to a similar solution, but leaving only the left hand side in the first line. I endorse Manuel's advice and I'd also remove all the \, commands. Surely \left and \right are to avoid when enclosing a summation symbol, preferring \biggl and \biggr (maybe \Bigl and \Bigr are still too small). However the l and r variants should be used rather the unadorned \Big. –  egreg Nov 29 '12 at 0:29
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.