6

I have an equation that is too long to fit on one line:

x = a + b + c + d + e + f

as an example of what it looks like. What is the correct way to handle this? Do i break it up over multiple lines? Do I decrease the font? I am using LyX as my editor.

Alex
  • 2,111

4 Answers4

12

Don't decrease the font size just to make an equation fit. The amsmath package has many multi-line alignment structures, the simplest of which perhaps is:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
x ={}&  a + b + c +{}\\
    & d + e + f
\end{align*}


or

\begin{align*}
x &=  a + b + c \\
  & + d + e + f
\end{align*}



\end{document}
David Carlisle
  • 757,742
6

i believe that the amsmath environments are available with lyx. you can try this:

\[
\begin{aligned}
  x &= a + b + c\\
    & \quad{} + d + e + f
\end{aligned}
\]
David Carlisle
  • 757,742
2

From http://forms.aps.org/author/styleguide.pdf , the Physical Review Style and Notation Guide they recommend that the continued line for an equation that you are breaking begin with a math operator not an expression.

\documentclass{article}
\begin{document}
\[
\begin{array}{ll}
x = & a + b + c\\
    & + d + e + f\\
\end{array}
\]
\end{document}

And another style guide from cstools agrees.

And they allow the option of lining up on the equality sign as valid also.

\documentclass{article}
\begin{document}
\[
\begin{array}{lll}
x & = & a + b + c\\
  & + & d + e + f\\
\end{array}
\]
\end{document}

The above is a very quick discussion of the issues. The proper environment to implement this is the ams align environment. But, I am out of time with a student who has a challenge.

David Carlisle
  • 757,742
  • As noted in a comment on the other answer, the spacing of array is not designed for operator alignment, the AMS alignments provide alignment points while giving the normal spacing around = – David Carlisle Mar 26 '13 at 19:24
1

You can split your equation over multiple lines using the "array" environment. Depending on the line width (whether you use one column or double column, A4 or use letter, etc), you have to look where you should split the equation. It maybe something like this:

\begin{align}
\label{eq1}
\begin{array}{ll}
x & = a + b + c\\
& + d + e + f
\end{array}
\end{align}

N.B: You can just use "align" too, but you should better use "array" to keep one label to your equation.

hmitcs
  • 196