我有以下代码,可生成附加的三角形图片。有人知道如何从 S_0 生成一条有向边,向下向右,结束于 D_0b 吗?此外,如何将顶点 S_1 和 S_1 合并为一个顶点或点?
tikz-cd 文档中关于此形状的信息很少,我自己的结果导致了许多编译失败。感谢任何有关创建形状的指导。
谢谢
注意:我正在尝试画一棵斑岩树。
\begin{tikzcd}[row sep=tiny]
& S_0 \arrow[dd, "\phi_1" description] \\
D_0 \arrow[ur, leftarrow] \arrow[dr, "\phi_2" description] \\
& S_1 \\
& S_1 \arrow[dd, "\phi_1" description] \\
D_1 \arrow[ur, leftarrow] \arrow[dr, "\phi_2" description] & \\
& S_2
\end{tikzcd}
答案1
OP 澄清后重新给出答案:
\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}[row sep=tiny]
& S_0 \arrow[dd, "\phi_1" description]\ar[dr] \\
D_0 \arrow[ur, leftarrow] \arrow[dr, "\phi_2" description] &&D_{0b}\\
& S_1 \arrow[dd, "\phi_1" description]\ar[dr] \\
D_1 \arrow[ur, leftarrow] \arrow[dr, "\phi_2" description] &&D_{1b}\\
& S_2
\end{tikzcd}
\end{document}
答案2
这是你想要的吗?
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}[row sep=tiny]
& S_0\dlar \ar[dd, "\phi_1" description] \drar \\
D_0 \drar["\phi_2" description] & & D_{0b}\\
&S_1\dlar \arrow[dd, "\phi_1" description] \\
D_1 \drar["\phi_2" description] & \\
& S_2
\end{tikzcd}
\end{document}