How can I create a circled not equal sign similar to the image below?

Enter image description here

  • 7
    Welcome! \documentclass{article} \usepackage{circledsteps} \begin{document} \[ E\Circled{\ne}m\,c^3\] \end{document} ?
    – user194703
    Jan 30 '20 at 15:22

Here is a solution with a smaller \not bar, so the symbol is completely enclosed in the circle without the circle being too large.

Edit: I added another solution. The \circneqrel command provides a circled \neq symbol which is spaced as a binary relation symbol, considering the circle as the limits of the symbol (this is the first solution I posted). The \circneq command provides a similar symbol, but adjusting the spacing as if it was a simple \neq symbol.

\newcommand{\newneq}{\clipbox{0pt 1.5pt 0pt 1.5pt}{$\neq$}}
\( E \circneqrel mc^3 \)

\( E \circneq mc^3 \)

\( E \neq mc^3 \)

While one may quibble about the small overlap, this approach has two advantages: 1) the spacing of \necirc is the same as that of \ne and 2) it works across math styles.

$E\ne mc^3$

$E \necirc mc^3$

$\scriptstyle E\ne mc^3$

$\scriptstyle E \necirc mc^3$

$\scriptscriptstyle E\ne mc^3$

$\scriptscriptstyle E \necirc mc^3$

enter image description here


Here are two solutions: one with \stackinset command from the stackengine package, with \bigcirc and a slightly reduced version of \neq, and another with the recent package circledsteps:


\newcommand{\circledneq}{\mathrel{\stackMath\stackinset{c}{0pt}{c}{0pt}{\scalebox{0.75}{$\neq $}}{\bigcirc}}}
\newcommand{\Circledneq}{\pgfkeys{/csteps/inner ysep=2.5pt, /csteps/inner xsep=2.5pt}\mathrel{\Circled{\neq}} }


$E\circledneq mc^3 $

$E\Circledneq mc^3 $


enter image description here


This is only a simple solution using simple commands where I have used a predefinite symbol of the stix package called \circledequal.

enter image description here

%% Compile and read me!
A \cancel{\circledequal} B, A_{\cancel{\circledequal}} B

Addendum: With fdsymbol package you have the same font of Computer Modern (CM).

enter image description here

$A\cancel{\oequal} B$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.