3

I am trying to draw a quiver with abbreviated arrows like quiver

I tried the following

\documentclass{standalone}
\usepackage{tikz-cd} 
\begin{document}
\begin{tikzcd}
1 
\arrow[rrrr, draw=none, "\raisebox{+1.5ex}{\vdots}" description

\arrow[rrrr, bend left,        "x_0"]
\arrow[rrrr, bend right, swap, "x_m"]
\arrow[ddrr, draw=none, "\raisebox{+1.5ex}{\vdots}" description]
\arrow[ddrr, bend left,        "y_{0}"]
\arrow[ddrr, bend right, swap, "y_n"]
&&&& 3
   \\
   \\
&&2
\arrow[uurr]
\\
\end{tikzcd}
\end{document}

but the output is not satisfactory. I was wondering if I there is anyway to change the 'bend left/right' to something that suits better for the presentation.

Thanks for the help!

  • You probably want shift rather than bend – egreg Mar 20 '18 at 20:53
5

I'd avoid symmetric shifting (not bending anyhow), so the arrows won't overlap. Some tweaking of the positions for the labels is necessary.

\documentclass{standalone}
\usepackage{amsmath,tikz-cd}

\makeatletter
\newcommand{\svdots}{%
  \vbox{%
    \scriptsize
    \baselineskip 2\p@
    \lineskiplimit \z@
    \hbox {.}\hbox {.}\hbox {.}%
  }%
}
\makeatother

\begin{document}
\begin{tikzcd}[column sep=huge,row sep=huge]
1
\arrow[rr,shift left=2ex,"x_0"]
\arrow[rr,"\svdots","x_m" swap]
\arrow[dr,"y_{0}" pos=0.45]
\arrow[dr,shift right=2ex,"\svdots" {sloped,pos=0.4},"y_n" swap]
&& 3
   \\
&2 \arrow[ur]
\\
\end{tikzcd}

\end{document}

enter image description here

3

Hopefully this is what you had in mind

\documentclass[border = 5pt]{standalone}
\usepackage{tikz-cd} 

\usepackage{amsmath}
\makeatletter
\DeclareRobustCommand{\rvdots}{%
  \vbox{
    \baselineskip3\p@\lineskiplimit\z@
    \kern-\p@
    \hbox{.}\hbox{.}\hbox{.}\hbox{.}
  }}
\makeatother

\begin{document}
\begin{tikzcd}[nodes = {inner sep = 9pt, row sep = 40pt},
lbl/.style={anchor = south, rotate = -50}]
1 
\arrow[rr, shift right = 2ex, "x_n"'] 
\arrow[rr, shift left = 2ex, "x_1", "\rvdots"'] 
\arrow[rd, shift left = 1ex, "y_n"] 
\arrow[rd, shift right = 3ex, "y_1"', "\rvdots" lbl] 
& & 3 \\
& 2 
\arrow[ru] 
& 
\end{tikzcd}
\end{document}

enter image description here

2

Really just for fun a proposal that makes use of the fact that the commutative diagrams are essentially TikZ matrices of nodes (see section 3.3 of the manual) and @cfr's nice double arrow trick.

\documentclass{standalone}
\usepackage{tikz-cd}
\usetikzlibrary{decorations.markings}
\tikzset{arrowed double line/.style={% inspired by https://tex.stackexchange.com/a/321759/121799
  preaction={
    draw=black,line width=0.5pt,
    double distance between line centers=#1,
  },
   draw=white,
    line width={#1-1pt},
    shorten >=-.5pt,
    shorten <=-.5pt,
  postaction={
  decoration={
    markings,
    mark=at position 1 with {
      \arrow[line width=0.5pt,black,yshift=#1/2]{>}
      \arrow[line width=0.5pt,black,yshift=-#1/2]{>}
    },
  },
    decorate,
  },
  }
} 
\begin{document}
\begin{tikzpicture}
\matrix[matrix of math nodes, name=m, commutative diagrams/every cell] {
1 & \hspace*{2cm}&3 \\[1.8cm] &2 &\\};
\draw[arrowed double line=3mm] (m-1-1) -- (m-1-3) 
node[midway,above=3pt,inner sep=0pt] (x1) {$x_1$} node[midway,below=3pt,inner sep=0pt] (xn) {$x_n$};
\draw[arrowed double line=3mm] (m-1-1) -- (m-2-2) 
node[sloped,midway,above=3pt,inner sep=0pt] (y1) {$y_1$} 
node[sloped,midway,below=3pt,inner sep=0pt] (yn) {$y_n$};
\draw[->] (m-1-3) -- (m-2-2);
\draw[dotted,thick] (x1) -- (xn);
\draw[dotted,thick] (y1) -- (yn);
\end{tikzpicture}
\end{document}

enter image description here

As I said, just for fun.

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.