答案1
你可以使用 TikZ 矩阵。然后像这样:
\documentclass[margin=5mm, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{matrix}
\usetikzlibrary{backgrounds}
\begin{document}
\pgfmathsetlengthmacro\eradius{0.65ex}
\begin{tikzpicture}[
si/.style={circle, draw, fill=white},
]
\matrix (m) [matrix of nodes, nodes in empty cells,
nodes={inner sep=1ex, anchor=center},
column sep=2em, row sep=2em,
]{
& & & & & & \\
& |[si]|Si & & |[si]|Si & & |[si]|Si & \\
& & & & & & \\
& |[si]|Si & & |[si]|Si & & |[si]|Si & \\
& & & & & & \\
%1 & 2 & 3 & 4 & 5 & 6 & 7 \\
};
% Annotations
\foreach \y in {1,3,5}{
\foreach \x in {2,4,6}{
\fill[] ([yshift=0.2*\eradius]m-\y-\x.north) circle[radius=\eradius];
\fill[] ([yshift=-0.2*\eradius]m-\y-\x.south) circle[radius=\eradius];
}}
\foreach \y in {2,4}{
\foreach \x in {1,3,5,7}{
\fill[] ([xshift=0.2*\eradius]m-\y-\x.east) circle[radius=\eradius];
\fill[] ([xshift=-0.2*\eradius]m-\y-\x.west) circle[radius=\eradius];
}}
\begin{scope}[on background layer]
\foreach \y in {2,4}{
\draw[transform canvas={yshift=1ex},
shorten >=-1.5ex, shorten <=-1.5ex
] (m-\y-1.north west) -- (m-\y-7.north east);
\draw[transform canvas={yshift=-1ex},
shorten >=-1.5ex, shorten <=-1.5ex
] (m-\y-1.south west) -- (m-\y-7.south east);
}
\foreach \x in {2,4,6}{
\draw[transform canvas={xshift=-0.7ex},
shorten >=-1.5ex, shorten <=-1.5ex
] (m-1-\x.north west) -- (m-5-\x.south west);
\draw[transform canvas={xshift=0.7ex},
shorten >=-1.5ex, shorten <=-1.5ex
] (m-1-\x.north east) -- (m-5-\x.south east);
}
\end{scope}
\end{tikzpicture}
\end{document}