代码没有将最后一张图片(兔子 3)及其标签直接放置在第二张图片(兔子 2)下方。兔子 3 的图片及其标签被移动了。我该怎么做?谢谢!
\documentclass[9pt,handout,compress,rgb]{beamer}
\usepackage{amstext}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{tikz}
\begin{document}
\begin{frame}
{\bf Contributors}
\begin{center}
\begin{tikzpicture}[scale=.4]
\node[circle,draw=none, label={below:{\newline\bf Bunny 1}}, fill overzoom image={figures/bunny.png},inner sep=1cm] at (0,0) {};
\node[circle,draw=none, label={below:{\newline\bf Bunny 2}}, fill overzoom image={figures/bunny.png},inner sep=1cm] at (13,0) {};
\end{tikzpicture}
\end{center}
\begin{columns}
\begin{column}{0.5\textwidth}
\bluebf{The research was very important.}
\end{column}
\begin{column}{0.4\textwidth}
\begin{center}
\begin{tikzpicture}[scale=.4]
\node[circle,draw=none, label={below:{\newline\bf Bunny 3}}, fill overzoom image={figures/bunny.png},inner sep=1cm] at (13,0) {};
\end{tikzpicture}
\end{center}
\end{column}
\end{columns}
\end{frame}
\end{document}
答案1
如果您想要对齐图形,您可以columns
对两行使用类似的结构:
\documentclass[9pt,handout,compress,rgb]{beamer}
\usepackage{amstext}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{tikz}
\usepackage[most]{tcolorbox}
\begin{document}
\begin{frame}
{\bf Contributors}
\begin{columns}
\begin{column}{0.5\textwidth}
\centering
\begin{tikzpicture}[scale=.4]
\node[circle,draw=none, label={below:{\newline\bf Bunny 1}}, fill overzoom image={example-image-a},inner sep=1cm] at (0,0) {};
\end{tikzpicture}
\end{column}
\begin{column}{.4\textwidth}
\centering
\begin{tikzpicture}[scale=.4]
\node[circle,draw=none, label={below:{\newline\bf Bunny 2}}, fill overzoom image={example-image-b},inner sep=1cm] at (13,0) {};
\end{tikzpicture}
\end{column}
\end{columns}
\begin{columns}
\begin{column}{0.5\textwidth}
\centering
\textbf{The research was very important.}
\end{column}
\begin{column}{0.4\textwidth}
\centering
\begin{tikzpicture}[scale=.4]
\node[circle,draw=none, label={below:{\newline\bf Bunny 3}}, fill overzoom image={example-image-c},inner sep=1cm] at (13,0) {};
\end{tikzpicture}
\end{column}
\end{columns}
\end{frame}
\end{document}
答案2
tikzpicture
除了使用列之外,您还可以使用库将所有元素对齐到单个元素中positioning
。
\documentclass[9pt,handout,compress,rgb]{beamer}
\usepackage{amstext}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{tikz}
\usetikzlibrary{positioning}% added <<<<<<<<<<<
\usepackage[skins]{tcolorbox}% added <<<<<<<<<<<
\usepackage{graphicx}% added <<<<<<<<<<<
\begin{document}
\begin{frame}
\begin{center}
\begin{tikzpicture}[node distance=1.5cm]
\node(a)[circle,draw=none, label={below:{\newline\bfseries Bunny 1}}, fill overzoom image={example-image-a}, inner sep=1cm] {};
\node(b)[circle,draw=none, label={below:{\newline\bfseries Bunny 2}}, fill overzoom image={example-image-b}, inner sep=1cm, right = of a] {};
\node(c)[circle,draw=none, label={below:{\newline\bfseries Bunny 3}}, fill overzoom image={example-image-c}, inner sep=1cm, below = of b] {};
\node(x)[font=\bfseries, text=black,above left= of a] {Contributors};%
\node[font=\bfseries, text=blue, anchor= west] at (x.west|-c.center) {The research was very important.};
\end{tikzpicture}
\end{center}
\end{frame}
\end{document}