This question is very similar to Extendible equals sign but the solutions given there do not apply immediately.

At times I woud like to clarify the nature of a mathematical congruence. So I have defined in my preamble

\newcommand*\morph[1]{\underset{\mbox{\tiny #1}}{\cong}}

So I can write things like \morph{diff} and \morph{hom} to differentiate between different congruences. But even with the \mbox content set to \tiny, the text is still wider than the congruence sign. Any ideas?

  • Reducing the font size, although possible, would make the label almost illegible; on the other side, making an extended version of \cong will produce (IMO) inconsistent results. In this particular case (again, in my opinion) I'd rather stick to the behaviour exhibited by your current definition. Another option would be to select different symbols. Apr 14, 2011 at 15:25
  • Sometimes, when I have this sort of issue with features not in LaTeX that I think I want, I realize after trying to produce them that they are absent because they are a bad idea. It looks to me like you want to label "congruences" which are isomorphisms, in which case perhaps you could use \xrightarrow[under]{over} and put a \sim in one position? You could also use \widetilde to some (probably limited) extent to place a tilde over an extendible equals sign, though I haven't tried it so I'll leave the suggestion here as a comment.
    – Ryan Reich
    Apr 14, 2011 at 15:54

2 Answers 2


One could always use \resizebox to stretch the symbol.

\[X\morph{long text}Y\morph{i}Z\]
  • Hum, something's weird. It works if I invoke using latex test; dvipdf test; xpdf test.pdf. But it doesn't work if I invoke using pdflatex test; xpdf test.pdf. Any ideas? Apr 15, 2011 at 13:11
  • Let me clarify: doesn't work means "where the symbol should display, there is nothing there." \resizebox works by itself with pdflatex: if I have something inline like \resizebox{3cm}{2cm}{test} or the same with something in mathmode inside the third argument, it gets displayed and scaled. But somehow not the command you gave above. Apr 15, 2011 at 13:14
  • Hum, \scalebox however doesn't have the same problems. Looking at my use case, I am happy to now just scale the width of the symbol by 33%. Apr 15, 2011 at 13:47
  • @Willie: I can't imagine why the code doesn't work for you with pdflatex. It is what I used.
    – TH.
    Apr 15, 2011 at 14:44
  • @Willie: If \scalebox works, then so should \resizebox. They both end up using the same macro \Gscale@box.
    – TH.
    Apr 15, 2011 at 14:47

Of course, whilst agreeing that this Not Recommended, it's also fairly similar to something I do: I like to make arrows and so forth a little more conspicuous in presentation by making them a bit bigger. So my method for doing that adapts reasonably well to this situation.

That method is to use ... TikZ!


\mathrel{\tikz[baseline=0pt] {
   \node[above] at (0,1.2ex) (a) {\(\scriptstyle #1\)};
      transform canvas={yshift=-.5ex},
      transform canvas={yshift=-1ex},
    (a.south west) .. controls +(.25,.15) and +(-.25,-.15) .. (a.south east);

A \cong B \quad A \xcong{a,b,c,d,e,f,g,h} B

Okay, it's not going to win any design awards ...

extensible congruence sign

  • To save on preaction, you could use double, double equal sign distance (as I just found out for a similar problem).
    – Caramdir
    Apr 14, 2011 at 21:25
  • 1
    Have you heard of the calligraphy library? (Just kidding.;-) I think this will allow one to produce an even nicer version thereof, which could also be used in packages like tikz-cd.
    – user194703
    May 14, 2020 at 22:57
  • @Schrödinger'scat I'd have to check the dates, but my guess would be that this predates that library by a good year or so. Nice idea, though. May 14, 2020 at 23:34
  • 1
    I think so, too. But it would make a great extensible wide tilde, I'd think.
    – user194703
    May 14, 2020 at 23:38
  • Feel free to have a go! You'd get a guaranteed up-vote from me. May 14, 2020 at 23:44

You must log in to answer this question.

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