![如何设置 beamer 中可见的 frametitle 下的字幕框?](https://linux22.com/image/462075/%E5%A6%82%E4%BD%95%E8%AE%BE%E7%BD%AE%20beamer%20%E4%B8%AD%E5%8F%AF%E8%A7%81%E7%9A%84%20frametitle%20%E4%B8%8B%E7%9A%84%E5%AD%97%E5%B9%95%E6%A1%86%EF%BC%9F.png)
我在用这种定制的投影机风格
但它需要一点修改才能正常工作。当我们没有框架的字幕时,它是可以的
\begin{frame}{Introduction}%{My Title}
some text about Latex
\end{frame}
但在字幕模式下,字幕框成为定义圆的基线,然后向下跳跃一点。
\begin{frame}{Introduction}{My Title}
some text about Latex
\end{frame}
为此,我想将字幕框设置为可见,即使它是空的。另一个解决方案是不使用字幕。
\documentclass{beamer}
\definecolor{devryblue}{RGB}{5, 51, 92}
\makeatletter
\colorlet{beamer@blendedblue}{devryblue}
\makeatother
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetheme{Madrid}
\usepackage{default}
\addtobeamertemplate{frametitle}{}{%
\begin{tikzpicture}[remember picture,overlay]
\fill[devryblue] (10.8,0.6) circle (.9cm);
\clip (10.8,0.6) circle (.75cm);
\node at (10.8,0.6) {\includegraphics[width=2.1cm]{example-image}};
\end{tikzpicture}}
\begin{document}
\section{title}
\begin{frame}
\frametitle{title}
\tableofcontents
\end{frame}
答案1
您可以通过根据页面定位徽标来避免徽标可能出现的跳跃:
\documentclass{beamer}
\definecolor{devryblue}{RGB}{5, 51, 92}
\makeatletter
\colorlet{beamer@blendedblue}{devryblue}
\makeatother
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetheme{Madrid}
%\usepackage{default}
\addtobeamertemplate{frametitle}{}{%
\begin{tikzpicture}[remember picture,overlay]
\coordinate (logo) at ([xshift=-1.5cm,yshift=-1cm]current page.north east);
\fill[devryblue] (logo) circle (.9cm);
\clip (logo) circle (.75cm);
\node at (logo) {\includegraphics[width=2.1cm]{example-image}};
\end{tikzpicture}}
\begin{document}
\section{title}
\begin{frame}
\frametitle{title}
\tableofcontents
\end{frame}
\begin{frame}
\frametitle{title}
\framesubtitle{My Title}
some text about Latex
\end{frame}
\end{document}