3

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

Enter image description here

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

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.

\documentclass{article}
\usepackage{trimclip}
\newcommand{\newneq}{\clipbox{0pt 1.5pt 0pt 1.5pt}{$\neq$}}
\newlength{\bigcirclength}
\newlength{\neqlength}
\settowidth{\bigcirclength}{$\bigcirc$}
\settowidth{\neqlength}{$\neq$}
\newcommand{\circneqrel}{\mathrel{\makebox{$\bigcirc$\hspace*{-\bigcirclength}\makebox[\bigcirclength]{\newneq}}}}
\newcommand{\circneq}{\mathrel{\makebox{\makebox[\neqlength]{$\bigcirc$}\hspace*{-\neqlength}$\newneq$}}}
\begin{document}
\( E \circneqrel mc^3 \)

\( E \circneq mc^3 \)

\( E \neq mc^3 \)
\end{document}
6

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.

\documentclass{article}
\usepackage{stackengine,scalerel}
\newcommand\necirc{\mathrel{\ThisStyle{\ensurestackMath{%
  \stackengine{0pt}{\SavedStyle\ne}{\SavedStyle\bigcirc}{O}{c}{F}{T}{L}}}}}
\begin{document}
$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$
\end{document}

enter image description here

4

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:

\documentclass{article}
\usepackage{graphicx}
\usepackage{stackengine}
\usepackage{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}} }

\begin{document}

$E\circledneq mc^3 $

$E\Circledneq mc^3 $

\end{document} 

enter image description here

3

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!
\documentclass[12pt]{article}
\usepackage{stix,cancel}
\begin{document}
\[
A \cancel{\circledequal} B, A_{\cancel{\circledequal}} B
\]
\end{document}

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

enter image description here

\documentclass[a4paper,12pt]{article}
\usepackage{cancel,fdsymbol}
\begin{document}
$A\cancel{\oequal} B$
\end{document}

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.