
Estoy usando el equation
entorno con el amsmath
paquete. Me gustaría eliminar los corchetes a cada lado de la numeración de la ecuación.
Me gustaría etiquetar mi ecuación como 1, 2, 3... en lugar de (1), (2), (3).
¿Existe un comando apropiado para esto?
Respuesta1
Si está utilizando amsmath
, simplemente redefina \tagform@
de esta manera
\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 señala egreg, es posible que desee \eqref
mantener el paréntesis al imprimir la referencia. En este caso, reemplace el código anterior con
\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}
Producción:
Respuesta2
Poner
\makeatletter
\def\@eqnnum{{\normalfont \normalcolor \theequation}}
\makeatother
en el 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}