TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am defining a submolecule in chemfig (2,2'-bipyridine) and I want to show the lone pair of electrons on both the Nitrogens. (For those who care, I wish to show a coordination bond between the lone pairs and a metal but that's the next question!)

I have defined the submolecule and when I display it rotated the positioning of the lone pairs does not rotate as the \lewis command uses absolute positions rather than relative positions.

Is it possible to have relative lewis positions which can allow for rotation of the full molecule? (I attach nodes to the Ns so I can draw dative bonds from them at a later stage...)

MWE below...





\vspace{1cm}%just for clarity
Should have the lone pair of electrons on the lower N in position 4 and on the upper N in position 5 according to   \verb|\lewis{}| command in chemfig

bipy molecule enter image description here

share|improve this question
up vote 3 down vote accepted

Here is an imperfect idea. The current angle of the arriving bond at an atom is available through \CF@current@angle. The proposal below uses it to compute the position of the lone pair.


% this is far from perfect, the most obvious restriction is that it only allows
% to place _one_ electron pair.





enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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