2

enter image description here

How can I write numbers (enumerate) in front of the equation?? If I write with \item , be much space between enumerate numbers and equations.

3 Answers3

5

Use leqno class parameter:

\documentclass[leqno]{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
y &= mx + b\\
y &= Ax^2 + Bx + c
\end{align}
\end{document}

Output below:

Output

5

In the picture you show, the numbers are hanging from nowhere and the centering of the formulas has no meaning.

In the following, the formulas are on the same line as the numbers, separated from them by two quads.

\documentclass{article}
\usepackage{amsmath}
\usepackage{enumitem}

\usepackage{showframe}% just for the example

\begin{document}

\begin{enumerate}[itemsep=\baselineskip,itemindent=2em,labelsep=2em]

\item $\displaystyle \prod_{k=2}^{\infty}\left(1-\frac{2}{k(k+1)}\right)=\frac{1}{3}$

\item $\displaystyle \prod_{k=2}^{\infty}\left(1-\frac{2}{k^{3}+1)}\right)=\frac{2}{3}$

\item \begin{tabular}[t]{@{}c@{}}
      $\displaystyle \prod_{k=1}^{\infty}
                     \left(\frac{2k}{2k-1}\right)
                     \left(\frac{2k}{2k+1}\right)=
       \frac{2}{1}\cdot\frac{2}{3}\cdot\frac{4}{3}\cdot
       \frac{4}{5}\cdot\frac{6}{5}\cdot\frac{6}{7}\dots=\frac{\pi}{2}$
       \\
       \bfseries (Wallis's formula)
      \end{tabular}

\end{enumerate}

\end{document}

enter image description here

Just to mention how the original has been typeset:

\documentclass{article}
\usepackage{amsmath}

\usepackage{showframe} % just for the example

\begin{document}

\begin{enumerate}

\item \[\prod_{k=2}^{\infty}\left(1-\frac{2}{k(k+1)}\right)=\frac{1}{3}\]

\item \[\prod_{k=2}^{\infty}\left(1-\frac{2}{k^{3}+1)}\right)=\frac{2}{3}\]

\item \begin{gather*}
       \prod_{k=1}^{\infty}
         \left(\frac{2k}{2k-1}\right)
         \left(\frac{2k}{2k+1}\right)=
       \frac{2}{1}\cdot\frac{2}{3}\cdot\frac{4}{3}\cdot
       \frac{4}{5}\cdot\frac{6}{5}\cdot\frac{6}{7}\dots=\frac{\pi}{2}
       \\
       \textbf{(Wallis's formula)}
      \end{gather*}

\end{enumerate}
\end{document}

enter image description here

egreg
  • 1,121,712
3

Example which centers the equations and puts the numbers to the left.

\documentclass{article}

\newcounter{eqitem}
\newcommand*{\eqitem}[1]{%
  \refstepcounter{eqitem}%
  \[
    \hbox to \displaywidth{$\displaystyle
      \rlap{\theeqitem.}%
      \hfil#1\hfil
    $}%
  \]%
}
\begin{document}
\setcounter{eqitem}{0}
\eqitem{\prod_{k=2}^\infty \left(1 - \frac{2}{k(k+1)}\right) = \frac{1}{3}}
\eqitem{\prod_{k=2}^\infty \left(1 - \frac{2}{k^3 + 1}\right) = \frac{2}{3}}
\eqitem{\prod_{k=2}^\infty \left(1 + \frac{1}{2^k - 2}\right) = 2}
\end{document}

Result

Also, an environment can be defined:

\documentclass{article}

\newcounter{eqitem}
\newcommand*{\eqitem}[1]{%
  \refstepcounter{eqitem}%
  \[
    \hbox to \displaywidth{$\displaystyle
      \rlap{\theeqitem.}%
      \hfil#1\hfil
    $}%
  \]%
}
\newenvironment*{eqitemize}{%
  \setcounter{eqitem}{0}%
  \let\item\eqitem
}{}

\begin{document}
\begin{eqitemize}
  \item{\prod_{k=2}^\infty \left(1 - \frac{2}{k(k+1)}\right) = \frac{1}{3}}
  \item{\prod_{k=2}^\infty \left(1 - \frac{2}{k^3 + 1}\right) = \frac{2}{3}}
  \item{\prod_{k=2}^\infty \left(1 + \frac{1}{2^k - 2}\right) = 2}
\end{eqitemize}
\end{document}
Heiko Oberdiek
  • 271,626