我想Rightarrow
在图中放置两个平行箭头()tikz-cd
,但是当我缩短它们时节点离箭头太远。
\documentclass[utf8]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
H \dar[r,Rightarrow,shorten >= 10pt,shift left=1ex] \dar[r,Rightarrow,shorten >= 10pt,shift right=1ex] & F
\end{tikzcd}
\end{document}
有什么建议可以改善这种情况吗?
答案1
您不应该缩短箭头,而应该修改列距:
\documentclass[utf8]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
H \arrow[r,Rightarrow,shift left=1ex] \arrow[r,Rightarrow,shift right=1ex] & F
\end{tikzcd}
\begin{tikzcd}[column sep=small]
H \arrow[r,Rightarrow,shift left=1ex] \arrow[r,Rightarrow,shift right=1ex] & F
\end{tikzcd}
\end{document}
答案2
除了 Gregorio 先生的版本外,还有针对单列的第三个版本:
% arara: pdflatex
\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
H \arrow[Rightarrow,shift left=1ex]{r} \arrow[Rightarrow, shift right=1ex]{r} & F \arrow[Rightarrow,shift left=1ex]{r} \arrow[Rightarrow, shift right=1ex]{r} & D
\end{tikzcd}
\begin{tikzcd}[column sep=small] % or column sep=0.5em or alike
H \arrow[Rightarrow,shift left=1ex]{r} \arrow[Rightarrow, shift right=1ex]{r} & F \arrow[Rightarrow,shift left=1ex]{r} \arrow[Rightarrow, shift right=1ex]{r} & D
\end{tikzcd}
\begin{tikzcd}
H \arrow[Rightarrow,shift left=1ex]{r} \arrow[Rightarrow, shift right=1ex]{r} &[-1em] F \arrow[Rightarrow,shift left=1ex]{r} \arrow[Rightarrow, shift right=1ex]{r} & D
\end{tikzcd}
\end{document}