18

I wrote the following to print a mathematical equation, but I do not need the number of equation to be appeared:

\documentclass[conference]{IEEEtran}

\usepackage{amsmath}

\begin{document}

\begin{align}
f_{n}(\beta,\lambda)&= \lambda(1-\lambda/n)^{n-1} \int_{0} ^{1} g_{n}(\beta,\lambda)d\alpha \\
                     & \leq \lambda(1-\lambda/n)^{n-1}\int_{0}^{1} g_{n}(\beta,1)d\alpha \\
                     & \leq (1-1/n)^{n-1} \int_{0}^{1} g_{n}(\beta,1)d\alpha = f_{n}(\beta,1)
\end{align}

\end{document}
Hamm
  • 377

3 Answers3

23

Either use \begin{align*}...\end{align*} or use \nonumber for a specific equation to be suppressed in an align environment.

This might get tedious if all equations in an align environment should be unnumbered.

General rule: An environment or command with * most times means: 'Do not number'

The same is true for alignat and alignat* environments and equation and equation* environments from amsmath, the later two are for a single equation only.

\documentclass[conference]{IEEEtran}

\usepackage{amsmath}

\begin{document}

\begin{align}
f_{n}(\beta,\lambda)&= \lambda(1-\lambda/n)^{n-1} \int_{0} ^{1} g_{n}(\beta,\lambda)d\alpha \nonumber \\
                     & \leq \lambda(1-\lambda/n)^{n-1}\int_{0}^{1} g_{n}(\beta,1)d\alpha \\
                     & \leq (1-1/n)^{n-1} \int_{0}^{1} g_{n}(\beta,1)d\alpha = f_{n}(\beta,1)
\end{align}

\end{document}

enter image description here

  • \nonumber doens't only hide, but doesn't count the line either. Is there a way to just hide the number on a specific line, but still count it? – mazunki Feb 26 '21 at 14:14
  • 1
    @mazunki If the document is simply missing a number, the reader might reasonably spend ages searching for the missing number and worry about the integrity of the document. If the number is actually being printed somewhere else, then maybe that has a better solution than hiding it in one place and displaying it in another. – Adam Chalcraft Oct 07 '22 at 17:06
2

The star form \begin{align*}...\end{align*} suppresses the equation number:

\documentclass[conference]{IEEEtran}

\usepackage{amsmath}

\begin{document}

\begin{align*}
f_{n}(\beta,\lambda)&= \lambda(1-\lambda/n)^{n-1} \int_{0} ^{1}
g_{n}(\beta,\lambda)d\alpha \\
                     & \leq \lambda(1-\lambda/n)^{n-1}\int_{0}^{1}
g_{n}(\beta,1)d\alpha \\
                     & \leq (1-1/n)^{n-1} \int_{0}^{1} g_{n}(\beta,1)d\alpha
= f_{n}(\beta,1)
\end{align*}

\end{document}

Result

Heiko Oberdiek
  • 271,626
2

This is a single equation, not a collection of equations that are being aligned, so I would use equation*, the * suppresses the equation number, and do the alignment with split, as below. This way, if I later find I need to refer to this equation and add a number all I need do is change the outer environment to equation and add a \label command.

Sample output

\documentclass[conference]{IEEEtran}

\usepackage{amsmath}

\begin{document}

\begin{equation*}
  \begin{split}
    f_{n}(\beta,\lambda)
    &= \lambda(1-\lambda/n)^{n-1} \int_{0} ^{1} g_{n}(\beta,\lambda)
    \, d\alpha \\
    & \leq \lambda(1-\lambda/n)^{n-1}\int_{0}^{1} g_{n}(\beta,1)
    \, d\alpha \\
    & \leq (1-1/n)^{n-1} \int_{0}^{1} g_{n}(\beta,1) \, d\alpha
    = f_{n}(\beta,1)
  \end{split}
\end{equation*}

\end{document}

I have added a standard thin space \, before the differentials and would assume you have some punctuation to add at the end of the final line.

Andrew Swann
  • 95,762