# How to invert the direction of an arrow?

How can I write the following diagram: A to B to C and then I want an arrow from D to B where D is below B. The following code fix the B at the bottom but I want the reverse (the command \arrow(xx1--@bb) doesn't work)

I tried with this but idk what should I change. Also, how can I type a word over or below the arrow?

\schemestart
A\arrow(aa--bb)B\arrow(--cc)C
\arrow(@bb--xx1)[90]X
\schemestop

• Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See minimal working example (MWE). – Henri Menke Aug 8 '17 at 21:09
• Welcome! Can you please edit your code to make it compilable? – cfr Aug 8 '17 at 21:41

You can pass arguments to the \arrow command to draw it backwards, as well as to write text above and below the arrow. (See documentation IV Reaction Schemes 9 Arrow optional arguments)

\documentclass{article}
\usepackage{chemfig}

\begin{document}
%   \schemedebug{true}
\schemestart
A \arrow(aa--bb){->[up][down]} B \arrow(--cc) C
\arrow(@bb--dd){<-}[-90]D
\schemestop
\end{document}


My proposal is to use (for example) tikz-cd (it is similar to tikz-arrows) or xy package. To invert the direction of an arrow, you can write into [...], l (left) instead of r (right); or u (up) with down d.

\documentclass{article}
\usepackage{amsmath,tikz-cd}
\begin{document}

\begin{tikzcd}[row sep=.7cm, column sep=1cm]
\mathrm{A} \arrow[r, "\text{above}", "\text{below}"'] & \mathrm{B} \arrow[r] & \mathrm{C} \\
& \mathrm{D} \arrow[u] &
\end{tikzcd}

\end{document}