I have a document, that compiles fine on MacTeX 2017, which is installed on my desktop machine. I now installed MacTeX 2019 on my laptop and get this cryptic error:
(/usr/local/texlive/2019/texmf-dist/tex/latex/unicode-math/unicode-math-table.t
ex)
! LaTeX3 Error: Control sequence \not= already defined.
For immediate help type H <return>.
...
l.3954 \NewNegationCommand { = } { \neq }
?
Does anyone understand what this is about?
Edit:
MWE:
\documentclass[usenames,dipsnames,article,oneside]{memoir}
\usepackage{fontspec}
\usepackage[lining]{ebgaramond}
\usepackage[cmintegrals,cmbraces]{newtxmath}
\usepackage{ebgaramond-maths}
\usepackage{amssymb}
\usepackage{unicode-math}
\begin{document}
Test
\end{document}
Gives:
$ latexmk -pdf -lualatex test.tex
[...]
(/usr/local/texlive/2019/texmf-dist/tex/latex/unicode-math/unicode-math-table.t
ex)
! LaTeX3 Error: Control sequence \not= already defined.
For immediate help type H <return>.
...
l.3954 \NewNegationCommand { = } { \neq }
?
Best Answer
The example fails also on my TeX Live (MacTeX) 2017, probably because of updates you didn't apply.
The problem is simple: you are using too many math font packages. Loading
newtxmath
beforeebgaramond-maths
is recommended, because the latter only acts on theoperators
andletters
math groups, not onsymbols
andlargesymbols
.If you load
unicode-math
, all these settings to math fonts will be completely discarded and you'd get Latin Modern Math.If you add
to your test document and compile skipping past the errors, you get
Removing
\usepackage{unicode-math}
not only removes the errors, but produces