在此代码中
\documentclass{beamer}
\logo{\raisebox{-2cm}{\includegraphics[width=1cm]{example-image-a}}}
\setbeamertemplate{footline}{
\begin{beamercolorbox}[wd = 1.0\paperwidth, ht = 2.25ex, dp = 1ex, center]{author in head/foot}
This is footline
\end{beamercolorbox}
}
\begin{document}
\begin{frame}{Title}
Frame Contents
\end{frame}
\end{document}
我尝试使用负值来\raisebox
强制将徽标置于脚线区域内。
结果是
我尝试将徽标放在脚线区域内,但没有成功。如何破解(除了将徽标直接插入脚线外)?
答案1
那么 tikz 覆盖怎么样?
编辑:修复了每一帧都“工作”的问题:
最后编辑:mshow
变量必须为 1 才能显示徽标,否则将不显示其他整数
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{positioning}
%\logo{\raisebox{-2cm}{\includegraphics[width=1cm]{example-image-a}}}
\setbeamertemplate{footline}{
\begin{beamercolorbox}[wd = 1.0\paperwidth, ht = 2.25ex, dp = 1ex, center]{author in head/foot}
This is footline
\end{beamercolorbox}
}
\xdef\mshow{0}
\def\showlogo{\ifnum\mshow=1 \begin{tikzpicture}[remember picture,overlay]
\node at ([yshift=0.2cm,xshift=-0.25cm]current page.south east){\includegraphics[width=0.5cm]{example-image-a}};
\end{tikzpicture}\fi}
\let\oldbeginframe\frame
\renewenvironment{frame}[1][ ]{\oldbeginframe{#1}\bgroup\showlogo}{\egroup}
\begin{document}
\begin{frame}{Title}
Frame Contents
\end{frame}
\xdef\mshow{1}
\begin{frame}{Title2}
Frame 2
\end{frame}
\begin{frame}{Title3}
Frame 3
\end{frame}
\end{document}
答案2
如果您不关心脚注符号并且不修改(无论出于何种原因脚注),那么有一个肮脏的解决方案(我不推荐)。
\documentclass{beamer}
\usepackage{eso-pic}
\AddToShipoutPictureFG{% Add picture to background of every page
\AtPageLowerLeft{\hspace*{\paperwidth}\hspace*{-1cm}\includegraphics[width=1cm]{example-image-a}
}}
\setbeamertemplate{footline}{
\begin{beamercolorbox}[wd = 1.0\paperwidth, ht = 2.25ex, dp = 1ex, center]{author in head/foot}
This is footline
\end{beamercolorbox}
}
\begin{document}
\begin{frame}{Title}
Frame Contents
\end{frame}
\end{document}