答案1
你可以把任何你喜欢的东西放入equation
环境中。这样,它就会表现得像一个方程式,就像你想要的那样。
% arara: pdflatex
\documentclass{article}
\usepackage{tikz-cd}
\usepackage{blindtext}
\begin{document}
\setcounter{page}{15}
\noindent
into a commutative diagramm
\begin{equation}
\begin{tikzcd}
B\times_A C \arrow{r}{\pi_2}\arrow{d}[swap]{\pi_1} & C\arrow{d}{g} \\
B \arrow{r}[swap]{f} & A;
\end{tikzcd}
\end{equation}
\blindtext
In a general category $C$, one says that a commutative square
\begin{equation}
\begin{tikzcd}
P \arrow{r}{q}\arrow{d}[swap]{p} & C\arrow{d}{g} \\
B \arrow{r}[swap]{f} & A
\end{tikzcd}
\end{equation}
\blindtext
\end{document}
如果您也想拥有最后一张图表:
\begin{equation*}
\begin{tikzcd}
X\arrow{drr}{\gamma}\arrow[dashed]{dr}[near end]{!\delta}\arrow{ddr}[swap]{\beta} & & \\[1ex]
& P \arrow{r}{q}\arrow{d}[swap]{p} & C\arrow{d}{g} \\
& B \arrow{r}[swap]{f} & A
\end{tikzcd}
\end{equation*}