答案1
您可以使用 Ti 创建自定义符号钾例如Z:
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\newcommand{\moleculeA}{%
\begin{tikzpicture}[x=.5em, y=.5em, baseline]
\foreach \x in {{{-1*cos(30)},1.5}, {0,0}, {{2*cos(30)},0}, {{4*cos(30)},0}, {{5*cos(30)},1.5}} {
\begin{scope}[shift={(\x)}]
\draw (30:1) -- (90:1) -- (150:1) -- (210:1) -- (270:1) -- (330:1) -- cycle;
\end{scope}
}
\end{tikzpicture}%
}
\newcommand{\moleculeB}{%
\begin{tikzpicture}[x=.5em, y=.5em, baseline]
\foreach \x in {{{-1*cos(30)},1.5}, {0,0}, {{2*cos(30)},0}} {
\begin{scope}[shift={(\x)}]
\draw (30:1) -- (90:1) -- (150:1) -- (210:1) -- (270:1) -- (330:1) -- cycle;
\end{scope}
}
\begin{scope}[shift={({4*cos(30)},0)}]
\draw (210:1) -- (270:1) -- (330:1);
\end{scope}
\end{tikzpicture}%
}
\newcommand{\moleculeC}{%
\begin{tikzpicture}[x=.5em, y=.5em, baseline]
\foreach \x in {{{-1*cos(30)},1.5}, {0,0}, {{2*cos(30)},0}, {{4*cos(30)},0}} {
\begin{scope}[shift={(\x)}]
\draw (30:1) -- (90:1) -- (150:1) -- (210:1) -- (270:1) -- (330:1) -- cycle;
\end{scope}
}
\begin{scope}[shift={({5*cos(30)},1.5)}]
\draw (150:1) -- (210:1)
(270:1) -- (330:1);
\end{scope}
\end{tikzpicture}%
}
\newcommand{\moleculeD}{%
\begin{tikzpicture}[x=.5em, y=.5em, baseline]
\foreach \x in {{{-1*cos(30)},1.5}, {0,0}, {{2*cos(30)},0}, {{4*cos(30)},0}} {
\begin{scope}[shift={(\x)}]
\draw (30:1) -- (90:1) -- (150:1) -- (210:1) -- (270:1) -- (330:1) -- cycle;
\end{scope}
}
\begin{scope}[shift={({5*cos(30)},1.5)}]
\draw (90:1) -- (150:1) -- (210:1)
(270:1) -- (330:1) -- (30:1);
\end{scope}
\end{tikzpicture}%
}
\newcommand{\moleculeE}{%
\begin{tikzpicture}[x=.5em, y=.5em, baseline]
\foreach \x in {{{-1*cos(30)},1.5}, {0,0}, {{2*cos(30)},0}} {
\begin{scope}[shift={(\x)}]
\draw (30:1) -- (90:1) -- (150:1) -- (210:1) -- (270:1) -- (330:1) -- cycle;
\end{scope}
}
\end{tikzpicture}%
}
\newcommand{\moleculeF}{%
\begin{tikzpicture}[x=.5em, y=.5em, baseline]
\foreach \x in {{{-1*cos(30)},1.5}, {0,0}, {{2*cos(30)},0}, {{4*cos(30)},0}} {
\begin{scope}[shift={(\x)}]
\draw (30:1) -- (90:1) -- (150:1) -- (210:1) -- (270:1) -- (330:1) -- cycle;
\end{scope}
}
\end{tikzpicture}%
}
\begin{document}
\begin{align*}
P\Big(\moleculeA\Big)
& = wP\Big(\moleculeB\Big) + P\Big(\moleculeC\Big) + P\Big(\moleculeD\Big) \\
& = (w + 1)P\Big(\moleculeE\Big) + P\Big(\moleculeF\Big) \\
& = (w + 1)(w^2 + 5w + 5) + (2w^2 + 8w + 7) \\
& = w^3 + 8w^2 + 18w + 12.
\end{align*}
\end{document}
答案2
和chemfig
\documentclass{article}
\usepackage{amsmath}
\usepackage{chemfig}
\setchemfig{atom sep=1em, angle increment=30}
\begin{document}
\[
P\chemleft(\chemfig{*6(--*6(--*6(---*6(------)---)---)--*6(------)--)}\chemright)
\]
\begin{align*}
&= wP\chemleft(\chemfig{*6(--*6(--(--[1])---)--*6(------)--)}\chemright)
+ P\chemleft(\chemfig{*6(--*6(--*6(---(-)-(-)--)---)--*6(------)--)}\chemright)
+ P\chemleft(\chemfig{*6(--*6(--*6(---(--[3])-(--[1])--)---)--*6(------)--)}\chemright) \\
&= (w+1)P\chemleft(\chemfig{*6(--*6(-----)--*6(------)--)}\chemright)
+
P\chemleft(\chemfig{*6(--*6(--*6(------)---)--*6(------)--)}\chemright) \\
&= (w + 1)(w^2 + 5w + 5) + (2w^2 + 8w + 7) = w^3 + 8w^2 + 18w + 12.
\end{align*}
\end{document}