6

I need a math symbol which

  1. is similar to Yinyang (as follows) but without the two dots enter image description here
  2. and has the same size as \bullet.

A MWE is as follows

\documentclass{article}
\usepackage{amsmath,amsfonts,amssymb}
\begin{document}

\end{document}

Then how to define it? Any help is welcome!

8

Here is one way to do it using TikZ. Code for the symbol was obtained from this answer, and modified to match the size of \bullet. The size of the symbol is also scalable depending on your font size.

enter image description here

\documentclass{article}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{tikz}

\newcommand{\customyinyang}[1][1]{%
    \begin{tikzpicture}[scale=#1*0.07]
      \draw[line width = #1*0.05mm,transform canvas={yshift=0.02cm}] (0,0) circle (1cm);
      \path[fill=black,transform canvas={yshift=0.02cm}] (90:1cm) arc (90:-90:0.5cm)
                        (0,0)    arc (90:270:0.5cm)
                        (0,-1cm) arc (-90:-270:1cm);

    \end{tikzpicture}}

\begin{document}

Text \customyinyang[1] $\bullet$

\LARGE Large text \customyinyang[1.8] $\bullet$

\end{document}

UPDATE

A version which scales automatically based on font size. As requested in the comments.

\documentclass{article}
\usepackage{tikz}

\newcommand{\customyinyang}{%
    \begin{tikzpicture}[scale=0.45]
      \draw[line width = 0.05ex,transform canvas={yshift=0.12ex}] (0,0) circle (1ex);
      \path[fill=black,transform canvas={yshift=0.12ex}] (90:1ex) arc (90:-90:0.5ex)
                        (0,0)    arc (90:270:0.5ex)
                        (0,-1ex) arc (-90:-270:1ex);
    \end{tikzpicture}}

\begin{document}

Text \customyinyang~$\bullet$

\Huge Huge text \customyinyang~$\bullet$

\end{document}

enter image description here

  • 3
    +1 nice answer! A small suggestion: If you use a unit based on the font size, e.g. ex the size would automatically scale. See for example tex.stackexchange.com/a/413081/36296 – user36296 May 15 '18 at 19:46
  • @samcarter could you give a specific answer in which the symbol changes with the font size? – Mogic May 16 '18 at 1:22
  • @Kuttens Done :) – user36296 May 16 '18 at 2:02
7

As asked in comment here a version based on Myles answer which scales the size of the symbol:

\documentclass{article}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{tikz}
\usepackage{scalerel}

\newcommand{\customyinyang}{%
    \scalerel*{%
        \tikz[anchor=base, baseline]{%
            \draw[line width = 0.01em] (0,0.26em) circle (0.2em);
            \path[fill=black] (90:0.46em) arc (90:-90:0.1em)
                              (0,0.46em)    arc (90:270:0.2em)
                              (0,0.06em) arc (-90:-270:0.1em);
        }%
    }{\bullet}%
}

\begin{document}


{\Huge $F  \customyinyang \bullet$}   

{\normalsize $F \customyinyang \bullet$}   

{\tiny $ F \customyinyang \bullet$}   


\end{document}

enter image description here

5

You can increase o decrease the size of the symbol with the command \Yiyang with the coordinates of the points and of the circles. After with circle (.25cm) you can create a big, small o little bullet changed the value of (.25cm).

enter image description here

\documentclass[a4paper,12pt]{article}
\usepackage{tikz}
\newcommand{\Yiyang}{\tikz{\begin{scope}
\clip (0,0) circle (.25cm);
\fill[black] (0cm,.25cm) rectangle (-.25cm, -.25cm);
\end{scope}
\fill[black] (0,0.125) circle (0.125cm);
\fill[white] (0,-0.125) circle (0.125cm);
\draw (0,0) circle (.25cm);}
}
\newcommand{\newbullet}{\tikz\draw[black,fill=black] (0,0) circle (.25cm);
}

\begin{document}
Text \Yiyang and text! \ldots and \newbullet

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.