我需要一个带有多个箭头的图表,其中一些箭头从其他箭头前面经过。到目前为止,我唯一能做的就是用 Mathematica 绘制它们并导入为图像。以下是一个例子:https://mathoverflow.net/q/236707/41291
正如你所见,这在很多方面都远远不能令人满意。
可以用 TikZ 绘制类似的东西吗?或者也许有其他更适合此类事物的软件包?
答案1
您可以使用tikz-cd
该crossing over
选项。您只需确保按正确的顺序(从后到前)放置箭头即可。
\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\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]
\end{tikzcd}
\end{document}