答案1
\documentclass{article}
\usepackage{amsmath,graphicx}
\newcommand{\mynoteq}{\mathrel{\text{$\ooalign{$=$\cr\hidewidth$\mycross$\hidewidth\cr}$}}}
\newcommand{\mycross}{%
\vcenter{\hbox{\scalebox{1.3}{$\times$}}}
}
\begin{document}
$ a \mynoteq d_{a \mynoteq d_{a \mynoteq d}}$
$ a \mynoteq d^{a \mynoteq d^{a \mynoteq d}}$
$ a = d$
\end{document}
答案2
使用图片模式:
\documentclass{article}
\usepackage{pict2e}
\makeatletter
\newcommand{\nnoteq}{\mathrel{\mathpalette\nnot@eq\relax}}
\newcommand{\nnot@eq}[2]{%
\sbox\z@{$\m@th#1=$}%
\vcenter{\rlap{%
\setlength{\unitlength}{\wd0}%
\begin{picture}(1,1)
\linethickness{0.4pt}%
\ifx#1\scriptstyle
\linethickness{.9\@wholewidth}%
\else
\ifx#1\scriptscriptstyle
\linethickness{.75\@wholewidth}%
\fi
\fi
\roundcap
\put(0.1,0.1){\line(1,1){0.8}}
\put(0.1,0.9){\line(1,-1){0.8}}
\end{picture}%
}}%
{=}%
}
\begin{document}
$a\nnoteq b_{\nnoteq_{\nnoteq}}$
\end{document}
答案3
这也许可以进一步优化:
\documentclass{article}
\usepackage{centernot,graphicx}
\newcommand{\xequal}{\mathrel{\mathchoice
{\centernot{\reflectbox{$\neq$}}}
{\centernot{\reflectbox{$\neq$}}}
{\centernot{\reflectbox{$\scriptstyle\neq$}}}
{\centernot{\reflectbox{$\scriptscriptstyle\neq$}}}}}
\begin{document}
$a = b \xequal c^{d = e \xequal f^{g = h \xequal i}}$
\end{document}