# What changed related to \ne in TeXLive 2019?

Did something change related to \ne recenetly?

The MWE below in TeXLive 2018 yields the expected output

but with TeXLive 2019 (with all packages up to date as of today) I get

Argument of \ne  has an extra }.

## Code

\documentclass{article}
\usepackage{mathtools}
\usepackage{xparse}

\let\OldNe\ne

\RenewDocumentCommand{\ne}{o}{%
\mathrel{\OldNe}
}

\begin{document}
$a \ne b$
\end{document}

• \ne is now \protect\ne<space>, so you need to use the letltxmacro package and \LetLtxMacro\OldNe\ne – Phelype Oleinik Nov 12 at 1:45
• @PhelypeOleinik: Thanks. Works great. Please post a answer. – Peter Grill Nov 12 at 1:50

With the last LaTeX release (October 2019) a lot of commands which are not usually supposed to expand were made robust, so \ne, which usually was \not=, now expands to \protect\ne<space> (\ne<space> is \csname ne \endcsname).
With \let\OldNe\ne, when your command does \mathrel{\OldNe}, \OldNe expands to \protect\ne<space>, and now \ne<space> is a macro delimited by a ], but a } is found before that, so TeX raises the Argument of \ne  has an extra } (note the extra space in the error message).
To work around the issue, for the time being, load the letltxmacro and use \LetLtxMacro\OldNe\ne instead of \let\OldNe\ne. \LetLtxMacro takes care of the fact that \ne is now protected. Eventually the LaTeX kernel will probably have, now that there are many more protected macros, a \let command that takes care of that in a similar way \LetLtxMacro does.
• Why is the protected version delimited by a ]? – siracusa Nov 12 at 5:48
• @siracusa to be honest I don't know yet. I'm traveling until tomorrow, so my debugging powers are limited. I thought it weird too, since (from the very little I know of xparse's internals) there should not be a \ne<space> nor a ]-delimited macro. I'll investigate when I can. – Phelype Oleinik Nov 12 at 8:58