Example: Oxidation and reduction

Published 2008-10-22 | Author: Arne Röhrs

Example of how to add TikZ arrows to chemical reactions made with the mhchem package. TikZ coordinate nodes are put in the reaction equations and later used as reference points for drawing using TikZ’s remember picture feature.

Download as: [PDF] [TEX]  •  [Open in writeLaTeX]

Oxidation and reduction

Do you have a question regarding this example, TikZ or LaTeX in general? Just ask in the LaTeX Forum.
Oder frag auf Deutsch auf TeXwelt.de. En français: TeXnique.fr.

% Oxidation and reduction
% Author: Arne Röhrs
% Note that two compilations are necessary. 


% Insert a named coordinate for later reference.
% Usage:
% \ncoord{name}
% \ncoord[1em,2em]{name}
    \tikz[remember picture,overlay]{\path (#1) coordinate (#2);}%


% Define a handful of special cases of \ncoord




% First reaction
\ce{{\ccoord{a}} Na + {\bcoord{c}} Cl -> {\ccoord{b}} Na+  + {\bcoord{d}} Cl-}

\tikz[overlay,remember picture] {
    \draw[oxidation,->] (a) -- ++(0,0.7em) -| (b)
        node[above, near start] {Oxidation};
    \draw[reduction,->] (c) -- ++(0,-0.7em) -| (d)
        node[below, near start] {Reduktion};

\\[0.5cm] % add some extra vertical spacing

% Second reaction

    {\dcoord{a}} $\overset{\text{0}}{\text{2\,Na}}$
    +{\ecoord{c}}$\overset{\text{0}}{\text{Cl$_2$}}$ ->

    {\dcoord{b}} $\overset{\text{+I}}{\text{2\,Na$^+$}}$  +

    {\ecoord{d}} $\overset{\text{-I}}{\text{2\,Cl$^-$}}$}

\tikz[overlay,remember picture] {
    \draw[oxidation,->] (a) -- ++(0,0.7em) -| (b)
        node[above, near start] {Oxidation};
    \draw[reduction,->] (c) -- ++(0,-0.7em) -| (d)
        node[below, near start] {Reduktion};




Adding comments is currently not enabled.

Scientific and technical areas


LaTeX Beginners Guide

Limited discount 50%
coupon code tDRet6Y

Creative Commons License