고딕 유형의 실수 연산자를 일반 'Re'로 바꾸려면 다음이 적합합니다.
\documentclass[a4paper,11pt,twoside,fleqn]{report}
[...]
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage[bold-style=ISO]{unicode-math} % must come after ams and symbols
[...]
\begin{document}
\def\Re{\operatorname{Re}}
그러나 마지막 두 줄을 바꾸면 에 대한 재정의가 \Re
효과가 없습니다. 무슨 일이 일어나고 있나요? \begin{document}
매크로 재정의를 어떻게 덮어쓸 수 있나요 ?
답변1
에는 여러 명령이 unicode-math
포함되어 있으므로 \AtBeginDocument
해당 명령에 대한 처리가 수행되는 지점을 중심으로 먼저 실행됩니다 \begin{document}
. 정의를 재정의하기 위해 동일한 트릭을 직접 사용할 수 있습니다.
\documentclass[a4paper,11pt,twoside,fleqn]{report}
\usepackage{mathtools}
\usepackage[bold-style=ISO]{unicode-math}
\AtBeginDocument{\renewcommand{\Re}{\operatorname{Re}}}
\begin{document}
\( \Re z \)
\end{document}
와 같은 유사한 명령이 \AtEndOfPackage
핵심 LaTeX에도 정의되어 있습니다. 다음을 포함한 추가 명령이 패키지 \AtBeginEnvironment
에 있습니다 etoolbox
.