在 Beamer 中更改 Uppsala 主题

在 Beamer 中更改 Uppsala 主题

我有以下 MWE

\documentclass{beamer}

% Theme
\mode<presentation>
\usetheme{Uppsala}
\setbeamertemplate{footline}{}
\usepackage[utf8]{inputenc}

% Graphics
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\pgfplotsset{compat=1.7}
\usepackage{subcaption}

% Math
\usepackage{amssymb, amsmath}
\newcommand{\bmf}[1]{\mbox{\boldmath$#1$}}
\usepackage{mathtools}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}

% Tables
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{threeparttable}
\usepackage{dcolumn}
\newcolumntype{d}{D{.}{.}{2.5}}

% Textboxes
\usepackage[absolute,overlay]{textpos}
\textblockcolour{white}

% Other
\usepackage{csquotes}
\usepackage{comment}

% Information for title page
\title{My Presentation}
\author{My name}
\date[]{My University}

% Titlepage
\begin{document}
\begin{frame}
\titlepage
\end{frame}


\section{Aim}


\begin{frame}{Aim}
\textbf{My Aim}
\begin{itemize}
\item This is what I want to do
\end{itemize}
\end{frame}

\end{document}

我想更改徽标,因为我想使此格式适应我的需求。我发现在标题页中包含大徽标的代码行位于文件“uu-all.tex”中。所以我可以更改它。但是,我不明白在侧边栏中生成徽标的命令在哪里。我检查了位于我的“main.tex”同一文件夹中的所有辅助文件。事实上,我确实有一个带有该徽标的文件在侧边栏中,但我将其从我正在处理的文件夹中排除。尽管如此,徽标仍然出现。我的问题:

  1. 侧边栏中包含徽标的命令位于哪里?
  2. 最后,我该如何更改侧边栏中的徽标?

以下是所有上述文件的链接。

关联

答案1

徽标的文件名在 中的标题定义中是硬编码的uu-main.tex。您可以通过重新定义标题来更改它(在以下代码中搜索注释<- change image here):

\documentclass{beamer}

% Theme
\mode<presentation>
\usetheme{Uppsala}
\setbeamertemplate{footline}{}
%\usepackage[utf8]{inputenc}

% Graphics
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\pgfplotsset{compat=1.7}
\usepackage{subcaption}

% Math
%\usepackage{amssymb, amsmath}
\newcommand{\bmf}[1]{\mbox{\boldmath$#1$}}
\usepackage{mathtools}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}

% Tables
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{threeparttable}
\usepackage{dcolumn}
\newcolumntype{d}{D{.}{.}{2.5}}

% Textboxes
\usepackage[absolute,overlay]{textpos}
\textblockcolour{white}

% Other
\usepackage{csquotes}
\usepackage{comment}

% Information for title page
\title{My Presentation}
\author{My name}
\date[]{My University}

\makeatletter
\setbeamertemplate{headline}
{%
  \begin{beamercolorbox}[wd=\beamer@sidebarwidth]{logo}
    \usebeamercolor[bg]{logo}%
    \vrule width\beamer@sidebarwidth height \beamer@headheight%
    \hskip-\beamer@sidebarwidth%
    \hbox to \beamer@sidebarwidth{\hss\vbox to%
      \beamer@headheight{\vss\hbox{\color{fg}%
          \ifbeamer@mylogo%
          %% Should be the image file, not the include command
          \pgfimage[width=\beamer@sidebarwidth,height=\beamer@headheight]{\insertlogo}%
          \else%
          \pgfimage[width=\beamer@sidebarwidth,height=\beamer@headheight]{example-image-duck}%uulogo_red160}% <- change image here
          \fi%
        }\vss}\hss}%
  \end{beamercolorbox}%
  \vskip-\beamer@headheight%
  \hskip\beamer@sidebarwidth%
  %% If we want the subsections at the top
  \ifbeamer@subsectionsattop
  \insertsubsectionnavigationhorizontal{\beamer@mydim}{}{\hskip0pt plus1filll}
  \vskip2ex%
  \else
  %% If we want the shorttitle>section>subsection at the top; 2ex high
  \ifbeamer@sectionpathattop
  \begin{beamercolorbox}[wd=\beamer@mydim,ht=2ex,dp=1ex,leftskip=1ex]{section in head/foot}%
    {\usebeamerfont{title in head/foot}\usebeamercolor{title in head/foot}%
      \insertshorttitle\strut}%
    {\usebeamerfont{section in head/foot}\usebeamercolor{section in head/foot}%
      \hspace*{1ex}\insertgotosymbol%~
      \insertsectionhead}%
    \ifx\insertsubsectionhead\@empty%
    \else%
    {\usebeamerfont{subsection in head/foot}\usebeamercolor{subsection in head/foot}
      \insertgotosymbol%\hspace*{1ex}
      \insertsubsectionhead}
    \fi%
  \end{beamercolorbox}%
  \else%
  \vskip2ex%
  \fi%
  \fi%
}

\makeatother

% Titlepage
\begin{document}
\begin{frame}
\titlepage
\end{frame}


\section{Aim}


\begin{frame}{Aim}
\textbf{My Aim}
\begin{itemize}
\item This is what I want to do
\end{itemize}
\end{frame}

\end{document}

在此处输入图片描述

相关内容