I'm trying to represent the electrons in the bonds between atoms by drawing points at the end of each bond segment. Something like this: CO2 diagram

Is there any way I can do this? I can get something similar with \lewis but the dots don't quite align with the bonds:


CO2 diagram with dots offset

  • 2
    Can you please provide a complete example showing what you have done? Commented May 30, 2020 at 18:57
  • Just added; thanks for pointing that out! My apologies.
    – Gravitron
    Commented May 31, 2020 at 19:49

1 Answer 1


You can set the distance between the dots in \lewis with the macro \setlewisdist. Note that this also affects the distance between the electrons above and below the O, but that is probably good in terms of consistency. A distance of 0.2em seems to fit with the bond lines.

Important note: the \lewis macro has been deprecated in current versions of chemfig in favor of the new command \charge. Therefore this answer will not work anymore when the command is removed from the package in the future. However, since the OP already uses the command this answer is based on it.




enter image description here

  • 1
    Very nice and my compliments.
    – Sebastiano
    Commented May 30, 2020 at 21:21
  • Now: \chemfig{\charge{90=\:,-90=\:,0=\:}{O}=\charge{0=\:,180=\:}{C}=\charge{90=\:,-90=\:,180=\:}{O}} Commented Jun 23, 2022 at 5:50

You must log in to answer this question.

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