使用 \xrightarrow 和 \downarrow

使用 \xrightarrow 和 \downarrow

\downarrow我正在尝试使用箭头表示一组转换。当和\xrightarrow在同一行中使用时,以下内容无法编译。有人能帮忙吗?

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$\overset{\downarrow}{b}$ \quad
$\overset{\overset{\text{text}}{\downarrow}}{b}$
\[ 
A\xrightarrow{\text{a}}\overset{\downarrow}{B}\xrightarrow{\text{a}}C 
\]
\end{document}

答案1

在此处输入图片描述

\documentclass{article}
\usepackage{tikz-cd}
\usepackage{amsmath}
\begin{document}
I do not get an error:\\
$\overset{\downarrow}{b}$ \quad
$\overset{\overset{\text{text}}{\downarrow}}{b}$
\[ 
A\xrightarrow{\text{a}}\overset{\downarrow}{B}\xrightarrow{\text{a}}C 
\]
But I am wondering if you are secretly looking for a commutative diagram.
\[
\begin{tikzcd}[row sep=0.4cm,column sep=0.4cm]
\arrow[d] &  & \text{text}\arrow[d] \\
b  & D\arrow[d,"\text{text}"] & b \\
A \arrow[r,"a"]& B \arrow[r,"a"] & C
\end{tikzcd}
\]
I understand that this may not be the diagram you want, but if you let me know
how it should look like I'll be happy to adjust.
\end{document}

相关内容