3
\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.

2
  • 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?
    – AboAmmar
    Commented Nov 20, 2015 at 10:34

3 Answers 3

4

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

5

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:

enter image description here

1
  • 1
    +1 for the improvement I hadn't even thought of.
    – Bernard
    Commented Nov 20, 2015 at 11:20
0
\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}
% for every equation should start with \begin{flalign} ... \end{flalign}
1
  • 1
    ...the -10cm seems fairly arbitrary and not accurate in general, apart from perpetual adjustments until you get it somewhat right.
    – Werner
    Commented Aug 19, 2021 at 4:14

You must log in to answer this question.

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