가능한 중복:
amsmath를 사용하여 방정식 번호의 모양 변경
방정식의 레이블을 굵게 표시할 수 있어야 하지만 동시에 나머지 텍스트에서 일반적인 스타일을 가지려면 해당 방정식에 대한 인용이 필요합니다.
내가 시도한 것은 다음과 같습니다.
\let\theoldequation\theequation
\renewcommand*{\theequation}{\textbf{\theoldequation}} % bold equation numbers
그리고 이것은 ( etoolbox
패키지 사용)
\pretocmd{\theequation}{\textbf}{}{}
산출:
이 문제를 해결하기 위해 구글링을 많이 했는데 다음과 같은 시도밖에 나오지 않았습니다.
\renewcommand{\eqref}[1]{\textnormal{(\ref{#1})}}
그리고
\let\oldeqref\eqref
\renewcommand*{\eqref}{\textnormal{\oldeqref}} % bold equation numbers
그리고
\pretocmd{\eqref}{\textnormal}{}{}
그리고 마지막 것:
\patchcmd{\eqref}{\textbf}{\textnormal}{}{}
그러나 아무도 내가 해야 할 일을 이행하지 않았습니다. 이 문제에 대한 해결책을 제시해 주실 수 있나요?
답변1
amsmath
and 를 사용하는 경우 및 레이블과 괄호를 모두 굵은 글씨로 다시 \eqref
정의해야 합니다 .\tagform@
\eqref
\documentclass{article}
\usepackage{amsmath}
\makeatletter
\def\tagform@#1{\maketag@@@{\bfseries(\ignorespaces#1\unskip\@@italiccorr)}}
\renewcommand{\eqref}[1]{\textup{{\normalfont(\ref{#1}}\normalfont)}}
\makeatother
\begin{document}
\begin{equation}\label{eq:test}
a + b = c.
\end{equation}
See equation~\eqref{eq:test}
\end{document}
레이블만 굵게 표시해야 하는 경우 다음과 같이 말할 수 있습니다.
\documentclass{article}
\usepackage{amsmath}
\makeatletter
\def\tagform@#1{\maketag@@@{(\ignorespaces\textbf{#1}\unskip\@@italiccorr)}}
\renewcommand{\eqref}[1]{\textup{{\normalfont(\ref{#1}}\normalfont)}}
\makeatother
\begin{document}
\begin{equation}\label{eq:test}
a + b = c.
\end{equation}
See equation~\eqref{eq:test}
\end{document}
답변2
재정의 \@eqnnum
. (편집: Torbjørn T.가 지적했듯이 OP처럼 amsmath
.)
\documentclass{article}
\makeatletter
\def\@eqnnum{{\normalfont\normalcolor\bfseries(\theequation)}}
\makeatother
\begin{document}
\begin{equation}\label{eq:test}
a^2 + b^2 = c^2
\end{equation}
See equation~\ref{eq:test}.
\end{document}