以下是最小工作示例
\documentclass[12pt,reqno,a4paper]{amsart}
%\usepackage[utf8]{inputenc} % not needed with up-to-date TeX systems
\usepackage[english]{babel}
\usepackage[all]{xy}
\usepackage{tikz-cd}
\newcommand{\mc}{\mathcal}
\begin{document}
\begin{equation}\begin{tikzcd}
& & (\mc{G}_1\times_M \mc{H}_1)/\mc{G}_1 \arrow[ldd] \arrow[rdd] & & \\
& & \mc{G}_1 \arrow[dd,xshift=0.75ex,"t"]\arrow[dd,xshift=-0.75ex,"s"'] & & \mc{H}_1 \arrow[dd,xshift=0.75ex,"t"]\arrow[dd,xshift=-0.75ex,"s"'] \\
& \mc{G}_1 \arrow[ld, "t_{\mc{G}}"'] \arrow[rd, "s_{\mc{G}}"] & & \mc{H}_1 \arrow[ld, "t_{\mc{H}}"'] \arrow[rd] & \\
M & & M & & M
\end{tikzcd}.\end{equation}
\begin{equation} \begin{tikzcd}[sep=small]
\underline{M} \arrow[dd,"L"'] \arrow[rr, "G"] & & \underline{N} \arrow[dd, "q"] \\
& & \\
\mc{D} \arrow[Rightarrow, shorten >=20pt, shorten <=20pt, uurr] \arrow[rr, "F"] & & \mc{C}
\end{tikzcd}. \end{equation}
\end{document}
问题如下:
tikzcd 中的图表大小是固定的吗?还是可以增加或减少图表的大小?
我遵循了以下答案中的建议。它对第一个图表有效(在编辑版本中),但第二个图表扭曲了。我正在添加它的图片。
答案1
tikz-cd
有几个选项可以改变大小,例如sep=tiny
、small
、large
或huge
或cramped
选项。它们在手册的第 7 页有描述。然而,正如tikz-cd
“秘密”的 Ti钾Z matrix
,您还可以使用tikz
键column sep
或row sep
,并访问 v3.1.5 第 20 和 60 节的所有其他样式pgfmanual
。pgfmanual 中对矩阵的讨论可能会在未来得到扩展。
\documentclass[12pt,reqno,a4paper]{amsart}
\usepackage{tikz-cd}
\begin{document}
\begin{equation}
\begin{tikzcd}[sep=small]
& & (\mathcal{G}_1\times_M \mathcal{H}_1)/\mathcal{G}_1 \arrow[ldd] \arrow[rdd] & & \\
& & \mathcal{G}_1 \arrow[dd,shift left=0.75ex,"t"]\arrow[dd,shift left=-0.75ex,"s"'] & &
\mathcal{H}_1 \arrow[dd,shift left=0.75ex,"t"]\arrow[dd,shift left=-0.75ex,"s"'] \\
& \mathcal{G}_1 \arrow[ld, "t_{\mathcal{G}}"'] \arrow[rd, "s_{\mathcal{G}}"] & & \mathcal{H}_1 \arrow[ld, "t_{\mathcal{H}}"'] \arrow[rd] & \\
M & & M & & M
\end{tikzcd}\;.
\end{equation}
\begin{equation}
\begin{tikzcd}[column sep=1ex,row sep=1ex]
& & (\mathcal{G}_1\times_M \mathcal{H}_1)/\mathcal{G}_1 \arrow[ldd] \arrow[rdd] & & \\
& & \mathcal{G}_1 \arrow[dd,shift left=0.75ex,"t"]\arrow[dd,shift left=-0.75ex,"s"'] & &
\mathcal{H}_1 \arrow[dd,shift left=0.75ex,"t"]\arrow[dd,shift left=-0.75ex,"s"'] \\
& \mathcal{G}_1 \arrow[ld, "t_{\mathcal{G}}"'] \arrow[rd, "s_{\mathcal{G}}"] & & \mathcal{H}_1 \arrow[ld, "t_{\mathcal{H}}"'] \arrow[rd] & \\
M & & M & & M
\end{tikzcd}\;.
\end{equation}
\end{document}
我还要提一下,您给出的示例是可行的,但并不是最简化的。我也用 替换xshift
了shift left
。