![Beamer:垂直對齊問題,元素未居中](https://rvso.com/image/348630/Beamer%EF%BC%9A%E5%9E%82%E7%9B%B4%E5%B0%8D%E9%BD%8A%E5%95%8F%E9%A1%8C%EF%BC%8C%E5%85%83%E7%B4%A0%E6%9C%AA%E5%B1%85%E4%B8%AD.png)
我有一個類似於下面 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}