我正在嘗試重新定義數學命令(比如說),以便它總是使用以下技巧\int
做更多的事情(比如說):\int lol
https://tex.stackexchange.com/a/47353/15659
但,現在我想unicode-math
在 LuaLaTeX 中使用該包,但它不再起作用了。
最小工作範例:
\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}%
}