tikz-cd 中的双图

tikz-cd 中的双图

有人可以帮我用 tikz-cd 画一个这样的双重图吗?在此处输入图片描述

答案1

一个选项(第二张图的箭头与方框分离)

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

\begin{document}

\begin{tikzcd}[row sep=large,cells={nodes={draw,minimum height=0.6cm}}]
\mathbb{R}^{p}\ar[d,"\mathbf{D}_{p}",swap] & \mathbb{R}^{n^{\ast}}\ar[r,"\mathbf{Y}^{T}"]\ar[l,"\mathbf{X}^{T}",swap] & \mathbb{R}^{q}\ar[d,"\mathbf{D}_{q}"] \\
\mathbb{R}^{p^{\ast}}\ar[r,"\mathbf{X}",swap] & \mathbb{R}^{n}\ar[u,"\mathbf{D}_{n}",swap] & \mathbb{R}^{q^{\ast}}\ar[l,"\mathbf{Y}"]
\end{tikzcd}\par\bigskip

\begin{tikzcd}[row sep=large,arrows={shorten >= 2pt,shorten <= 2pt},cells={nodes={draw,minimum height=0.6cm}}]
\mathbb{R}^{p}\ar[d,"\mathbf{D}_{p}",swap] & \mathbb{R}^{n^{\ast}}\ar[r,"\mathbf{Y}^{T}"]\ar[l,"\mathbf{X}^{T}",swap] & \mathbb{R}^{q}\ar[d,"\mathbf{D}_{q}"] \\
\mathbb{R}^{p^{\ast}}\ar[r,"\mathbf{X}",swap] & \mathbb{R}^{n}\ar[u,"\mathbf{D}_{n}",swap] & \mathbb{R}^{q^{\ast}}\ar[l,"\mathbf{Y}"]
\end{tikzcd}

\end{document}

在此处输入图片描述

您真的需要这些框吗?如果不需要,请删除该cells={...}部分代码。

相关内容