8

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?

karlkoeller
  • 124,410

2 Answers2

16

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

karlkoeller
  • 124,410
1

Put

\makeatletter
\def\@eqnnum{{\normalfont \normalcolor \theequation}}
\makeatother

in the preamble

\documentclass{article}

\makeatletter
\def\@eqnnum{{\normalfont \normalcolor \theequation}}
\makeatother

\begin{document}

\begin{equation}
    c^2 = a^2 + b^2
\end{equation}

\end{document}

enter image description here