
Estou usando o equation
ambiente com o amsmath
pacote. Gostaria de remover os colchetes de cada lado da numeração da equação.
Eu gostaria que minha equação fosse rotulada como 1, 2, 3... em vez de (1), (2), (3).
Existe um comando apropriado para isso?
Responder1
Se você estiver usando amsmath
, basta redefinir \tagform@
desta forma
\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}
EDITAR
Como egreg observa, você pode querer \eqref
manter os parênteses ao imprimir a referência. Neste caso, substitua o código acima por
\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}
Saída:
Responder2
Colocar
\makeatletter
\def\@eqnnum{{\normalfont \normalcolor \theequation}}
\makeatother
no preâmbulo
\documentclass{article}
\makeatletter
\def\@eqnnum{{\normalfont \normalcolor \theequation}}
\makeatother
\begin{document}
\begin{equation}
c^2 = a^2 + b^2
\end{equation}
\end{document}