我需要幫助來更正

我需要幫助來更正

我要畫的圖的形狀如下圖:

在此輸入影像描述

這是我嘗試過的:

\[
    \begin{tikzcd}
                 &   &               1   \\
                 &  1^{\ast} \arrow[dash, dashed,ldd]  & \\
                 & \quad \quad ~~~~~~ r  ~~~~~~\arrow[dash, dashed,ruu] & \\
                 s^{\ast}  &  &
    \end{tikzcd},
    \begin{tikzcd}
    &\begin{array}{rlc} ~1^{\ast}~\\ ~~~1\end{array}\arrow[dash, dashed,dr] \arrow[dash, dashed, dl]& \\
     s^{\ast} &  & r
    \end{tikzcd},
    \begin{tikzcd} ~1^{\ast} \arrow[dash,dashed,dr] && 1 \arrow[dash,dashed,dl] \\
                 & \begin{array}{rlc} s^{\ast}~~~\\ ~r~\end{array} & 
    \end{tikzcd}
\]

答案1

使用[...]after&\\可以控制列或行之間的距離。

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}
\begin{tikzcd}
    & &[-3.5em] & 1 \\
    & 1^{\ast}\ar[dash, dashed, ldd]\\[-4.5ex]
    & & r\ar[dash, dashed, ruu]\\
    s^{\ast}\\
\end{tikzcd},
\begin{tikzcd}
    & 1^{\ast}\ar[dash, dashed, ldd] &[-3.5em]\\[-4.5ex]
    & & 1\ar[dash, dashed, rd]\\
    s^{\ast} & & & r\\
\end{tikzcd},
\begin{tikzcd}
1^{\ast}\ar[dash, dashed, rd]& &[-3.5em] & 1\\
&s^{\ast}\\[-4.5ex]
&&r\ar[dash, dashed, uur]
\end{tikzcd}
\end{document}

在此輸入影像描述

相關內容