问题:
在我幻灯片中,当您编译时,我们可以看到页脚中有三个部分(名称、标题、日期和页码)。我的问题是,我们可以将标题从页脚移到页眉吗(页眉已经是空白的,有 2 种颜色组合)?
我的第二个问题是,我们能否实现尾线和头线的单一颜色?
梅威瑟:
\documentclass{beamer}
\usepackage{xcolor}
\usetheme{CambridgeUS}
\usecolortheme{default}
\usefonttheme{professionalfonts} % using non standard fonts for beamer
\usefonttheme{serif} % default family is serif
%title
\author{Mr. X. Y. Z.}
\title{My Title}
\date{\today}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
\begin{frame}[t]{ABC}
In this slide, i will write text related this title.
\[\dfrac{\partial y}{\partial x}=0\]
\end{frame}
\end{document}
答案1
您可以使用该hackthefootline
包来配置哪些信息应该包含在您的脚注中以及哪些信息应该被删除:
\documentclass{beamer}
\usepackage{xcolor}
\usetheme{CambridgeUS}
\usecolortheme{default}
\usefonttheme{professionalfonts} % using non standard fonts for beamer
\usefonttheme{serif} % default family is serif
%title
\author{Mr. X. Y. Z.}
\title{My Title}
\date{\today}
\usepackage[onecol]{hackthefootline}
\htfconfig{%
authinst=onlyauthor,
date=long,
framenrs=fraction,
title=none
}
\setbeamertemplate{headline}
{%
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=2.65ex,dp=1.5ex,left,leftskip=1em]{section in head/foot}%
\usebeamerfont{section in head/foot}\inserttitle
\end{beamercolorbox}}%
\vskip0pt%
}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
\begin{frame}[t]{ABC}
In this slide, i will write text related this title.
\[\dfrac{\partial y}{\partial x}=0\]
\end{frame}
\end{document}