我想重新创建在维基百科,但只有括号中的组。
答案1
你可以通过以下代码获得以下输出:
\documentclass[border=3mm]{standalone}
\usepackage{chemfig}
% Set chemical bonds length
\setatomsep{20pt}
% From chemfig manual
\newcommand\setpolymerdelim[2]{\def\delimleft{#1}\def\delimright{#2}}
\def\makebraces(#1,#2)#3#4#5{%
\edef\delimhalfdim{\the\dimexpr(#1+#2)/2}%
\edef\delimvshift{\the\dimexpr(#1-#2)/2}%
\chemmove{
\node[at=(#4),yshift=(\delimvshift)]
{$
\left\delimleft
\vrule height\delimhalfdim depth\delimhalfdim width0pt
\right.
$};
\node[at=(#5),yshift=(\delimvshift)]
{$
\left.
\vrule height\delimhalfdim depth\delimhalfdim width0pt
\right\delimright_{\rlap{#3}}
$};
}%
}
\begin{document}
\setpolymerdelim()
\chemfig{-[:-30,0.7]Si(-[:90,0.7])(-[:-90,0.7])-[:30]O-[@{op,.5}:-30]Si(-[:90,0.7])(-[:-90,0.7])-[:30]O-[@{cl,.5}:-30]Si(-[:90,0.7])(-[:-90,0.7])-[:30,0.7]}
\makebraces(10pt,20pt){$\!\!\!n$}{op}{cl}
\end{document}
得出的结果为:
如你所见,括号中的代码来自chemfig
手动的(第三部分,第 12.5 节)。我用 调整了空键的长度-[:<angle>,<length multiplier>]
。
编辑:如果您只想获得一个 Si-O 组,如下所示:
您只需要此代码:
\documentclass[border=3mm]{standalone}
\usepackage{chemfig}
% Set chemical bonds length
\setatomsep{20pt}
\begin{document}
\chemfig{-[:-30,0.7]Si(-[:90,0.7])(-[:-90,0.7])-[:30]O-[:-30,0.7]}
\end{document}