2

I'm using the to path option for the first time in tikzcd, and run into the problem that the labels for my arrows do not show up:

\documentclass[a4paper,10pt]{article}
\usepackage{tikz}
\usetikzlibrary{cd}

\begin{document}

\begin{tikzcd}
 & B \\
 A \arrow[ru,"c",to path={--(\tikztotarget.west)}]&
 \end{tikzcd}

\end{document}

This just gives A and B, with an arrow, but I do not see the label?

1
  • Don't show snippets. Make a complete example, this makes it much easier to test your code. Jul 27, 2017 at 8:30

1 Answer 1

3

You need to add \tikztonodes somewhere, to determine where nodes should be placed.

\documentclass[a4paper,10pt]{article}
\usepackage{tikz}
\usetikzlibrary{cd}

\begin{document}

\begin{tikzcd}
 & B \\
 A \arrow[ru,"c",to path={--(\tikztotarget.west) \tikztonodes}]&
 \end{tikzcd}

\end{document}

enter image description here

2
  • Ah oke thanks. Can I add multiple tikztnodes? And if so, which one will be used? Jul 27, 2017 at 8:34
  • @user2520938 Just tried, you'll get duplicate labels if you have more than one \tikztonodes. Jul 27, 2017 at 8:40

You must log in to answer this question.

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