I use chemfig to draw cyclic molecules. Quite often, it is desirable to reorient the molecule for which I use the optional directive [rotate=-18]. Sometimes this is barely acceptable but most often just wrong.

How do I achieve the following -

  1. The letters should not be rotated even if the molecule is.
  2. The double bond should be rotated in its entirety.
  3. The molecule should not be shifted upward or downward.

Or is there any way to achieve my objectives.

My MWE is as follows

    Unrotated & Rotated & \\
    \chemfig{*6(-=-=-=)} & \chemfig[][rotate=-30]{*6(-=-=-=)} & Acceptable\\
    \chemfig{*5(---O-(=[:145]O)-)} & \chemfig[][rotate=-55]{*5(---O-(=[:145]O)-)} & unacceptable \\
    \chemfig{*5(-N(-H)-=-=)} & \chemfig[][rotate=-18]{*5(-N(-H)-=-=)} & unacceptable


  • Does this run through on your machine? (I am not implying you are doing something wrong but I get errors when I run this on my just updated TeXLive 2020 installation with pdflatex.) BTW, if I had to guess, I'd try \chemfig[][rotate=-55,transform shape=false]{*5(---O-(=[:145]O)-)} but this is just a guess.
    – user194703
    Commented Apr 13, 2020 at 6:01
  • It does run without any problem. I had already tried transform shape ... both true and false are no different. I am using TeXLive 2019
    – magguu
    Commented Apr 13, 2020 at 6:40
  • BTW, I didn't find this rotate hack from docs. I just tried an ugly hack. I am not sure if it is supposed to work. Maybe TeXLive-2020 has explicitly barred it.
    – magguu
    Commented Apr 13, 2020 at 6:43
  • You did not yet tell me which compiler you are using and how old your installation is.
    – user194703
    Commented Apr 13, 2020 at 6:44
  • compiler = pdflatex. July 2019 installation.
    – magguu
    Commented Apr 13, 2020 at 6:46

1 Answer 1


I have a partial answer. This takes care of my concern number 1 and 2. However the molecule is still shifted downwards probably because it is rotated w.r.t. the origin.

This time I am using a () outisde the ring and issuing a [::-30] directive just at the start of ().

enter image description here Please see this MWE




    Unrotated & Rotated & Rotated & \\
        & rotate=-30 hack & [::-30] hack \\
    \chemfig{*6(-=-=-=)} & \chemfig[][rotate=-30]{*6(-=-=-=)} & \chemfig{([::-30]*6(-=-=-=))} & Acceptable\\
    \chemfig{*5(---O-(=[:145]O)-)} & \chemfig[][rotate=-55]{*5(---O-(=[:145]O)-)} & \chemfig{([::-55]*5(---O-(=[:90]O)-))} & unacceptable \\
    \chemfig{*5(-N(-H)-=-=)} & \chemfig[][rotate=-18]{*5(-N(-H)-=-=)} & \chemfig{([::-18]*5(-N(-H)-=-=))} & unacceptable 


You must log in to answer this question.

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