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.

1

4 Answers 4

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}
1
  • 1
    I just want to point out that there are depending on the purpose some extensions to that with \begin{split}...\end{split} or \begin{multiline}...\end{multiline} See ams manual/guide for more help. Commented Jan 21, 2014 at 6:13
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}
\]
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.

1
  • 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 = Commented Mar 26, 2013 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.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .