unicode-math 및 내장 수학 명령 재정의

unicode-math 및 내장 수학 명령 재정의

나는 수학 명령(예를 들어 \int)을 재정의하여 항상 더 많은 작업을 수행하려고 합니다(예를 들어\int lol다음 트릭을 사용하여https://tex.stackexchange.com/a/47353/15659

하지만, 이제 LuaLaTeX에서 패키지를 사용하고 싶지만 unicode-math더 이상 작동하지 않습니다.


최소한의 작업 예:

\documentclass[11pt,a4paper]{article}

\usepackage{unicode-math}

\let\oldint\int
\renewcommand\int{\oldint lol}

\begin{document}

\begin{equation}
\mathbf{B}\left(P\right)=\frac{\mu_0}{4\pi}\int\frac{\mathbf{I}\times\hat{r}'}{r'^2}dl
\end{equation}

\end{document}

답변1

unicode-math기술적인 이유로 기호의 의미를 정의하는 작업의 대부분은 시작 문서에서 수행됩니다. 특히 는 \int거기에 정의된 기호 중 하나입니다. 그래서 사용

\AtBeginDocument{%
  \let\oldint\int
  \renewcommand\int{\oldint lol}%
}

관련 정보