2

Starting from

\documentclass[a4paper,12pt]{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
A \arrow[r, "\alpha"]   & B
\end{tikzcd}
\end{document}

enter image description here

reading the guide of tikz-cd I found no reference on how to insert two labels above and below on the same arrow. How can this be resolved?

  • 2
    Add a ' after the second label: A \arrow[r, "\alpha", "\beta"'] & B (I think). – Phelype Oleinik Mar 4 at 16:35
3

Add a single quote (') after the label to move it to the other side of the arrow:

\documentclass[a4paper,12pt]{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}%              V
A \arrow[r, "\alpha", "\beta"'] & B
\end{tikzcd}
\end{document}

At the bottom of page 2 of the manual there is a remark about that:

Arrows can have an arbitrary number of labels, by repeated use of arguments in quotes. The example below shows how to control the positioning of labels. Notice in particular that an apostrophe as <code>〈label option〉</code> causes the label to be placed on the opposite side of the arrow.

  • I have not see absolutely :-(. I am without eyes :-(. How you have done the up/down arrow and V in the your code (see comment)? – Sebastiano Mar 4 at 16:41
  • 1
    @Sebastiano It happens. It's a rather stealthy sentence :) About the down arrow () you asked, in my computer (Ubuntu) I use AltGr+U. (AltGr+Y=; AltGr+U=; AltGr+I=; AltGr+Shift+U=) – Phelype Oleinik Mar 4 at 16:44
  • And for Windows :-)? I will find it :-)? – Sebastiano Mar 4 at 16:47
  • 1
    @Sebastiano No idea. According to this page you can use Alt codes: ALT+8592=; ALT+8595=; ALT+8594=; ALT+8593=. As far as I can remember you hold Alt and type the corresponding number, then release Alt. I'm not sure, though. – Phelype Oleinik Mar 4 at 16:50
  • Your comment has been original. Many compliments. – Sebastiano Mar 4 at 16:51

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.