\文档类[11pt]{beamer} \使用包{tikz} \usetikzlibrary{arrows.meta,calc,matrix,覆盖-相机样式,定位} \newcommand\Circle[1]{% \tikz[基线=(char.base)]\node[圆,画,内部sep=2pt](char){1};} \tikzset{circled/.style={路径图片={ \绘制let \p1=($(路径图片边界框.东北)-(路径图片边框 box.south west)$),\n1={min(\x1,\y1)/2.2}英寸 (路径图片边界框.中心)圆[半径=\n1];}}, 圈出在/上。样式={alt=#1{圈出}{}}} \开始{文档} \开始{帧}[易碎,t] \框架标题{ \仅<1-2>{标题?} } \开始{居中} \开始{tikzpicture} \矩阵(m)[节点矩阵, 节点={绘制,最小尺寸=8mm}, 立柱间距=3mm, 行间距=2mm, 第7行/.style={visible-on=<2>}, 行1/.style={nodes={draw=none}}](mat) { 0&1&2&3&4 \\[-3mm] 6 & 2 & 4 & 4 & 5 \\ |[在<2>|8&4&|[在<{2}>]|5&6&|[在<2>|6上圈出\\ 7 & 5 & 2 & 7 & 5 \\ 6 & 5 & 1 & 6 & 5 \\ 5&|[圈出=<2>]|9&0&2&4\\ 8 & 9 & 5 & 7 & 6 \\ }; \路径(mat-6-1.南)--(mat-7-1.北)坐标[中途](辅助); \绘制[可见位置=<2>](mat.west|-aux)--(mat.east|-auth); \节点[右侧=1.5cm的mat-7-5.east,在=<2>](标签){最大柱}; \绘制[->,厚,可见于=<2>](label.west)--++(-1,0); \结束{tikzpicture} \结束{中心} \结束{帧} \结束{文档}
-
另请参见 pgfinterruptbounding框 . – 约翰·科尔米洛 5月17日23:32
1答案
\文档类[11pt]{beamer} \使用包{tikz} \usetikzlibrary{arrows.meta,calc,matrix,覆盖-相机样式,定位} \tikzset{circled/.style={路径图片={ \绘制let \p1=($(路径图片边界框.东北)-(路径图片边框 box.south west)$),\n1={min(\x1,\y1)/2.2}英寸 (路径图片边界框.中心)圆[半径=\n1];}}, 圈出在/上。样式={alt=#1{圈出}{}}} \开始{文档} \开始{帧}[易碎,t] \框架标题{标题?} \开始{居中} \开始{tikzpicture} \矩阵(m)[节点矩阵, 节点={绘制,最小尺寸=8mm}, 立柱间距=3mm, 行间距=2mm, 第7行/.style={visible-on=<2>}, 第1/.style={nodes={draw=none}}]行(垫子) { 0&1&2&3&4\\[-3mm] 6 & 2 & 4 & 4 & 5 \\ |[circled on=<2>]|8&4&|[circleted on=<{2}>]|5&6&|[circled on=<2>]|6\\ 7 & 5 & 2 & 7 & 5 \\ 6 & 5 & 1 & 6 & 5 \\ 5&|[圈出=<2>]|9&0&2&4\\ 8 & 9 & 5 & 7 & 6 \\ }; \路径(mat-6-1.南)--(mat-7-1.北)坐标[中途](辅助); \绘制[可见位置=<2>](mat.west|-aux)--(mat.east|-auth); \节点[重叠,右侧=1.5cm的mat-7-5.east,可见于=<2>,对齐=左侧](标签){Column\\maxima}; \绘制[overlay,->,thick,visible on=<2>](label.west)--++(-1,0); \结束{tikzpicture} \结束{中心} \结束{帧} \结束{文档}
-
1 -