1

I am trying to display this equation without any equation numbering using eqnarray. I have specified \nonumber, but the equation number still shows up. What do I need to do to fix this and why is occurring?

I can figure this out:

\begin{eqnarray}
\lefteqn{\bm{B}_s =  (\bm{B}_1 \oplus \bm{B}_2 \oplus \cdots \oplus   
\bm{B}_n)} \\ \nonumber
&& \qquad \qquad - \lambda_R \bm{e}'( \bm{p}_1 \otimes \bm{p}_2 \otimes 
\cdots \otimes \bm{p}_n), 
\end{eqnarray}
Sebastiano
  • 54,118
PiE
  • 271
  • 4
    You are setting two equations and have only one \nonumber, so one of them (the first in this case) will be numbered. – Werner Apr 05 '17 at 00:35
  • 2
    There is a starred version to it \begin{eqnarray*} but there are several articles that show why you should not use eqnarray. I would suggest the equation or align environments. – azetina Apr 05 '17 at 00:35
  • 2
    Consider reading the following: eqnarray vs align – Werner Apr 05 '17 at 00:35
  • Do you want the entire thing unnumbered? What does \lefteqn do? Instead of providing code snippets, provide a complete, minimal, working example (or MWE) that replicates your problem. It should start with \documentclass and end with \end{document}. – Werner Apr 05 '17 at 00:39
  • @azetina - That seems to work. I've been using eqnarray for many years - I'll look into the other environments - Thanks – PiE Apr 05 '17 at 00:39
  • @Werner - The "lefteqn" breaks up 1 equation into 2 lines. The reason I did that was that the formula did not fit on 1 line in my paper. – PiE Apr 05 '17 at 00:40
  • @PMF: There is no visible way how \lefteqn breaks up its argument to split it across multiple rows from your code snippet... – Werner Apr 05 '17 at 00:43
  • 1
    eqnaraywhich is not recommended in any case is never intended to be used that way, the = is supposed be between the & – David Carlisle Apr 05 '17 at 07:22

1 Answers1

4

You have two lines in eqnarray, but just one \nonumber.

You might just use eqnarray*, but you should never use eqnarray to begin with. See eqnarray vs align and LaTeX guides which describe the much more powerful environments provided by amsmath.

\documentclass[twocolumn]{article}
\usepackage{amsmath}
\usepackage{bm}

\usepackage{lipsum} % just for the example

\begin{document}

\section{This is bad}

\lipsum*[2]
\begin{eqnarray*}
\lefteqn{\bm{B}_s =  (\bm{B}_1 \oplus \bm{B}_2 \oplus \cdots \oplus   
\bm{B}_n)} \\
&& \qquad \qquad - \lambda_R \bm{e}'( \bm{p}_1 \otimes \bm{p}_2 \otimes 
\cdots \otimes \bm{p}_n), 
\end{eqnarray*}
\lipsum[3]

\newpage

\section{This is good}

\lipsum*[2]
\begin{multline*}
\bm{B}_s = (\bm{B}_1 \oplus \bm{B}_2 \oplus \cdots \oplus \bm{B}_n)
\\
- \lambda_R \bm{e}'( \bm{p}_1 \otimes \bm{p}_2 \otimes \cdots \otimes \bm{p}_n), 
\end{multline*}
\lipsum[3]

\end{document}

enter image description here

egreg
  • 1,121,712