I need a diagram with several arrows, some passing in front of others. So far the only thing I could do is to draw them with Mathematica and import as an image. An example of this: https://mathoverflow.net/q/236707/41291

enter image description here

As you see, this is far from satisfactory in many respects.

Can something like this be drawn with TikZ? Or maybe there is some other package better suited for such things?

1 Answer 1


You can use tikz-cd with the crossing over option. You just have to make sure you place the arrows in the right order (from back to front).

enter image description here




\begin{tikzcd}[row sep=12mm, column sep=6mm, outer sep=0pt, arrow style=tikz, 
    arrows={-latex, semithick, blue!60!black}, crossing over clearance=5pt]
x_1\arrow[rrrrrr]\arrow[ddr] &[3mm]&[-1mm]&[-2mm]&[-2mm]&[-1mm]&[3mm] x_2\arrow[ddddd]\arrow[dlll]\\
 &&& c_2\arrow[red, ulll]\arrow[dr]\\[5mm]
 & c_1\arrow[ddrr] &&& c_{23}\arrow[red, lll]\arrow[dr]\arrow[uullll]\\[-10mm]
 && c_{12} &&& c_3\arrow[red, uuur]\\
 &&&c_{13}\arrow[red, dlll]\arrow[uur]\\
 x_0\arrow[uuuuu]\arrow[rrrrrr] &&&&&& x_3\arrow[ulll]\arrow[uul]
\arrow[crossing over, from=6-1, to=1-7]
\arrow[crossing over, from=4-3, to=5-4]
\arrow[crossing over, from=2-4, to=3-2]
\arrow[crossing over, from=1-1, to=6-7]
\arrow[crossing over, from=5-4, to=4-6]
\arrow[crossing over, from=4-3, to=2-4]
\arrow[red, crossing over, from=4-6, to=2-4]
\arrow[crossing over, from=3-2, to=4-3]
\arrow[red, crossing over, from=4-6, to=4-3]
\arrow[red, crossing over, from=4-3, to=6-1]
\arrow[red, from=3-2, to=6-1]

  • Wow that's beautiful! Except in some cases it might be tricky to figure out what is behind what. For example, in my case the octahedron (with vertices labeled by indexed cs) must be entirely inside the tetrahedron with vertices x_0, x_1, x_2, x_3. Supposedly the arrow from x_0 to x_2 must be behind everything, then from c_{23} to x_1, but also I believe some edges are missing - e. g. there must be complete octahedron with "inner face" c_1 - c_{12} - c_2 and "outer face" x_0 - x_1 - x_2, and I do not quite see how to order all their edges... Jan 2, 2023 at 11:21
  • 1
    I find this one very much more legible thant the one you produced in your question.
    – SebGlav
    Jan 2, 2023 at 16:06
  • @SebGlav absolutely! Jan 8, 2023 at 6:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .