0

I want to recreate this picture found on wikipedia, but with only the group in the parentheses.Repeating unit of silicone rubber

cgnieder
  • 66,645
  • Welcome to [tex.se]! Please have a look at http://tex.stackexchange.com/a/96634/5049 – cgnieder Oct 12 '15 at 12:10
  • Thank you! Yes, I looked at that one and I'm trying to implement it, but I don't have a clue how the chemfig syntax works. I'm currently doing \chemfig{Si-[:30]O-[:-30]Si} but it doesn't look good and it's missing the empty carbon bonds – Emilgardis Oct 12 '15 at 12:19
  • The syntax of chemfig is explained in detail in the chemfig manual?! – cgnieder Oct 12 '15 at 13:06
  • Naturally, but I would rather have someone explain it for me. But I'll try and then post my answer. Oh well. – Emilgardis Oct 12 '15 at 13:21
  • Which aspects of the syntax should we explain? If there are details of the syntax you don't understand you should ask questions about those details. the someone can add an answer explaining said details. Explaining the whole syntax would otherwise require to more or less repeat the whole manual… – cgnieder Oct 12 '15 at 13:33
  • I already explained the details about the \makebraces macro and how to use it in the answer I linked. If you have concrete questions about that I can also answer them. Otherwise I'd just reproduce my answer here (exchanging C with Si and O…) – cgnieder Oct 12 '15 at 13:35
  • Yes, but I don't want the braces. – Emilgardis Oct 12 '15 at 13:53
  • I do now realise I malformed my question, sorry for that! The real title should be *Create with chemfig one unit of Si-O* – Emilgardis Oct 12 '15 at 14:02
  • So you want this: \chemfig{-[:30]Si(-[:90])(-[:-90])-[:-30]O-[:30]} where branches are inserted in between braces? – cgnieder Oct 12 '15 at 14:15
  • Yes, I've marked @MarcoG's answer.after his edit. – Emilgardis Oct 12 '15 at 19:27

1 Answers1

1

You could get this output with this code:

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

That produces:

enter image description here

As you can see, I took the code for the brackets from chemfig manual (part III, section 12.5). I adjusted the length of the empty bonds with -[:<angle>,<length multiplier>].

EDIT: If you want to get only one Si-O group like the following:

enter image description here

You only need this code:

\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}
MarcoG
  • 1,437
  • Thank you! I'll use this in my document. However my question was for the part enclosed by the parentheses. I'll mark this as the answer if you add the same formula for n=1. (Only one Si-O) – Emilgardis Oct 12 '15 at 13:56
  • @Emilgardis Do you mean e.g. only the first Si-O group, without brackets? I'll edit my answer in a moment. – MarcoG Oct 12 '15 at 14:06