![箭筒与缩写箭头](https://linux22.com/image/372635/%E7%AE%AD%E7%AD%92%E4%B8%8E%E7%BC%A9%E5%86%99%E7%AE%AD%E5%A4%B4.png)
我尝试了以下
\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}
但输出并不令人满意。我想知道是否有办法将“向左/向右弯曲”更改为更适合演示的内容。
谢谢您的帮助!
答案1
我会避免对称移动(无论如何都不会弯曲),这样箭头就不会重叠。需要对标签的位置进行一些调整。
\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}
答案2
希望这就是你的想法
\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}
答案3
真的只是为了好玩,一个利用交换图本质上是 Ti 的事实的提议钾节点的 Z 矩阵(参见手册第 3.3 节)和@cfr 的双箭头技巧。
\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}
正如我所说,只是为了好玩。