Beamer:垂直对齐问题,元素未居中

Beamer:垂直对齐问题,元素未居中

我有一个与下面 MWE 中的布局类似的布局,我对框架内容在顶部留下的空间以及在底部留下的空间感到困惑......有没有办法让内容居中?

梅威瑟:

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{positioning,calc}
\setbeamertemplate{navigation symbols}{}

\mode<presentation> {
    \usetheme{Dresden}
}

\begin{document}

\section{some section}
\begin{frame}[c]
    \begin{tikzpicture}[remember picture, every node/.style={inner sep=0,outer sep=0,align=left}]

    \node[anchor=west] (A) at (0,0) {\includegraphics[width=2.5cm, height=1cm]{example-image}};
    \node[right=0.75cm of A.east, anchor=west] (B) {{\Large \textbf{\alert{2007}}}};
    \node [right=0.75cm of B.east, anchor=west] (C) {Some text here in\\a couple of lines};

    \node [below=0.25cm of A.south, anchor=north] (D) {\includegraphics[width=2.5cm, height=1cm]{example-image}};
    \node [right=0.75cm of D.east, anchor=west, text width=6.5cm] (E) {More and more text here\\also in a couple of lines};
    \end{tikzpicture}
    \begin{center}
        \includegraphics[width=.6\linewidth, height=4.75cm]{example-image}
    \end{center}
\end{frame}

\end{document}

制作:

如图

答案1

环境center在末尾添加垂直空间,改用\centering

在此处输入图片描述

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{positioning,calc}
\setbeamertemplate{navigation symbols}{}

\mode<presentation> {
    \usetheme{Dresden}
}

\begin{document}

\section{some section}
\begin{frame}[c]
    \begin{tikzpicture}[remember picture, every node/.style={inner sep=0,outer sep=0,align=left}]

    \node[anchor=west] (A) at (0,0) {\includegraphics[width=2.5cm, height=1cm]{example-image}};
    \node[right=0.75cm of A.east, anchor=west] (B) {{\Large \textbf{\alert{2007}}}};
    \node [right=0.75cm of B.east, anchor=west] (C) {Some text here in\\a couple of lines};

    \node [below=0.25cm of A.south, anchor=north] (D) {\includegraphics[width=2.5cm, height=1cm]{example-image}};
    \node [right=0.75cm of D.east, anchor=west, text width=6.5cm] (E) {More and more text here\\also in a couple of lines};
    \end{tikzpicture}

\bigskip

\centering
        \includegraphics[width=.6\linewidth, height=4.75cm]{example-image}

\end{frame}

\end{document}

相关内容