1

I wrote the following code, trying to get a commuting triangle with one of the arrows being dotted.

\begin{tikzcd}[column sep=1.5em]
 S \ar{dr}{f} \ar{rr}{m} && Y\arrow[dl,dotted]{g} \\
&F
\end{tikzcd}

But the dotted arrow doesn't display the label g as I tried to make things.

Diagram with missing g

What am I doing wrong here?

1 Answer 1

3

You can use almost two same options as codes:

First 1.

enter image description here

\documentclass[a4paper,12pt]{article}

\usepackage{tikz-cd}
\usepackage{mathtools}

\begin{document}
\begin{tikzcd}[column sep=1.5em]
 S \ar{dr}{f} \ar{rr}{m} && Y\arrow[dl,dotted, "g"'] \\
&F
\end{tikzcd}
\end{document}

Second 2.

enter image description here

\documentclass[a4paper,12pt]{article}

\usepackage{tikz-cd}
\usepackage{mathtools}

\begin{document}
\begin{tikzcd}[column sep=1.5em]
 S \ar{dr}{f} \ar{rr}{m} && Y\arrow[dl,dotted, swap, "g"] \\
&F
\end{tikzcd}
\end{document}

You must log in to answer this question.

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