腳線內的投影機導航符號

腳線內的投影機導航符號

我試圖將導航符號放置在我添加的第二條腳線內。

受以下啟發,我在標準腳線之上創建了第二條腳線資訊線主題代碼。在這個額外的腳註中,我想看到導航符號。

\addtobeamertemplate{footline}{
    \leavevmode%
    \hbox{%
    \begin{beamercolorbox}[wd=\paperwidth,ht=2.25ex,dp=1ex,right]{author in head/foot}%
    \end{beamercolorbox}%
    }%
    \vskip0.5pt%
}

當我這樣做時,會添加導航符號多於這個額外的腳線。但我希望將它們添加到這條額外的行之上。

我嘗試使用\vspace,但最終結果是在後面腳線:

% uncommented, because it doesn't work:
%\addtobeamertemplate{navigation symbols}{\vspace{-3.5ex}}

渲染:
腳線

\documentclass{beamer}
\mode<presentation>

\title[Beamer Sample]{Sample presentation using Beamer}
\institute[UoF]{University of Foo}
\author{derabbink}
\date{\today}

\usecolortheme{dolphin}
\useoutertheme{infolines}

\setbeamertemplate{headline}[default]

\addtobeamertemplate{footline}{
    \leavevmode%
    \hbox{%
    \begin{beamercolorbox}[wd=\paperwidth,ht=2.25ex,dp=1ex,right]{author in head/foot}%
    \end{beamercolorbox}%
    }%
    \vskip0.5pt%
}
%\addtobeamertemplate{navigation symbols}{\vspace{-3.5ex}}

\begin{document}

\frame{\titlepage}

\begin{frame}\frametitle{FooBar}
\begin{itemize}
    \item Foo
    \item Bar
\end{itemize}
\end{frame}

\end{document}

PS:我還注意到,當我添加背景圖像時,它將在兩條腳線之間 0.5pt 的空間中可見。使該空間成為白線的最佳方法是什麼?

答案1

首先,您需要將導航符號範本設定為空白:

\setbeamertemplate{navigation symbols}{}

然後您可以使用適當的插入將符號插入附加腳線中:

\insertslidenavigationsymbol%
\insertframenavigationsymbol%
\insertsubsectionnavigationsymbol%
\insertsectionnavigationsymbol%
\insertdocnavigationsymbol%
\insertbackfindforwardnavigationsymbol%

一個完整的範例(我為附加顏色框定義了新顏色,因此符號可見):

\documentclass{beamer}
\mode<presentation>

\title[Beamer Sample]{Sample presentation using Beamer}
\institute[UoF]{University of Foo}
\author{derabbink}
\date{\today}

\usecolortheme{dolphin}
\useoutertheme{infolines}

\setbeamertemplate{headline}[default]
\setbeamercolor{mycolor}{fg=white,bg=structure!30}
\setbeamertemplate{navigation symbols}{}
\addtobeamertemplate{footline}{
    \leavevmode%
    \hbox{%
    \begin{beamercolorbox}[wd=\paperwidth,ht=2.75ex,dp=.5ex,right,rightskip=1em]{mycolor}%
\usebeamercolor[fg]{navigation symbols}\insertslidenavigationsymbol%
\insertframenavigationsymbol%
\insertsubsectionnavigationsymbol%
\insertsectionnavigationsymbol%
\insertdocnavigationsymbol%
\insertbackfindforwardnavigationsymbol%
    \end{beamercolorbox}%
    }%
    \vskip0.5pt%
}{}

\begin{document}

\frame{\titlepage}

\begin{frame}\frametitle{FooBar}
\begin{itemize}
    \item Foo
    \item Bar
\end{itemize}
\end{frame}

\end{document}

在此輸入影像描述

對於問題的第二部分,您可以使用另一個所需高度的顏色框,而不是垂直跳躍;就像是

\addtobeamertemplate{footline}{
    \leavevmode%
    \hbox{%
    \begin{beamercolorbox}[wd=\paperwidth,ht=2.75ex,dp=.5ex,right,rightskip=2em]{mycolor}%
\usebeamercolor[fg]{navigation symbols}\insertslidenavigationsymbol%
\insertframenavigationsymbol%
\insertsubsectionnavigationsymbol%
\insertsectionnavigationsymbol%
\insertdocnavigationsymbol%
\insertbackfindforwardnavigationsymbol%
    \end{beamercolorbox}%
    }\par%
    \begin{beamercolorbox}[wd=\paperwidth,ht=.5pt]{}%
    \end{beamercolorbox}%
}{}

相關內容