[Tex/LaTex] How to left align an equation

equations

\begin{equation}
\lefteqn{TPR=\frac{\sum_{i=1}^{N}\sum_{j=1}^{S}S_{SU_{ij}=1\mid PU=1 }}{\sumS_{PU=1}}*N}
\label{eqn:6}
\end{equation}

I am trying to write this equation. The denominator part is not coming proper and i am not able to left align the equation. I am in a two columned format. The problem is the equation is moving to the second column.

Best Answer

To left align a moderately long equation, you can use the align environment, and the \MovEqLeft[number of ems](default is 1em), or, for the equation to begin at the left margin, the flalign environment. Needless to load amsmath since mathtools does it:

\documentclass{ieeetran}
\usepackage{mathtools}
\usepackage{lipsum}
\begin{document}
\lipsum[2]
\begin{align}\MoveEqLeft[12]
  TPR =\frac{\sum_{i=1}^{N}\sum_{j=1}^{S}S_{SU_{ij}=1\mid PU=1 }}{\sum S_{PU=1}}*N &
  \label{eqn:6}
\end{align}
\lipsum[3-7]
\begin{flalign}
  TPR & =\frac{\sum_{i=1}^{N}\sum_{j=1}^{S}S_{SU_{ij}=1\mid PU=1 }}{\sum S_{PU=1}}*N &
  \label{eqn:6}
\end{flalign}
\lipsum[8]

\end{document} 

enter image description here

Related Question