我经常使用 Beamer(特别是马德里主题)。有时,我的“标题”很长。Beamer 将此标题放在底部,但当标题太长时,它会将其截断。我真的很想知道如何增加底部中间矩形页脚的大小。
以下是代码(抱歉,所有的包和命令都在这里):
\documentclass[t]{beamer} %Add "mathserif" to script math lettering. "t" places all text to start at the top of each slide
\usetheme{Madrid}
%Packages
\usepackage{amsmath} %Math mode
\usepackage{amssymb} %Math mode
\usepackage{commath}
\usepackage{graphicx} %Including pictures
\usepackage{color} %Define colours
\usepackage{setspace} %Enables double-spacing/variable spacing
\usepackage{pgfplots} %Draw graphs
\usepackage{upgreek} %Insert theta symbol as unitalicized
\usepackage[version=3]{mhchem} %Chemistry equation mode \ce{}
\usepackage[export]{adjustbox} %Place black borders around images
\usepackage{scrextend} %Used to change font size
\usepackage{caption} %Used to utilize * in caption function
\usepackage{subfig} %Used to place figures side-by-side with sub-captions
\usepackage{siunitx} %SI Units (+ scientific notation)
\usepackage{cancel}
\usepackage{fancybox}
%\usepackage{enumitem} %Making lists
%\usepackage[english]{babel} %Lists with letters
%Erases Beamer Navigation Symbols on the bottom left
\setbeamertemplate{navigation symbols}{}
%\setbeamertemplate{footline}{}
\captionsetup[subfigure]{labelformat=empty}
%Defined Colours
\definecolor{orangered}{RGB}{255,69,0}
\definecolor{darkgreen}{RGB}{0,100,0}
\definecolor{firebrick}{RGB}{178, 34, 34}
\definecolor{navy}{RGB}{0,0,128}
\definecolor{lightsteelblue}{RGB}{176,196,222}
\definecolor{steelblue}{RGB}{70,130,180}
\definecolor{darkslateblue}{RGB}{72, 61, 139}
\definecolor{forestgreen}{RGB}{34, 139, 34}
\definecolor{Gold}{RGB}{218,165,32}
%Defined Colour Theme and List Sizing
\setbeamercolor{structure}{fg = Gold}
\setbeamertemplate{navigation symbols}{}
\setbeamerfont*{itemize/enumerate body}{size=\normalsize}
\setbeamerfont*{itemize/enumerate subbody}{parent=itemize/enumerate body}
\setbeamerfont*{itemize/enumerate subsubbody}{parent=itemize/enumerate body}
%Opening Title Page
\title{Chapter 7 - Absolute Value and Reciprocal Functions}
\subtitle{Section 7.3 - Absolute Value Equations}
\date{}
\begin{document}
%Slide 1
\maketitle
\end{document}
答案1
beamer 的 Madrid 主题中使用的 footline 模板取自 infolines 外部主题,由以下代码定义:
\defbeamertemplate*{footline}{infolines theme}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor\expandafter\beamer@ifempty\expandafter{\beamer@shortinstitute}{}{~~(\insertshortinstitute)}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
\usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
\insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
\end{beamercolorbox}}%
\vskip0pt%
}
有三个beamercolorbox
es,每个的宽度为 的三分之一\paperwidth
。如果您想修改框的宽度,您可以通过将此代码复制到文件中并更改参数来定义不同的模板wd
。您可以根据需要选择宽度,但应确保它们的总和等于\paperwidth
。此外,您必须将定义括在\makeatletter
和之间,\makeatother
因为@
在代码中使用了 。以下 MWE 给出了一个示例(其中已删除示例中未使用的包)。
\documentclass[t]{beamer}
\usetheme{Madrid}
\definecolor{Gold}{RGB}{218,165,32}
%Defined Colour Theme and List Sizing
\setbeamercolor{structure}{fg = Gold}
\setbeamertemplate{navigation symbols}{}
\makeatletter
\defbeamertemplate*{footline}{Dan P theme}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.2\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor\expandafter\beamer@ifempty\expandafter{\beamer@shortinstitute}{}{~~(\insertshortinstitute)}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.6\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.2\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
\usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
\insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
\end{beamercolorbox}}%
\vskip0pt%
}
\makeatother
%Opening Title Page
\title{Chapter 7 - Absolute Value and Reciprocal Functions}
\subtitle{Section 7.3 - Absolute Value Equations}
\date{}
\begin{document} %Slide 1
\maketitle
\end{document}