答案1
这里采用新定义的更通用的方法ar symbol
。
\documentclass{article}
\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary{cd}
\begin{document}
\begin{tikzcd}[
ar symbol/.style = {draw=none,"#1" description,sloped},
isomorphic/.style = {ar symbol={\cong}},
equals/.style = {ar symbol={=}},
]
A \ar[r] & B \ar[r] & C \ar[r,equals] & D \\
\mathbb{Z}_{?} \ar[u,isomorphic] & \mathbb{Z}_{12} \ar[u,isomorphic] & \mathbb{Z}_{24} \ar[u,isomorphic] \\
\end{tikzcd}
\end{document}
经过进一步的聊天讨论,得出了以下最佳解决方案:
\documentclass{article}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary{cd}
\begin{document}
\begin{tikzcd}[
column sep=tiny,row sep=small,
ar symbol/.style = {draw=none,"\textstyle#1" description,sloped},
isomorphic/.style = {ar symbol={\cong}},
]
A \ar[r] & B \ar[r] & C \mathrlap{{} = D} \\
\mathbb{Z}_{?} \ar[u,isomorphic] & \mathbb{Z}_{12} \ar[u,isomorphic] & \mathbb{Z}_{24} \ar[u,isomorphic] \\
\end{tikzcd}
\end{document}
答案2
我建议使用另一个isom
符号(及其旋转变体),基于\AC
中的符号wasysym
和stackengine
包。它们可能在非 tkz 环境中使用。
\documentclass{article}
\usepackage{amssymb}
\usepackage{tikz-cd}
\usepackage{wasysym, stackengine, makebox, graphicx}
\newcommand\isom{\mathrel{\stackon[-0.1ex]{\makebox*{\scalebox{1.08}{\AC}}{=\hfill\llap{=}}}{{\AC}}}}
\newcommand\nvisom{\rotatebox[origin=cc] {-90}{$ \isom $}}
\newcommand\visom{\rotatebox[origin=cc] {90} {$ \isom $}}
\begin{document}
\begin{tikzcd}[sep = small]
A \ar[r] & B \ar[r] & C \ar[r ,equals] & D \\
\mathbb{Z}_{?} \ar[u, phantom, "\visom"] & \mathbb{Z}_{12} \ar[u,phantom, "\nvisom"] \ar[r, phantom, "\isom"] & \mathbb{Z}_{24} \ar[u, phantom, "\nvisom"] \\
\end{tikzcd}
\end{document}