2

I am using the following code to draw a commutative diagram and I want to draw the chi above the arrow but I don't know how

\begin{document}
\usepackage{tikz-cd}
\begin{center}
    \begin{tikzcd}
    & I &\\
    0 \arrow[r]&M \arrow[r, "\psi"] \arrow[u, "\phi" near start] & N \arrow[lu, "\chi" near end]
    \end{tikzcd}
\end{center}

enter image description here

Is there a way to get the chi above the arrow from N to I?

2
  • 5
    Try swap option.
    – CarLaTeX
    Feb 15, 2020 at 18:18
  • 3
    \arrow[lu, "\chi" {near end,swap}] as @CarLaTeX says. A prime also works \arrow[lu,"\chi"' near end].
    – user194703
    Feb 15, 2020 at 18:18

1 Answer 1

1

One can swap the labels with a prime.

\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{center}
    \begin{tikzcd}
    & I &\\
    0 \arrow[r]&M \arrow[r, "\psi"] \arrow[u, "\phi" near start] & 
    N \arrow[lu,"\chi"' near end]
    \end{tikzcd}
\end{center}
\end{document}

enter image description here

This is a short cut of swap, as suggested by @CarLaTeX, which then leads to the arguably cleaner syntax:

\arrow[lu, "\chi" {near end,swap}]

You must log in to answer this question.

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