![长箭头指向双单元图](https://linux22.com/image/441379/%E9%95%BF%E7%AE%AD%E5%A4%B4%E6%8C%87%E5%90%91%E5%8F%8C%E5%8D%95%E5%85%83%E5%9B%BE.png)
通过代码:
\documentclass[12pt,a4paper]{memoir}
\usepackage[all,cmtip,2cell]{xy}
\UseAllTwocells
\begin{document}
\xymatrix@R+20pc@C+3pc{
\bullet\ruppertwocell^a{\hspace{.40em}ab}
\rlowertwocell_c{\hspace{.40em}bc}
\ar[r]_(.40)b & \bullet\\
}
\end{document}
我获得了一个双单元图:
现在我需要一个名为交流电从A到C整个图表都保持双箭头AB和公元前进入图表,但我不知道该怎么做。
有人能帮忙吗?谢谢。
答案1
如果您可以使用tikz-cd
:
\documentclass[12pt,a4paper]{memoir}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
\bullet\ar[r,"b"{name=B, below left},""{name=middle, inner sep=0pt}]\ar[r, bend left=70,"a"{name=A}]\ar[r, bend right=70,"c"{name=C, below}] &[1em] \bullet
\arrow[Rightarrow, from=A, to=middle, shorten <=2pt, "ab"]
\arrow[Rightarrow, from=middle, to=C, shorten =2pt, "bc"]
\arrow[Rightarrow, from=A, to=C, shorten =2pt, "ac", bend left=100, looseness=3]
\end{tikzcd}
\end{document}
答案2
一种方法是使用Implies
箭头(在arrows.meta
库中)和double
TikZ 选项。随意更改数字!
\documentclass[tikz,border=5mm]{standalone}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}[c/.style={fill,circle,inner sep=2pt,outer sep=2pt},
arr/.style={-{Implies},double,double distance=1mm,shorten >=1mm,shorten <=1mm}] ]
\path
(0,0) node[c] (X) {}
(3,0) node[c] (Y) {}
;
\draw[->] (X) to[bend left=60] node[above,inner sep=2pt] (a) {$a$} (Y);
\draw[->] (X) to[bend right=60] node[below,inner sep=2pt] (c) {$c$} (Y);
\draw[->] (X)--(Y) coordinate[pos=.5] (M);
\path (M)+(-135:.3)node{$b$};
\draw[arr] (a)--(M) node[pos=.5,right]{$ab$};
\draw[arr] (M)--(c) node[pos=.5,right]{$bc$};
\draw[arr] (a) ..controls +(180:2.5) and +(180:2.5).. (c) node[pos=.5,left]{$ac$};
\end{tikzpicture}
\end{document}