重塑交换图

重塑交换图

我有这个图表:

\documentclass{article}
\usepackage{amsmath}
\usepackage{xcolor}
\usepackage[all,cmtip,color]{xy}

\begin{document}

$$
&&\xymatrix{
&&&&&X\times Y\times Z\times T\ar[ld]\ar[rd]\ar[ld]\ar[lllldd]\ar[rrrrdd]&&&&&\\
&&&&X\times Y\times T\ar[rd]\ar[rrrrrdd]\ar[lllldd]&&X\times Z\times T\ar[ld]\ar[llllldd]\ar[rrrrdd]&&&&\\
&X\times Y\times Z\ar[ld]\ar[d]\ar[rrrrd]&&&&X\times T&&&&Y\times Z\times T\ar[lllld]\ar[d]\ar[rd]&\\
X\times Y&X\times Z&&&&Y\times Z&&&&Y\times T&Z\times T\\
}
$$

\end{document}

我遇到了一个问题:第一个问题是图表不适合页面,页面右侧不会显示在创建的 PDF 中。此外,我想为某些特定箭头着色。

答案1

我会使用弯曲的箭头:

\documentclass{article}
\usepackage{amsmath}
\usepackage{xcolor}
\usepackage[all,cmtip,color]{xy}

\begin{document}

\[
\[email protected]@R+2pc{
  &&&&&X\times Y\times Z\times T\ar[ld] \ar@[red][rd]
    \ar@/_3pc/[lllldd]\ar@/^3pc/[rrrrdd]&&&&&\\
  &&&&X\times Y\times T\ar[rd]\ar@/^1pc/[rrrrrdd]\ar@/_3pc/[lllldd]&&
    X\times Z\times T\ar[ld]\ar@/_1pc/[llllldd]\ar@/^3pc/[rrrrdd]&&&&\\
  &X\times Y\times Z\ar[ld]\ar[d]\ar[rrrrd]&&&&X\times T&&&&
    Y\times Z\times T\ar[lllld]\ar[d]\ar@[red][rd]&\\
  X\times Y&X\times Z&&&&Y\times Z&&&&Y\times T&Z\times T
}
\]

\end{document}

我还给几个箭头涂了颜色,只是为了展示如何做到这一点。

\ar[ld]我从第一行删除了重复项。

在此处输入图片描述

类似地,对于tikz-cd

\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz-cd}

\begin{document}

\[
\begin{tikzcd}[column sep=-0.6em,row sep=huge]
&&& X\times Y\times Z\times T\arrow[ld] \arrow[rd,color=red]
    \arrow[lldd,bend right=40] \arrow[rrdd,bend left=40]
\\
&& X\times Y\times T \arrow[rd] \arrow[lldd,bend right=40] \arrow[rrrdd,bend left]
&& X\times Z\times T \arrow[ld] \arrow[llldd,bend right] \arrow[rrdd,bend left=40]
\\
& X\times Y\times Z \arrow[ld] \arrow[d] \ar[rrd]
&& X\times T
&& Y\times Z\times T\arrow[lld] \arrow[d] \arrow[rd,color=red]
\\
X\times Y & X\times Z && Y\times Z && Y\times T& Z\times T
\end{tikzcd}
\]

\end{document}

在此处输入图片描述

相关内容