3

I type equivalent equations using \align environment and so, I have to write the word "or" besides the second, third and fourth equations. I want to align the word "or" in the three lines. I use

\begin{align*}
\phi\left(\sum_{j=1}^{r}c^{j}(e)t_{j}(p) \right) 
&=  \phi\left(\sum_{j=1}^{r} \left(b^{j}\circ\pi  \right)(e)t_{j}(p)\right), 
\\
\text{or}\qquad \sum_{j=1}^{r}c^{j}(e)\phi(t_{j}(e)) 
&=  \sum_{j=1}^{r} \left(b^{j}\circ\pi \right)(e)\phi(t_{j}(p)),
 \\
 \text{or}\qquad  \sum_{j=1}^{r}c^{j}(e)(p,e_{j}) 
 &= \sum_{j=1}^{r}  \left(b^{j}\circ\pi \right)(e)(p,e_{j}) ,
 \\
 \text{or}\qquad \left(p, \sum_{j=1}^{r}c^{j}(e)e_{j}  \right) 
  &= \left(p, \sum_{j=1}^{r}\left(b^{j}\circ\pi \right)(e)e_{j} \right).
 \end{align*}

Here is what this produces

enter image description here

I hope that my question is clear.

4 Answers4

5

Use another alignment point; I show two ways, one with align, the other one with alignat.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align*}
&&          \phi\biggl(\,\sum_{j=1}^{r}c^{j}(e)t_{j}(p) \biggr) 
            &= \phi\biggl(\,\sum_{j=1}^{r} (b^{j}\circ\pi)(e)t_{j}(p)\biggr), 
\\
&\text{or}& \sum_{j=1}^{r}c^{j}(e)\phi(t_{j}(e)) 
            &=  \sum_{j=1}^{r} (b^{j}\circ\pi)(e)\phi(t_{j}(p)),
\\
&\text{or}& \sum_{j=1}^{r}c^{j}(e)(p,e_{j}) 
            &= \sum_{j=1}^{r} (b^{j}\circ\pi)(e)(p,e_{j}) ,
\\
&\text{or}& \biggl(p, \sum_{j=1}^{r}c^{j}(e)e_{j}  \biggr) 
            &= \biggl(p, \sum_{j=1}^{r} (b^{j}\circ\pi)(e)e_{j} \biggr).
\end{align*}

\begin{alignat*}{2}
&&\qquad    \phi\biggl(\,\sum_{j=1}^{r}c^{j}(e)t_{j}(p) \biggr) 
            &= \phi\biggl(\,\sum_{j=1}^{r} (b^{j}\circ\pi)(e)t_{j}(p)\biggr), 
\\
&\text{or}& \sum_{j=1}^{r}c^{j}(e)\phi(t_{j}(e)) 
            &=  \sum_{j=1}^{r} (b^{j}\circ\pi)(e)\phi(t_{j}(p)),
\\
&\text{or}& \sum_{j=1}^{r}c^{j}(e)(p,e_{j}) 
            &= \sum_{j=1}^{r} (b^{j}\circ\pi)(e)(p,e_{j}) ,
\\
&\text{or}& \biggl(p, \sum_{j=1}^{r}c^{j}(e)e_{j}  \biggr) 
            &= \biggl(p, \sum_{j=1}^{r} (b^{j}\circ\pi)(e)e_{j} \biggr).
\end{alignat*}

\end{document}

Note that the outer \left( and \right) should better be \biggl( and \biggr). Add\,after\biggl(in order not to hit the subscript. The inner\leftand\right` are wrong.

enter image description here

An alternative without alignment at the equals signs.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align*}
 & \phi\biggl(\,\sum_{j=1}^{r}c^{j}(e)t_{j}(p) \biggr)
           = \phi\biggl(\,\sum_{j=1}^{r} (b^{j}\circ\pi)(e)t_{j}(p)\biggr),
\\
\text{or}\quad
 & \sum_{j=1}^{r}c^{j}(e)\phi(t_{j}(e))
   =  \sum_{j=1}^{r} (b^{j}\circ\pi)(e)\phi(t_{j}(p)),
\\
\text{or}\quad
 & \sum_{j=1}^{r}c^{j}(e)(p,e_{j})
   = \sum_{j=1}^{r} (b^{j}\circ\pi)(e)(p,e_{j}) ,
\\
\text{or}\quad
 & \biggl(p, \sum_{j=1}^{r}c^{j}(e)e_{j}  \biggr)
   = \biggl(p, \sum_{j=1}^{r} (b^{j}\circ\pi)(e)e_{j} \biggr).
\end{align*}

\end{document}

enter image description here

egreg
  • 1,121,712
3

you don't need to do any special spacing, just add a couple of &s to each line to take advantage of the fact that align* can handle multiple side-by-side equations (or other components).

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
& &\phi\left(\sum_{j=1}^{r}c^{j}(e)t_{j}(p) \right) 
 &=  \phi\left(\sum_{j=1}^{r} \left(b^{j}\circ\pi  \right)(e)t_{j}(p)\right), 
\\
&\text{or} &\sum_{j=1}^{r}c^{j}(e)\phi(t_{j}(e)) 
&=  \sum_{j=1}^{r} \left(b^{j}\circ\pi \right)(e)\phi(t_{j}(p)),
 \\
& \text{or} & \sum_{j=1}^{r}c^{j}(e)(p,e_{j}) 
 &= \sum_{j=1}^{r}  \left(b^{j}\circ\pi \right)(e)(p,e_{j}) ,
 \\
& \text{or} &\left(p, \sum_{j=1}^{r}c^{j}(e)e_{j}  \right) 
  &= \left(p, \sum_{j=1}^{r}\left(b^{j}\circ\pi \right)(e)e_{j} \right).
 \end{align*}
\end{document}

output of example code

3

You can do that with alignat. I also propose a solution with the \ArrowBetweenLines command, from mathtools, which looks nicer, in my opinion:

\documentclass{article}
\usepackage{mathtools}
\newcommand\OrBetweenLines{\ArrowBetweenLines[\text{or}]}

\begin{document}

\begin{alignat*}{2}
    & & ϕ\biggl(∑_{j=1}^{r}c^{j}(e)t_{j}(p) \biggr)
  &= ϕ\biggl(∑_{j=1}^{r} \left(b^{j} ∘ \pi \right)(e)t_{j}(p)\biggr),
  \\
    & \text{or} & ∑_{j=1}^{r}c^{j}(e)ϕ(t_{j}(e))
  &= ∑_{j=1}^{r} \left(b^{j} ∘ \pi \right)(e)ϕ(t_{j}(p)),
  \\
    & \text{or} & ∑_{j=1}^{r}c^{j}(e)(p,e_{j})
  &= ∑_{j=1}^{r} \left(b^{j} ∘ \pi \right)(e)(p,e_{j}) ,
  \\
    & \text{or}\quad & \biggl(p, ∑_{j=1}^{r}c^{j}(e)e_{j} \biggr)
  &= \biggl(p, ∑_{j=1}^{r}\left(b^{j} ∘ \pi \right)(e)e_{j} \biggr).
\end{alignat*}

\begin{alignat*}{2}
    & & ϕ\biggl(∑_{j=1}^{r}c^{j}(e)t_{j}(p)\biggr)
  &= ϕ\biggl(∑_{j=1}^{r} \left(b^{j} ∘ \pi \right)(e)t_{j}(p)\biggr),
  \\
  \OrBetweenLines
    & & ∑_{j=1}^{r}c^{j}(e)ϕ(t_{j}(e))
  &= ∑_{j=1}^{r} \left(b^{j} ∘ \pi \right)(e)ϕ(t_{j}(p)),
  \\
  \OrBetweenLines
    & & ∑_{j=1}^{r}c^{j}(e)(p,e_{j})
  &= ∑_{j=1}^{r} \left(b^{j} ∘ \pi \right)(e)(p,e_{j}) ,
  \\
  \OrBetweenLines
    & & \biggl(p, ∑_{j=1}^{r}c^{j}(e)e_{j} \biggr)
  &= \biggl(p, ∑_{j=1}^{r}\left(b^{j} ∘ \pi \right)(e)e_{j} \biggr).
\end{alignat*}

\end{document} 

enter image description here

Bernard
  • 271,350
0

How about using an array environment, such as described here. You could put & after each or as well as after =

Ankush
  • 401