我搜索了这里的问题,但找不到问题的答案。我试图用绘制聚合物,除了\chemfig
括号之外,一切都正常,特别是右括号。我使用以下代码:
\documentclass[11pt]{scrartcl}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{chemfig,chemmacros}
%\usepackage{math}
\chemsetup{
modules = {polymers}
}
\begin{document}
\chemfig{[:30]-[@{auf}](-[1](-[2,0.5]CH_2OH)-[0,2]O-[7])-[7](-[:30,0.5]OH)-[0,2](-[6,0.5]NH_2)-[1]-[:30]
O-[:-30](-[1](-[7,0.5]OH)-[0,2](-[2,0.5]NH_2)-[7][@{zu}])-[7](-[6,0.5]CH_2OH)-[0,2]O-[1]-[7]
}
\makepolymerdelims{30pt}{auf}{zu}
\end{document}
我该如何解决这个问题?谢谢
答案1
您有一对不需要的括号(如果注释掉 ,您会看到它们\makepolymerdelims
),它们源自[7][@{zu}]
。您必须删除[@{zu}]
—— 无论如何它都在错误的位置。然后更改最后的 [7]
将整个公式转化为[@{zu}7]
:
\documentclass[11pt]{scrartcl}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{chemfig,chemmacros}
%\usepackage{math}
\chemsetup{
modules = {polymers}
}
\begin{document}
\chemfig{[:30]-[@{auf}](-[1](-[2,0.5]CH_2OH)-[0,2]O-[7])-[7](-[:30,0.5]OH)-[0,2](-[6,0.5]NH_2)-[1]-[:30]
O-[:-30](-[1](-[7,0.5]OH)-[0,2](-[2,0.5]NH_2)-[7])-[7](-[6,0.5]CH_2OH)-[0,2]O-[1]-[@{zu}7]
}
\makepolymerdelims{30pt}{auf}{zu}
\end{document}
为了对称,我也会改变开始 [:30]-[@{auf}]
进入-[@{auf}1]
: