title: How do I break a long equation over lines?
body: <p>I am trying to add an equation in a new line. The problem is that the equation is too long for the line, and I need to break it manually. Otherwise, it just overlaps to the right column, or to the right margins (and looks ugly...).
  Is there a way LaTeX can brake the equation for me, so it seems nice?</p>
  
  <p>I'm attaching my latex code:</p>
  
  <pre><code>\begin{align*}
  f(n)-f(0) &amp;= A(n)-B(n)-C(n)-D(n)\cdot d-\left(A(0)-B(0)-C(0)-D(0)\cdot d\right) \\
            &amp;= A(n)-0-X-D(n)\cdot d-\left(0-0-0-0\right) \\
            &amp;= A(n)-X-D(n)\cdot d
  \end{align*}
  </code></pre>
  
  <p>The problematic line is the first line, which is too long. </p>