Please help Alignment of very very long equations in latex

  • Context: LaTeX 
  • Thread starter Thread starter AdityaNanda
  • Start date Start date
  • Tags Tags
    alignment Latex
Click For Summary

Discussion Overview

The discussion focuses on the alignment of very long equations in LaTeX, exploring various environments and methods for formatting equations effectively. Participants share their experiences and preferences regarding different LaTeX environments suitable for multi-line equations.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant seeks assistance with long equations that extend beyond the page margins when using the "equation" environment.
  • Some participants recommend using the "eqnarray" environment as a solution for aligning long equations.
  • Another participant expresses a preference for the "align" environment, citing its consistency and aesthetic appeal, while noting a minor formatting issue with spacing.
  • One participant suggests the "multline" environment for multi-line equations and the "IEEEeqnarray" environment for more flexibility, referencing a recommendation from a LaTeX guide.

Areas of Agreement / Disagreement

Participants present multiple competing views on the best environment to use for aligning long equations, with no consensus reached on a single preferred method.

Contextual Notes

Some participants mention specific formatting issues and preferences, but these are not universally agreed upon. The discussion reflects a variety of approaches without resolving the best practices for all scenarios.

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.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 11 ·
Replies
11
Views
9K