\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}