我正在使用 Beamer(马德里主题),并在每个框架的右下角添加徽标,如下所示:
\addtobeamertemplate{frametitle}{}{
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=south east, yshift=.5cm] at (current page.south east) {\includegraphics[height=3cm]
{logo.png}};
\end{tikzpicture}}
现在文本与徽标重叠。有没有办法相应地控制幻灯片内容的宽度或在发生溢出时自动隐藏徽标?
答案1
您可以\setbeamersize{text margin right=1.75cm}
稍微增加右边距,为徽标留出足够的空间
\documentclass{beamer}
\usepackage{tikz}
\usepackage{lipsum}
\addtobeamertemplate{frametitle}{}{
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=south east, yshift=.5cm] at (current page.south east) {\includegraphics[height=3cm,width=1.5cm]{example-image-duck}};
\end{tikzpicture}}
\setbeamersize{text margin right=1.75cm}
\begin{document}
\begin{frame}
\frametitle{title}
\lipsum[1-2]
\end{frame}
\end{document}