tikz.dev / chemfig Manual

chemfig

Horizontal reactions

4 Arrow labels

If the token “>” is immediately followed by an optional argument [⟨label⟩], this ⟨label⟩ will be placed above the arrow. If another optional argument [⟨label⟩] is present, the other ⟨label⟩ will be placed below the arrow.

Compiled output

Arrow labels
\hreac[hreac debug]
A >[up] B >[][down] C >[up][down] D
\endhreac

The default width of an arrow is 3em, but if a label exceeds this dimension, the arrow lengthens.

Compiled output

Arrow lengthening
\hreac[hreac debug]
A >[up][down] B
\endhreac
\qquad
\hreac[hreac debug]
A >[very long label][down] B
\endhreac

As with compound names, it is possible to use \\ to compose a ⟨label⟩ over several lines.

Compiled output

Label over several lines
\hreac[hreac debug]
A >[very\\long\\label][bas] B
\endhreac

The box containing the bottom label has no influence on the vertical position of the compound names.

Compiled output

Independence of labels and names
\hreac[hreac debug]
\chemfig{*6(-=-=-=)}\name{cycle}
+
\chemfig{X=[1]Y}\name{name}
+
Z >[][label\\under\\arrow\\very\\deep] X
\endhreac