4

I need help with this equation. I'm trying to put it in one column and multiple lines and make it look nice.

The format of the latex document is two-column. So (obviously) it has to fit in 1 column.

Also, it's a long equation, so it has to be on multiple lines.

Here is the image and code...enter image description here

\begin{eqnarray*}
P(0)  & = & (1 - A) \\ \nonumber
P(1) & = & (1 - A)(e^A - 1)  \nonumber
\end{eqnarray*}
\begin{multline}
\label{md1ssprob}
P(i + 1)  =  \frac{1}{P(0,A)} \left\{ P(i) - [P(0) + P(1)] \cdot P(i,A) \right. \\
\quad \quad \quad \quad \quad    \left. - \sum_{\nu=2}^{i} P(\nu) \cdot P(i - \nu + 1, A) \right\}. 
\end{multline}

I tried eqnarry, mutline, etc. I can't seem to do it.

Any help would be appreciated.

4
  • What would like to have instead?
    – Bernard
    Commented May 6, 2020 at 0:15
  • The same equation - all in one latex line code - is that possible?
    – PiE
    Commented May 6, 2020 at 0:23
  • See the space below $P(1) = ...$ - that does not look good...
    – PiE
    Commented May 6, 2020 at 0:24
  • It is possible in many journals to have a full-width equation despite a two-column layout. Your journal may have instructions for that. In the middle of the page it often disrupts the reading flow though
    – Chris H
    Commented May 6, 2020 at 9:20

2 Answers 2

4

A slighly different layout with àlignatandfleqn:

\documentclass[twocolumn]{article}
\usepackage{lipsum}

\usepackage{nccmath, mathtools, amssymb}

\begin{document}
\lipsum[47]
\begin{fleqn}
\begin{alignat}{2}%
 & P(0) = (1 - A) \notag \\
 & P(1) = (1 - A)\mathrlap{(e^A - 1)}\notag \\
 & P(i + 1) =
\frac{1}{P(0,A)}\Bigl\{P(i) &&- [P(0) + P(1)] \cdot \mathrlap{P(i,A) }\notag\\
 & &\mathllap{-\sum_{\nu=2}^{i} P(\nu) }& \cdot P(i - \nu + 1, A) \Bigr\}.
\label{md1ssprob}
\end{alignat}
\end{fleqn}

\end{document} 

enter image description here

1
  • Looks even better now...Thanks for your help
    – PiE
    Commented May 6, 2020 at 2:04
4

The follow looks decent. Just avoid using eqnarray.

enter image description here

\documentclass[twocolumn]{article}

\usepackage{amsmath}
\usepackage{lipsum}

\begin{document}

\lipsum*[1]
\begin{align}
      P(0) &= (1 - A) \nonumber \\
      P(1) &= (1 - A)(e^A - 1) \nonumber \\
  P(i + 1) &= \frac{1}{P(0,A)} \biggl\{
                P(i) - \bigl[ P(0) + P(1) \bigr] \cdot P(i, A) \nonumber \\
           &\quad {} - \sum_{\nu = 2}^i P(\nu) \cdot P(i - \nu + 1, A) \biggr\}. 
\end{align}
\lipsum*[2]

\end{document}
1
  • Thanks so much! Looks great!
    – PiE
    Commented May 6, 2020 at 0:27

You must log in to answer this question.

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