[Tex/LaTex] Removing the brackets around equation numbering

amsmathequationsnumbering

I am using the equation environment with the amsmath package.
I would like to remove the brackets on each side of the equation numbering.

I would like to have my equation labelled as 1, 2, 3 … instead of (1), (2), (3).

Is there an appropriate command for this?

Best Answer

If you are using amsmath, just redefine \tagform@ in this way

\makeatletter
\renewcommand\tagform@[1]{\maketag@@@{\ignorespaces#1\unskip\@@italiccorr}}
\makeatother

MWE

\documentclass{article}
\usepackage{amsmath}
\makeatletter
\renewcommand\tagform@[1]{\maketag@@@{\ignorespaces#1\unskip\@@italiccorr}}
\makeatother

\begin{document}
\begin{equation}
  x=y
\end{equation}
\end{document} 

enter image description here


EDIT

As egreg notices, you might want \eqref to keep the parenthesis when printing the reference. In this case, replace the above code with

\makeatletter
\let\oldtagform@\tagform@
\renewcommand\tagform@[1]{\maketag@@@{\ignorespaces#1\unskip\@@italiccorr}}
\renewcommand{\eqref}[1]{\textup{\oldtagform@{\ref{#1}}}}
\makeatother

MWE:

\documentclass{article}
\usepackage{amsmath}
\makeatletter
\let\oldtagform@\tagform@
\renewcommand\tagform@[1]{\maketag@@@{\ignorespaces#1\unskip\@@italiccorr}}
\renewcommand{\eqref}[1]{\textup{\oldtagform@{\ref{#1}}}}
\makeatother

\begin{document}
\begin{equation}\label{myeq}
  x=y
\end{equation}
A reference to equation \eqref{myeq}
\end{document} 

Output:

enter image description here

Related Question