I need to put an undetermined electron withdrawing or donating group in an organic molecule (an aromatic ring), using arrows instead of lines as bonds, but with the barbs just in the middle. This is an example, with arrows in red and blue: enter image description here

This is possible in chemfig to change the bond configuration from a line to an arrow?

My best shot was:



\chemfig{**6(-(-[,,,,->]G)---(-C(=[:30]\charge{90=\:,-30=\:}{O})(-[:150]HO))--)} \quad


But seems quite different.

2 Answers 2


One way to do this is to split the bond in half.

    \chemfig{**6(-(-[,0.5,,,blue,->]-[,0.5,,,blue]G)---(-C(=[:30]\charge{90=\:,-30=\:}{O})(-[:150]HO))--)} \quad

enter image description here

you can change arrow style using TIKZ blue,-stealth] and red,stealth-] commands in bond options


Ok, here's at least a route you can follow. Code's result:

enter image description here

A few comments:

  • chemfig is built on tikz, so you can apply tikz concepts one way or the other (search the chemfig manual)
  • ring 1 shows a simple recoloring of the whole line including the arrow tip in red
  • ring 2 uses some tikz decoration, see ch. 12.3; it requires \usetikzlibrary{decorations.pathmorphing and the "clumsy" options ... ->,decorate,decoration=snake]G)
  • ring 3 uses a self-defined style, see the \tikzset statement in the beginning; see ch. 12.7 chemfig, and ch. 50.6 tikz manual; for illustration purposes I used two colors; you should be able to replace the X by an arrow tip // This is where tikzlibrary decorations.markings is required // it's a bit like with LISP, you can get lost easily in required braces ...
  • ring 4 is unchanged, for reference, for the opposite arrow direction
  • ring 5 proves the self-defined style arr works there, too

One minor problem remains for ring 5: the red X is set halfways of the related path; as you can see, the starting- or end-point must be at or close to the inner circle. Worst case you need to have a second arr-style defined, depending on the arrows direction.

\usetikzlibrary{decorations.pathmorphing,% for the snake line
                decorations.markings}% for the "shifted" arrow tip


% from chemfig manual ch. 12.7
%\tikzset{nbond/.style args={#1}{%
%   draw=none,%
%   decoration={%
%       markings,%
%       mark=at position 0 with {\coordinate (CFstart@) at (0,0);},
%       mark=at position 1 with 
%       {%
%           \foreach\CF_i in{0,1,...,\number\numexpr#1-1}{%
%           \pgfmathsetmacro\CF_nbondcoeff{\CF_i-0.5*(#1-1)}%
%           \draw ([yshift=\CF_nbondcoeff\CF_doublesep]CFstart@)--(0,\CF_nbondcoeff\CF_doublesep);
%           }%
%       }
%   },
%   postaction={decorate}
%   }

        markings,% see ch. 50.6 in the tikz-manual
        mark=at position 0.5
            \node [red] {X};
%           \draw (-2pt,-2pt) -- (2pt,2pt);
%           \draw (2pt,-2pt) -- (-2pt,2pt);

\chemfig{**6(-(-[,,,,->,red]G)---(-C(=[:30]\charge{90=\:,-30=\:}{O})(-[:150]HO))--)} \quad

\chemfig{**6(-(-[,,,,->,decorate,decoration=snake]G)---(-C(=[:30]\charge{90=\:,-30=\:}{O})(-[:150]HO))--)} \quad

\chemfig{**6(-(-[,,,,->,arr]G)---(-C(=[:30]\charge{90=\:,-30=\:}{O})(-[:150]HO))--)} \quad

\chemfig{**6(-(-[,,,,<-]G)---(-C(=[:30]\charge{90=\:,-30=\:}{O})(-[:150]H\charge{90=\:,-90=\:}{O}))--)} \quad



You must log in to answer this question.

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