Mathematical Field Notes

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.

Advertisements

Written by Jonny Evans

March 1, 2013 at 11:37 am

One Response

Subscribe to comments with RSS.

  1. Jonny,

    This one was really useful.

    Regards,
    Vijay

    Vijay Sharma

    March 22, 2013 at 6:31 pm


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: