22

Recently in some LaTeX documentation I noticed that there is a special LaTeX command for the symbol meaning "corresponds to", which is similar to an equal sign with a hat on top. \hat{=} or \widehat{=} both do not give satisfying results (my personal view). Unfortunately, I cannot remember which documentation it was! Does anyone know the command or the documentation where to find it?

The symbol I am looking for:

The symbol I am looking for

PS: I have already tried detexify but it didn't produce anything useful! Also, browsing the comprehensive LaTeX symbol list wasn't successful.

13
  • $\cong$ might be what you want. Other related symbols are \simeq, \sim, \approx. There is a symbol bible out on the web called symbols-A4.pdf. Very useful. Mar 20, 2013 at 12:21
  • In addition to trying the above, could you perhaps draw what you want and upload it here? (Carefully drawing it on paper and then taking a picture is probably the easiest way.) Mathematical notation varies greatly from region to region; e.g. my training urges me to use something similar to \func. Mar 20, 2013 at 12:25
  • 4
    Since you even linked to the Comprehensive LaTeX symbol list: Table 76, second column, last row on page 32 ;-)
    – mafp
    Mar 20, 2013 at 12:32
  • 4
    I addition to @mafp's command \mathrel{\widehat{=}} might help you. It would help us, if you discribe, what is not good with the commands you found. Mar 20, 2013 at 12:35
  • 1
    \mathrel{\widehat{=}} and \widehat{=} are actually the same as they will produce the same symbol. The only difference (at least to my knowledge) is, that the former tells tex it is a relation symbol which results in more free space in front and behind it. What ever symbol you use at the end: it might be a good idea to put it into \mathrel{}for that particular reason. Mar 20, 2013 at 13:07

1 Answer 1

11

Try this. Of course, the parameters can be adjusted to change vertical separation height or horizontal width of wedge relative to = sign, or aspect ratio of wedge. Note that the appearance of this is not quite the same as \hateq cited in comments above, but better conforms to the symbol illustrated by the questioner.

REVISED SOLUTION eliminated use of array to make space around \equalhat compatible with \mathrel.

\documentclass{article}
\usepackage{scalerel,stackengine,amsmath}
\newcommand\equalhat{\mathrel{\stackon[1.5pt]{=}{\stretchto{%
    \scalerel*[\widthof{=}]{\wedge}{\rule{1ex}{3ex}}}{0.5ex}}}}
\begin{document}
\[
x^2 \equalhat \ensurestackMath{\Centerstack[c]{a b c}}
\]

\begin{align}
a &\equalhat b \\
a &= b
\end{align}
\end{document}

enter image description here

ORIGINAL SOLUTION

\documentclass{article}
\usepackage{scalerel,amssymb}

\newcommand\equalhat{%
\let\savearraystretch\arraystretch
\renewcommand\arraystretch{0.3}
\begin{array}{c}
\stretchto{
    \scalerel*[\widthof{=}]{\wedge}
    {\rule{1ex}{3ex}}%
}{0.5ex}\\ 
=%
\end{array}
\let\arraystretch\savearraystretch
}

\begin{document}

$x^2 \equalhat \begin{array}{c}a\\b\\c\end{array}$

\end{document}

enter image description here

5
  • What I don't like with this solution is that $a \equalhat b$ and $a = b$ have different spacing. Can this be fixed?
    – bers
    Feb 3, 2016 at 17:30
  • @bers That is a problem with the array environment, as I understand it. I will give thought to fixing that (after I get back from next meeting). Feb 3, 2016 at 17:58
  • @bers One quick and simple fix is to edit the \equalhat definition by adding a \! at the very beginning and very end of the definition. Feb 3, 2016 at 18:20
  • Sure, this work, but rather imperfectly (if what one is after is alignment with the regular = character).
    – bers
    Feb 3, 2016 at 18:34
  • @bers I am not sure that the quick fix is imperfect, but in any event, I have revised the solution to eliminate the use of array. Feb 3, 2016 at 19:12

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