0

I am trying to draw a diagram of methanol with chemfig and there are a few problems that I want to sort out. (1) How do I make the 𝛿+ not overlap the C-H bond? i.e. How can I move it slightly (2) How do I make the 𝛿+ and 𝛿- display at the same height? (3) How do I make the dipole moments shorter so they don't touch each other and the bond.

Methanol with dipole moments. The charges are placed badly and the moment arrows look strange.

\documentclass{minimal}
\usepackage{chemfig}
\begin{document}
\chemfig{
       \chemabove{C}{\scriptstyle\delta +}(-[::270,0.5,,,draw=none]@{mthlc})
       (-[2]H)(-[4]H)(-[6]H)-
         \chemabove[3pt]{O}{\scriptstyle\delta -}(-[::270,0.5,,,draw=none]@{mthlo})-
         \chemabove[3pt]{H}{\scriptstyle\delta +}(-[::270,0.5,,,draw=none]@{mthlh})
        }
\chemmove{
          \draw[|->, thick] (mthlh)--(mthlo);
        \draw[|->, thick] (mthlc)--(mthlo);
          }
\end{document}
New contributor
LEG is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

2 Answers 2

0
\documentclass[border=3mm]{standalone}
\usepackage{chemfig}
\begin{document}
    \setcharge{extra sep=6pt, macro charge=\scriptsize}
    \chemfig{
        H-
        \charge{90=\hspace{12pt}$\delta^+$}{C}
            (-[2]H)(-[@{mch}6]H)-
        @{o}\charge{90=$\delta^-$}{O}-
        @{h}\charge{90=$\delta^+$}{H}
    }
    \chemmove{
        \draw[|->, thick, shorten <=1pt, shorten >=0.5pt] (mch) -- (mch -| o);
        \draw[|->, thick, shorten <=0.5pt, shorten >=1pt] (mch -| h) -- (mch -| o);
    }
\end{document}

enter image description here

0

(1) the \charge command allows you to place any symbol in any position around an atom. But it is possible to move the symbol to the side by inserting spaces, too.

(2) Here I put the angle at 90 degrees and inserted spaces so that all the "delta" are at the same height. The height can be adjusted (change from 90:3pt to 90:5pt for example)

(3) to shorten (or increase) the length of the arrows use the "shorten" option in \draw

\documentclass[margin={2mm 2mm}]{standalone}
\usepackage{chemfig}

\begin{document}

\schemestart
%
\chemfig{\charge{90:3pt=$\quad\scriptstyle\delta^+$}{C}(-[2]H)(-[4]H)(-[6]H)(-[6,.3,,,,draw=none]@{c})-\charge{90:3pt=$\;\scriptstyle\delta^{-}$}{O}(-[6,.3,,,,draw=none]@{o})-\charge{90:3pt=$\;\scriptstyle\delta^+$}{H}(-[6,.3,,,draw=none]@{h})}
%
\schemestop
    \chemmove{
        \draw[|->,red,thick,shorten >=1pt] (h)--(o);
        \draw[|->, red,thick,shorten <=1pt,shorten >=1pt] (c)--(o);
    }
\end{document}

enter image description here

Your Answer

LEG is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.