# How to left align an 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}$$


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.

• Use multline to break the equation into two lines if it protrudes into the second column. Commented Nov 20, 2015 at 10:14
• And what is \sumS? Commented Nov 20, 2015 at 10:34

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}


Your equation will become shorter if you will move summation limits below and on the top of it symbol by use \limits after symbol \sum. Based on MWE from @Bernard answer:

\documentclass{ieeetran}
\usepackage{mathtools}
\usepackage{lipsum}

\begin{document}
\lipsum[2]
\begin{align}%\MoveEqLeft[12]
TPR =\frac{\sum\limits_{i=1}^{N}\sum\limits_{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\limits_{i=1}^{N}\sum\limits_{j=1}^{S}S_{SU_{ij}=1\mid PU=1 }}
{\sum\limits S_{PU=1}}*N &
\label{eqn:6}
\end{flalign}
\lipsum[8]
\end{document}


this gives:

• +1 for the improvement I hadn't even thought of. Commented Nov 20, 2015 at 11:20
\begin{flalign}
\psi(\xi,\tau) = \eta (\xi, \tau) \;\; sech \left[\eta(\xi,\tau)\right]\;\; e^{\iota \{\phi(\xi, \tau)  - \alpha(\xi,\tau) \tau \}}
&&\\
\end{flalign}
\begin{flalign}
E=mc^2 &&\\
\end{flalign}
\begin{flalign}
a^2 + b^2 = c^2&&
\end{flalign}

• ...the -10cm seems fairly arbitrary and not accurate in general, apart from perpetual adjustments until you get it somewhat right.