使用 tikz 并排显示交换图

使用 tikz 并排显示交换图

如何使用 tikz 包将两个交换图并排放置?

\documentclass{article}
\usepackage{tikz}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{dsfont}
\begin{document} 
\begin{tikzpicture}
  \matrix (m) [matrix of math nodes,row sep=0.8em,column sep=3em,minimum width=2em] {
 \quad & \mathcal{A}\otimes \mathcal{A} \\
 \mathcal{A} & \quad \\
 \quad & \mathcal{A}\otimes \mathcal{A} \\};
 \path[-stealth]
(m-2-1) edge node [above] {$\Delta$} (m-1-2)
(m-2-1) edge node [below] {$\Delta$} (m-3-2)
(m-1-2) edge node [right] {$\sigma$} (m-3-2);
\end{tikzpicture}

\begin{tikzpicture}
 \matrix (m) [matrix of math nodes,row sep=0.8em,column sep=3em,minimum width=2em] {
 \mathcal{A}\otimes \mathcal{A} & \quad \\
 \quad & \mathcal{A} \\
 \mathcal{A}\otimes \mathcal{A} & \quad \\};
  \path[-stealth]
(m-1-1) edge node [above] {$m$} (m-2-2)
(m-3-1) edge node [below] {$m$} (m-2-2)
(m-1-1) edge node [left] {$\sigma$} (m-3-1);
\end{tikzpicture}
\end{document}

答案1

您留下了一个空白行,因此第二tikzpicture行将转到新行。

删除它你就会得到你想要的。

平均能量损失

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{matrix}


\begin{document}
\begin{tikzpicture}
  \matrix (m) [matrix of math nodes,row sep=0.8em,column sep=3em,minimum width=2em] {
 \quad & \mathcal{A}\otimes \mathcal{A} \\
 \mathcal{A} & \quad \\
 \quad & \mathcal{A}\otimes \mathcal{A} \\};
 \path[-stealth]
(m-2-1) edge node [above] {$\Delta$} (m-1-2)
(m-2-1) edge node [below] {$\Delta$} (m-3-2)
(m-1-2) edge node [right] {$\sigma$} (m-3-2);
\end{tikzpicture}\qquad%
\begin{tikzpicture}
 \matrix (m) [matrix of math nodes,row sep=0.8em,column sep=3em,minimum width=2em] {
 \mathcal{A}\otimes \mathcal{A} & \quad \\
 \quad & \mathcal{A} \\
 \mathcal{A}\otimes \mathcal{A} & \quad \\};
  \path[-stealth]
(m-1-1) edge node [above] {$m$} (m-2-2)
(m-3-1) edge node [below] {$m$} (m-2-2)
(m-1-1) edge node [left] {$\sigma$} (m-3-1);
\end{tikzpicture}
\end{document} 

在此处输入图片描述


tikz-cd也可以使用 轻松绘制相同的图表。

\documentclass{article}

\usepackage{tikz-cd}

\tikzcdset{
arrow style=tikz,
diagrams={>={Stealth[scale=0.9]}}
}

\begin{document}
 \[
  \begin{tikzcd}[row sep=0.8em,column sep=3em]
   & \mathcal{A}\otimes \mathcal{A} \arrow[dd,"\sigma"] & \mathcal{A}\otimes \mathcal{A} \arrow[dd,"\sigma"'] \arrow[dr,"m"] \\
   \mathcal{A} \arrow[ur,"\Delta"] \arrow[dr,"\Delta"'] & & & \mathcal{A} \\
   & \mathcal{A}\otimes \mathcal{A} & \mathcal{A}\otimes \mathcal{A} \arrow[ur,"m"'] \\
  \end{tikzcd}
 \]
\end{document} 

在此处输入图片描述

相关内容