# MacTeX 2019 gives “! LaTeX3 Error: Control sequence \not= already defined.”

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 } ?  • What's the purpose of loading unicode-math along with newtxmath and ebgaramond-maths? – egreg Jul 9 '19 at 9:03 • huh? :) I don't know... Is this expected not to work? – jonalv Jul 9 '19 at 9:25 • Off-topic: Is dipsnames a typo? I have encountered dvipsnames before, but never dipsnames. – Mico Jul 9 '19 at 9:29 • oops yea typo :) – jonalv Jul 9 '19 at 9:31 • You are loading three package for math fonts (newtxmath, ebgaramond-maths, unicode-math). Of course you can only use a single math font at a time. Which one do you want to use? – Henri Menke Jul 9 '19 at 10:04 ## 1 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 before ebgaramond-maths is recommended, because the latter only acts on the operators and letters math groups, not on symbols and largesymbols. 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 $abc+\int f(x)\,dx$  to your test document and compile skipping past the errors, you get Removing \usepackage{unicode-math} not only removes the errors, but produces • I have tested a bit more and it seems like unicode-math has a nice looking $\hookrightarrow$ that I can use in MacTex 17 by loading that package before the other ones. So it seems like I still would like to "load too many font packages" but maybe I am missing something... – jonalv Jul 9 '19 at 12:12 • @jonalv Adding it before or after other font packages is irrelevant, because unicode-math does most of its work at begin document. You just remove those errors, getting a couple of different ones, but the document will use Latin Modern Math for math. – egreg Jul 9 '19 at 12:16 • Yea so it seems, you are right as usual. I guess I can't use that awesome looking $\hookrightarrow\$ together with EB Garamond then :( – jonalv Jul 9 '19 at 12:28
• @jonalv You can import the symbol from the legacy stix fonts. – egreg Jul 9 '19 at 14:29
• For reference: tex.stackexchange.com/questions/499358/… – jonalv Jul 10 '19 at 11:52