0

Is it possible for tikzcd to intelligently place labels? For example, when drawing the following diagram,

\begin{tikzcd}[row sep=large]
& C 
\arrow[ld, "f"] 
\arrow[rd, "g"] 
\arrow[d, "!h" , dashed] & \\
A 
& A\times B 
\arrow[r, "\pi_B"] 
\arrow[l, "\pi_A"]          
& B
\end{tikzcd}

enter image description here

the labels look ugly. I have to manually swap sides, with

\begin{tikzcd}[row sep=large]
& C 
\arrow[ld, "f", swap] 
\arrow[rd, "g"] 
\arrow[d, "!h" , dashed] & \\
A 
& A\times B 
\arrow[r, "\pi_B"] 
\arrow[l, "\pi_A", swap]          
& B
\end{tikzcd}

Is there a more intelligent way to do this?

2
  • 1
    Any reason why you don't accept the answers from many of your previous questions? Feb 3 at 8:19
  • @Dr.ManuelKuehner That's my bad, I often forget. Feb 3 at 21:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.