How to create a dashed equality symbol as follows?
Also, make sure that, it
- be effected by
\notthe same as=, - and act the same as = in other ways.
By the way, it's not necessary that there must be three gaps in =.
How to create a dashed equality symbol as follows?
Also, make sure that, it
\not the same as =,By the way, it's not necessary that there must be three gaps in =.
You can make your own symbol using the techniques from this post. Here is a version using \ooalign to superimpose two white rules on an = symbol to make the dash pattern. You can adjust the spacing and thickness of the gaps to your liking by changing the arguments in \hspace and \rule. Note that if your page color is not white you'll have to change the color of the rules.
\documentclass{article}
\usepackage{color} %for \textcolor
\newcommand{\eqeqeq}{\mathrel{\ooalign{=\cr\hfil\textcolor{white}{\rule[.28ex]{.1em}{.6ex}\hspace{.2em}\rule[.28ex]{.1em}{.6ex}}\hfil\cr}}}
\begin{document}
$A\eqeqeq B$
$A\not\eqeqeq B$
$A=B$
$A\ne B$
\end{document}
If you need the symbol in \scriptstyle or \scriptscriptstyle, you can use \mathchoice:
\newcommand{\eqeqeq}{\mathrel{
\mathchoice
{\ooalign{=\cr\hfil\textcolor{white}{\rule[.28ex]{.1em}{.6ex}\hspace{.2em}\rule[.28ex]{.1em}{.6ex}}\hfil\cr}}
{\ooalign{=\cr\hfil\textcolor{white}{\rule[.28ex]{.1em}{.6ex}\hspace{.2em}\rule[.28ex]{.1em}{.6ex}}\hfil\cr}}
{\ooalign{$\scriptstyle{=}$\cr\hfil\textcolor{white}{\rule[.17ex]{.08em}{.47ex}\hspace{.18em}\rule[.17ex]{.08em}{.47ex}}\hfil\cr}}
{\ooalign{$\scriptscriptstyle{=}$\cr\hfil\textcolor{white}{\rule[.1ex]{.06em}{.38ex}\hspace{.17em}\rule[.1ex]{.06em}{.38ex}}\hfil\cr}}
}}
Again, you can adjust the spacing and thickness of the gaps however you like.
em is stuck at \normalsize. It might be possible to salvage this by explicitly specifying the desired size for each stage. (This should probably be investigated directly at the level of \mathchoice, but that's digging deeper than I feel comfortable doing.)
– barbara beeton
Aug 08 '21 at 23:27
\not line.
– M. Logic
Aug 09 '21 at 06:02
Here is a different solution using the trimclip package. This works with all sizes (large, Huge, etc.) as well as scriptstyle and scriptscriptstyle.
Instead of overlaying white onto an = sign, we clip portions of the = sign and replace with whitespace. I selected the left, middle and right 1/4 of the = sign indicated in the code as .25\weq (left quarter) followed by an eighth space (.125\weq) followed by the middle quarter (.375\weq to .625\weq), etc. You can adjust the spacing however you wish, or subdivide the = even more.
Update
Here are two additional versions where the clipping only affects one of the lines. Instead of inserting space between the segments, a clipped = symbol is inserted. When the bottom portion is clipped (\eqeqeqb) the baseline changes so a \raisebox command is used.
\documentclass{article}
\usepackage{trimclip}
\newlength{\weq}
\newlength{\heq}
\makeatletter
\newcommand{\eqeqeq}{\mathrel{\mathpalette\eq@eq\relax}}
\newcommand{\eq@eq}[2]{\settowidth{\weq}{$\m@th#1=$}%
\clipbox{0pt 0pt {.25\weq} \height}{$\m@th#1=$}%
\hspace{.125\weq}%
\clipbox{{.375\weq} 0pt {.625\weq} \height}{$\m@th#1=$}%
\hspace{.125\weq}%
\clipbox{{.75\weq} 0pt {\weq} \height}{$\m@th#1=$}%
}
\newcommand{\eqeqeqt}{\mathrel{\mathpalette\eq@eqt\relax}}
\newcommand{\eq@eqt}[2]{\settowidth{\weq}{$\m@th#1=$}%
\clipbox{0pt 0pt {.25\weq} \height}{$\m@th#1=$}%
\clipbox{{.25\weq} 0pt {.375\weq} {.5\height}}{$\m@th#1=$}%
\clipbox{{.375\weq} 0pt {.625\weq} \height}{$\m@th#1=$}%
\clipbox{{.625\weq} 0pt {.75\weq} {.5\height}}{$\m@th#1=$}%
\clipbox{{.75\weq} 0pt {\weq} \height}{$\m@th#1=$}%
}
\newcommand{\eqeqeqb}{\mathrel{\mathpalette\eq@eqb\relax}}
\newcommand{\eq@eqb}[2]{\settowidth{\weq}{$\m@th#1=$}\settoheight{\heq}{$\m@th#1=$}%
\clipbox{0pt 0pt {.25\weq} \height}{$\m@th#1=$}%
\raisebox{.5\heq}{\clipbox{{.25\weq} {.5\height} {.375\weq} {\height}}{$\m@th#1=$}}%
\clipbox{{.375\weq} 0pt {.625\weq} \height}{$\m@th#1=$}%
\raisebox{.5\heq}{\clipbox{{.625\weq} {.5\height} {.75\weq} {\height}}{$\m@th#1=$}}%
\clipbox*{{.75\weq} 0pt {\weq} \height}{$\m@th#1=$}%
}
\makeatother
\begin{document}
$A=B_{a=b_{x=y}}$
$A\eqeqeq B_{a\eqeqeq b_{x\eqeqeq y}}$
$A\eqeqeqt B_{a\eqeqeqt b_{x\eqeqeqt y}}$
$A\eqeqeqb B_{a\eqeqeqb b_{x\eqeqeqb y}}$
$A\ne B_{a\ne b_{x\ne y}}$
$A\not\eqeqeq B_{a\not\eqeqeq b_{x\not\eqeqeq y}}$
$A\not\eqeqeqt B_{a\not\eqeqeqt b_{x\not\eqeqeqt y}}$
$A\not\eqeqeqb B_{a\not\eqeqeqb b_{x\not\eqeqeqb y}}$
\end{document}
= to - in the expression $\m@th#1=$ (4 times)
– Sandy G
Aug 16 '21 at 14:47
\eqeqeq dashes both lines, \eqeqeqt dashes the top, \eqeqeqb dashes the bottom.
– Sandy G
Aug 17 '21 at 02:17
\notable), but maybe another more common symbol is better suited. What do you want to express with the symbol? Maybe use\stackrel?=? – gernot Aug 07 '21 at 20:09\eqeqeqin unicode-math, stix and stix2 packages. – David Carlisle Aug 07 '21 at 21:13