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.

lpdbw
  • 8,330
  • $\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. – Steven B. Segletes Mar 20 '13 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. – Sean Allred Mar 20 '13 at 12:25
  • \stackrel{\frown}{=} – hpesoj626 Mar 20 '13 at 12:26
  • I have added a picture. @hpesoj626 I remeber that it was a special command (like \cong for example) not a composition of different commands. I know that that I can define a command myself but I want to know what that command was ;-) – lpdbw Mar 20 '13 at 12:28
  • Not sure why I read your question and saw "tilde" instead of "hat" in my first comment, but the symbol bible is still useful. – Steven B. Segletes Mar 20 '13 at 12:29
  • 4
    Since you even linked to the Comprehensive LaTeX symbol list: Table 76, second column, last row on page 32 ;-) – mafp Mar 20 '13 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. – Dominikus K. Mar 20 '13 at 12:35
  • http://en.wikipedia.org/wiki/Equals_sign says it's ≘ so \stackrel{\frown}{=} can be an option, too. But @mafp is correct. mathabx indeed provides \corresponds – hpesoj626 Mar 20 '13 at 12:36
  • I think we can close this as a duplicate. But I would suggest that you don't delete this question since other readers might search for the same symbol. – hpesoj626 Mar 20 '13 at 12:39
  • With \stackrel{\frown}{=} the hat is not square but round. With \mathrel{\widehat{=}} or \widehat{=} the distance between the hat and the = is to big (in my eyes). \cooresponds does look good but it needs the mathabx package. Loading it I get an error \leftmoon already defined without having done anything with \leftmoon ... I am quite certain that that symbol I saw didn't need any special package. But maybe I was dreaming :-) @mafp Sorry, apparently I overlooked this in the list! – lpdbw Mar 20 '13 at 12:43
  • 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. – Dominikus K. Mar 20 '13 at 13:07
  • this is unicode x+2259, and as such should be present in a font that supports the unicode symbols. – barbara beeton Mar 20 '13 at 13:10
  • I've 'reverse duped' here: there is a newer question with a wider range of answers – Joseph Wright Jun 27 '14 at 17:09

1 Answers1

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

  • 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 03 '16 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). – Steven B. Segletes Feb 03 '16 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. – Steven B. Segletes Feb 03 '16 at 18:20
  • Sure, this work, but rather imperfectly (if what one is after is alignment with the regular = character). – bers Feb 03 '16 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. – Steven B. Segletes Feb 03 '16 at 19:12