# Reshaping a commutative diagram

I have this diagram:

\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}


And I have an issue: the first one is that the diagram doesn't fit the page, and the right side of the page won't display in the created pdf. Besides, I want to color some specific arrow.

• Welcome to TeX S.E. ! Please edit your MWE : put four spaces at the beginning of each line and, above all, make it fully compiliable. A simple copy paste should be sufficient, we should'nt have to add a preamble, especially since you are using custom package. – sztruks Dec 31 '18 at 11:21
• thanks @sztruks for the comment. Do you mean I should add some \usepackage{ xymatrix} ? – user2478159 Dec 31 '18 at 11:26
• Yes you should, and all the documentclass, begin{document} lines and so on. – sztruks Dec 31 '18 at 11:28
• @sztruks ok I added the right header. Thanks for help – user2478159 Dec 31 '18 at 12:06
• What is the question? – Peter Mortensen Dec 31 '18 at 17:00

I'd use bending arrows:

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

\begin{document}

$\xymatrix@C-2.5pc@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}


I also colored a couple of arrows, just to show how it can be done.

I removed the duplicate \ar[ld] from the first row.

Similarly, with 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}


• @user2478159 You're welcome. I added the tikz-cd version. You have a duplicate \ar[ld] arrow in your code (first row). Never use  in LaTeX. – egreg Dec 31 '18 at 12:26