1

I'm trying to use the tikz-cd package to write the following diagram with multiple bent arrows between the same two objects, with horizontal dots between them.

enter image description here

My tikz-cd skills are not up to par here. My feeble attempt so far is the following

\documentclass{article}
    \usepackage{tikz-cd}
    \begin{document}
    \begin{equation}
    \begin{tikzcd}
    A \arrow[swap]{d} \\
    B \arrow[bend right = 70]{u} \arrow[bend right = 70, draw=none]{u}{\ldots} \arrow[bend right=120]{u}
    \end{tikzcd}
    \end{equation}
\end{document}
4
  • I'm sorry, I'm not sure how to properly format the code on this site. If someone could correct me, hopefully I can figure out how! Thanks.
    – Benighted
    Jul 11, 2018 at 22:34
  • To format code you can select the code and click the {} button in the editor. Jul 11, 2018 at 22:38
  • Select the code and hit Ctrl+K or click the button with {}. Blocks are indented with four spaces, inline code placed between backticks. Jul 11, 2018 at 22:39
  • Please could you make your code compilable? That makes it much easier for people to help.
    – cfr
    Jul 11, 2018 at 22:49

1 Answer 1

4

There you go:

enter image description here

To add text to an arrow you just have to insert it between "...". To put the text on the other side of the arrow, append a single quote, like this: "..."'.

I also changed a little how you draw the arrow. Instead of increasing the bend angle of bend right (or bend left), you can set the looseness parameter a little higher. It will look much more... loose :).

The code:

\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{equation}
\begin{tikzcd}
A \arrow[swap]{d} \\
B \arrow[bend right = 70, "\sigma_1", "\ldots"']{u}
  \arrow[bend right = 90, looseness=2, "\sigma_n"']{u}
\end{tikzcd}
\end{equation}
\end{document}
9
  • 1
    beautiful! Thanks so much. Yeah, I tried playing with the bending but it just looked absurd. This solution with the looseness is perfect!
    – Benighted
    Jul 12, 2018 at 1:03
  • Although it doesn't seem to be compiling. I don't think it likes the things in quotations. Any idea what's up here?
    – Benighted
    Jul 12, 2018 at 1:11
  • Strange... It compiles for me. What version of tikzcd and LaTeX are you using? Are you compiling with other packages or does the code above alone throws the error? Jul 12, 2018 at 1:13
  • It fails with just that code. I'm using Latex2e, and I'm struggling to find what version of Tikz I'm using. Perhaps I should just get the latest.
    – Benighted
    Jul 12, 2018 at 1:23
  • @Benighted To see which version of the packages you are using add the \listfiles command before your \documentclass. Then the .log file will have such list. Or, to see the version of tikzcd specifically you can open a command prompt and type texdoc tikz-cd. Jul 12, 2018 at 2:42

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.