1

I need multiple equations aligned in single column of a two columned document. I have tried a mixture of both align and multiline but it does not work.

\documentclass[12pt,journal,compsoc]{IEEEtran}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\begin{document}
\maketitle
\section{Introduction}

\begin{align*}
p(W_{i},T_{n})&=\begin{multline*}
p(W_{i},T_{n})\\+(p(W_{i},T_{n})*k/100)
\end{multline*}\\
p(W_{i},T_{n})&=\begin{multline*}
p(W_{i},T_{n})\\+(p(W_{i},T_{n})*k/100)
\end{multline*}\\
\end{align*}

\end{document}

It gives me the error

Package amsmath Error :\begin{multline*} allowed only in paragraph mode
tanee
  • 55
  • 1
  • 10
  • `multline` can not be embedded in `align`. If you load the `mathtools` package, it provides a `multined` envornment that can be embedded. But as Werner's answer shows a simple `align` is sufficient for your display. – Andrew Swann Jan 17 '18 at 09:22

1 Answers1

5

There's no need for multline here; a regular align will do:

enter image description here

\documentclass[journal,compsoc]{IEEEtran}

\usepackage{amsmath,lipsum}

\begin{document}

\section{Introduction}

\lipsum*[1]
\begin{align*}
  p(W_i, T_n) ={}& p(W_i, T_n) \\
                 & + (p(W_i, T_n) \times k / 100) \\
  p(W_i, T_n) ={}& p(W_i, T_n) \\
                 & + (p(W_i, T_n) \times k / 100)
\end{align*}
\lipsum*[2]

\end{document}

Since you're aligning with a line-break, it's easier to use ={}& as opposed to the traditional &= (which would require additional \phantoms to ensure proper alignment).

Werner
  • 14,324
  • 7
  • 55
  • 77