# Equation does not fit in single column

An accepted paper in one of the elsevier journals has been sent for proof reading. The paper compiles to two column format and one of the equations does not show up completely in single column. Equation number is also missing. After clicking the equation it shows following code

P_m=\frac1N\vert q_\mathit{ml}\vert^2=\frac1N\left(\frac1N\sum_{n=0}^{N-1}e^{\frac{j2\pi n}N(l-\frac mM)}\right)\left(\frac1N\sum_{r=0}^{N-1}e^{\frac{-j2\pi r}N(l-\frac mM)}\right)


How can I spread it two lines so that equation number is also shown. I also don't understand, why there is no or similar code segment.

In the submitted manuscript I had used following code:

\documentclass[12pt,twocolumn]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{lipsum}
\begin{document}
\lipsum
\begin{flalign}\label{eq_Pm}
P_{m}&=\frac{1}{N}|q_{ml}|^2 \nonumber \\
&=\frac{1}{N}\left(\frac{1}{N}\sum^{N-1}_{n=0}e^{\frac{j2\pi n}{N}(l-\frac{m}{M})}\right)\left( \frac{1}{N}\sum^{N-1}_{{r}=0}e^{\frac{-j2\pi r}{N}(l-\frac{m}{M})}\right)\
\end{flalign}
\end{document}

• You have asked over thirty questions within the last two years. Still, you don't provide a minimal working example? – Johannes_B Mar 26 '17 at 13:06
• Have you searched for questions about that problem in once-column mode and tried to get the solution done in two-column mode? – Johannes_B Mar 26 '17 at 13:07
• Just use multline from amsmath or some such thing. As an aside, either Elsevier do the typesetting themselves, in which case I doubt this would have happened, or you submitted code in one of their styles and didn't notice. – JPi Mar 26 '17 at 13:15
• I had added the code segment of the submitted manuscript in the original quaetion – Ehsa Mar 26 '17 at 13:17
• @ Johannes_B Sorry for not giving MWE. Actually I could only get one code line from the online editor of the document to be proof read. – Ehsa Mar 26 '17 at 13:19

Here are two solutions,:

\documentclass[twocolumn]{elsarticle}
\usepackage{mathtools, nccmath}
\usepackage{lipsum}

\begin{document}

\lipsum[11]

\begin{aligned}[b] & P_m=\frac1N\vert q_{ml}\vert^2= \frac1N × {}\\ & \left(\frac1N\sum_{n=0}^{N-1}e^{\frac{j2\pi n}N(l-\frac mM)}\right)\left(\frac1N\sum_{r=0}^{N-1}e^{\frac{-j2πr}N(l-\frac mM)}\right) \end{aligned}
%
Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text.
%
\begin{fleqn}
\begin{aligned}[b] & P_m=\frac1N\vert q_{ml}\vert^2=\\ & \frac1N\left(\frac1N\sum_{n=0}^{N-1}e^{\frac{j2\pi n}N(l-\frac mM)}\right)\left(\frac1N\sum_{r=0}^{N-1}e^{\frac{-j2\pi r}N(l-\frac mM)}\right) \end{aligned}
\end{fleqn}

\end{document}


• \mathit{ml} is quite dubious: they are two indices, not a single word. Please, check that you paste correct code; you have ² instead of the correct ^{2}. – egreg Mar 26 '17 at 13:31
• @egreg: I agree with you. The\mathit{ml} was in the initial post. As to the ², there was also a π and a Σ, which I forgot to check (editor configuration…). It's fixed now. Thank you for pointing it! – Bernard Mar 26 '17 at 13:40
• The problem when the text is retyped by people who know nothing about math. :-( For instance, it's silly to use \frac1N and even sillier changing | into \vert: if a change has to be made it should be \lvert...\rvert. – egreg Mar 26 '17 at 13:46
• I know. Unfortunately, I often forget to check. My editor displays this kind of pretty-printing only on reopening the file, but saves it in standard form. In this case I should copy-paste the code from another editor, but it supposes I've checked first. That's why I'm grateful to people who point out such problems. – Bernard Mar 26 '17 at 13:51

I'd like to suggest that you simplify the appearance of the second row by using a single letter, say, \kappa, for the repeated term \frac{j2\pi}{N}(l-\frac{m}{M}).

The expression for \kappa presumably has some kind of intrinsic meaning or natural interpretation, right? If so, it might be helpful to your readers if you stated the meaning explicitly.

Naturally, you are free to choose a symbol name other than \kappa.

\documentclass[3p,twocolumn]{elsarticle} % or '5p'
\usepackage{amsmath}
\usepackage{lipsum}
\begin{document}
\lipsum*[1]
\begin{align}\label{eq_Pm}
P_{m}&=\tfrac{1}{N}|q_{ml}|^2 \notag \\
&=\frac{1}{N}
\biggl(\frac{1}{N}\sum^{N-1}_{n=0}e^{\kappa n}\biggr)
\biggl(\frac{1}{N}\sum^{N-1}_{{r}=0}e^{-\kappa r}\biggr)
\end{align}
where $\kappa=(2j\pi/N)(l-m/M)$.

\lipsum*[2]
\end{document}

\documentclass[12pt,twocolumn]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{lipsum}
\begin{document}
\lipsum
\begin{flalign}\label{eq_Pm}
P_{m}&=\frac{1}{N}|q_{ml}|^2 \nonumber \\
&=\frac{1}{N}\left(\frac{1}{N}\sum^{N-1}_{n=0}e^{\frac{j2\pi n}{N}(l-\frac{m}{M})}\right)\notag\\
& \quad \times \left( \frac{1}{N}\sum^{N-1}_{{r}=0}e^{\frac{-j2\pi r}{N}(l-\frac{m}{M})}\right)\
\end{flalign}
\end{document}

• It would be helpful if you provided a bit of narrative to mention how your proposed solution differs from the OP's code. E.g., something like "your equation can be made to fit if an additional line break is introduced". – Mico Mar 26 '17 at 14:34

I'd go with split:

\documentclass[12pt,twocolumn]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{lipsum}

\begin{document}

\lipsum*[1]
$$\label{eq_Pm} \begin{split} P_{m}&=\frac{1}{N}|q_{ml}|^2 \\ &=\frac{1}{N}\biggl(\frac{1}{N}\sum^{N-1}_{n=0}e^{\frac{j2\pi n}{N}(l-\frac{m}{M})}\biggr) \\ &\qquad\times \biggl(\frac{1}{N}\sum^{N-1}_{{r}=0}e^{\frac{-j2\pi r}{N}(l-\frac{m}{M})}\biggr) \end{split}$$

\end{document}


Note that \left and \right would produce too big parentheses.

two more solutions (with equations in three lines):

\documentclass[12pt,twocolumn]{article}
\usepackage[latin1]{inputenc}
\usepackage{mathtools}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{lipsum}

\begin{document}
\lipsum*[11]
\begin{align}\label{eq_Pm}
P_{m}
& = \frac{1}{N}|q_{ml}|^2 \nonumber \\
& = \begin{multlined}[t]
\frac{1}{N}
\left(\frac{1}{N}\sum^{N-1}_{n=0}e^{\frac{j2\pi n}{N}(l-\frac{m}{M})}\right)\\
\left(\frac{1}{N}\sum^{N-1}_{{r}=0}e^{\frac{-j2\pi r}{N}(l-\frac{m}{M})}\right)
\end{multlined}
\end{align}
\lipsum*[11]
\begin{align}\label{eq_Pm}
P_{m}
& = \frac{1}{N}|q_{ml}|^2 \nonumber \\
\begin{split}
& = \frac{1}{N}
\left(\frac{1}{N}\sum^{N-1}_{n=0}e^{\frac{j2\pi n}{N}(l-\frac{m}{M})}\right)\\