![LaTex ChemFig 如何在聚合物周围加上括号?](https://linux22.com/image/393061/LaTex%20ChemFig%20%E5%A6%82%E4%BD%95%E5%9C%A8%E8%81%9A%E5%90%88%E7%89%A9%E5%91%A8%E5%9B%B4%E5%8A%A0%E4%B8%8A%E6%8B%AC%E5%8F%B7%EF%BC%9F.png)
\documentclass[12pt]{article}
\usepackage[a4paper, margin=2.5cm]{geometry}
\usepackage{chemfig}
\begin{document}
\begin{center}
{
\chemname
{\chemfig{HO-[:30]-[:-30]-[:30]OH}}
{Diol}\\
\bigskip
\bigskip
$+$\\
\chemname
{\chemfig{([3]N=C=O)-[0]*6(=-=([0]-*6(=-=(-[0]([9]N=C=O))-=-))-=-)}}
{Isocyanates}\\
\bigskip
\bigskip
$\downarrow$\\
\bigskip
\bigskip
\chemname
{\chemfig{-O(=[2]C)-N(-[6]H)-(*6(=-=(-*6(=-=(-N(-[6]H)-O(=[2]C)-O-O-)-=-))-
=-))}}
{Polyurethane}
}
\end{center}
\end{document}
我怎样才能在“聚氨酯”结构周围加上括号,以便括号与两个外键相交?
非常感谢!
答案1
使用\polymerdelim
(在 1.33 版中引入chemfig
):
\documentclass[12pt]{article}
\usepackage[a4paper, margin=2.5cm]{geometry}
\usepackage{chemfig}
\begin{document}
\begin{center}
\chemname
{\chemfig{-[@{upleft,0.5},1]O(=[2]C)-N(-[6]H)-(*6(=-=(-*6(=-=(-N(-[6]H)-O(=[2]C)-O-O-[@{upright,0.5},1])-=-))-
=-))}}
{Polyurethane}
\polymerdelim[delimiters ={[]}, height = 45pt, depth = 40pt, indice = n]{upleft}{upright}
\end{center}
\end{document}