1

I want this equation to break into different lines at each of the line breaks indicated below.

f = c_{A1}x_{A1}+c_{A2}x_{A2}+c_{A3}x_{A3}+c_{B1}x_{B1}+c_{B2}x_{B2}+c_{B3}x_{B3} \\ 
+ c_{X1}[y_X,(W/S)_X,(T/W)_X,(AR)_X]X_{X1} \\
+ c_{X2}[y_X,(W/S)_X,(T/W)_X,(AR)_X]X_{X2} \\ 
+ c_{X3}[y_X,(W/S)_X,(T/W)_X,(AR)_X]X_{X3}

The line breaks are not working. I tried using the \usepackage{amsmath} option and the \begin{align} option with & to align the split equatio but it just returns an error when I compile the whole document.

Is there anyway around this problem?

1
  • Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. — “But it just return an error […]”? Which one? Jun 10, 2013 at 2:19

2 Answers 2

2

It should work.

Here are two ideas to split one equation on more lines. (The align family is used to align more than one equation.)

Code

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{multline}
f  = c_{A1}x_{A1}+c_{A2}x_{A2}+c_{A3}x_{A3}+c_{B1}x_{B1}+c_{B2}x_{B2}+c_{B3}x_{B3} \\ 
    + c_{X1}[y_X,(W/S)_X,(T/W)_X,(AR)_X]X_{X1} \\
    + c_{X2}[y_X,(W/S)_X,(T/W)_X,(AR)_X]X_{X2} \\ 
    + c_{X3}[y_X,(W/S)_X,(T/W)_X,(AR)_X]X_{X3}
\end{multline}

\begin{equation}
\begin{split}
f &  = c_{A1}x_{A1}+c_{A2}x_{A2}+c_{A3}x_{A3}+c_{B1}x_{B1}+c_{B2}x_{B2}+c_{B3}x_{B3} \\ 
 & \hphantom{{}={}}  + c_{X1}[y_X,(W/S)_X,(T/W)_X,(AR)_X]X_{X1} \\
 & \hphantom{{}={}}   + c_{X2}[y_X,(W/S)_X,(T/W)_X,(AR)_X]X_{X2} \\ 
 & \hphantom{{}={}}   + c_{X3}[y_X,(W/S)_X,(T/W)_X,(AR)_X]X_{X3}
\end{split}
\end{equation}
\end{document}

Output

enter image description here

0

For example:

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\[
\begin{split}
        f &= c_{A1}x_{A1}+c_{A2}x_{A2}+c_{A3}x_{A3}+c_{B1}x_{B1}+c_{B2}x_{B2}+c_{B3}x_{B3} \\ 
  & \quad{} + c_{X1}[y_X,(W/S)_X,(T/W)_X,(AR)_X]X_{X1} \\
   & \quad{}+ c_{X2}[y_X,(W/S)_X,(T/W)_X,(AR)_X]X_{X2} \\ 
  & \quad {}+ c_{X3}[y_X,(W/S)_X,(T/W)_X,(AR)_X]X_{X3}
\end{split}
\]

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.