主要代码如下:
\begin{frame}
\frametitle{Householder Transformation}
\begin{equation}
%\onslide<1->
\mathop{
\begin{pmatrix}
\times & \times &\times \\
\times & \times &\times \\
\times & \times &\times \\
\times & \times &\times
\end{pmatrix}
}_{A}
%\onslide<2->
\xrightarrow{(1:4,1:3)}
\mathop{
\begin{pmatrix}
\mythickertimes & \mythickertimes & \mythickertimes \\
\boldsymbol{0} & \mythickertimes & \mythickertimes \\
\boldsymbol{0} & \mythickertimes & \mythickertimes \\
\boldsymbol{0} & \mythickertimes & \mythickertimes
\end{pmatrix}
}_{Q_{1}A}
%\onslide<3->
\xrightarrow{(2:4,2:3)}
\begin{split}
\mathop{
\begin{pmatrix}
\times & \times & \times \\
0 & \mythickertimes & \mythickertimes \\
0 & \boldsymbol{0} & \mythickertimes \\
0 & \boldsymbol{0} & \mythickertimes
\end{pmatrix}
}_{Q_{1}A}
%\onslide<4->
\xrightarrow{(3:4,3:3)}
\mathop{
\begin{pmatrix}
\times & \times & \times \\
0 & \times & \times \\
0 & 0 & \mythickertimes \\
0 & 0 & \boldsymbol{0}
\end{pmatrix}
}_{Q_{1}A}
%\onslide<5->
\xrightarrow{(2:4,2:3)}
R.
\end{split}
\end{equation}
\end{frame}
新的 \mythickertimes 定义如下:
\usepackage{tikz}
\usetikzlibrary{shapes.misc}
\newcommand{\mythickertimes}{ \tikz[baseline=-.55ex] \node [inner sep=0pt,cross out,draw,line width=1pt,minimum size=1ex] (a) {};}
拧紧效果如下图所示:
我怎样才能得到这样的等式:
答案1
使用以下提供的任何可换行的显示数学环境amsmath
。下面我使用了,但您也alignat
可以使用gather
或:align
\documentclass{beamer}
\usepackage{amsmath,amssymb}
\newcommand{\mythickertimes}{\boldsymbol{\times}}
\begin{document}
\begin{frame}
\frametitle{Householder Transformation}
\begin{alignat*}{3}
\underset{A}{\begin{pmatrix}
\times & \times & \times \\
\times & \times & \times \\
\times & \times & \times \\
\times & \times & \times
\end{pmatrix}}
& \xrightarrow{(1:4,1:3)} &
\underset{Q_1 A}{\begin{pmatrix}
\mythickertimes & \mythickertimes & \mythickertimes \\
\boldsymbol{0} & \mythickertimes & \mythickertimes \\
\boldsymbol{0} & \mythickertimes & \mythickertimes \\
\boldsymbol{0} & \mythickertimes & \mythickertimes
\end{pmatrix}}
& \xrightarrow{(2:4,2:3)} \\
\underset{Q_1 A}{\begin{pmatrix}
\times & \times & \times \\
0 & \mythickertimes & \mythickertimes \\
0 & \boldsymbol{0} & \mythickertimes \\
0 & \boldsymbol{0} & \mythickertimes
\end{pmatrix}}
& \xrightarrow{(3:4,3:3)} &
\underset{Q_1 A}{\begin{pmatrix}
\times & \times & \times \\
0 & \times & \times \\
0 & 0 & \mythickertimes \\
0 & 0 & \boldsymbol{0}
\end{pmatrix}}
& \xrightarrow{(2:4,2:3)}
R.
\end{alignat*}
\end{frame}
\end{document}
要使用覆盖按顺序显示矩阵操作,您可以使用\onslide
:请注意,您必须为环境中的每个单元单独指定覆盖alignat
:
\documentclass{beamer}
\usepackage{amsmath,amssymb}
\newcommand{\mythickertimes}{\boldsymbol{\times}}
\begin{document}
\begin{frame}
\frametitle{Householder Transformation}
\begin{alignat*}{3}
\underset{A}{\begin{pmatrix}
\times & \times &\times \\
\times & \times &\times \\
\times & \times &\times \\
\times & \times &\times
\end{pmatrix}}
& \onslide<2->{\xrightarrow{(1:4,1:3)} &
\underset{Q_1 A}{\begin{pmatrix}
\mythickertimes & \mythickertimes & \mythickertimes \\
\boldsymbol{0} & \mythickertimes & \mythickertimes \\
\boldsymbol{0} & \mythickertimes & \mythickertimes \\
\boldsymbol{0} & \mythickertimes & \mythickertimes
\end{pmatrix}}}
& \onslide<3->{\xrightarrow{(2:4,2:3)} \\
\underset{Q_1 A}{\begin{pmatrix}
\times & \times & \times \\
0 & \mythickertimes & \mythickertimes \\
0 & \boldsymbol{0} & \mythickertimes \\
0 & \boldsymbol{0} & \mythickertimes
\end{pmatrix}}}
& \onslide<4->{\xrightarrow{(3:4,3:3)} &
\underset{Q_1 A}{\begin{pmatrix}
\times & \times & \times \\
0 & \times & \times \\
0 & 0 & \mythickertimes \\
0 & 0 & \boldsymbol{0}
\end{pmatrix}}}
& \onslide<5->{\xrightarrow{(2:4,2:3)}
R.}
\end{alignat*}
\end{frame}
\end{document}