Aligning very long equations in LaTeX to fit the page

  • Topic: LaTeX 
  • Thread starter Thread starter AdityaNanda
  • Start date Start date
  • Tags Tags
    alignment Latex
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
3 replies · 4K views
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.)

[tex]\begin{align}<br /> x &= x'' + blah blah \nonumber\\<br /> &+ y''+ blah blah<br /> \end{align}[/tex]
 
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.