3

I would like to have an equality sign with a dot right in the middle, between the bars. After reading this answer:

How do you superimpose two symbols over each other?

I tried to use \mathrlap{=}\cdot, \mathclap{=}\cdot and \superimpose{=}{\cdot}, but each time the dot is either too far left or right. Is there a way to control the exact position of the dot so I can put it in the middle?

3
  • 1
    You're using the wrong syntax for \superimpose. But see the revamped answer, particularly the second part.
    – egreg
    Oct 30, 2022 at 16:21
  • What is the meaning of this symbol?
    – projetmbc
    Oct 30, 2022 at 17:05
  • 1
    @projetmbc It's new. I want to use it as a placeholder that indicates that it goes from a 2-categorical structure to a 0-categorical one. Indicate the categorical level of the domain and codomain by the number of lines horizontally and vertically, with the 0-categorical case being represented by a point. This way, the notation can be generalized to arbitrary n-categories. Oct 30, 2022 at 17:58

3 Answers 3

4

You can use \ooalign for this purpose. Using \mathpallette will allow proper spacing for subscripts.

enter image description here

\documentclass{article}

\makeatletter
\newcommand{\equaldot}{\mathrel{\mathpalette\eqd@t\relax}}
\newcommand{\eqd@t}[2]{%
  \ooalign{%
    $\m@th#1=$\cr
    \hidewidth$\m@th#1\cdot$\hidewidth\cr
  }%
}
\makeatother


\begin{document}

$A\equaldot B_{A\equaldot B_{A\equaldot B}}$

\end{document}
2
  • Thanks! I copied your code, but it gives me a error "command already defined" error, though the word is never used before and only in the document later. And in the document, the dot is below the equality sign. Do you know what could cause this? Oct 30, 2022 at 16:52
  • 2
    @AlexanderPraehauser: You are probably loading a package that has \eqdot already defined, such as fdsymbol or stix or MnSymbol. Try changing the command name to \equaldot or something of your choice. I edited my answer with this change. In the future you should provide a "Minimal Working Example" (MWE) that starts with \documentclass, includes all relevant \usepackage commands, ends with \end{document}
    – Sandy G
    Oct 30, 2022 at 17:29
3

Based on the code here:

\documentclass{article}
\newcommand{\eq}{\mathrel{{=}\mkern-9.5mu{\cdot}\mkern4mu}}
\begin{document}
$a\eq b$
\end{document}

enter image description here

1
  • Since this symbol will presumably be used as a relation, you should enclose =\mkern-14.5mu\cdot \mkern4mu with \mathrel{...}. Note that the spacing will not be correct for subscripts. For example, try $a\eq b_{a\eq b}$
    – Sandy G
    Oct 30, 2022 at 15:47
2

I cannot reproduce your problem. Here:

\documentclass{article}
\makeatletter
\newcommand{\superimpose}[2]{%
  {\ooalign{$#1\@firstoftwo#2$\cr\hfil$#1\@secondoftwo#2$\hfil\cr}}}
\makeatother

\begin{document}
$\mathpalette\superimpose{{=}{\cdot}}$
\end{document}

the dot seems to by placed absolutely correct. However, you can use, e.g., \mskip to move the dot left or right:

\documentclass{article}
\makeatletter
\newcommand{\superimpose}[2]{%
  {\ooalign{$#1\@firstoftwo#2$\cr\hfil$#1\@secondoftwo#2$\hfil\cr}}}
\makeatother

\begin{document}
$\mathpalette\superimpose{{=}{\cdot}}$

$\mathpalette\superimpose{{=}{\mskip5mu\cdot}}$

$\mathpalette\superimpose{{=}{\mskip-5mu\cdot}}$

\end{document}

You must log in to answer this question.

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