6

In my country, the similar triangle symbol is different to \cong or \sim symbol. I draw the symbol with TikZ package so it is not compatible with sizes and color. Please help me create the symbol with TeX command. Thank you very much.

enter image description here

P.S The code draws similar symbol.

\documentclass[tikz,border=2mm]{standalone}

\begin{document}

\begin{tikzpicture}[baseline=-7pt,scale=0.1,line width=0.65pt]

\draw (-2,0);
\draw (4,0);
\draw (0,0) arc (90:270:1)..controls +(0:1) and +(180:1).. (2,0) arc (90:-90:1);

\end{tikzpicture}

\end{document}
6
  • 1
    The curve is no doubt aesthetic-- with minimal and complete arcs and curves connected smoothly. However, I'm a bit curious to know (nothing related to LaTeX, though) in which country a pair of similar triangles are denoted by a symbol having nothing to do with straight lines even !
    – Partha D.
    Commented May 21, 2021 at 6:41
  • @ParthaD. I live in VietNam. Commented May 21, 2021 at 13:02
  • That's wonderful. Tôi rất thích nó !
    – Partha D.
    Commented May 21, 2021 at 18:15
  • 1
    @ParthaD. I’m guessing, rotated S for sembables? (Without going into that history.)
    – Davislor
    Commented May 21, 2021 at 19:41
  • @Davislor Yes, that's a good catch at linguistic etymology. Similar and semblance all start with S, whose colloquial form could be \sim (how come I never wondered before !) and more puritan form the rotated "S". Nice !
    – Partha D.
    Commented May 22, 2021 at 6:48

2 Answers 2

6

If you like your tikz symbol there is another simple option. You can wrap it inside a macro and use scalable units. Something like this:

\documentclass{article}
\usepackage   {tikz}

\newcommand{\similar}
{%
  \mathrel%
  {%
    \begin{tikzpicture}[baseline=(a.south),line width=0.15ex]
      \node (a) {};
      \draw (0,0.5ex) arc (90:270:0.5ex) .. controls +(0:0.5ex) and +(180:0.5ex) .. (1ex,0.5ex) arc (90:-90:0.5ex);
    \end{tikzpicture}
  }
}

\begin{document}
The red triangles {\color{red} $ABC \similar DEF$} are similar.

So are the big triangles {\large $A'B'C' \similar  D'E'F'$}.
\end{document}

enter image description here

Edit: As Davislor suggested I wrapped all in a \mathrel for a better spacing.

6
  • Thank you very much! Commented May 21, 2021 at 11:03
  • It is equal to the original. +1
    – Sebastiano
    Commented May 21, 2021 at 11:22
  • 1
    @Sebastiano, thanks!!. Yes it's the same, I only changed the units and wrapped it inside a macro. Commented May 21, 2021 at 11:24
  • The technique is scalable ex unit. It is not equal to the original code. Juan Castaño's code is quite good! Commented May 21, 2021 at 11:27
  • Like I mentioned at the end of my answer, you want to wrap it in \mathrel for correct spacing.
    – Davislor
    Commented May 21, 2021 at 15:49
6

∽ (U+223D) is \backsim in the packages unicode-math, stix or stix2.

You could instead put a sans-serif S inside a \rotatebox from graphicx.

You can also put a tikzpicture inside \mathrel and use it as a relation symbol in math mode.

1
  • 1
    Thank you very much for your help! The second option is useful! ibb.co/fxRGhxL Commented May 21, 2021 at 2:26

You must log in to answer this question.

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