I've been struggling to draw the following triangular diagram:

enter image description here

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{\scriptstyle #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{\scriptstyle #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{\ \ \scriptstyle #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{\ \ \scriptstyle #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? – Javier Dec 18 '17 at 16:23
  • 1
    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

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

diagram

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

diagram

You must log in to answer this question.

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