将索引添加到 Simple Beamer 主题顶部

将索引添加到 Simple Beamer 主题顶部

我想添加索引(类似于达姆施塔特主题)到顶部简单的Beamer 主题。

有什么方法可以做到这一点?我需要修改sty文件简单的或者我需要另一种方法?

更新:我在这个问题的末尾 添加了sty file一个最小演示以供使用。it在此处输入图片描述

beamerthemesimple.sty

% Copyright 2015 by Facundo Muñoz
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%


\ProvidesPackage{beamerthemesimple}

%\def\beamer@simplecolor{gris}
%\DeclareOptionBeamer{color}{\beamer@simplecolor=#1}
%\ExecuteOptionsBeamer{gris}
%\ProcessOptionsBeamer

\usepackage{tikz}
\usetikzlibrary{arrows,shapes,trees,positioning,fadings}

\input xkeyval

\newcommand<>{\includeoverlaygraphics}[2][]
{
  \begin{tikzpicture}
    \alt#3{\node[opacity=1] {\includegraphics[#1]{#2}};}
          {\node[opacity=.15] {\includegraphics[#1]{#2}};}
  \end{tikzpicture}
}

% These define macros \KV@setwatermark@hoffset that take one argument
% which is processed by the last piece of codes into braces
\def\@hos{}
\def\@vos{}
\def\@alpha{} % This one does not work. Why?
\define@key{setwatermark}{hoffset}[\def\@hos{.}]{\def\@hos{\hspace*{#1}}} 
\define@key{setwatermark}{voffset}[\def\@vos{.}]{\def\@vos{\vspace*{#1}}} 
\define@key{setwatermark}{alpha}[\def\@alpha{0.7}]{\def\@alpha{#1}} 

\def\setwatermark{\@ifnextchar[\@setwatermark{\@setwatermark[]}}
\def\@setwatermark[#1]#2{%
  \setkeys{setwatermark}{#1}%
  \def\@watermark{#2}
}
% \newcommand{\setwatermark}[1]{\def\@watermark{#1}}
\setwatermark{}   % Empty initialization


\mode<presentation>

  % http://www.colorcombos.com/color-scheme-275.html
  \definecolor{destacado}{HTML}{515151} % gris oscuro
  \definecolor{normal}{HTML}{797979}  % gris medio
  \definecolor{fondo}{HTML}{e6e6e6}  % gris claro

  \setbeamercolor{normal text}{bg=white,fg=normal}
  \setbeamercolor*{block title}{bg=fondo,fg=destacado}
  \setbeamercolor*{block body}{bg=fondo,fg=normal}
  \setbeamercolor{alerted text}{fg=black}

  \usetheme{default}
%  \usecolortheme[named=gris]{structure}
  \usecolortheme[named=destacado]{structure}
  \usefonttheme{structurebold}

  % overlays semitransparentes
  \setbeamercovered{transparent}

  % incluir el contador de diapos
  \setbeamertemplate{footline}[frame number]

  % eliminar íconos de nav.
  \setbeamertemplate{navigation symbols}{}

  % bloques
  \setbeamertemplate{blocks}[rounded][shadow=true]

  % especificación global para listas
  %\beamerdefaultoverlayspecification{<+-| alert@+>}

  % márgenes
  \setbeamersize{text margin left=0.4cm,text margin right=0.4cm}

  \setbeamertemplate{background}{
  \parbox[c][\paperheight]{\paperwidth}{%
    \vfill \hfill 
    \begin{tikzpicture}
      %\node[opacity=\@alpha]  % not working. why?
      \node[opacity=.07]
      {
        \@watermark
      };
    \end{tikzpicture}
    \@hos

    \@vos
  }
} 

\mode
<all>

演示文本

\documentclass{beamer}

\usetheme{simple}

\usepackage{lmodern}
\usepackage[scale=2]{ccicons}

\title{A simple beamer theme}
\subtitle{}
\date{\today}
\author{Facundo Mu\~noz}
\institute{\url{http://github.com/famuvie}}

\begin{document}

\maketitle

\begin{frame}{simple}
  \framesubtitle{A beamer theme}

  \texttt{simple} is a minimalist Beamer theme that features

  \begin{columns}
    \column{.5\textwidth}
      \begin{itemize}
        \item a \alert{watermark} logo in the background
        \item slide \alert{numbers}
        \item \emph{emph}asized and \alert{alert}ed text
      \end{itemize}

    \column{.5\textwidth}
      \begin{block}{And of course...}
         blocks, columns, and all Beamer power
      \end{block}
  \end{columns}

\end{frame}
\end{document}

答案1

主题使用的标题Darmstadt来自smoothbars外部主题:

\documentclass{beamer}

\usetheme{simple}
\useoutertheme{smoothbars}

\usepackage{lmodern}
\usepackage[scale=2]{ccicons}

\title{A simple beamer theme}
\subtitle{}
\date{\today}
\author{Facundo Mu\~noz}
\institute{\url{http://github.com/famuvie}}

\begin{document}

\maketitle

\section{test}
\subsection{test2}
\begin{frame}{simple}
  \framesubtitle{A beamer theme}

  \texttt{simple} is a minimalist Beamer theme that features

  \begin{columns}
    \column{.5\textwidth}
      \begin{itemize}
        \item a \alert{watermark} logo in the background
        \item slide \alert{numbers}
        \item \emph{emph}asized and \alert{alert}ed text
      \end{itemize}

    \column{.5\textwidth}
      \begin{block}{And of course...}
         blocks, columns, and all Beamer power
      \end{block}
  \end{columns}

\end{frame}
\end{document}

在此处输入图片描述


编辑:

要删除子部分名称,请使用\useoutertheme[subsection=false]{smoothbars}

相关内容