21

I can’t find the LaTeX command for the symbol below. Can anyone help me out to find this symbol? I wasn't able to find it with Detexify.

enter image description here

4
  • 6
    what does this symbol mean?
    – Francis
    Aug 7, 2013 at 7:57
  • 18
    To the voters for closing as duplicate: before doing this one should ensure that the symbol can be found with those means.
    – egreg
    Aug 7, 2013 at 8:52
  • @egreg In case of these ever-returning symbol questions, I'd rather close any that doesn't state explicitly that the OP already tried Detexify.
    – lockstep
    Aug 7, 2013 at 13:32
  • 7
    @lockstep So, before voting, ask the OP.
    – egreg
    Aug 7, 2013 at 15:01

6 Answers 6

23

Well here is one that looks kinda like cheating, it uses amsmath only, though adding calc will make the definition much simpler:

\documentclass{article}
\usepackage{amsmath}

\newlength{\crossl}
\settowidth{\crossl}{$\times$}
\newlength{\ceql}
\settowidth{\ceql}{$\times=$}
\addtolength{\ceql}{-\crossl}
\newcommand{\crosseq}{\mathrel{\makebox[\crossl][l]{$\times\hspace{-\ceql}=$}}}

\begin{document}
$f(x)\crosseq g(x)\crosseq h(x)$
\end{document}

Result:

enter image description here

One can also play around with the position and the symbols used:

\newcommand{\crosseq}{\mathrel{\makebox[7.7778pt][l]{$\neq$\hspace{-6.7778pt}\raisebox{-2.5pt}{$\backslash$}}}}

enter image description here

EDIT: Since this answer is chose I will add some more solution, this time using egreg's suggestion as poking around with boxes will likely create unexpected spacing issue:

\newcommand{\crosseq}{\mathrel{\ooalign{\hidewidth$/$\hidewidth\cr\ooalign{\hidewidth$\backslash$\hidewidth\cr$=$\cr}\cr}}}

or

\newcommand{\crosseq}{\mathrel{\ooalign{\hidewidth$/$\hidewidth\cr\ooalign{\hidewidth\raisebox{-2pt}{$\backslash$}\hidewidth\cr$=$\cr}\cr}}}

Result:

enter image description here

EDIT2: Add [l] option to \makebox in order to adjust alignment.

2
  • 4
    Why \DeclareMathOperator? I'd say it's a \mathrel. However, \mathrel{\ooalign{\hidewidth$\times$\hidewidth\cr$=$\cr}} is simpler.
    – egreg
    Aug 7, 2013 at 8:47
  • @egreg: good call, it should be a relation.
    – Francis
    Aug 7, 2013 at 9:00
23

Depending on your usage, the following may suffice:

enter image description here

\documentclass{article}
\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\newcommand{\crosseq}{\mathrel{\ooalign{$\neq$\cr\reflectbox{$\neq$}\cr}}}
\begin{document}
$f(x) = g(x) \neq h(x) \crosseq i(x)$
\end{document}

The symbol \crosseq consists of an overlay of \neq and a reflected \neq. For a short lesson in \ooalign and symbol overlaying, see \subseteq + \circ as a single symbol (“open subset”).

4
  • hi its not working here Werner. it displays 2 \neq nearer only,,,
    – ravi
    Aug 7, 2013 at 7:49
  • 1
    @ravi: Do you receive errors? Did you include the graphicx package? Did you copy it correctly? What "[is] not working"?
    – Werner
    Aug 7, 2013 at 7:52
  • i copied the above entire code and paste it in tex file and run it. im not getting the exact output what displayed here
    – ravi
    Aug 7, 2013 at 8:03
  • @ravi: I'm using one of the basic packages/tools (graphicx) and compiling under pdflatex. Note that \crosseq can only be used in math mode. Are you getting an error or a warning?
    – Werner
    Aug 7, 2013 at 8:11
15

Just for a change, no \ooalign:

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx,calc}

% make \widthof usable with \hspace
% http://tex.stackexchange.com/a/99242
\makeatletter
\def\@hspace#1{\begingroup\setlength\dimen@{#1}\hskip\dimen@\endgroup}
\makeatother

\newcommand{\rnot}{%
  \mathrel{%
    \text{%
      \makebox[0pt][l]{%
        \hspace{\widthof{$=$}}\reflectbox{$\not$}%
      }%
    }%
  }%
}
\newcommand{\crosseq}{\rnot\not=}

\begin{document}
$a\crosseq b$
\end{document}

enter image description here

1
  • This looks nicer than the first answer, and especially than the one based on xcancel as the cross is vertically centred on the = sign
    – Chris H
    Aug 7, 2013 at 9:24
15

You might consider using the cancel package. Its command \xcancel places a cross over any given symbol. For a relation symbol like = you should enclose the whole construct in \mathrel to get the correct horizontal spacing:

Sample output

\documentclass{article}

\usepackage{cancel}

\newcommand{\cancelledeq}{\mathrel{\xcancel{=}}}

\begin{document}

\( a = b \cancelledeq c \)

\end{document}
5

Poor man's code (simplified and stolen from egreg's):

\documentclass{article}
\usepackage{mathtools}
\usepackage{graphicx}
%
\newcommand{\crosseq}{%
  \mathrel{%
    \text{%
        {$\neq$\reflectbox{$\not$}}%
    }%
  }%
}

\begin{document}
$a\crosseq b$
\end{document}

enter image description here

0
4

on the theory that there was some meaning to the asymmetry of the original drawing, and stealing egreg's very nice name for the symbol, here's another approach.

\documentclass{article}
\usepackage{mathtools}
\usepackage{amssymb}

\newcommand{\crosseq}{\mathrlap{{}\mathrel{\smallsetminus}{}}\not=}

\begin{document}
$a\crosseq b$
\end{document}

output of example code

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .