Mathematical Field Notes

Posts Tagged ‘diagram

TikZ code for the octahedral axiom

with one comment

If anyone finds it useful, I’ve created a LaTeX command for drawing the octahedral axiom (requires the TikZ package) based on this example of Stefan Kottwitz. You can easily edit the code to add labels to arrows (they would go in the empty brackets in the lines that say “edge”) or add these as extra arguments to the function.

Include the following code in the head of your LaTeX document:


\usepackage{tikz}
\usetikzlibrary{arrows}

\newcommand{\Octa}[6]{\begin{center}
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=2cm,
  thick]

  \node (1) {$#1$};
  \node (4) [below right of=1] {$#4$};
  \node (6) [below right of=4] {$#6$};
  \node (2) [above right of=4] {$#2$};
  \node (5) [above right of=6] {$#5$};
  \node (3) [above right of=5] {$#3$};


  \path
    (1) edge [out=25,in=155] node [right] {} (3)
        edge node[right] {} (2)
    (2) edge node [right] {} (3)
        edge node[right] {} (4)
    (3) edge node [right] {} (5)
        edge [out=270,in=0] node [right] {} (6)
    (4) edge node [right] {} (6)
    (6) edge node [right] {} (5);
  \path[dashed]
    (4) edge node[right] {} (1)
    (5) edge node[right] {} (4)
        edge node[right] {} (2)
    (6) edge [out=180,in=270] node [right] {} (1);
\end{tikzpicture}\end{center}}

Then the command \Octa{X}{Y}{Z}{A}{B}{C} will produce a diagram like this:

The octahedral axiom for taking the cone of a composition.

The octahedral axiom for taking the cone of a composition.

Written by Jonny Evans

March 1, 2013 at 11:37 am