Commits

Anonymous committed 2d1a427

bugfix for red, added theme

Comments (0)

Files changed (9)

+Main development:
+
 Till Tantau <tantau@users.sourceforge.net>
+
+
+Theme constributors:
+
+Paul Gomme <paul-gomme@uiowa.edu> (beamerthemesplitcondensed)
 	  can be zoomed arbitrarily.
 	- Fixed bug in overwritten \document.
 	- Added \appendix command.
+	- Fixed bug when using color options like "red".
+	- Added theme beamerthemesplitcondensed, adapted from a submission
+	  by Paul Gomme
 
 2003-10-13 Till Tantau <tantau@cs.tu-berlin.de>
 
-1) More themes
-2) Some themes more appropriate for presentations of lectures.
-3) Use xcolor for better color management
-4) Explain in the user guide, how hyperref can be used to create
-   non-linear talks.
-5) Perhaps add an way of showing photos of the authors and the
-   institutes in a convenient way.
-6) Add a FAQ section in User guide.
-7) Make adding navigation buttons like a "back button" easy.
-8) Put internal macros in beamer.cls into a namespace
-9) "Cleanup" beamer.cls
-
+1)  More themes
+2)  Some themes more appropriate for presentations of lectures.
+3)  Use xcolor for better color management
+4)  Explain in the user guide, how hyperref can be used to create
+    non-linear talks.
+5)  Perhaps add an way of showing photos of the authors and the
+    institutes in a convenient way.
+6)  Add a FAQ section in User guide.
+7)  Make adding navigation buttons like a "back button" easy.
+8)  Put internal macros in beamer.cls into a namespace
+9)  "Cleanup" beamer.cls
+10) Add an \insertframenumber command.
+12) Document some of the commands for creating headline and footlines.
 \def\textlatin{}
 
 
+%
+% Theme coloring, this should be changed to use xcolor...
+%
+\def\themecolor#1#2#3{
+  \definecolor{structure}{rgb}{#1,#2,#3}
+  \edef\thethemecolor{#1,#2,#3}
+  \pgf@ya=1pt
+  \advance\pgf@ya by-#1pt%
+  \pgf@ya=.4\pgf@ya%
+  \pgf@x=1pt%
+  \advance\pgf@x by-\pgf@ya%
+  \pgf@ya=1pt
+  \advance\pgf@ya by-#2pt%
+  \pgf@ya=.4\pgf@ya%
+  \pgf@y=1pt%
+  \advance\pgf@y by-\pgf@ya%
+  \pgf@ya=1pt
+  \advance\pgf@ya by-#3pt%
+  \pgf@ya=.4\pgf@ya%
+  \pgf@xa=1pt%
+  \advance\pgf@xa by-\pgf@ya%
+  \definecolor{structureshaded}{rgb}{\pgfget{x},\pgfget{y},\pgfget{xa}}
+  \edef\theshadedthemecolor{\pgfget{x},\pgfget{y},\pgfget{xa}}
+  \pgf@ya=1pt
+  \advance\pgf@ya by-#1pt%
+  \pgf@ya=.7\pgf@ya%
+  \pgf@x=1pt%
+  \advance\pgf@x by-\pgf@ya%
+  \pgf@ya=1pt
+  \advance\pgf@ya by-#2pt%
+  \pgf@ya=.7\pgf@ya%
+  \pgf@y=1pt%
+  \advance\pgf@y by-\pgf@ya%
+  \pgf@ya=1pt
+  \advance\pgf@ya by-#3pt%
+  \pgf@ya=.7\pgf@ya%
+  \pgf@xa=1pt%
+  \advance\pgf@xa by-\pgf@ya%
+  \definecolor{structuremedium}{rgb}{\pgfget{x},\pgfget{y},\pgfget{xa}}
+  }
+\themecolor{0.2}{0.2}{0.7}
+
 
 %
 %
 \subsectionshidefalse
 \subsectionsshadedfalse
 
+\newif\ifbeamer@centered
 
 
 %
 \DeclareOption{inrow}
 {\subsectionrowstrue}
 
+\DeclareOption{slidescentered}
+{\beamer@centeredtrue}
+
+\DeclareOption{slidestop}
+{\beamer@centeredfalse}
+
 \DeclareOption{blue}
 {\themecolor{0.2}{0.2}{0.7}}
 
 \DeclareOption{bigger}{\def\beamer@size{{size12.clo}}}
 \DeclareOption{smaller}{\def\beamer@size{{size10.clo}}}
 
-\ExecuteOptions{sans}
+\ExecuteOptions{sans,slidescentered}
 
 \ProcessOptions
 
 \definecolor{blockstructure}{rgb}{0.2,0.2,0.7}
 \definecolor{lightgray}{gray}{0.9}
 
-% This should be changed to use xcolor...
-\def\themecolor#1#2#3{
-  \definecolor{structure}{rgb}{#1,#2,#3}
-  \edef\thethemecolor{#1,#2,#3}
-  \pgf@ya=1pt
-  \advance\pgf@ya by-#1pt%
-  \pgf@ya=.4\pgf@ya%
-  \pgf@x=1pt%
-  \advance\pgf@x by-\pgf@ya%
-  \pgf@ya=1pt
-  \advance\pgf@ya by-#2pt%
-  \pgf@ya=.4\pgf@ya%
-  \pgf@y=1pt%
-  \advance\pgf@y by-\pgf@ya%
-  \pgf@ya=1pt
-  \advance\pgf@ya by-#3pt%
-  \pgf@ya=.4\pgf@ya%
-  \pgf@xa=1pt%
-  \advance\pgf@xa by-\pgf@ya%
-  \definecolor{structureshaded}{rgb}{\pgfget{x},\pgfget{y},\pgfget{xa}}
-  \edef\theshadedthemecolor{\pgfget{x},\pgfget{y},\pgfget{xa}}
-  \pgf@ya=1pt
-  \advance\pgf@ya by-#1pt%
-  \pgf@ya=.7\pgf@ya%
-  \pgf@x=1pt%
-  \advance\pgf@x by-\pgf@ya%
-  \pgf@ya=1pt
-  \advance\pgf@ya by-#2pt%
-  \pgf@ya=.7\pgf@ya%
-  \pgf@y=1pt%
-  \advance\pgf@y by-\pgf@ya%
-  \pgf@ya=1pt
-  \advance\pgf@ya by-#3pt%
-  \pgf@ya=.7\pgf@ya%
-  \pgf@xa=1pt%
-  \advance\pgf@xa by-\pgf@ya%
-  \definecolor{structuremedium}{rgb}{\pgfget{x},\pgfget{y},\pgfget{xa}}
-  }
-\themecolor{0.2}{0.2}{0.7}
-
 %
 % Page where the appendix start.
 %
   \vskip0pt plus -1fill%
   {\gdef\insertframetitle{#1\par}\@headrenderer}
   \vskip0.25em%
+  \ifbeamer@centered
   \vfill%
+  \fi
 }
 
 \long\def\useframetitletemplate#1{\def\@headrenderer{#1}}
 \newif\if@anotherslide
 \newif\if@localanotherslide
 
+\newcounter{framenumber}
+\def\insertframenumber{\@arabic\c@framenumber}
+
 \def\frame{\@ifnextchar[{\@frame}{\@frame[+]}}
 \def\@frame[#1]{%
+  \refstepcounter{framenumber}%
   {\let\@elt\@savecounter\@overlaycounterresets}
   \gdef\insertframetitle{}%
   \gdef\beamer@framestartpage{}%
     \tempheight=\ht\tempbox%
     \setbox\tempbox=\hbox{\lower\tempheight\hbox{\box\tempbox}}\wd\tempbox=0pt\ht\tempbox=0pt\dp\tempbox=0pt%
     \vbox{\hbox{\hskip-\Geom@lmargin\box\tempbox}\hbox{\@headtemplate}\hfil}}
-  \def\@oddfoot{\@foottemplate\hypertarget{Navigation\thepage}{}\hfill}
+  \def\@oddfoot{\@foottemplate\hypertarget{Navigation\thepage}{}\hfil}
   \let\@evenhead\@oddhead
   \let\@evenfoot\@oddfoot}
 \pagestyle{navigation}
     \def\appendixslideentry{\fakeslideentry}%
     \fi%
     \hbox to #1{\hskip.3cm\tiny\setbox\sectionbox=\hbox{}%
-        \hskip0pt plus-1fill\dohead%
+        \hskip-5pt plus-1fill\dohead%
       \box\sectionbox\hfil\hskip.3cm}%
   }}
 
 \def\sectionentry#1#2#3#4{% section name, section title, page
-  \box\sectionbox\hfill
+  \box\sectionbox\hskip5pt plus 1fill%
   \setbox\sectionbox=
   \hbox{\def\insertsectionhead{#2}%
     \ifnum\thesection=#1%
   \ignorespaces}
 
 \def\appendixsectionentry#1#2#3#4{% section name, section title, page
-  \box\sectionbox\hfill
+  \box\sectionbox\hskip5pt plus 1fill%
   \setbox\sectionbox=
   \hbox{\def\insertsectionhead{#2}%
     \ifnum\thesection=#1%
      \else%
      \def\appendixsectionentry##1##2##3##4{}%
      \fi%
-     \dohead\vskip1.5pt}\hfill}}
+     \dohead\vskip1.5pt}\hfil}}
+
+\def\insertsectionnavigationhorizontal#1#2#3{%
+  \hbox to #1{%
+     \def\slideentry##1##2##3##4##5{}%
+     \def\appendixslideentry##1##2##3##4##5{}%
+     \ifbeamer@inappendix%
+     \def\sectionentry##1##2##3##4{}%
+     \else%
+     \def\appendixsectionentry##1##2##3##4{}%
+     \fi%
+     #2\hskip.3cm\tiny\setbox\sectionbox=\hbox{}%
+     \hskip-5pt plus-1fill\dohead%
+     \box\sectionbox\hfil\hskip.3cm%
+     #3}}
 
 \newcount\currentsubsection
 \def\insertsubsectionnavigation#1{%
       \else%
       \def\appendixslideentry##1##2##3##4##5{}%
       \fi%
-      \dohead\vskip1.5pt}\hfill}}
+      \dohead\vskip1.5pt}\hfil}}
+
+\def\insertsubsectionnavigationhorizontal#1#2#3{%
+  \hbox to #1{%
+    \currentsubsection=1%
+    \def\sectionentry##1##2##3##4{}%
+    \def\appendixsectionentry##1##2##3##4{}%
+    \def\slideentry##1##2##3##4##5{\ifnum##1=\thesection%
+      \ifnum##2=\currentsubsection%
+      \advance\currentsubsection by1%
+      \box\sectionbox\hskip5pt plus1fill%
+      \setbox\sectionbox=
+      \hbox{\def\insertsubsectionhead{##5}%
+        \ifnum\thesubsection=##2%
+        \beamer@link(##4){\@subsectionheadhilight}\else%
+        \beamer@link(##4){\@subsectionheadnohilight}\fi}%
+      \fi\fi\ignorespaces}%
+    \def\appendixslideentry##1##2##3##4##5{%
+      \ifnum##2=\currentsubsection%
+      \advance\currentsubsection by1%
+      \box\sectionbox\hskip5pt plus1fill%
+      \setbox\sectionbox=
+      \hbox{\def\insertsubsectionhead{##5}%
+        \ifnum\thesubsection=##2%
+        \beamer@link(##4){\@subsectionheadhilight}\else%
+        \beamer@link(##4){\@subsectionheadnohilight}\fi}%
+      \fi\ignorespaces}%
+    \ifbeamer@inappendix%
+      \def\slideentry##1##2##3##4##5{}%
+    \else%
+      \def\appendixslideentry##1##2##3##4##5{}%
+    \fi%
+    #2\hskip.3cm\tiny\setbox\sectionbox=\hbox{}%
+    \hskip-5pt plus-1fill\dohead%
+    \box\sectionbox\hfil\hskip.3cm%
+    #3}}
 
 \long\def\usesubsectionheadtemplate#1#2{\def\@subsectionheadhilight{#1}\def\@subsectionheadnohilight{#2}}
 

beamerthemesplitcondensed.sty

+\ProvidesPackage{beamerthemesplitcondensed}[2003/10/21]
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+
+% Copyright 2003 by Paul Gomme <paul-gomme@uiowa.edu> and
+%                   Till Tantau <tantau@cs.tu-berlin.de> 
+%
+% This program can be redistributed and/or modified under the terms
+% of the LaTeX Project Public License Distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt.
+
+                                % Title page 
+\usetitlepagetemplate{
+  \vbox{}
+  \vfill
+  \begin{centering}
+    \Large\structure{\bfseries\inserttitle}
+    \vskip1em\par
+    \normalsize\insertauthor\vskip1em\par
+    {\scriptsize\insertinstitute\par}\par\vskip1em
+    \insertdate\par\vskip1.5em
+    \inserttitlegraphic
+  \end{centering}
+  \vfill
+  }
+
+                                % Frametitles
+\useframetitletemplate{%
+  {\leftskip-\Geom@lmargin\advance\leftskip by0.3cm%
+   \rightskip-\Geom@rmargin plus1fil\advance\rightskip by0.3cm\leavevmode
+    \color{structure}
+    \Large\insertframetitle\par}%
+  }
+
+                                % Sections in headline
+\usesectionheadtemplate
+{\color{white}\tiny\textbf{\insertsectionhead}}
+{\color{shaded}\tiny\textbf{\insertsectionhead}}
+
+\usesubsectionheadtemplate
+{\color{white}\tiny\textbf{\insertsubsectionhead}}
+{\color{structureshaded}\tiny\textbf{\insertsubsectionhead}}
+
+
+                                % Entries in table of contents
+\usetemplatetocsection
+{{\large\color{structure}\inserttocsection}}
+{{\large\color{structureshaded}\inserttocsection}}
+
+                                % Entries in table of contents
+\usetemplatetocsubsection
+{\leavevmode\leftskip=1.5em\color{black}\inserttocsubsection\par}
+{\leavevmode\leftskip=1.5em\color{shaded}\inserttocsubsection\par}
+
+\useframetitletemplate{%
+  {\leftskip-\Geom@lmargin\advance\leftskip by0.3cm%
+   \rightskip-\Geom@rmargin plus1fil\advance\rightskip by0.3cm\leavevmode
+    \color{structure}
+    \Large\textbf{\insertframetitle}\par}%
+  }
+
+                                % Head
+\useheadtemplate{%
+  \vbox{%
+    \setbox\linebox=\hbox to\paperwidth{%
+      \insertsectionnavigationhorizontal{.5\paperwidth}{\hskip0pt plus1filll}{}%
+      \insertsubsectionnavigationhorizontal{.5\paperwidth}{}{\hskip0pt plus1filll}\hfil}%
+    \ht\linebox=7pt
+    \dp\linebox=0pt
+    \setbox\linebox=\vbox{\box\linebox\vskip3pt}%
+    \hbox to\textwidth{%
+      {\color{black}\hskip-1cm\vrule width.5\paperwidth height\ht\linebox
+      \color{structure}\vrule width.5\paperwidth height\ht\linebox\hskip-\paperwidth\hskip1cm}%
+      \hskip-1cm\box\linebox\hfill\hskip-1cm%
+      }%
+  }%
+}
+
+
+                                % Footline
+\usefoottemplate{%
+  \hbox{%
+    \setbox\linebox=\hbox to\paperwidth{%
+      \hbox to.5\paperwidth{\hfill\tiny\color{white}\textbf{\insertshortauthor}\hskip.3cm}%
+      \hbox to.5\paperwidth{\hskip.3cm\tiny\color{white}\textbf{\insertshorttitle}\hfill}\hfill}%
+    \ht\linebox=7pt%
+    \dp\linebox=0pt%
+    \setbox\linebox=\vbox{\box\linebox\vskip3pt}%
+    \color{black}\hskip-\Geom@lmargin\vrule width.5\paperwidth
+    height\ht\linebox\color{structure}\vrule width.5\paperwidth
+    height\ht\linebox\hskip-\paperwidth% 
+    \hbox{\box\linebox\hfill}\hfill\hskip-\Geom@rmargin}}
+
+\def\logo#1{%
+  \def\insertlogo{#1}%
+  \usefoottemplate{%
+    \vbox{%
+      \hbox to\textwidth{\hfill\setbox\logobox=\hbox{\insertlogo}\ht\logobox=0pt\box\logobox\hskip-\Geom@rmargin\hskip0.3cm}\vskip2pt%
+    \hbox{%
+    \setbox\linebox=\hbox to\paperwidth{%
+      \hbox to.5\paperwidth{\hfill\tiny\color{white}\textbf{\insertshortauthor}\hskip.3cm}%
+      \hbox to.5\paperwidth{\hskip.3cm\tiny\color{white}\textbf{\insertshorttitle}\hfill}\hfill}%
+    \ht\linebox=7pt%
+    \dp\linebox=0pt%
+    \setbox\linebox=\vbox{\box\linebox\vskip3pt}%
+    \color{black}\hskip-\Geom@lmargin\vrule width.5\paperwidth
+    height\ht\linebox\color{structure}\vrule width.5\paperwidth
+    height\ht\linebox\hskip-\paperwidth% 
+    \hbox{\box\linebox\hfill}\hfill\hskip-\Geom@rmargin}}}}
+
+                                % Background
+\usebackgroundtemplate{}
+
+                                % Blocks
+\useblocktemplate{\medskip{\color{blockstructure}\large\insertblockname}\par}{\medskip}
+\usealertblocktemplate{\medskip{\alert{\large\insertblockname}}\par}{\medskip}
+\useexampleblocktemplate{\medskip\begingroup\color{darkgreen}{\large\insertblockname}\par}{\endgroup\medskip}
+

Binary file modified.

doc/beamerexample.tex

-\documentclass{beamer}
+\documentclass[red]{beamer}
 % Try the class options [notes], [notesonly], [trans], [handout],
 % [red] and see what happens!
 
 % of the LaTeX Project Public License Distributed from CTAN
 % archives in directory macros/latex/base/lppl.txt.
 
-\usepackage{beamerthemesplit,beamertemplates}
+\usepackage{beamerthemesplitcondensed,beamertemplates}
 \usepackage[english]{babel}
 \usepackage{pgf,pgfarrows,pgfnodes,pgfautomata,pgfheaps,pgfshade}
 \usepackage{amsmath,amssymb}
 
 
 % Try this:
-\beamertemplateshadingbackground{1,0.9,0.9}{0.9,0.9,1}
+%\beamertemplateshadingbackground{1,0.9,0.9}{0.9,0.9,1}
 
 \begin{document}
 
Add a comment to this file

doc/beameruserguide.pdf

Binary file modified.

doc/beameruserguide.tex

   for different subsections are shown in different lines.
   }
 
+\ClassOption{slidescentered}
+\Description{
+  Place text of slides at the (vertical) center of the slides. This is
+  the default.
+  }
+
+\ClassOption{slidestop}
+\Description{
+  Place text of slides at the (vertical) top of the slides. This
+  corresponds to a vertical ``flush.''
+}
+
 \ClassOption{blue, red, grey, brown}
 \Description{
   These options change the main color of the navigation and title bars
   Inserts the current footnote text into a template. 
 }
 
+\Command{insertframenumber}
+\Description{
+  Inserts the number of the current frame (not slide) into a template.
+}
+
 \Command{insertframetitle}
 \Description{
   Inserts the current frame title into a template.
   current section hilighted.
 }
 
+\Command{insertsectionnavigationhorizontal}
+\Parameters{
+\item a width
+\item a text (typical a glue) to be inserted at the left
+\item a text (typical a glue) to be inserted at the right
+  }
+\Description{
+  Inserts a horizontal navigation bar containing all sections, with the
+  current section hilighted. By inserting a triple fill (a
+  \texttt{filll}) you can flush to bar to the left or right.
+}
+\Example
+\begin{verbatim}
+\insertsectionnavigationhorizontal{.5\textwidth}{\hskip0pt plus1filll}{}
+\end{verbatim}
+
 \Command{insertshortauthor}
 \Description{
   Inserts the short version of the author into a template.
   Arabic number) into a template.
 }
 
+\Command{insertsubsection}
+\Description{
+  Inserts the current subsection into a template.
+}
+
 \Command{insertsubsectionnavigation}
 \Parameters{
 \item a width
   current section, with the current subsection hilighted.
 }
 
-\Command{insertsubsection}
+\Command{insertsubsectionnavigationhorizontal}
+\Parameters{
+\item a width
+\item a text (typical a glue) to be inserted at the left
+\item a text (typical a glue) to be inserted at the right
+  }
 \Description{
-  Inserts the current subsection into a template.
+  Inserts a horizontal navigation bar containing all subsections, with the
+  current section hilighted. By inserting a triple fill (a
+  \texttt{filll}) you can flush to bar to the left or right.
 }
+\Example
+\begin{verbatim}
+\insertsubsectionnavigationhorizontal{.5\textwidth}{}{\hskip0pt plus1filll}
+\end{verbatim}
 
 \Command{inserttitle}
 \Description{
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.