6

I'm very new to this. This is what I'm trying to do:

\begin{equation}\label{eq.7}
    \begin{split}
    CTS = 
    {P_1}_1 \cdot {L_1}_1 + {P_1}_2 \cdot {L_1}_2 + {P_1}_3 \cdot {L_1}_3+{P_1}_4
      \cdot {L_1}_4+{P_1}_5 \cdot {L_1}_5 +\\
    {P_2}_1 \cdot {L_2}_1 + {P_2}_2 \cdot {L_2}_2 + {P_2}_3 \cdot {L_2}_3+{P_2}_4
      \cdot {L_2}_4+{P_2}_5 \cdot {L_2}_5+\\
    {P_3}_1 \cdot {L_3}_1 + {P_3}_2 \cdot {L_3}_2 + {P_3}_3 \cdot {L_3}_3+{P_3}_4
      \cdot {L_3}_4+{P_3}_5 \cdot {L_3}_5+\\
    {P_4}_1 \cdot {L_4}_1 + {P_4}_2 \cdot {L_4}_2 + {P_4}_3 \cdot {L_4}_3+{P_4}_4
      \cdot {L_4}_4+{P_4}_5 \cdot {L_4}_5+\\
    {P_5}_1 \cdot {L_5}_1 + {P_5}_2 \cdot {L_5}_2 + {P_5}_3 \cdot {L_5}_3+{P_5}_4
      \cdot {L_5}_4+{P_5}_5 \cdot {L_5}_5\\
    \end{split}
\end{equation}

All but the last line are good. How do I correct the alignment of the last line?

Zarko
  • 296,517
Chet
  • 231
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Your question looks very similar to http://tex.stackexchange.com/questions/3782/how-can-i-split-an-equation-over-two-lines?rq=1 or http://tex.stackexchange.com/questions/14665/split-equation-problem?rq=1. Do the answers given there help you already? – cryingshadow Dec 10 '15 at 18:22
  • 1
    Your equation is quit unusual typeset ... what means {P_1)_1? If you have indices for matrices, than is correct P_{11}, if your indices have sub-indices, than you should write P_{1_1}. Also \cdot as multiplication symbol can be omitted. – Zarko Dec 10 '15 at 18:51

3 Answers3

3

You can use & for align items in different lines

\begin{equation}\label{eq.7}
\begin{split}
CTS = 
{P_1}_1 \cdot {L_1}_1 &+ {P_1}_2 \cdot {L_1}_2 + {P_1}_3 \cdot {L_1}_3+{P_1}_4
  \cdot {L_1}_4+{P_1}_5 \cdot {L_1}_5 +\\
{P_2}_1 \cdot {L_2}_1 &+ {P_2}_2 \cdot {L_2}_2 + {P_2}_3 \cdot {L_2}_3+{P_2}_4
  \cdot {L_2}_4+{P_2}_5 \cdot {L_2}_5+\\
{P_3}_1 \cdot {L_3}_1 &+{P_3}_2 \cdot {L_3}_2 + {P_3}_3 \cdot {L_3}_3+{P_3}_4
  \cdot {L_3}_4+{P_3}_5 \cdot {L_3}_5+\\
{P_4}_1 \cdot {L_4}_1 &+ {P_4}_2 \cdot {L_4}_2 + {P_4}_3 \cdot {L_4}_3+{P_4}_4
  \cdot {L_4}_4+{P_4}_5 \cdot {L_4}_5+\\
{P_5}_1 \cdot {L_5}_1 &+ {P_5}_2 \cdot {L_5}_2 + {P_5}_3 \cdot {L_5}_3+{P_5}_4
  \cdot {L_5}_4+{P_5}_5 \cdot {L_5}_5
\end{split}
\end{equation}
3

I think you don't want something like {P_1}_1 but rather P_{11}. Here are two possible realizations, one with the + signs at the end, the other one at the left.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}\label{eq.7}
\begin{split}
  CTS ={}
  & P_{11}L_{11} + P_{12}L_{12} + P_{13}L_{13} + P_{14}L_{14} + P_{15}L_{15} +{} \\
  & P_{21}L_{21} + P_{22}L_{22} + P_{23}L_{23} + P_{24}L_{24} + P_{25}L_{25} +{} \\
  & P_{31}L_{31} + P_{32}L_{32} + P_{33}L_{33} + P_{34}L_{34} + P_{35}L_{35} +{} \\
  & P_{41}L_{41} + P_{42}L_{42} + P_{43}L_{43} + P_{44}L_{44} + P_{45}L_{45} +{} \\
  & P_{51}L_{51} + P_{52}L_{52} + P_{53}L_{53} + P_{54}L_{54} + P_{55}L_{55}
\end{split}
\end{equation}
\begin{equation}
\begin{split}
CTS ={}& P_{11}L_{11} + P_{12}L_{12} + P_{13}L_{13} + P_{14}L_{14} + P_{15}L_{15}\\
  {}+{}& P_{21}L_{21} + P_{22}L_{22} + P_{23}L_{23} + P_{24}L_{24} + P_{25}L_{25}\\
  {}+{}& P_{31}L_{31} + P_{32}L_{32} + P_{33}L_{33} + P_{34}L_{34} + P_{35}L_{35}\\
  {}+{}& P_{41}L_{41} + P_{42}L_{42} + P_{43}L_{43} + P_{44}L_{44} + P_{45}L_{45}\\
  {}+{}& P_{51}L_{51} + P_{52}L_{52} + P_{53}L_{53} + P_{54}L_{54} + P_{55}L_{55}
\end{split}
\end{equation}
\end{document}

enter image description here

egreg
  • 1,121,712
1

Use \phantom:

\cdot {L_5}_4+{P_5}_5 \cdot {L_5}_5\phantom{+}\\
  • 2
    but the spacing around the final + signs isn't correct. (and they should usually be at the beginning of the continuing line, at least for u.s. publishing.) – barbara beeton Dec 10 '15 at 18:54
  • 1
    Sure, but that was not the question ... –  Dec 10 '15 at 18:58