交换图 Beamer 使用 \xymatrix 暂停

交换图 Beamer 使用 \xymatrix 暂停

我想使用 \xymatrix 命令制作一个带有停顿的交换图。我想在演示文稿中一点一点地建立一个图表,但我不太清楚如何实现。这是一张我想要制作的图片。 在此处输入图片描述

但是,我不想让它一下子全部出现。我想从 $X$ 开始,然后显示 $f_0$ 走向 $Y_0$,然后显示 $f_1$ 走向 $Y_1$,然后显示 $g_0$ 从 $Y_1$ 走向 $Y_0$,等等...

任何帮助都将不胜感激。以下是我制作的文件代码的迷你版本:

\documentclass[10pt]{beamer}

\usetheme[progressbar=frametitle]{metropolis}
\usepackage{amssymb,amscd,amsthm,amsmath,graphicx,color}
\usepackage{booktabs}
\usepackage{color}
\usepackage[color,matrix,arrow]{xy}
\usepackage{ragged2e}
\usepackage[scale=2]{ccicons}
%\usefonttheme{professionalfonts} % using non standard fonts for beamer
%\usefonttheme{serif} % default family is serif
%\usepackage{fontspec}
%\setmainfont{Times New Roman}



\usepackage{pgfplots}
\usepgfplotslibrary{dateplot}

\usepackage{xspace}
\newcommand{\themename}{\textbf{\textsc{metropolis}}\xspace}
\newcommand{\of}[1]{\left(#1\right)}
\newcommand{\ofb}[1]{\left[#1\right]}
\newcommand{\ofc}[1]{\left\{#1\right\}}
\newcommand{\ofi}[1]{\left<#1\right>}
\newcommand{\ofa}[1]{\left|#1\right|}
\def\R{\mathbb{R}}
\def\N{\mathbb{N}}
\setbeamertemplate{theorems}[ams style]
\newtheorem{thm}{Theorem}
\newtheorem*{thm*}{Theorem}
\newtheorem{proposition}[theorem]{Proposition}

\begin{document}

\maketitle

\begin{frame}
\pause
\xymatrix{
& & & & & & X \ar[dllllll]|-{f_0} \ar[dlllll]|-{f_1} \ar@{.>}[dllll] \ar[dlll]|-{f_k} \ar@{.>}[dll] \ar[dl]|-{f_{i-1}} \ar[dr]|-{\color{red}{f_i}}\\
Y_0 & \ar[l]^{g_0} Y_1 & \ar@{.>}[l] \cdots & \ar[l]^{g_{k-1}} Y_k & \ar[l]^{g_k} \cdots & \ar[l]^{g_{i-2}} Y_{i-1} & & \ar[ll]^{\color{red}{g_{i-1}}} \color{red}{Y_i}
}
\end{frame}

\end{document}

答案1

您可以在 中使用\uncover或类似内容\xymatrix。例如,发现Y_i

\documentclass[10pt]{beamer}
\usepackage[color,matrix,arrow]{xy}

\begin{document}

\begin{frame}
\xymatrix{
& & & & & & X \ar[dllllll]|-{f_0} \ar[dlllll]|-{f_1} \ar@{.>}[dllll] \ar[dlll]|-{f_k} \ar@{.>}[dll] \ar[dl]|-{f_{i-1}} \ar[dr]|-{\color{red}{f_i}}\\
Y_0 & \ar[l]^{g_0} Y_1 & \ar@{.>}[l] \cdots & \ar[l]^{g_{k-1}} Y_k & \ar[l]^{g_k} \cdots & \ar[l]^{g_{i-2}} Y_{i-1} & & \ar[ll]^{\color{red}{g_{i-1}}} \uncover<2->{\color{red}{Y_i}}
}
\end{frame}

\end{document}

在此处输入图片描述

相关内容