LaTeX Please help Alignment of very very long equations in latex

  • Thread starter Thread starter AdityaNanda
  • Start date Start date
  • Tags Tags
    alignment Latex
AI Thread Summary
To align very long equations in LaTeX, users recommend using the "align" environment for better aesthetics and consistency, while others suggest "eqnarray" for simpler cases. The "multline" environment is also recommended for multi-line equations, as it allows for better formatting. For more complex alignments, the "IEEEeqnarray" environment from the IEEEtrantools package is favored for its flexibility and lack of formatting issues. The discussion emphasizes the importance of choosing the right environment to prevent equations from running off the page. Proper alignment enhances readability and presentation in LaTeX documents.
AdityaNanda
Messages
6
Reaction score
0
Please help! Alignment of very very long equations in latex

Hi all,

I need to type very long equations in LATEX.

\begin{equation} x = x'' + y'' + blah blah blah + z'' + blah ...\end {equation}

When I compile and create the pdf , the equations(the long ones) run into the edge of the page and beyond.

I want the RHS to start in the
 
Physics news on Phys.org
You should use "eqnarray" instead of "equation". Eg.
\begin{eqnarray}
blah blah blah 1 \nonumber\\
blah blah blah 2 \nonumber\\
...
blah blah blah end
\end{eqnarray}
 
djelovin said:
You should use "eqnarray" instead of "equation". Eg.
\begin{eqnarray}
blah blah blah 1 \nonumber\\
blah blah blah 2 \nonumber\\
...
blah blah blah end
\end{eqnarray}

I prefer using "align" for most things. While I'm not as fanatical as some, align is just more consistent and generally looks nicer. (Although I'm not entirely happy about the lack of space after the + in the second row on the board.)

\begin{align}<br /> x &amp;= x&#039;&#039; + blah blah \nonumber\\<br /> &amp;+ y&#039;&#039;+ blah blah<br /> \end{align}
 
I think the recommendation for multi-line equations nowadays is to use the multline environment where it works, and use the IEEEeqnarray environment (provided by the IEEEtrantools package) for everything else. IEEEeqnarray is an environment for the display of aligned equations that's more flexible than either align or eqnarray, without the formatting problems of the eqnarray environment.

The Not So Short Introduction to LaTeX2e recommends IEEEeqnarray this way in its math section as of a couple of years ago. There's also a more detailed overview available here.
 
Back
Top