Example: Commutative diagram with crossing edges

Published 2011-12-16 | Author: Stefan Kottwitz
Source: TeXblog
 
When one edge of a graph passes over or under another edge there may be a small gap needed in the drawing of one of those edges. An easy trick is to draw the upper edge two times: first with the background color and more thickness, afterwards normally. This is an example diagram used in the definition of the pull-back of a Banach bundle.

Download as: [PDF] [TEX]

Commutative diagram with crossing edges

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.

% Commutative diagram with edges passing under/over
% Jan 7, 2009, Stefan Kottwitz
% http://texblog.net
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}
  \matrix (m) [matrix of math nodes, row sep=3em,
    column sep=3em]{
    & f^\ast E_V& & \vphantom{f^\ast}E_V \\
    f^\ast E & & \vphantom{f^\ast}E & \\
    & U & & V \\
    M & & N & \\};
  \path[-stealth]
    (m-1-2) edge (m-1-4) edge (m-2-1)
            edge [densely dotted] (m-3-2)
    (m-1-4) edge (m-3-4) edge (m-2-3)
    (m-2-1) edge [-,line width=6pt,draw=white] (m-2-3)
            edge (m-2-3) edge (m-4-1)
    (m-3-2) edge [densely dotted] (m-3-4)
            edge [densely dotted] (m-4-1)
    (m-4-1) edge (m-4-3)
    (m-3-4) edge (m-4-3)
    (m-2-3) edge [-,line width=6pt,draw=white] (m-4-3)
            edge (m-4-3);
\end{tikzpicture}
\end{document}

Comments

Adding comments is currently not enabled.