# How do I render math (or a PNG) inside of a TikZ text arc?

I'm trying to get a "hex dot" symbol to be in a text arc in tikz, but I'm not succeeding.

Here is my attempt:

\documentclass{standalone}

\usepackage{tikz}
\usetikzlibrary{decorations.text}

\usepackage{graphicx}
\usepackage{amsmath,amssymb}

\newcommand{\hexdot}{$\therefore\atop\because$}

\begin{document}
\begin{tikzpicture}
\node (myfirstpic) at (0,0) {\includegraphics{round_test_image.png}};
\node (One) at (-5,0) {};
\node (Two) at (5,0) {};
\def\myshift#1{\raisebox{-2.5ex}}
\draw [-,thick,black!0,postaction={decorate,decoration={text along path,text align=center,text={|\myshift|B\hexdot{} O\hexdot{} T\hexdot{} T\hexdot{} O\hexdot{} M\hexdot{} T\hexdot{} E\hexdot{} X\hexdot{} T\hexdot{}}}}] (One) to [bend right=45]  (Two);
\def\myshift#1{\raisebox{1ex}}
\draw [-,thick,black!0,postaction={decorate,decoration={text along path,text align=center,text={|\myshift|T\hexdot{} O\hexdot{} P\hexdot{}  T\hexdot{} E\hexdot{} X\hexdot{} T\hexdot{}}}}] (One) to [bend left=45] (Two);
\end{tikzpicture}
\end{document}


I can add \hexdot or \hexdot{} to a node label, or elsewhere in the document, and have it appear correctly. However, if I put it in either the bottom text arc or the upper text arc, the document just hangs forever while trying to render. If I write the arcs without any \hexdot{} symbols, it works just fine.

I have also tried this using a .png version of the hexdot character, but that doesn't work either, as the rendering also hangs indefinitely.

Any help would be greatly appreciated! Thank you kindly.

• Welcome to TeX.SX. As a new member, it is recommended to visit these pages tex.meta.stackexchange.com/questions/1436/welcome-to-tex-sx and tex.stackexchange.com/tour and also tex.meta.stackexchange.com/questions/228 to know about Minimal Example. Otherwise, more specifically to your question: I do not understand how the Hebrew language and font is necessary in your example ! Is it absolutely necessary ? in other words, does it change the behaviour of your code and the sense of your question? if no please consider editing (minimizing) your question. – R. N Jan 13 at 21:47
• Thank you for the suggestion, R.N. The bit about the Hebrew is probably not relevant. I have edited my OP to work towards a more minimized version of my question. – Gabriel Jagush Jan 13 at 21:55

You need to wrap the math content into braces. (Also you may want to use \genfrac or something of that sort instead of \atop. This answer also work with your macro.)

\documentclass{standalone}

\usepackage{tikz}
\usetikzlibrary{decorations.text}

\usepackage{graphicx}
\usepackage{amsmath,amssymb}

\newcommand{\hexdot}{$\genfrac{}{}{0pt}{}{\therefore}{\because}$}

\begin{document}
\begin{tikzpicture}
\node (myfirstpic) at (0,0) {\includegraphics{example-image-a.png}};
\node (One) at (-5,0) {};
\node (Two) at (5,0) {};
\def\myshift#1{\raisebox{-2.5ex}}
\draw [-,thick,black!0,postaction={decorate,decoration={text along path,text align=center,text={|\myshift|B{\hexdot} O{\hexdot} T{\hexdot} T{\hexdot} O{\hexdot} M{\hexdot} T{\hexdot} E{\hexdot} X{\hexdot} T{\hexdot}}}}] (One) to [bend right=45]  (Two);
\def\myshift#1{\raisebox{1ex}}
\draw [-,thick,black!0,postaction={decorate,decoration={text along path,text align=center,text={|\myshift|T{\hexdot} O{\hexdot} P{\hexdot}  T{\hexdot} E{\hexdot} X{\hexdot} T{\hexdot}}}}] (One) to [bend left=45] (Two);
\end{tikzpicture}
\end{document}


As I do not have your png image I use an image that is included in most TeX installations.

• I believe example-image-duck is also available in most TeX distributions, and it is much better than the boring example-image-a.png – fractal Jan 14 at 5:38
• Marked as solved! Thank you so much! I had no idea that the solution was going to be something as simple as bracketing the statement. I greatly appreciate your help. – Gabriel Jagush Jan 14 at 15:59