我想修改 CambridgeUS 主题以保持相同的颜色,但通过更改页脚的配置如下:标题/页码带有“--”而不是“/”和副标题。
对于标题页,我想删除页眉和页脚,因为只需使用简单的 \thispagestyle{empty} 即可完成。
还有两件事:我怎样才能将文档的左右边距调整得更窄一些?怎样才能不设置阴影块,但提供下图中相同的阴影块?(如果这样做很简单,请使用剑桥主题和百合色……)。非常感谢!
\documentclass{beamer}
\mode<presentation> {
\usetheme{CambridgeUS}
\usecolortheme{lily}
\useinnertheme{circles} % rectangles, circles, inmargin, rounded
}
\setbeamertemplate{blocks}[rounded][shadow=true]
\usepackage{lmodern} % latin modern font
\usepackage{cmbright} % computer modern font sans serif
\usepackage{graphicx} % Allows including images
\usepackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables
\usepackage{appendixnumberbeamer} % Number for appendix numbers
\usepackage{amsmath}
\usepackage{ragged2e} % \justifying to justify the text
\addtobeamertemplate{block begin}{}{\justifying}
\usepackage{hyperref} % Generate hyperlinks in the final pdf
% CREATE HYPERLINKS
\hypersetup{
%bookmarks=true, % show bookmarks bar?
unicode=false, % non-Latin characters in Acrobat’s bookmarks
pdftoolbar=true, % show Acrobat’s toolbar?
pdfmenubar=true, % show Acrobat’s menu?
pdffitwindow=false, % window fit to page when opened
pdfstartview={FitH}, % fits the width of the page to the window
%pdftitle={My title}, % title
%pdfauthor={Author}, % author
%pdfsubject={Subject}, % subject of the document
%pdfcreator={Creator}, % creator of the document
%pdfproducer={Producer}, % producer of the document
%pdfkeywords={keyword1} {key2}, % list of keywords
%pdfnewwindow=true, % links in new window
colorlinks=true, % false: boxed links; true: colored links
linkcolor=black, % color of internal links (change box color with linkbordercolor)
citecolor=green, % color of links to bibliography
filecolor=magenta, % color of file links
urlcolor=red % color of external links
}
% gets rid of bottom navigation bars
%\setbeamertemplate{footline}[page number]{}
% gets rid of navigation symbols
\setbeamertemplate{navigation symbols}{}
% add figures numbering
\setbeamertemplate{caption}[numbered]
%\setbeamerfont{frametitle}{family=\bfseries}
% Display content for long talk
%\setbeamerfont{myTOC}{series=\bfseries,size=\normalfont}
%\AtBeginSection[]{\frame{\frametitle{Outline}
%\usebeamerfont{myTOC}\tableofcontents[current]}}
%\setbeamertemplate{headline}{}
\setcounter{tocdepth}{1} % in the table of contents
\setcounter{secnumdepth}{2} % with a number
\title[SCI Communication]{Serial Communication Interface Evaluation} % The short title appears at the bottom of every slide, the full title is only on the title page
\subtitle{EE-491(a): Project in Electrical Energy Systems}
\author{Antoine Giraldi} % Your name
\institute[EPFL] % Your institution as it will appear on the bottom of every slide, may be shorthand to save space
{Power Electronics Laboratory, EPFL
% \inst{1}%
% EPFL %\\ % Your institution for the title page
% \and
% \inst{2}%
% Power Electronics Laboratory
%\bigskip
%\textit{Power Electronics Laboratory} % Your email address
}
\date{\today} % Date, can be changed to a custom date
\begin{document}
%------------------------------------------------
\begin{frame}
\titlepage % Print the title page as the first slide
\end{frame}
\section[Technical Approach]{Technical Approach}
%------------------------------------------------
\begin{frame}
\frametitle{Simulink implementation}
\end{frame}
\end{document}
答案1
以下是 CambridgeUS 使用的脚线定义(来自文件beamerouterthemeinfolines.sty
):
\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%
}
显然,/
您要替换的就在行上\insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
。
至于标题页,您可以使用它\begin{frame}[plain]
来获取一个空白的标题页。
以下是重新定义脚线的 MWE:
\documentclass{beamer}
\mode<presentation> {
\usetheme{CambridgeUS}
\usecolortheme{lily}
\useinnertheme{circles} % rectangles, circles, inmargin, rounded
}
\setbeamertemplate{blocks}[rounded][shadow=true]
\makeatletter
\setbeamertemplate{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%
}
\makeatother
% gets rid of navigation symbols
\setbeamertemplate{navigation symbols}{}
% add figures numbering
\setbeamertemplate{caption}[numbered]
\setcounter{tocdepth}{1} % in the table of contents
\setcounter{secnumdepth}{2} % with a number
\title[SCI Communication]{Serial Communication Interface Evaluation} % The short title appears at the bottom of every slide, the full title is only on the title page
\subtitle{EE-491(a): Project in Electrical Energy Systems}
\author{Antoine Giraldi} % Your name
\institute[EPFL] % Your institution as it will appear on the bottom of every slide, may be shorthand to save space
{Power Electronics Laboratory, EPFL
% \inst{1}%
% EPFL %\\ % Your institution for the title page
% \and
% \inst{2}%
% Power Electronics Laboratory
%\bigskip
%\textit{Power Electronics Laboratory} % Your email address
}
\date{\today} % Date, can be changed to a custom date
\begin{document}
%------------------------------------------------
\begin{frame}[plain]
\titlepage % Print the title page as the first slide
\end{frame}
\section[Technical Approach]{Technical Approach}
%------------------------------------------------
\begin{frame}
\frametitle{Simulink implementation}
\end{frame}
\end{document}
结果如下:
您可以更改\setbeamertemplate{blocks}[rounded][shadow=true]
块的外观并使用\setbeamersize{text margin left=0pt,text margin right=0pt}
来更改文本边距。
如果您有任何疑问请告诉我!
答案2
感谢您查看我放在您想要的地方...
\documentclass{beamer}
\mode<presentation> {
\usetheme{CambridgeUS}
%\usecolortheme{dove} % simple gray
\usecolortheme{lily}
\useinnertheme{circles} % rectangles, circles, inmargin, rounded
}
\setbeamertemplate{blocks}[rounded][shadow=false]
\setbeamercolor{section in head/foot}{fg=white}
% % % MY THEME % % %
\makeatletter % and \makeatother are programming commands to make @ a command instead of a letter, sort of
\setbeamertemplate{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%
}
\makeatother
% % % MY THEME % % %