Beamer 首页

Beamer 首页

我正在尝试使用在互联网上找到的模板在 Beamer 中创建首页幻灯片。我不知道在模板或 TeX 文件中要更改什么才能获得我想要的效果;我的目标是获得图像中的高光部分幻灯片 1幻灯片 2幻灯片 3

我的 TeX 文件如下:

\documentclass[english]{beamer}

\mode<article> % only for the article version
{
  \usepackage{fullpage}
  \usepackage{hyperref}
}


\mode<presentation>
{
  %\setbeamertemplate{background canvas}[vertical shading][bottom=red!10,top=blue!10]
  \setbeamercovered{transparent}
  \usetheme{progressbar}
  \usefonttheme{serif}
  \usecolortheme{crane}
}

\usepackage{pgf,pgfarrows,pgfnodes,pgfautomata,pgfheaps,pgfshade}
\usepackage[latin1]{inputenc}
\usepackage{colortbl}

\setbeamercovered{dynamic}

\setbeamertemplate{items}[circle]

\title[]{{\LARGE {\sc Title 1}} \vspace*{0.5cm}}

\author{{\bf Title 2} \\ {\it Title 3}}

\date{Author}

\begin{document}

\begin{frame}

\maketitle

\end{frame}

\begin{frame}
\vfill \centering Title 4 \vfill
\end{frame}

\begin{frame}
This is my first slide...
\end{frame}

\end{document}

编译需要5个样式文件,我无法上传这些文件,因此我将在下面贴出相应的代码。

  1. beamercolorthemeprogressbar.sty
\ProvidesPackage{beamercolorthemeprogressbar}[2007/06/21]

\makeatletter

\usecolortheme{rose}

\definecolor{progressbar@bgblue}{rgb}{0.75,0.75,0.95} % use structure theme to change
\definecolor{progressbar@fgblue}{rgb}{0.1,0.1,0.9} % use structure theme to change

\setbeamercolor*{palette primary}{fg=progressbar@fgblue,bg=progressbar@bgblue}
\setbeamercolor*{palette secundary}{fg=progressbar@fgblue,bg=progressbar@bgblue}
\setbeamercolor*{palette tertiary}{fg=progressbar@fgblue,bg=progressbar@bgblue}

\setbeamercolor{section in head/foot}{parent=palette primary}

\makeatother
  1. beamerfontthemeprogressbar.sty
\ProvidesPackage{beamerfontthemeprogressbar}[2007/06/21]

\mode<presentation>

\usefonttheme{default}

\setbeamerfont{title}{size=\Large,series=\bfseries,parent=structure}

\setbeamertemplate{bibliography item}[mybibitem]
\setbeamerfont{bibliography entry author}{shape=\upshape,series=\bfseries,size=\normalsize}%
\setbeamerfont{bibliography entry title}{shape=\upshape,size=\small,series=\mdseries}
\setbeamerfont{bibliography entry journal}{shape=\upshape,size=\small,series=\mdseries}
\setbeamerfont{bibliography entry note}{shape=\upshape,size=\small,series=\mdseries}

\setbeamerfont{itemize/enumerate body}{size=\small}
\setbeamerfont{itemize/enumerate subbody}{size=\footnotesize}
\setbeamerfont{itemize/enumerate subsubbody}{size=\scriptsize}

\setbeamerfont{block title}{size=\normalsize,series=\bfseries,parent={structure,block body}}

\setbeamerfont{section in head/foot}{size=\tiny,series=\bfseries}
\renewcommand{\emph}[1]{\color{structure.fg}\textbf{#1}\color{fg}\xspace}

\setbeamerfont{section in toc}{parent=structure,series=\bfseries}

\mode
<all>
  1. beamerinnerthemeprogressbar.sty
\ProvidesPackage{beamerinnerthemeprogressbar}[2007/06/21]

\RequirePackage{tikz}

\useinnertheme{rounded}

\defbeamertemplate*{bibliography item}{progressbar theme}{
  \begin{tikzpicture}
    \useasboundingbox (0, 0.2) rectangle (0.5, 0.7);
    \fill[fill=bg!85!blue] (0, 0.25) rectangle (0.4, 0.5);
    \shade[bottom color=bg,top color=bg!85!blue] (0, 0) -- (0.3, 0) -- (0.4, 0.12) -- (0.4, 0.3) -- (0, 0.3) -- cycle;
    \shade[left color=bg,right color=bg!85!blue] (0,0.27) .. controls (0.25,0.25) .. (0.4,0.5) -- (0,0.5) -- cycle;
    \fill[fill=bg!90!blue] (0,0) rectangle (0.3,0.05);
    \shade[left color=bg!95!blue,right color=bg!90!blue] (0,0) rectangle (0.05,0.5);
    \shade[left color=bg,right color=bg!80!black,shading angle=45] (0.3,0) -- (0.3,0.12) -- (0.4,0.12) -- cycle;
    \draw[draw=fg!35!bg] (0,0) -- (0.3,0) -- (0.4,0.12) -- (0.4,0.5) -- (0,0.5) -- cycle;
    \draw[draw=fg!35!bg](0.3,0) -- (0.3,0.12) -- (0.4,0.12);
  \end{tikzpicture}
}

\defbeamertemplate*{frametitle}{progressbar theme}{
  \begin{centering}
    \textbf{\insertframetitle}
    \par
  \end{centering}
}

\mode
<all>
  1. beamerouterthemeprogressbar.sty
\ProvidesPackage{beamerouterthemeprogressbar}[2007/06/21]

\RequirePackage{tikz}

\makeatletter

\setbeamercolor{progressbar primary}{parent=palette primary}
\setbeamercolor{progressbar secondary}{parent=palette secondary}
\setbeamercolor{progressbar tertiary}{parent=palette tertiary}
\setbeamercolor{progressbar quaternary}{parent=palette quaternary}

\newdimen\progressbar@currentbarlength
\newdimen\progressbar@framenumberrectangle
\newdimen\progressbar@titlerectangle
\newdimen\progressbar@leftbar
\newdimen\progressbar@barlengthmm

\newcount\progressbar@tmpresult
\newcount\progressbar@numer
\newcount\progressbar@denom
\newcount\progressbar@barlength

\progressbar@framenumberrectangle=\paperwidth
\progressbar@titlerectangle=\paperwidth

\advance\progressbar@framenumberrectangle by -0.9cm
\advance\progressbar@titlerectangle by -1.1cm

\progressbar@barlength=115 % (in millimeters)
\progressbar@barlengthmm=\progressbar@barlength mm
\progressbar@leftbar=\progressbar@titlerectangle
\advance\progressbar@leftbar by -\progressbar@barlength mm

\def\insertprogressbar{
  \ifnum\inserttotalframenumber=1\else
    \progressbar@numer=\insertframenumber
    \advance\progressbar@numer by -1
    \progressbar@denom=\inserttotalframenumber
    \advance\progressbar@denom by -1
    \progressbar@tmpresult=\progressbar@barlength
    \multiply\progressbar@tmpresult by \progressbar@numer
    \divide\progressbar@tmpresult by \progressbar@denom
    \progressbar@currentbarlength=\progressbar@tmpresult mm

    \begin{tikzpicture}
      \shade[top color=bg, bottom color=bg!80!fg] (0, 0) rectangle  (\paperwidth, 0.6cm);
      \shade[left color=bg,right color=bg!70!fg] (.5\paperwidth, 0.2cm) rectangle (\paperwidth, 0.22cm);
      \draw (\progressbar@framenumberrectangle, 0.21cm) node [anchor=mid west, draw=bg!70!fg, fill=bg] {\color{structure.fg!70!bg}\insertframenumber~/~\inserttotalframenumber};
      \draw (\progressbar@titlerectangle, 0.32cm) node [anchor=south east] {\color{bg!70!fg}\inserttitle};
      \fill (\progressbar@leftbar, 0.12cm) [fill=bg, rounded corners=0.1cm] rectangle (\progressbar@titlerectangle, 0.3cm);
      \ifnum\insertframenumber=1\else
      \shade[left color=progressbar primary.fg!10!bg, right color=progressbar primary.fg!20!bg, rounded corners=0.1cm] (\progressbar@leftbar, 0.12cm) rectangle ++(\progressbar@currentbarlength, 0.2cm);
      \fi
      \draw (\progressbar@leftbar, 0.11cm) [draw=bg!70!fg, rounded corners=0.1cm] rectangle ++(\progressbar@barlengthmm, 0.2cm);
    \end{tikzpicture}
  \fi
}

\mode<presentation>

\newlength\progressbar@sectionboxwidth
\newlength\progressbar@sectionboxheight
\newbox\progressbar@sectionbox
\newbox\progressbar@sectionboxbox

\usesectionheadtemplate
  {\hfill
    \setbox\progressbar@sectionbox=\hbox{\insertsectionhead}%
    \progressbar@sectionboxwidth=\wd\progressbar@sectionbox
    \advance\progressbar@sectionboxwidth by 4pt
    \setbox\progressbar@sectionbox=\hbox{\pgfinterruptpicture t \endpgfinterruptpicture}%
    \progressbar@sectionboxheight=\ht\progressbar@sectionbox
    \advance\progressbar@sectionboxheight by 4pt
    \begin{tikzpicture}
      \useasboundingbox (-0.5\progressbar@sectionboxwidth, 0pt) rectangle (0.5\progressbar@sectionboxwidth, \progressbar@sectionboxheight);
      \draw[anchor=base] (0pt, 2pt) node {\color{structure.fg!80!bg} \insertsectionhead};
      \draw[rounded corners=3pt, draw=structure.fg!80!bg] (-0.5\progressbar@sectionboxwidth, 0pt) rectangle (0.5\progressbar@sectionboxwidth, \progressbar@sectionboxheight);
    \end{tikzpicture}
  }
  {\hfill
    \setbox\progressbar@sectionbox=\hbox{\pgfinterruptpicture\insertsectionhead\endpgfinterruptpicture}%
    \progressbar@sectionboxwidth=\wd\progressbar@sectionbox
    \advance\progressbar@sectionboxwidth by 4pt
    \setbox\progressbar@sectionboxbox=\hbox{\pgfinterruptpicture t \endpgfinterruptpicture}%
    \progressbar@sectionboxheight=\ht\progressbar@sectionboxbox
    \advance\progressbar@sectionboxheight by 4pt
    \begin{tikzpicture}
      \useasboundingbox (-0.5\progressbar@sectionboxwidth, 0pt) rectangle (0.5\progressbar@sectionboxwidth, \progressbar@sectionboxheight);
      \draw[anchor=base] (0pt, 2pt) node {\color{structure.fg!50!bg} \insertsectionhead};
    \end{tikzpicture}
  }

\defbeamertemplate*{headline}{progressbar theme}
{%
  \leavevmode%
  \begin{beamercolorbox}[wd=\paperwidth,ht=4ex,dp=1.125ex]{section in head/foot}%
    \insertsectionnavigationhorizontal{\paperwidth}{}{}%\hskip0pt plus1filll}{}%
  \end{beamercolorbox}%
}

\defbeamertemplate*{footline}{progressbar theme}{
  \begin{beamercolorbox}[wd=\paperwidth,ht=0.6cm,dp=0ex]{progressbar in head/foot}%
    \insertprogressbar
  \end{beamercolorbox}%
}

%\institute{(void)}

\defbeamertemplate*{title page}{progressbar theme}{
  \pgfdeclarehorizontalshading{separationtitlepagelineshading}{0.5pt}{color(0cm)=(bg); color(0.5\textwidth)=(structure.fg); color(\textwidth)=(bg)}

  \makeatletter
  \begin{center}
    \textbf{\textcolor{structure.fg}\large\inserttitle}

    \pgfuseshading{separationtitlepagelineshading}
    \vskip\baselineskip
    \footnotesize\insertauthor\\[\baselineskip]
    \ifx\insertinstitute\@empty \else\tiny\insertinstitute\\[\baselineskip]\fi
    \insertlogo
    \vskip\baselineskip
    \pgfuseshading{separationtitlepagelineshading}
    \vfill
    \footnotesize
    \insertdate
  \end{center}
  \makeatother
}
\setbeamertemplate{title page}[mytitlepage]

\defbeamertemplate*{background canvas}{progressbar theme}{\pgfuseshading{background shading}}%[action]

\AtBeginDocument{%
  {
    \usebeamercolor{progressbar primary}
    \pgfdeclareverticalshading{background shading}{\the\paperwidth}{color(0cm)=(normal text.bg); color(0.8\paperheight)=(normal text.bg); color(0.95\paperheight)=(progressbar primary.bg); color(\paperheight)=(progressbar primary.bg)
    }
  }
}

\mode
<all>

\makeatother
  1. beamerthemeprogressbar.sty
\ProvidesPackage{beamerthemeprogressbar}[2007/06/21]

\RequirePackage{tikz}


\usecolortheme{progressbar}
\useinnertheme{progressbar}
\usefonttheme{progressbar}
\useoutertheme{progressbar}

\setbeamertemplate{blocks}[rounded][shadow=true]
\setbeamertemplate{navigation symbols}{}

\AtBeginDocument{%
  \typeout{..................................................................}
  \typeout{You are using the progressbar beamer theme (Sylvain B.)}
  \typeout{Version: 0.32. Jun. 2007.}
  \typeout{..................................................................}
}

欢迎任何帮助或提示。谢谢。

相关内容