# Challenge: can you draw the following triangular diagram?

I've been struggling to draw the following triangular diagram: Can I do it in SE or should I forget about it?

Ideally the line for $f'$ should be dashed.

Here is a MathJax version that works, though it is certainly a hack, and only works well with the MathJax TeX fonts, not the STIX fonts, so some people might see a less satisfactory version.

$$\require{AMScd} \def\diaguparrow#1{\smash{\raise.6em\rlap{#1} \lower.3em{\mathord{\diagup}}\raise.52em{\!\mathord{\nearrow}}}} \begin{CD} && X'\\ & \diaguparrow{f'} @VVpV \\ Y @>>f> X \end{CD}$$


which displays as

$$\require{AMScd} \def\diaguparrow#1{\smash{\raise.6em\rlap{#1} \lower.3em{\mathord{\diagup}}\raise.512em{\!\mathord{\nearrow}}}} \begin{CD} && X'\\ & \diaguparrow{f'} @VVpV \\ Y @>>f> X \end{CD}$$

Alternatively, you could use

$$\require{AMScd} \require{cancel} \def\diaguparrow#1{\smash{\raise.6em\rlap{\ \ #1} \lower.6em{\cancelto{}{\Space{2em}{1.7em}{0px}}}}} \begin{CD} && X'\\ & \diaguparrow{f'} @VVpV \\ Y @>>f> X \end{CD}$$


which produces

$$\require{AMScd} \require{cancel} \def\diaguparrow#1{\smash{\raise.6em\rlap{\ \ #1} \lower.6em{\cancelto{}{\Space{2em}{1.7em}{0px}}}}} \begin{CD} && X'\\ & \diaguparrow{f'} @VVpV \\ Y @>>f> X \end{CD}$$

One could probably adjust the size of the \Space command and the \ \ to improve the result, but I just put this together as an example.

• copy pasting your second code in SE gives "Unknown environment 'CD'" . This is expected? – Rodrigo Dec 18 '17 at 16:23
• Did you enclose the example code in math delimiters, like ? I have added them to the code examples above, but originally only listed the TeX code. – Davide Cervone Dec 18 '17 at 19:54
• There was a recent question on MathOverflow Meta where a user eventually used your diagram but then they also asked whether the diagonal arrow can be made dotted. – Martin Sleziak Jan 17 '19 at 1:38
• @MartinSleziak, yes, I saw that, and your response. I don't have a good solution for dotted or dashed arrows. The diagonal one I did was just a hack, and I don't see a reasonable way to do it with dashes or dots. – Davide Cervone Jan 17 '19 at 1:42
• Thanks for the response. (I have added a comment directing the OP to what you said here.) – Martin Sleziak Jan 17 '19 at 1:55
• Which command controls the arrow pointing to the upper right? What if I want an arrow pointing to lower right? – AG learner Mar 4 at 22:16
• @AGlearner, the \cancelto{} command is what creates the arrow here. Unfortunately, there is not a corresponding one for a downward arrow. – Davide Cervone Mar 5 at 17:22

As suggested in this answer, one option is to use presheaf and include the image. On this website you can use xypic syntax. (Of course, you can do the same if you have LaTeX - including xy package - on your computer and can convert the result to a picture. Either solution - doing it online and doing it locally - has some advantages and some disadvantages.)

&X' \ar[d]^p\\
Y \ar[ru]^{f'} \ar[r]_f& X


http://presheaf.com/?d=d2bz1i6f6m4w2s3r5e4w6x44443f1h3l Ideally the line for $f′$ should be dashed.

This is obtained in xypic by modifier @{-->}

&X' \ar[d]^p\\
Y \ar@{-->}[ru]^{f'} \ar[r]_f& X


http://presheaf.com/?d=d68725l1w6m5r4k6l3s3j45y1i6x6y57 