I am trying to draw a Lewis structure using chemfig package. I want something like this:

enter image description here

So far, I have this:



The output is:

enter image description here

How can I get a shorter bond length, a bigger font size, and color?

  • Do you want it colored?
    – CarLaTeX
    Commented Mar 1, 2018 at 20:41
  • I need shorter bond length as well as Bigger font size and color@CarLaTeX
    – Biki Teron
    Commented Mar 1, 2018 at 20:43

1 Answer 1


The length of the arm is set by a number after the angle of the arm: :angle,length. I used 0.6 for you.

The style of the dots can be changed with the fourth argument of \setlewis.

I didn't find a "pretty" way of changing the font color, so I just used \textcolor :P

The font size can be changed by changing the \printatom macro, inserting the font size before the \ensuremath.

enter image description here


\setlewis[]{}{}{fill=yellow,very thin}



      ( -[:  90,0.6]\lewis{0:2:4:,\textcolor{orange}{F}})
      ( -[: -40,0.65]\lewis{0:4:6:,\textcolor{orange}{F}})
      ( -[:-140,0.65]\lewis{0:4:6:,\textcolor{orange}{F}})

  • 1
    To make the figure look even more like the OP's, one can tweak \printatom to \renewcommand*\printatom[1]{\large\ensuremath{\bm{\mathsf{#1}}}} and connect bm package; this makes labels for chemical elements printed with bold sans-serif font.
    – andselisk
    Commented Dec 18, 2018 at 17:54

You must log in to answer this question.

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