我正在创建一个自定义的beamer
框架“实际上”是简单的,带有侧边栏主题(PaloAlto
)。
经过:
frametitle
将的宽度设置为\paperwidth
而不是\paperwidth-\beamer@sidebarwidth
,- 利用
\newgeometry
,
我几乎成功了(“ right
”PaloAlto
也是如此),除了最后一个脚注行和页面底部之间的距离:它比普通(普通)框架更宽,如下面的 MCE 所示。
当然,我可以foot
在新的几何图形中使用该选项,但我无法弄清楚所涉及的精确尺寸。
因此问题是:在这个定制的beamer
普通框架中,如何使最后一个脚注行和页面底部之间的距离与普通(普通)框架相同?
\documentclass[t]{beamer}
\usepackage{xifthen}
\usepackage{multido}
\geometry{verbose}
\makeatletter
\newenvironment{myplainframe}[1][]{%
\ifthenelse{\isnamedefined{beamer@sidebarwidth}}{%
% Customize frametitle (changes from \defbeamertemplate*{frametitle}{sidebar
% theme} in `beamerouterthemesidebar.sty' flagged with `% <- !')
\setbeamertemplate{frametitle}
{%
\nointerlineskip%
\ifbeamer@plainframe%
\hbox{\usebeamercolor[bg]{frametitle}%
\@tempdima\paperwidth%\advance\@tempdima-\beamer@sidebarwidth % <- !
\hskip-\beamer@leftmargin\vrule height\beamer@headheight width\@tempdima\hskip-\beamer@rightmargin}%
\nointerlineskip%
\fi%
\vskip-\beamer@headheight%
\vbox to \beamer@headheight{%
\vfil
\leftskip=-\beamer@leftmargin%
\advance\leftskip by0.3cm%
\rightskip=-\beamer@rightmargin%
\advance\rightskip by0.3cm plus1fil%
{\usebeamercolor[fg]{frametitle}\usebeamerfont{frametitle}\insertframetitle\par}%
{\usebeamercolor[fg]{framesubtitle}\usebeamerfont{framesubtitle}\insertframesubtitle\par}%
\vbox{}%
\vskip-1em%
\vfil
}%
}%
% Customize the geometry (changes from options of geometry package in
% `beamer.cls' flagged with `% <- !')
\newgeometry{%
% hmargin=1cm,% <- !
vmargin=0cm,%
head=0.5cm,%
headsep=0pt,%
foot=0.5cm,%
textwidth=\textwidth+\beamer@sidebarwidth,% <- !
includeheadfoot,% <- !
}%
}{%
}%
%
\begin{frame}[plain,#1]%
}{%
\end{frame}%
\restoregeometry
}
\makeatother
\usetheme{PaloAlto}
% \usetheme[right]{PaloAlto}
\usecolortheme{seahorse}
\newcommand{\foo}[1]{%
\multido{\i=1+1}{#1}{%
\i~Foo
}%
}
\begin{document}
\begin{frame}[plain]
\frametitle{Default plain frame \alert{before} customization}
\foo{25}\footnote{\foo{25}}
\end{frame}
%
\begin{frame}
\frametitle{Default frame \alert{before} customization}
\foo{25}\footnote{\foo{25}}
\end{frame}
%
\begin{myplainframe}
\frametitle{Customized plain frame}
\foo{25}\footnote{\foo{25}}
\end{myplainframe}
%
\begin{frame}[plain]
\frametitle{Default plain frame \alert{after} customization}
\foo{25}\footnote{\foo{25}}
\end{frame}
%
\begin{frame}
\frametitle{Default frame \alert{after} customization}
\foo{25}\footnote{\foo{25}}
\end{frame}
\end{document}
答案1
合并https://tex.stackexchange.com/a/198224/36296和https://tex.stackexchange.com/a/113412/36296你可以简单地这样做:
\documentclass[t]{beamer}
\usepackage{xifthen}
\usepackage{multido}
\usetheme{PaloAlto}
% \usetheme[right]{PaloAlto}
\setbeamercolor{background canvas}{bg=yellow!50}
\usecolortheme{seahorse}
\newcommand{\foo}[1]{%
\multido{\i=1+1}{#1}{%
\i~Foo
}%
}
\makeatletter
\newenvironment{myplainframe}[1][]{%
\ifthenelse{\isnamedefined{beamer@sidebarwidth}}{%
% Customize frametitle (changes from \defbeamertemplate*{frametitle}{sidebar
% theme} in `beamerouterthemesidebar.sty' flagged with `% <- !')
\setbeamertemplate{frametitle}
{%
\nointerlineskip%
\ifbeamer@plainframe%
\hbox{\usebeamercolor[bg]{frametitle}%
\@tempdima\paperwidth%\advance\@tempdima-\beamer@sidebarwidth % <- !
\hskip-\beamer@leftmargin\vrule height\beamer@headheight width\@tempdima\hskip-\beamer@rightmargin}%
\nointerlineskip%
\fi%
\vskip-\beamer@headheight%
\vbox to \beamer@headheight{%
\vfil
\leftskip=-\beamer@leftmargin%
\advance\leftskip by0.3cm%
\rightskip=-\beamer@rightmargin%
\advance\rightskip by0.3cm plus1fil%
{\usebeamercolor[fg]{frametitle}\usebeamerfont{frametitle}\insertframetitle\par}%
{\usebeamercolor[fg]{framesubtitle}\usebeamerfont{framesubtitle}\insertframesubtitle\par}%
\vbox{}%
\vskip-1em%
\vfil
}%
}%
\setbeamertemplate{background canvas}
{%
\ifbeamercolorempty[bg]{background canvas}{}{\color{bg}\vrule width\dimexpr\paperwidth+\beamer@leftsidebar\relax height\paperheight}%
}
% Customize the geometry (changes from options of geometry package in
% `beamer.cls' flagged with `% <- !')
\hoffset=-\beamer@leftsidebar
\advance\textwidth\beamer@sidebarwidth
\hsize\textwidth
\columnwidth\textwidth
}{%
}%
%
\begin{frame}[plain,#1]%
}{%
\end{frame}%
}
\makeatother
\begin{document}
\begin{myplainframe}
\frametitle{Customized plain frame}
\foo{25}\footnote{\foo{25}}
\end{myplainframe}
\end{document}