tikz-cd:为什么 {d} 而不是 {r} 不起作用?

tikz-cd:为什么 {d} 而不是 {r} 不起作用?

我已经尝试过这个代码:

\begin{tikzcd}A \arrow[tail, two heads, dashed]{r} & B\end{tikzcd}

我已将那里的 {r} 更改为 {d} 和 {l},但它不起作用,它出现错误。

这是什么问题?我该如何修复它?

答案1

在此处输入图片描述

\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}A \arrow[tail, two heads, dashed]{r} & B\end{tikzcd}
% 
\begin{tikzcd}A  & B \arrow[tail, two heads, dashed]{l}\end{tikzcd}

\begin{tikzcd}A \arrow[tail, two heads, dashed]{d} \\ B\end{tikzcd}
% 
\begin{tikzcd}A  \\ B\arrow[tail, two heads, dashed]{u} \end{tikzcd}
\end{document}

对角箭头:

在此处输入图片描述

\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
  A &                                                     \\ 
    &  \arrow[leftharpoondown, two heads, dashed]{ul} B
\end{tikzcd}
%
\begin{tikzcd}
  A \arrow[leftharpoondown, two heads, dashed]{dr} &       \\ 
                                                   & B
\end{tikzcd}

\begin{tikzcd}
      & A \arrow[leftharpoondown, two heads, dashed]{dl}   \\ 
  B   &
\end{tikzcd}
%
\begin{tikzcd}
                                                    & A   \\ 
  B  \arrow[leftharpoondown, two heads, dashed]{ur} &
\end{tikzcd}
\end{document}

相关内容