答案1
tikz
用于绘制符号的另一种解决方案(尽管我更喜欢 egreg 的解决方案):
\documentclass[12pt]{article}
\usepackage{tikz}
\newlength{\lineheight}
\newcommand{\updateheight}{\settoheight{\lineheight}{A}}
\tikzset{ThreePoints/.style={circle, fill}}
\newcommand{\drawthreepoints}{%
\node [ThreePoints] (first) at (0,0) {};
\node [ThreePoints] (second) at (0.5,0.8) {};
\node [ThreePoints] (third) at (-0.5,0.8) {};
}
\newcommand{\resizepoints}[1]{\updateheight\resizebox{!}{\lineheight}{#1}}
\newcommand{\threepoints}{\resizepoints{\begin{tikzpicture}
\drawthreepoints
\end{tikzpicture}}}
\newcommand{\threepointsone}{\resizepoints{\begin{tikzpicture}
\drawthreepoints
\draw [line width=3pt] (third) -- (second);
\end{tikzpicture}}}
\newcommand{\threepointstwo}{\resizepoints{\begin{tikzpicture}
\drawthreepoints
\draw [line width=3pt] (third) -- (second) -- (first);
\end{tikzpicture}}}
\begin{document}
\begin{equation}
d(G)=d(\threepoints)d(\threepoints,G)+d(\threepointsone)d(\threepointsone,G)+d(\threepointstwo)d(\threepointstwo,G)
\end{equation}
\end{document}
答案2
使用 相当简单pict2e
。 的参数\TR
是一个三位数的二进制数,它设置 绘制连接点的线;第一位数字代表顶部,然后我们按顺时针顺序进行。
\documentclass{article}
\usepackage{pict2e}
\makeatletter
\newcommand{\TR}[1]{\TR@aux#1000\@nil}
\def\TR@aux#1#2#3#4\@nil{%
\,\vcenter{\hbox{\TR@aux@i{#1}{#2}{#3}}}\,%
}
\def\TR@aux@i#1#2#3{%
\setlength\unitlength{.5em}%
\begin{picture}(1,0.866)
\put(0.5,0){\circle*{.4}}
\put(0,0.866){\circle*{.4}}
\put(1,0.866){\circle*{.4}}
\ifnum#1=1 \polyline(0,0.866)(1,0.866) \fi
\ifnum#2=1 \polyline(1,0.866)(0.5,0) \fi
\ifnum#3=1 \polyline(0.5,0)(0,0.866) \fi
\end{picture}%
}
\makeatother
\begin{document}
\[
d(G)=
d(\TR{000})d(\TR{000},G)+
d(\TR{100})d(\TR{100},G)+
d(\TR{110})d(\TR{110},G)
\]
$\TR{000}\quad\TR{001}\quad\TR{010}\quad\TR{011}$
$\TR{100}\quad\TR{101}\quad\TR{110}\quad\TR{111}$
\end{document}
答案3
像这样?
\documentclass{article}\usepackage[show frame]{geometry}
\usepackage{mathtools, stackengine,adjustbox}
\newcommand{\threedots}{\!\begin{smallmatrix} \bullet\mkern10mu\bullet \\ \bullet \end{smallmatrix}\!}
\newcommand{\threedotsl}{\!\begin{smallmatrix}\bullet\mkern-4mu\mathord{\relbar\mkern-9mu\relbar}\mkern-4mu\bullet \\
\bullet \end{smallmatrix}\!}
\newcommand{\threedotsll}{\!\stackMath\stackinset{r}{9.7pt}{c}{0pt}{\adjustbox{rotate=-4, origin=c, scale={1}{0.8}}{$ \not $}}%
{\begin{smallmatrix}\bullet\mkern-4mu\mathord{\relbar\mkern-9mu\relbar}\mkern-4mu\bullet \\
\bullet \end{smallmatrix}}\!}
\begin{document}
\begin{equation*}
d(G) = d\bigl(\threedots\bigr)d\bigl(\threedots, G\bigr) + d\bigl(\threedotsl\bigr)d\bigl(\threedotsl, G\bigr) + d\bigl(\threedotsll)d\bigl(\threedotsll, G)
\end{equation*}
\end{document}