Feeding the input
\RequirePackage{ifthen}
\RequirePackage{ifxetex,ifluatex}
\newif\ifxetexorluatex
\ifxetex
\xetexorluatextrue
\else
\ifluatex
\xetexorluatextrue
\else
\xetexorluatexfalse
\fi
\fi
\documentclass{standalone}
\ifxetexorluatex
\usepackage{unicode-math}
\else
\usepackage{newtxmath}
\fi
\newcommand{\nmodels}{\not\models}%%% or \providecommand, or \providecommand* instead of \newcommand; the effect is the same.
\begin{document}
\(\nmodels\) %%% or \(\not\models\); the effect is the same.
\end{document}
to any of pdflatex
, xelatex
, or lualatex
causes an infinite loop. Well, in case of XeLaTeX + unicode-math enters infinite loop if \nin is defined? you can use \notin
instead of \not\in
, but what do you do if you like the shape of \models
(rather than that of \vDash
), want a negated form of it, and want to call it \nmodels
? The form of \nvDash
is different, so, it's not advisable to use both \models
and \nvDash
in the same document. Using (the whole of) MnSymbols is out of question: it may still have bugs (I knew it had some 10 years ago and stopped using it then), changes quite a a few symbols, and clashes with NewTX fonts.