How can one make a forked arrow in chemfig?

Semantically it is exactly opposite to \merge command but seems like it's not implemented in a package. I don't have any experience with TikZ graphics but any solution would be highly appreciated.

I'd like to get something like the following scheme:

forked Scheme


Since you can use \chemfig inside a tikzpicture environment, you can place the three compounds (forgive me if that's not the right name) inside \nodes and then use \draw to draw the arrows:




\begin{tikzpicture}[node distance=0cm and 2cm]
\node (A) 
\node[above right=of A] (B) 
\node[below right=of A] (C)    
\draw[-stealth] (A) -- ( $ (A.0)!0.5!(B.west|-A.0) $ ) |- (B.west) node[auto,pos=0.7] {i,j};
\draw[-stealth] (A) -- ( $ (A.0)!0.5!(C.west|-A.0) $ ) |- (C.west) node[auto,pos=0.7] {j};


enter image description here

  • 1
    Thank you for the solution. I was thinking in exactly opposite direction - placing tikz code inside chemmove command. But your solution looks much better than my attempts. – lastpook Sep 9 '13 at 14:27

You say »Semantically it is exactly opposite to \merge command« so lets define a command \fork that is the opposite of \merge. For this I patch the necessary commands with etoolbox's \patchcmd. The idea is simple: define a boolean switch \iffork and add arrow heads depending on the status. Then define \merge so it sets \forkfalse and \fork the same way but with \forktrue.

Here we go:



\patchcmd\CF@merge@ii{-CF@full}{\iffork\else -CF@full\fi}{}{}%
% \CF@merge@iii needs to be patched twice:
\patchcmd\CF@merge@iii{>=0]}{>=0,\iffork CF@full-\fi]}{}{}%
\patchcmd\CF@merge@iii{>=0]}{>=0,\iffork CF@full-\fi]}{}{}%



 a \arrow{0} b \arrow{0} c
 \merge{v}(c1)(c2)(c3)--() d


 a \arrow{0} b \arrow{0} c
 \fork{v}(c1)(c2)(c3)--() d


enter image description here

  • That's just brilliant! – lastpook Sep 9 '13 at 17:25
  • After careful consideration I've decided to give back the answer to Gonsalo Medina, since his solution is better suited to my actual needs: I'd like to put labels near each arrow head and \merge doesn't allow it, so does this solution. Also some additional tweaking is needed to make your code to work in horisontal direction. – lastpook Sep 9 '13 at 17:44
  • @lastpook well, since you didn't say that you need it in your question I didn't add anything. Indeed this would require some more work... – clemens Sep 9 '13 at 18:08
  • nevertheless, I think that your approach is more elegant – lastpook Sep 9 '13 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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