# Tetrahedron symbol

I would like to write a sum over tetrahedra in an equation, like:

$$\sum_{\tetrahedron} \sum_{i \in \tetrahedron} s_i$$


where the hypothetical \tetrahedron doesn't yet exist. How can I write a tetrahedron symbol for use as a subscript/limit etc.?

I searched on detexify and came up with nothing.

Any of the following shapes (in any orientation) would be sufficient, as long it can be understood as a tetrahedron:

I think Tikz would be overkill, but if there are no other options..

• I know it is not very polite to self-promote oneself, but I think that you can easily adapt this answer of mine to your case. – GuM Dec 23 '18 at 17:58

I downloaded a representative PNG of a tetrahedron and converted it to PDF using Inkscape. Then, using \mathchoice, you can include the image at various sizes depending on the math style.

\documentclass{article}

\usepackage{graphicx}

\newcommand{\tetrahedron}{
\mathchoice
{\includegraphics[height=1ex]{tetrahedron}} % \displaystyle
{\includegraphics[height=1ex]{tetrahedron}} % \textstyle
{\includegraphics[height=.8ex]{tetrahedron}} % \scriptstyle
{\includegraphics[height=.5ex]{tetrahedron}} % \scriptscriptstyle
}

\begin{document}

$$\sum_{\tetrahedron} \sum_{i \in \tetrahedron} s_i \quad x \tetrahedron^{x \tetrahedron^{x \tetrahedron}}$$

\end{document}


If the symbol is too intricate to draw, you can follow the above procedure to create a complicated "symbol".

Let me start with a rather poor attempt to patch together triangles to form a tetrahedron symbol.

\documentclass[fleqn]{article}
\usepackage{graphicx}
\newcommand{\basictetrahedron}{\raisebox{1ex}{\rotatebox{200}{\scalebox{1}[0.3]{$\bigtriangledown$}}}%
\hspace*{-0.86em}\raisebox{-0.2ex}{\rotatebox{80}{\scalebox{1}[0.3]{$\bigtriangledown$}}}%
\hspace*{-0.42em}\raisebox{1.58ex}{\rotatebox{320}{\scalebox{1}[0.3]{$\bigtriangledown$}}}
}
\newcommand{\tetrahedron}{\ifmmode%
\raisebox{-0.35ex}{\basictetrahedron}%
\else%
\basictetrahedron%
\fi}
\begin{document}
A\tetrahedron B
$\sum\limits_{\tetrahedron} \sum\limits_{i\in\tetrahedron} s_i$
\end{document}


With a sufficient amount of good will, these symbols may be identified as tetrahedra. Other users on this site are much better at this. However, to the best of my knowledge, when creating this there is always some amount of fine-tuning involved. Yet of course the result and the stability of the symbols produced by expert users are much better.

Another possibility, which you may refer to as overkill, is to employ TikZ. (To be honest, I do not fully understand where the notion overkill comes from. Yes, 10 years ago, loading TikZ might have considerably slowed down the compilation. And unlike other drawing packages, TikZ does not restrict you in your choice of the compilation chain, nor am I aware of many real incompatibilities. But of course different users have different opinions, which is good. Yet I would be grateful if someone would explain me in detail why loading TikZ may be considered an "overkill".) Anyway, this solution scales with the text size (but in its present form immune to commands like \boldsymbol.)

\documentclass[fleqn]{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{tikzmark,calc}
\newcommand{\tetrahedron}{\tikzmarknode[text opacity=0,path picture={%
\draw let \p1=($(path picture bounding box.north)-(path picture bounding box.south)$),\p2=($(path picture bounding box.east)-(path picture bounding box.west)$),\n1={0.5*min(\x2,\y1)},\n2={0.42*max(\x2,\y1)-\n1}
in ([yshift=-\n2]path picture bounding box.center) coordinate(aux0)
-- ++ (200:\n1) --
($(aux0)+(80:\n1)$)
-- (aux0) -- ++ (320:\n1)
-- ($(aux0)+(80:\n1)$)
($(aux0)+(320:\n1)$) --
($(aux0)+(200:\n1)$);
}]{aux}{W}}
\begin{document}
A\tetrahedron B
$\sum\limits_{\text{\normalsize\tetrahedron}} \sum\limits_{i\in\text{\normalsize\tetrahedron}} s_i$
\end{document}


The good thing about TikZ is that you can change the drawing, something which is much harder with the non-TikZ version, at least for dummies like me.

• How about setting line join to something appropriate that avoids the sharp corners? – Werner Dec 24 '18 at 3:58
• @Werner Yes, one could use \newcommand{\tetrahedron}{\tikzmarknode[text opacity=0,path picture={% \draw[line join=bevel] let \p1=($(path picture bounding box.north)-(path picture bounding box.south)$),\p2=($(path picture bounding box.east)-(path picture bounding box.west)$),\n1={0.5*min(\x2,\y1)},\n2={0.42*max(\x2,\y1)-\n1} in ([yshift=-\n2]path picture bounding box.center) coordinate(aux0) -- ++ (200:\n1) -- ($(aux0)+(80:\n1)$) -- (aux0) -- ++ (320:\n1) -- ($(aux0)+(80:\n1)$) ($(aux0)+(320:\n1)$) -- ($(aux0)+(200:\n1)$); }]{aux}{W}}, too. Many things one could change. – user121799 Dec 24 '18 at 4:01