[Tex/LaTex] Plus with a bullet in the middle

symbolstikz-pgf

I want to create a symbol "\bulletplus" which is basically a plus symbol
with a bullet in middle. The symbol should have the same width and height as
an usual plus.

bulletplus

How do I create this using only latex commands?
(maybe with the help of tikz)

Best Answer

Version with scaled down bullet

The following example

  • centers the bullet on the plus sign,

  • respects the current math style, and

  • uses a scaled down version of the bullet, which can be configured by setting macro \bulletplusscale.

  • The symbol behaves as math binary operator as the plus sign.

Full example:

\documentclass{article}
\usepackage{graphicx}

\makeatletter
\newcommand*{\bulletplus}{%
  \mathbin{%
    \mathpalette\@bulletplus{}%
  }%
}
\newcommand*{\@bulletplus}[2]{%
  % #1: math style
  % #2: unused (empty)
  \sbox0{$#1+\m@th$}%
  \sbox2{$#1\vcenter{}$}% math axis
  \rlap{%
    \hbox to \wd0{% centers the bullet in the space of the plus sign.
      \hfil
      % The bullet is moved to the base line, scaled, and
      % moved back.
      \raise\ht2\hbox{%
        \scalebox{\bulletplusscale}{%
          \lower\ht2\hbox{$#1\bullet\m@th$}%
        }%
      }%
      \hfil
    }%
  }%
  +%
}
\newcommand*{\bulletplusscale}{.6}
\makeatother

\begin{document}
\[ A \bulletplus B_{A \bulletplus B_{A \bulletplus B}}\]
\end{document}

Result


Older version with \bullet in original size

\documentclass{article}

\makeatletter
\newcommand*{\bulletplus}{%
  \mathbin{%
    \mathpalette\@bulletplus{}%
  }%
}
\newcommand*{\@bulletplus}[2]{%
  % #1: math style
  % #2: unused (empty)
  \sbox0{$#1+\m@th$}%
  \rlap{%
    \hbox to \wd0{\hfil$#1\bullet\m@th$\hfil}%
  }%
  +%
}
\makeatother

\begin{document}
\[ A \bulletplus B_{A \bulletplus B_{A \bulletplus B}}\]
\end{document}

Result