如何在 metropolis/mtheme 中的 beamer 幻灯片末尾插入水平条作为脚注?

如何在 metropolis/mtheme 中的 beamer 幻灯片末尾插入水平条作为脚注?

在 beamer 幻灯片中,使用 mtheme/都会主题,很难在幻灯片底部创建一个小的水平条来显示作者姓名或为每张幻灯片插入一些不同的文本。

答案是存在的这里。但是页码是从标题页开始的。如何让页码从标题页后的幻灯片开始?如果能够在脚注周围创建一个条或某个框,那就太好了。许多不同的主题默认都存在这样的条,例如 Beamer 的马德里主题。

答案1

基于https://tex.stackexchange.com/a/388811/36296

\documentclass{beamer}

\usetheme{moloch}% modern fork of the metropolis theme

\author{names}
\title{text}


\makeatletter
\def\beamer@autobreakframebox{%
  \global\setbox\beamer@splitbox=\box\voidb@x%
  \ifbeamer@autobreak%
    % Ok, frame was overful -> split it!
    \setbox\@tempboxa=\vsplit\beamer@framebox to\beamer@autobreakfactor\textheight%
    \global\setbox\beamer@splitbox=\box\beamer@framebox%
    \@tempdima=\ht\beamer@splitbox%
    \ifdim\@tempdima<\beamer@autobreaklastheight%
      \global\beamer@autobreaklastheight=\@tempdima\relax%
    \else%
      \setbox\@tempboxa=\vbox{\unvbox\@tempboxa\unvbox\beamer@splitbox}%
      \global\setbox\beamer@splitbox=\box\voidb@x%
    \fi%
    \setbox\beamer@framebox=\vbox to\textheight{\unvbox\@tempboxa%
      \vskip\beamer@framebottomskipautobreak%
      \ifvoid\beamer@splitbox%
              \begin{beamercolorbox}[wd=\paperwidth,left]{footnote}
                    \usebeamerfont{footnote}%   
                    \ifvoid\beamer@footins%
                        \vskip\baselineskip%
                    \else%
                        \unvbox \beamer@footins%
                        \global\setbox\beamer@footins=\box\voidb@x%
                    \fi%
                    
                    \vskip-1.4\baselineskip%
                    \hspace{.5\paperwidth}%
                \parbox{.48\paperwidth}{%
                    \usebeamerfont{footnote}\strut\insertshortauthor\hfill\insertframenumber\quad%
                }%
              \end{beamercolorbox}%
      \fi%
      \beamer@exitcode%
    }%
  \else%
    \setbox\beamer@framebox=\vbox to\textheight{\unvbox\beamer@framebox%
      \vskip\beamer@framebottomskip%
              \begin{beamercolorbox}[wd=\paperwidth,left]{footnote}
                    \usebeamerfont{footnote}%   
                    \ifvoid\beamer@footins%
                        \vskip\baselineskip%
                    \else%
                        \unvbox \beamer@footins%
                        \global\setbox\beamer@footins=\box\voidb@x%
                    \fi%
                    
                    \vskip-1.4\baselineskip%
                    \hspace{.5\paperwidth}%
                \parbox{.48\paperwidth}{%
                    \usebeamerfont{footnote}\strut\insertshortauthor\hfill\insertframenumber\quad%
                }%
              \end{beamercolorbox}%
      \beamer@exitcode}%
    \global\setbox\beamer@footins=\box\voidb@x%
  \fi%
  }
\makeatother

\setbeamerfont{footnote}{size=\scriptsize}
\setbeamertemplate{footline}{}
\setbeamercolor{footnote}{fg=white,bg=mDarkTeal}

\usepackage[style=authoryear]{biblatex}
\addbibresource{biblatex-examples.bib}

\begin{document}

\begin{frame}[plain,noframenumbering]
    \titlepage
\end{frame} 

\begin{frame}
   test
\end{frame} 

\begin{frame}
   test\footcite{bertram}
   
   text\footcite{angenendt}
\end{frame} 

\begin{frame}
    text\footcite{angenendt}
\end{frame} 

\begin{frame}
\printbibliography
\end{frame}

\end{document}

在此处输入图片描述

相关内容