I would like to redefine the \div
and \curl
commands to give \mbfnabla\cdot
and \mbfnabla\vectimes
.
In unicode-math breaks \DeclareMathOperator we get the hint that we need to wrap redefines inside an AtBeginDocument
block.
While this seems to work for redefining \div
with just giving the text div
, using \nabla
or \mbfnabla
does not render the respective nabla symbol:
The corresponding MVP code is:
\documentclass{scrartcl}
\usepackage{amsmath}
\usepackage{unicode-math}
\newcommand{\vdot}{\cdot}
\newcommand{\vcross}{\vectimes}
\newcommand{\vb}[1]{\symbfup{#1}}
\newcommand{\vu}[1]{\hat{\vb{#1}}}
\AtBeginDocument{
\let\div\relax
\let\curl\relax
\DeclareMathOperator{\div}{\mbfnabla\vdot}
\DeclareMathOperator{\curl}{\mbfnabla\vectimes}
}
\begin{document}
\begin{align}
\div\vb{E}
&=
j_0
&
\div\vb{B}
&=
0
\\
\curl\vb{E}
&=
-\partial_t\vb{B}
&
\curl\vb{B}
&=
\vb{j}
+
\partial_t\vb{E}
\end{align}
\end{document}
I am using LuaLaTex on MacOS where I recently updated all packages with tlmgr update -all
.
Best Answer
The problem can be seen in the log file:
You can use a similar math font that has the glyph:
You might use
\DeclareMathOperator
, but the spacing will be not the best.But the definition can be, more simply,