3

I want to use chemfig arrows between two tikz nodes.

I looked up chemfig manual. It has examples where chemfig scheme is drawn in tikz node, but no example of how to use chemfig arrows as tikz arrow. I could use it to draw an arrow between node (a) and (b):

 \draw[] (a) -- node[] {\schemestart \arrow{<->} \schemestop } (b); 

If I was less lazy, I would write a macro. I was wondering if chemfig already have such macros (or pgfkeys based solutions) such that its arrows can be used at tikz arrows as if they were tikz arrows? e.g.

 \draw[-some chemfig arrow-,draw] (a) -- (b);
0

1 Answer 1

4

chemfig's arrow tips are TikZ arrow tips called CF:

\documentclass{article}
\usepackage{tikz,chemfig}

\begin{document}

\begin{tikzpicture}
  \draw[-CF] (0,0) -- ++(1,0);
\end{tikzpicture}

\schemestart
  A \arrow B
\schemestop

\end{document}

enter image description here

2
  • How to use \arrow{<=>} ? I tried putting the \draw[\arrow{<=>}] etc. but I ran into undefined control sequence.
    – Dilawar
    Jul 13, 2017 at 12:54
  • 1
    @Dilawar I don't think you can… \draw[\schemestart{}\arrow{<=>}\schemestop] might work but might need adjusting with the compoundsep parameter.
    – cgnieder
    Jul 13, 2017 at 13:49

You must log in to answer this question.

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