0

This question already has an answer here:

I want to do something like this using chemfig. I watched the chemfig guide but I can't find a solution.

Can you help me?

(Sorry, my english is not very good)

enter image description here

marked as duplicate by clemens, Svend Tveskæg, Mensch, Zarko, barbara beeton May 13 '16 at 18:26

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

My comment provided the measn to find a number of links on the subject of Lewis Structures in LaTeX.

But here, without chemfig:

\documentclass{article}
\usepackage{stackengine}
\usepackage{graphicx,ifthen}
\newcommand\lewis[7]{\,%
  \ifthenelse{\equal{#3}{}}%
    {\def\RHS{}\def\RRHS{\hspace{.5ex}}}%
    {\def\RHS{\,\rotatebox{90}{\makebox[1.5ex]{#3}}\,}\def\RRHS{}}%
  \stackengine{2ex}{%
  \rotatebox{90}{\makebox[1.5ex]{#5}}\,%
  \stackengine{0.6ex}{%
  \stackengine{1.9ex}{#1}{#2}{O}{c}{F}{F}{L}%
  }{#4}{U}{c}{F}{F}{L}%
  \RHS$^{#6}$\RRHS%
  }{$#7$}{U}{c}{F}{F}{L}%
}
\savestack\Bond{\rule{1.2ex}{.5pt}}
\savestack{\PBond}{\rotatebox{90}{\Bond}}
\begin{document}
\sffamily
\stackunder{%
H\lewis{S}{..}{..}{..}{..}{}{}H\qquad
H\lewis{S}{\Bond}{\PBond}{\Bond}{\PBond}{}{}H%
}{\tiny\stackunder{Estructura de Lewis de la mol\'edula de sulfuro}{de hidr\'ogeno}}
\end{document}

enter image description here

Adapted/extended from my answer at Draw Lewis structures like a book

  • This doesn't use chemfig so I don't think its an answer to the question – especially since the task is rather easy with chemfig. – clemens May 13 '16 at 17:43
  • @clemens I guess things were slow on a Friday afternoon. No one jumped in with a chemfig solution, so I threw this one out, having to figure out the bond-bars (if I understand the notation right). But I'm not holding my breath for votes. – Steven B. Segletes May 13 '16 at 17:46
  • @clemensThe cited duplicate shows how to do the electron dots surrounding the atom, but does not show how to do the bars (bonds? or is it empty shells?). That was one of the reasons I added an answer. – Steven B. Segletes May 13 '16 at 19:43
  • 1
    Yes, but it's not that hard to look in the manual and to search for \lewis once its clear that the command is there: \setatomsep{1.7em} H\Lewis{0:2:4:6:,S}H \quad \chemfig{H-\lewis{26,S}-H} – clemens May 13 '16 at 20:54
  • Thank you very much @clemens. What you posted is just what I need right now. But it doesn't work if i want to do something like this but using O instead of H and put the electron pairs there. Or at least I think it doesn't work. The idea is to use chemfig to represent bonds and electron pairs as : – Miguel Ángel Rodríguez VIdal May 14 '16 at 17:53

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