如何在 beamer 中制作这个自定义页脚?

如何在 beamer 中制作这个自定义页脚?

我想在 Beamer 中创建类似这样的自定义页脚?我该如何操作并将其设置为所有或部分幻灯片?

自定义页脚

我想使用斯德哥尔摩投影仪主题(关联) 但我不喜欢这个页脚,所以我想将其更改为这个。

非常感谢您的帮助 !

答案1

如下所示(根据您的需要调整设置):

\documentclass[compress]{beamer}
\usetheme{sthlm}

\usepackage{
booktabs,
datetime,
dtklogos,
multicol,
pgfplots,
ragged2e,
tabularx,
tikz,
wasysym
}

\pgfplotsset{compat=1.8}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{newpxtext,newpxmath}

\usetikzlibrary{
backgrounds,
mindmap
}

\setbeameroption{show notes}

\title{The title}
\subtitle{The subtitle}
\date{\today}
\author{The Author}
\institute{The Institute}

\hypersetup{
pdfauthor = {Mark H. Olson: [email protected]},      
pdfsubject = {Mathematics, },
pdfkeywords = {},  
pdfmoddate= {D:\pdfdate},          
pdfcreator = {WriteLaTeX}
}

\definecolor{footcolor1}{RGB}{10,169,220}
\definecolor{footcolor2}{RGB}{161,229,78}
\definecolor{footcolor3}{RGB}{255,205,0}
\definecolor{footcolor4}{RGB}{182,232,230}
\definecolor{footcolor5}{RGB}{193,239,155}

\setbeamercolor{box1}{fg=black,bg=footcolor1}
\setbeamercolor{box2}{fg=black,bg=footcolor2}
\setbeamercolor{box3}{fg=black,bg=footcolor3}
\setbeamercolor{box4}{fg=black,bg=footcolor4}
\setbeamercolor{box5}{fg=black,bg=footcolor5}

\defbeamertemplate*{footline}{mytheme}{
\leavevmode
\begin{beamercolorbox}[wd=.15\paperwidth,sep=1em]{box1}
\usebeamercolor{author in head/foot}\insertframenumber
\end{beamercolorbox}\hfill%
\begin{beamercolorbox}[wd=.12\paperwidth,sep=1em]{box2}
\phantom{A}
\end{beamercolorbox}\hfill%
\begin{beamercolorbox}[wd=.12\paperwidth,sep=1em]{box3}
\phantom{A}
\end{beamercolorbox}\hfill%
\begin{beamercolorbox}[wd=.12\paperwidth,sep=1em]{box4}
\phantom{A}
\end{beamercolorbox}\hfill%
\begin{beamercolorbox}[wd=.4\paperwidth,sep=1em]{box5}
\hfill\usebeamercolor{author in head/foot}\insertshorttitle
\end{beamercolorbox}%
}

\begin{document}

\maketitle

\section{Background}

\begin{frame}
\frametitle{A test frame}
Some test text
\begin{block}{A test block}
\begin{itemize}
  \item point 1
  \item point 2
\end{itemize}
\end{block}
\end{frame}

\end{document}

结果:

在此处输入图片描述

当然,您可以将此脚注与您喜欢的任何主题一起使用;您只需要添加定义footline

\definecolor{footcolor1}{RGB}{10,169,220}
\definecolor{footcolor2}{RGB}{161,229,78}
\definecolor{footcolor3}{RGB}{255,205,0}
\definecolor{footcolor4}{RGB}{182,232,230}
\definecolor{footcolor5}{RGB}{193,239,155}

\setbeamercolor{box1}{fg=black,bg=footcolor1}
\setbeamercolor{box2}{fg=black,bg=footcolor2}
\setbeamercolor{box3}{fg=black,bg=footcolor3}
\setbeamercolor{box4}{fg=black,bg=footcolor4}
\setbeamercolor{box5}{fg=black,bg=footcolor5}

\defbeamertemplate*{footline}{mytheme}{
\leavevmode
\begin{beamercolorbox}[wd=.15\paperwidth,sep=1em]{box1}
\usebeamercolor{author in head/foot}\insertframenumber
\end{beamercolorbox}\hfill%
\begin{beamercolorbox}[wd=.12\paperwidth,sep=1em]{box2}
\phantom{A}
\end{beamercolorbox}\hfill%
\begin{beamercolorbox}[wd=.12\paperwidth,sep=1em]{box3}
\phantom{A}
\end{beamercolorbox}\hfill%
\begin{beamercolorbox}[wd=.12\paperwidth,sep=1em]{box4}
\phantom{A}
\end{beamercolorbox}\hfill%
\begin{beamercolorbox}[wd=.4\paperwidth,sep=1em]{box5}
\hfill\usebeamercolor{author in head/foot}\insertshorttitle
\end{beamercolorbox}%
}

相关内容