I want to draw a Lewis structure as in the picture. I tried to do with chemfig but does not perform the separation of the points and a minus in the superscript.

Lewis structures

  • Do you also need the electronic configuration beneath the element symbols? Oct 10, 2013 at 9:08
  • Not now, but in the near future I need it.
    – Kiyoshi
    Oct 10, 2013 at 10:06

2 Answers 2


Here are a different versions using different chemistry packages. Which one you want to use is up to you...

  • chemfig, provides \startscheme, \stopscheme, \chemfig, \lewis, \Lewis, \chemname ... ;
  • mhchem, provides \ce{};
  • chemformula, provides \ch{} with the !(<below>)(<formula>) syntax and \chlewis;
  • elements, provides \elconf and \writeelconf.



\section*{Version 1 -- \pkg{chemfig} and \pkg{mhchem}}
  \Lewis{4.,Li} + \Lewis{0.2:4:6:,F}
  Li+ + \Lewis{0:2:4:6:,F}-

\section*{Version 2 -- \pkg{chemfig} and \pkg{elements}}
  \arrow(.mid east--.mid west)

\section*{Version 3 -- \pkg{chemformula}}
  "\chlewis{180.}{Li}" + "\chlewis{0.90:180:270:}{F}"
  Li+ + "\chlewis{0:90:180:270:}{F}" {}-

\section*{Version 4 -- \pkg{chemformula} and \pkg{elements}}
  !(\elconf{Li})( "\chlewis{180.}{Li}" ) +
  !(\elconf{F})( "\chlewis{0.90:180:270:}{F}" )
  !(\writeelconf{2})( Li+ ) +
  !(\writeelconf{2,2+6})( "\chlewis{0:90:180:270:}{F}" {}- )


enter image description here

  • Very useful. I like this answer because use the package that I already use and I don't need others packages.
    – Kiyoshi
    Oct 10, 2013 at 22:00

I introduce \lewis with 7 arguments, and I apologize that I don't know the precise naming conventions for chemistry. (EDITED to specify valence in only one place).


#1 Core atom

#2 Top electrons

#3 Right electrons

#4 bottom electrons

#5 left electrons

#6 valence

#7 inner electron shells

\lewis{Li}{}{}{}{.}{}{1s^22s^1} +
$\quad$(o LiF)

enter image description here

  • It's a great solution for my problem. Thank you.
    – Kiyoshi
    Oct 10, 2013 at 12:09
  • \longrightarrow would look a little nicer. (and is what is used in the original example.) Oct 10, 2013 at 14:30
  • @barbarabeeton Thanks. I didn't have it on the tip of my tongue, and was focused on the \lewis part. Fixed. Oct 10, 2013 at 14:33

You must log in to answer this question.

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