I'm trying to redefine a math command (let's say \int) so that it will always do more (let's say \int lol) using the following trick: https://tex.stackexchange.com/a/47353/15659
BUT, now I want to use the package unicode-math in LuaLaTeX and it don't work any more.
Minimal working example:
\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}
\AtBeginDocument{\let\oldint\int\renewcommand\int{\oldint lol}}should work. – egreg Feb 09 '16 at 18:16