答案1
答案2
您可以在数组中设置数字,但要\footnotesize
减小行间距。最好为其定义一个合适的命令。
使用between origins
,东南方向的箭头将会对齐。
\documentclass{article}
\usepackage{amsmath,tikz-cd}
\newcommand{\stack}[1]{%
\mbox{%
\footnotesize
\renewcommand{\arraystretch}{0.75}%
$\begin{array}{@{}c@{}}#1\end{array}$%
}%
}
\begin{document}
\[
\begin{tikzcd}[row sep={4em,between origins},column sep={4em,between origins}]
\stack{3} \arrow[dr] \\
\stack{4} \arrow[r] &
\stack{2\\3\;4} \arrow[dr] \\
&& \stack{1\\2\\3\;4}
\end{tikzcd}
\qquad
\begin{tikzcd}[row sep={4em,between origins},column sep={4em,between origins}]
\stack{1\\2\\3} \arrow[dr] \\
\stack{1\\2\\4} \arrow[r] &
\stack{1\\2} \arrow[dr] \\
&& \stack{1}
\end{tikzcd}
\]
\end{document}
如果您想要类似 Times 的字体,请使用newtx
:
\documentclass{article}
\usepackage{amsmath,tikz-cd}
\usepackage{newtxtext,newtxmath}
\tikzcdset{arrow style=math font}
\newcommand{\stack}[1]{%
\mbox{%
\footnotesize
\renewcommand{\arraystretch}{0.75}%
$\begin{array}{@{}c@{}}#1\end{array}$%
}%
}
\begin{document}
\[
\begin{tikzcd}[row sep={4em,between origins},column sep={4em,between origins}]
\stack{3} \arrow[dr] \\
\stack{4} \arrow[r] &
\stack{2\\3\;4} \arrow[dr] \\
&& \stack{1\\2\\3\;4}
\end{tikzcd}
\qquad
\begin{tikzcd}[row sep={4em,between origins},column sep={4em,between origins}]
\stack{1\\2\\3} \arrow[dr] \\
\stack{1\\2\\4} \arrow[r] &
\stack{1\\2} \arrow[dr] \\
&& \stack{1}
\end{tikzcd}
\]
\end{document}
您的图片似乎是用Xy-pic制作的(但质量较差并且箭头很丑)。
\documentclass{article}
\usepackage{amsmath}
\usepackage[all]{xy}
\usepackage{newtxtext,newtxmath}
\newcommand{\stack}[1]{%
\mbox{%
\footnotesize
\renewcommand{\arraystretch}{0.75}%
$\begin{array}{@{}c@{}}#1\end{array}$%
}%
}
\begin{document}
\[
\xymatrix@R-1pc{
\stack{3} \ar[dr] \\
\stack{4} \ar[r] &
\stack{2\\3\;4} \ar[dr] \\
&& \stack{1\\2\\3\;4}
}
\qquad
\xymatrix@R-1pc{
\stack{1\\2\\3} \ar[dr] \\
\stack{1\\2\\4} \ar[r] &
\stack{1\\2} \ar[dr] \\
&& \stack{1}
}
\]
\end{document}