방정식 번호 매기기 주변의 괄호 제거

방정식 번호 매기기 주변의 괄호 제거

equation패키지 와 함께 환경을 사용하고 있습니다 amsmath. 방정식 번호 매기기 양쪽의 괄호를 제거하고 싶습니다.

방정식에 (1), (2), (3) 대신 1, 2, 3 ...으로 표시하고 싶습니다.

이에 대한 적절한 명령이 있습니까?

답변1

을 사용하는 경우 다음과 같이 amsmath재정의하십시오.\tagform@

\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} 

여기에 이미지 설명을 입력하세요


편집하다

\eqrefegreg에서 알 수 있듯이 참조를 인쇄할 때 괄호를 유지하는 것이 좋습니다 . 이 경우 위의 코드를 다음으로 대체하세요.

\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} 

산출:

여기에 이미지 설명을 입력하세요

답변2

놓다

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

서문에서

\documentclass{article}

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

\begin{document}

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

\end{document}

여기에 이미지 설명을 입력하세요

관련 정보