2

I searched the questions around here but I can`t find an answer to my problem. I´m trying to draw a polymer with \chemfig and everything works but the braces, specially the right one. I´m using this code:

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

This gives me the correct polymer with just one wrong brace: polymer

How can I fix this? Thx

0

1 Answer 1

2

You have a pair of unwanted brackets (you can see them if you comment out \makepolymerdelims) which stems from [7][@{zu}]. You must delete the [@{zu}] – it is at the wrong place anyway. Then change the last [7] in the whole formula into [@{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}

enter image description here

For the sake of symmetry I'd also change the beginning [:30]-[@{auf}] into -[@{auf}1]:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .