summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/talk
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/talk
Initial commit
Diffstat (limited to 'macros/latex/contrib/talk')
-rw-r--r--macros/latex/contrib/talk/Makefile30
-rw-r--r--macros/latex/contrib/talk/README76
-rw-r--r--macros/latex/contrib/talk/example.tex63
-rw-r--r--macros/latex/contrib/talk/sidebars.sty164
-rw-r--r--macros/latex/contrib/talk/talk.cls418
-rw-r--r--macros/latex/contrib/talk/talkdoc.pdfbin0 -> 141703 bytes
-rw-r--r--macros/latex/contrib/talk/talkdoc.tex720
7 files changed, 1471 insertions, 0 deletions
diff --git a/macros/latex/contrib/talk/Makefile b/macros/latex/contrib/talk/Makefile
new file mode 100644
index 0000000000..8bc7aa86e5
--- /dev/null
+++ b/macros/latex/contrib/talk/Makefile
@@ -0,0 +1,30 @@
+MF=Makefile
+
+INSTALLDIR=${HOME}/share/texmf/tex/latex
+
+SRC=\
+talk.cls \
+sidebars.sty \
+talkdoc.tex \
+example.tex
+
+OTHER=\
+README
+
+DOC=\
+talkdoc.pdf
+
+TAR=talk.tar.gz
+
+all: $(DOC)
+
+$(DOC): talkdoc.tex
+ pdflatex talkdoc.tex && pdflatex talkdoc.tex
+
+backup: $(MF) $(SRC) $(DOC) $(OTHER)
+ rm -f $(TAR)
+ tar zcvf $(TAR) $(MF) $(SRC) $(DOC) $(OTHER)
+
+install: talk.cls sidebars.sty
+ install talk.cls $(INSTALLDIR)/talk.cls
+ install sidebars.sty $(INSTALLDIR)/sidebars.sty
diff --git a/macros/latex/contrib/talk/README b/macros/latex/contrib/talk/README
new file mode 100644
index 0000000000..63cdd61c36
--- /dev/null
+++ b/macros/latex/contrib/talk/README
@@ -0,0 +1,76 @@
+
+ talk.cls -- A LaTeX class for presentations
+
+
+
+Abstract
+========
+
+The talk document class allows you to create slides for screen
+presentations or printing on transparencies. It also allows you to print
+personal notes for your talk. You can create overlays and display structure
+information (current section / subsection, table of contents) on your slides.
+The main feature that distinguishes talk from other presentation classes like
+beamer or prosper is that it allows the user to define an arbitrary
+number of slide styles and switch between these styles from slide to
+slide. This way the slide layout can be adapted to the slide content. For
+example, the title or contents page of a talk can be given a slightly different
+layout than the other slides.
+
+The talk class makes no restrictions on the slide design whatsoever. The entire
+look and feel of the presentation can be defined by the user. The style
+definitions should be put in a separate sty file. Currently the package comes
+with only one set of pre-defined slide styles (greybars.sty). Contributions
+from people who are artistically more gifted than me are more than welcome!
+
+
+Requirements
+============
+
+The talk class requires the packages
+
+ amsmath,
+ pgf,
+ multido,
+ hyperref.
+
+They can all be obtained from http://www.ctan.org. For further documentation see
+talkdoc.pdf.
+
+
+License
+=======
+
+This material is subject to the LaTeX Project Public License. See
+
+ http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
+
+for the details of that license.
+
+
+Changes
+=======
+
+
+v. 1.0.1:
+
+- Typesetting slides in minipages now, thus allowing for footnotes.
+
+- Added commands for changing colours in greybars.sty. Thus renamed greybars
+ to sidebars.
+
+v. 1.0.2:
+
+- \title and \author commands now support short versions as optional arguments.
+
+- Problem with the papersize in screen mode under pdflatex fixed.
+
+v. 1.1:
+
+- talk is now compatible with and requires pgf version 1.18.
+
+- talk no longer requires the graphicx package.
+
+- \@makeslide is now executed inside a pgfpicture environment. Existing style
+ packages may have to be adapted.
+
diff --git a/macros/latex/contrib/talk/example.tex b/macros/latex/contrib/talk/example.tex
new file mode 100644
index 0000000000..3cadee32c3
--- /dev/null
+++ b/macros/latex/contrib/talk/example.tex
@@ -0,0 +1,63 @@
+\documentclass[12pt,screen]{talk}
+%\documentclass[12pt,slides]{talk}
+%\documentclass[12pt,notes]{talk}
+
+\usepackage{sidebars}
+
+\slidesmag{1.5}
+
+\title{My Test Talk}
+\author[John Smith]{John Smith\thanks{Some bloke.}}
+
+
+\begin{document}
+
+\begin{slide}[plain]{}
+ \maketitle
+\end{slide}
+\begin{slide}[outline]{My Table of Contents}
+ \tableofcontents
+\end{slide}
+
+\section{First Section}
+
+\begin{slide}{My Title}
+ Stuff.\footnote{My footnote}
+\end{slide}
+\begin{notes}
+ Some notes about this slide.
+\end{notes}
+
+\subsection{First Subsection}
+\begin{slide}{Another Title}
+ More stuff.
+\end{slide}
+\begin{slide}{Yet Another Title}
+ Even more stuff.
+\end{slide}
+
+\subsection{Second Subsection}
+\begin{slide}{First Slide in Second Subsection}
+ Blah blah bla...
+\end{slide}
+
+\section{Second Section}
+
+\begin{slide}{A Slide in Section Two}
+ ...you get the idea.
+\end{slide}
+
+\subsection{Subsection 2.1}
+\begin{multislide}{3}{Multislide Example}
+ A few bullet points:
+ \begin{itemize}
+ \item Bullet 1
+ \fromslide{2}{\item Bullet 2}
+ {\onlyslide*{3}{\color{red}}\item Bullet 3}
+ \end{itemize}
+ \onlyslide*{1}{You can only see bullets 1 and 3.}%
+ \onlyslide*{2}{You can see all bullets.}
+ \onlyslide*{3}{Now bullet 3 is red.}
+\end{multislide}
+
+\end{document}
diff --git a/macros/latex/contrib/talk/sidebars.sty b/macros/latex/contrib/talk/sidebars.sty
new file mode 100644
index 0000000000..ecff124bda
--- /dev/null
+++ b/macros/latex/contrib/talk/sidebars.sty
@@ -0,0 +1,164 @@
+%% sidebars -- (sidebars.sty) style file
+%% A style package for the talk class
+%% Author: Martin Wiebusch
+%%
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2003/12/01 or later.
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{sidebars}
+
+\newif\if@compress\@compressfalse
+\DeclareOption{compress}{\@compresstrue}
+
+\ProcessOptions\relax
+
+\@slidesize{6in}{4.5in}
+
+\newcommand{\backgroundcolor}[1]{\definecolor{sb@bg}{rgb}{#1}}
+\newcommand{\sidebarcolor}[1]{\definecolor{sb@sb}{rgb}{#1}}
+\newcommand{\highlightcolor}[1]{\definecolor{sb@hl}{rgb}{#1}}
+\newcommand{\titlecolor}[1]{\definecolor{sb@title}{rgb}{#1}}
+\newcommand{\sidebartitlecolor}[1]{\definecolor{sb@sbt}{rgb}{#1}}
+
+\backgroundcolor{1,1,1}
+\sidebarcolor{0.85,0.85,0.85}
+\highlightcolor{0,0,0.7}
+\titlecolor{0,0,0.7}
+\sidebartitlecolor{0,0,0.7}
+
+\@newslidestyle{normal}{%
+ \renewcommand{\@makeslide}{%
+ \begin{pgfscope}
+ \color{sb@bg}
+ \pgfrect[fill]{\pgfpoint\z@\z@}{\pgfpoint\slidewidth\slideheight}%
+ \color{sb@sb}%
+ \pgfrect[fill]{\pgfpoint{5in}\z@}{\pgfpoint{1in}\slideheight}%
+ \@ifscreen{}{%
+ \color{black}%
+ \pgfrect[stroke]{\pgfpoint\z@\z@}{\pgfpoint\slidewidth\slideheight}%
+ }%
+ \end{pgfscope}
+ %
+ \pgfputat{\pgfpoint{5.1in}{4.3in}}{%
+ \pgfbox[left,top]{%
+ \begin{minipage}[t][4.2in]{0.8in}%
+ \sffamily\tiny%
+ {\centering\tiny\sffamily\textcolor{sb@sbt}{\@shorttitle}\par%
+ \vspace{1em}\@shortauthor\par\vspace{2em}}%
+ {\parskip=0.8em\@tableofcontents}%
+ {\vfill\hspace*{\fill}p. \theslidelabel\hspace*{\fill}}%
+ \end{minipage}%
+ }%
+ }%
+ \pgfputat{\pgfpoint{0.2in}{4.3in}}{%
+ \pgfbox[left,top]{%
+ \begin{minipage}[t][4.1in]{4.6in}%
+ \sffamily{\color{sb@title}\LARGE\@slidetitle\par}%
+ \vspace*{1.5em plus 1fill}%
+ \parskip=1.5ex plus0.5ex minus0.5ex\@slidebody\par%
+ \vspace*{0pt plus 1fill}%
+ \end{minipage}%
+ }%
+ }%
+ }%
+ \renewcommand{\@maketocsection}[3]{%
+ \raggedright\noindent%
+ \@ifcurrentsection{##1}{%
+ \@ifcurrentsubsection{0}{\textcolor{sb@hl}{##2}\par}%
+ {##2\par}%
+ }{##2\par}%
+ }%
+ \renewcommand{\@maketocsubsection}[4]{%
+ \raggedright\noindent%
+ \@ifcurrentsection{##1}{%
+ \@ifcurrentsubsection{##2}{%
+ {\leftskip=1.5em\textcolor{sb@hl}{##3}\par}%
+ }{%
+ {\leftskip=1.5em ##3\par}%
+ }%
+ }{%
+ \if@compress\else{\leftskip=1.5em ##3\par}\fi
+ }%
+ }%
+}
+
+\@newslidestyle{plain}{%
+ \renewcommand{\@makeslidebackground}{%
+ \begin{pgfscope}
+ \color{sb@bg}
+ \pgfrect[fill]{\pgfpoint\z@\z@}{\pgfpoint\slidewidth\slideheight}%
+ \@ifscreen{}{%
+ \color{black}%
+ \pgfrect[stroke]{\pgfpoint\z@\z@}{\pgfpoint\slidewidth\slideheight}%
+ }%
+ \end{pgfscope}
+ }%
+ \renewcommand{\@makeslidecontent}{\vspace*{\fill}\@slidebody\vspace*{\fill}}%
+}
+
+\@newslidestyle{outline}{%
+ \renewcommand{\@makeslidebackground}{%
+ \begin{pgfscope}
+ \color{sb@bg}
+ \pgfrect[fill]{\pgfpoint\z@\z@}{\pgfpoint\slidewidth\slideheight}%
+ \color{sb@sb}
+ \pgfrect[fill]{\pgfpoint\z@\z@}{\pgfpoint{0.5in}\slideheight}%
+ \pgfrect[fill]{\pgfpoint{5.5in}\z@}{\pgfpoint{0.5in}\slideheight}%
+ \@ifscreen{}{%
+ \color{black}%
+ \pgfrect[stroke]{\pgfpoint\z@\z@}{\pgfpoint\slidewidth\slideheight}%
+ }%
+ \end{pgfscope}%
+ }%
+ \renewcommand{\@makeslidecontent}{%
+ \vspace{0.2in}%
+ \hspace{0.7in}%
+ \begin{minipage}[b][4.1in][t]{4.6in}%
+ \sffamily%
+ {\centering\LARGE\color{sb@title}\@slidetitle\par}%
+ \vspace*{1.5em plus 1fill}\@slidebody\par%
+ \vspace*{0pt plus 1fill}%
+ \end{minipage}%
+ }%
+}
+
+\renewcommand{\maketitle}{%
+ \sffamily%
+ {\centering%
+ {\color{sb@sbt}\LARGE\@title\par}\vspace{3em}%
+ {\large\@author\par}\vspace{1.5em}%
+ {\large\@date\par}
+ }%
+}
+\renewcommand{\tableofcontents}[1][0.0-99.99]{%
+ \bgroup\parskip=0.4em\hangafter=1%
+ \def\@maketocsection##1##2##3{%
+ \@ifinrange{##1}{0}{#1}{{
+ \hangindent=2.5em%
+ \hspace{2em}\makebox[\z@][r]{##1.}\hspace{0.5em}##3\par%
+ }}{}%
+ }
+ \def\@maketocsubsection##1##2##3##4{%
+ \@ifinrange{##1}{##2}{#1}{{%
+ \hangindent=3.5em
+ \hspace{2.5em}\makebox[\z@][l]{$\bullet$}\hspace{1em}##3\par%
+ }}{}%
+ }
+ \@tableofcontents
+ \egroup
+}
+
+\@ifnotes{%
+ \addtolength{\textwidth}{1in}
+ \addtolength{\oddsidemargin}{-0.5in}
+}{}
+
+\setlength{\parindent}{\z@}
+\slidestyle{normal}
+\sloppy
diff --git a/macros/latex/contrib/talk/talk.cls b/macros/latex/contrib/talk/talk.cls
new file mode 100644
index 0000000000..aed90baf64
--- /dev/null
+++ b/macros/latex/contrib/talk/talk.cls
@@ -0,0 +1,418 @@
+%% talk -- (talk.cls) Class file
+%% A LaTeX class for creating presentations
+%% Author: Martin Wiebusch
+%%
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2003/12/01 or later.
+
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesClass{talk}[2006/07/11 v1.1]
+
+\def\pres@dt@notes{notes}
+\def\pres@dt@slides{slides}
+\def\pres@dt@screen{screen}
+\def\pres@doctype{}
+\newif\if@pres@rotate
+
+\def\@ifnotes#1#2{\ifx\pres@doctype\pres@dt@notes#1\else#2\fi}
+\def\@ifslides#1#2{\ifx\pres@doctype\pres@dt@slides#1\else#2\fi}
+\def\@ifscreen#1#2{\ifx\pres@doctype\pres@dt@screen#1\else#2\fi}
+
+\DeclareOption{notes}{\global\let\pres@doctype\pres@dt@notes}
+\DeclareOption{slides}{\global\let\pres@doctype\pres@dt@slides}
+\DeclareOption{screen}{\global\let\pres@doctype\pres@dt@screen}
+\DeclareOption{rotate}{\@pres@rotatetrue}
+\DeclareOption{norotate}{\@pres@rotatefalse}
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
+
+\ExecuteOptions{screen,rotate}
+\ProcessOptions\relax
+
+\LoadClass{article}
+
+\RequirePackage{multido}
+\RequirePackage{amsmath}
+\RequirePackage{graphicx}
+\RequirePackage{pgf}
+\RequirePackage{hyperref}
+
+% title and author
+%
+\def\title{\@ifnextchar[{\pres@titleii}{\pres@titlei}}
+\def\pres@titleii[#1]#2{\gdef\@title{#2}\gdef\@shorttitle{#1}}
+\def\pres@titlei#1{\pres@titleii[#1]{#1}}
+\def\author{\@ifnextchar[{\pres@authorii}{\pres@authori}}
+\def\pres@authorii[#1]#2{\gdef\@author{#2}\gdef\@shortauthor{#1}}
+\def\pres@authori#1{\pres@authorii[#1]{#1}}
+
+% collect@body (from amsmath.sty)
+%
+\long\def\pres@addto@envbody#1{\global\@envbody\@xp{\the\@envbody#1}}
+\long\def\pres@collect@body#1{%
+ \@envbody{\@xp#1\@xp{\the\@envbody}}%
+ \edef\process@envbody{\the\@envbody\@nx\end{\@currenvir}}%
+ \@envbody\@emptytoks \def\begin@stack{b}%
+ \begingroup
+ \@xp\let\csname\@currenvir\endcsname\pres@collect@@body
+ \edef\process@envbody{\@xp\@nx\csname\@currenvir\endcsname}%
+ \process@envbody
+}
+\long\def\pres@push@begins#1\begin#2{%
+ \ifx\end#2\else b\@xp\pres@push@begins\fi
+}
+\long\def\pres@collect@@body#1\end#2{%
+ \edef\begin@stack{\pres@push@begins#1\begin\end \@xp\@gobble\begin@stack}%
+ \ifx\@empty\begin@stack
+ \endgroup
+ \@checkend{#2}%
+ \pres@addto@envbody{#1}%
+ \else
+ \pres@addto@envbody{#1\end{#2}}%
+ \fi
+ \process@envbody % A little tricky! Note the grouping
+}
+
+
+% some definitions
+%
+\newlength{\slidewidth}
+\newlength{\slideheight}
+\newlength{\pres@hadjust}
+\newlength{\pres@vadjust}
+\def\pres@currentslidestyle{}
+\def\pres@oldslidestyle{}
+\def\@slidetitle{}
+\def\@slidebody{}
+\long\def\pres@defslidebody#1{\long\gdef\@slidebody{#1}}
+\def\pres@slidesmag{1}
+
+
+% section and subsection handling
+%
+\long\def\@tableofcontents{}
+\newcommand{\pres@artsection}[2][]{}
+\newcommand{\pres@artsubsection}[2][]{}
+\@ifnotes{%
+ \let\pres@artsection\section
+ \let\pres@artsubsection\subsection
+}{}
+\def\pres@addtocsection#1#2#3{%
+ \expandafter\gdef\expandafter\@tableofcontents\expandafter{\@tableofcontents\@maketocsection{#1}{#2}{#3}}%
+}
+\def\pres@addtocsubsection#1#2#3#4{%
+ \expandafter\gdef\expandafter\@tableofcontents\expandafter{\@tableofcontents\@maketocsubsection{#1}{#2}{#3}{#4}}%
+}
+\def\section{\@ifnextchar[{\@@pres@section}{\@pres@section}}
+\def\@pres@section#1{\@@pres@section[#1]{#1}}
+\def\@@pres@section[#1]#2{%
+ \pres@artsection[#1]{#2}
+ \@ifnotes{}{\refstepcounter{section}}
+ \addtocontents{ttc}{\string\pres@addtocsection{\the\c@section}{#1}{#2}}
+}
+\def\subsection{\@ifnextchar[{\@@pres@subsection}{\@pres@subsection}}
+\def\@pres@subsection#1{\@@pres@subsection[#1]{#1}}
+\def\@@pres@subsection[#1]#2{%
+ \pres@artsubsection[#1]{#2}
+ \@ifnotes{}{\refstepcounter{subsection}}
+ \addtocontents{ttc}{\string\pres@addtocsubsection{\the\c@section}{\the\c@subsection}{#1}{#2}}
+}
+\long\def\@ifcurrentsection#1#2#3{\ifnum\c@section=#1 #2\else#3\fi}
+\long\def\@ifcurrentsubsection#1#2#3{\ifnum\c@subsection=#1 #2\else#3\fi}
+\@input{\jobname.ttc}%
+\newwrite\tf@ttc
+\immediate\openout\tf@ttc\jobname.ttc\relax
+\newwrite\tf@toc
+\immediate\openout\tf@toc\jobname.toc\relax
+
+
+% table of contents
+%
+\long\def\maketitle{}
+\long\def\tableofcontents{}
+\long\def\pres@ifinrange#1#2[#3.#4-#5.#6]#7#8{%
+ \ifnum#1=#3
+ \ifnum#2<#4 #8\else #7\fi
+ \else
+ \ifnum#1=#5
+ \ifnum#2>#6 #8\else #7\fi
+ \else
+ \ifnum#1<#3 #8\else
+ \ifnum#1>#5 #8\else #7\fi
+ \fi
+ \fi
+ \fi
+}
+\long\def\@ifinrange#1#2#3#4#5{\pres@ifinrange{#1}{#2}[#3]{#4}{#5}}
+
+
+% default make commands
+%
+\long\def\pres@defaultslide{%
+ \vspace*{1.2em minus 0.4em}%
+ \centerline{\LARGE\@slidetitle}%
+ \vspace*{1.8em minus 0.6em}%
+ \@slidebody%
+ \vfill%
+ \raggedleft\tiny\@title\ -- \theslidelabel%
+}
+\def\pres@defaultslidebackground{%
+ \pgfsetlinewidth{0.8pt}
+ \color{black}
+ \pgfrect[stroke]{\pgfpointorigin}{\pgfpoint\slidewidth\slideheight}
+}
+\def\pres@restoredefaults{%
+ \gdef\@makeslidecontent{\pres@defaultslide}
+ \gdef\@makeslidebackground{\pres@defaultslidebackground}
+ \gdef\@makeslide{%
+ \@makeslidebackground%
+ \pgfputat{\pgfpointorigin}{\pgfbox[left,bottom]{%
+ \begin{minipage}[b][\slideheight][t]{\slidewidth}%
+ \@makeslidecontent%
+ \end{minipage}%
+ }}%
+ }
+ \gdef\@makenotesslide{\par\hspace*{\fill}\@slidebox\hspace*{\fill}\par}
+ \gdef\@maketocsection##1##2##3{}
+ \gdef\@maketocsubsection##1##2##3##4{}
+}
+\pres@restoredefaults
+
+
+% the slide environment
+%
+\def\@slidebox{%
+ \begin{pgfpicture}
+ \@ifslides{%
+ \pgftransformscale{\pres@slidesmag}%
+ \if@pres@rotate
+ \pgftransformrotate{90}%
+ \fi
+ }{}%
+ \pgfpathrectangle{\pgfpointorigin}{\pgfpoint\slidewidth\slideheight}%
+ \pgfusepath{use as bounding box}%
+ \pgflowlevelsynccm%
+ \@makeslide
+ \end{pgfpicture}%
+}
+
+\@ifnotes{\def\pres@makeslide{\noindent\@makenotesslide}}{}
+\@ifslides{%
+ \def\pres@makeslide{%
+ \vspace*{\fill}%
+ \vspace{2\pres@vadjust}
+ \noindent%
+ \hspace*{\fill}%
+ \hspace{2\pres@hadjust}
+ \@slidebox%
+ \hspace*{\fill}%
+ \vspace*{\fill}%
+ \newpage%
+ }%
+}{}
+\@ifscreen{\def\pres@makeslide{%
+ \noindent\@slidebox%
+ \newpage%
+}}{}
+
+\def\slide{\@ifnextchar[{\@@slide}{\@slide}}
+\long\def\@@slide[#1]#2{%
+ \refstepcounter{slide}
+ \csname pres@sty@#1\endcsname%
+ \long\global\def\@slidetitle{#2}
+ \pres@collect@body\pres@defslidebody%
+}
+\long\def\@slide#1{%
+ \refstepcounter{slide}
+ \csname pres@sty@\pres@currentslidestyle\endcsname
+ \long\global\def\@slidetitle{#1}
+ \pres@collect@body\pres@defslidebody%
+}
+\def\endslide{%
+ \global\@ignoretrue%
+ \pres@makeslide%
+}
+
+
+% slide styles
+%
+\long\def\@newslidestyle#1#2{%
+ \edef\@temp{#1}%
+ \expandafter\gdef\csname pres@sty@\@temp\endcsname{%
+ \pres@restoredefaults%
+ #2%
+ }%
+}
+\newcommand{\slidestyle}[1]{\gdef\pres@currentslidestyle{#1}}
+
+
+% slide and subslide numbering
+%
+\newcounter{slide}
+\newcounter{subslide}
+\def\theslide{\arabic{slide}}
+\def\thesubslide{\theslide.\arabic{subslide}}
+\def\theslidelabel{\theslide}
+
+% overlay commands
+%
+\@ifnotes{
+ \long\gdef\fromslide{\@ifnextchar*{\@fromslidestar}{\@fromslide}}
+ \long\gdef\@fromslide#1#2{#2}
+ \long\gdef\@fromslidestar*#1#2{#2}
+ \long\gdef\toslide{\@ifnextchar*{\@toslidestar}{\@toslide}}
+ \long\gdef\@toslide#1#2{#2}
+ \long\gdef\@toslidestar*#1#2{#2}
+ \long\gdef\onlyslide{\@ifnextchar*{\@onlyslidestar}{\@onlyslide}}
+ \long\gdef\@onlyslide#1#2{#2}
+ \long\gdef\@onlyslidestar*#1#2{#2}
+ \gdef\pres@makemultislide{\pres@makeslide}
+}{%
+ \long\gdef\fromslide{\@ifnextchar*{\@fromslidestar}{\@fromslide}}
+ \long\gdef\@fromslide#1#2{%
+ \ifnum\c@subslide<#1%
+ \pgfsys@begininvisible#2\pgfsys@endinvisible%
+ \else%
+ #2%
+ \fi%
+ }
+ \long\gdef\@fromslidestar*#1#2{%
+ \ifnum\c@subslide<#1%
+ \else%
+ #2%
+ \fi%
+ }
+ \long\gdef\toslide{\@ifnextchar*{\@toslidestar}{\@toslide}}
+ \long\gdef\@toslide#1#2{%
+ \ifnum\c@subslide>#1%
+ \pgfsys@begininvisible#2\pgfsys@endinvisible%
+ \else%
+ #2%
+ \fi%
+ }
+ \long\gdef\@toslidestar*#1#2{%
+ \ifnum\c@subslide>#1\relax%
+ \else%
+ #2%
+ \fi%
+ }
+ \long\gdef\onlyslide{\@ifnextchar*{\@onlyslidestar}{\@onlyslide}}
+ \long\gdef\@onlyslide#1#2{%
+ \ifnum\c@subslide=#1\relax%
+ #2%
+ \else%
+ \pgfsys@begininvisible#2\pgfsys@endinvisible%
+ \fi%
+ }
+ \long\gdef\@onlyslidestar*#1#2{%
+ \ifnum\c@subslide=#1\relax%
+ #2%
+ \fi%
+ }
+}
+\@ifslides{%
+ \def\pres@makemultislide{%
+ \setcounter{subslide}{0}%
+ \def\theslidelabel{\thesubslide}
+ \multido{}{\pres@msmax}{%
+ \refstepcounter{subslide}%
+ \vspace*{\fill}%
+ \noindent%
+ \hspace*{\fill}%
+ \@slidebox%
+ \hspace*{\fill}%
+ \vspace*{\fill}%
+ \newpage%
+ }%
+ }%
+}{}
+\@ifscreen{%
+ \def\pres@makemultislide{%
+ \setcounter{subslide}{0}%
+ \def\theslidelabel{\thesubslide}
+ \multido{}{\pres@msmax}{%
+ \refstepcounter{subslide}
+ \noindent\@slidebox%
+ \newpage%
+ }%
+ }%
+}{}
+\def\multislide{\@ifnextchar[{\@@multislide}{\@multislide}}
+\long\def\@@multislide[#1]#2#3{%
+ \refstepcounter{slide}
+ \csname pres@sty@#1\endcsname
+ \long\global\def\@slidetitle{#3}%
+ \global\def\pres@msmax{#2}%
+ \pres@collect@body\pres@defslidebody%
+}
+\long\def\@multislide#1#2{%
+ \refstepcounter{slide}%
+ \csname pres@sty@\pres@currentslidestyle\endcsname
+ \long\global\def\@slidetitle{#2}%
+ \global\def\pres@msmax{#1}%
+ \pres@collect@body\pres@defslidebody%
+}
+\def\endmultislide{%
+ \global\@ignoretrue%
+ \pres@makemultislide%
+}
+
+
+% notes
+%
+\newcommand{\pres@notes}[1]{\@ifnotes{#1}{}}
+\newenvironment{notes}{\pres@collect@body\pres@notes}{\global\@ignoretrue}
+
+
+% size settings
+%
+\AtBeginDocument{%
+ \AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}%
+}
+\def\pres@removemargins{%
+ \setlength\oddsidemargin{-1in}%
+ \setlength\evensidemargin{-1in}%
+ \setlength\topmargin{-1in}%
+ \setlength\headheight\z@%
+ \setlength\headsep\z@%
+ \setlength\topskip\z@%
+ \setlength\footskip\z@%
+ \setlength\textwidth\paperwidth%
+ \setlength\textheight\paperheight%
+}
+\def\@slidesize#1#2{
+ \setlength\slidewidth{#1}
+ \setlength\slideheight{#2}
+ \@ifscreen{%
+ \setlength\paperwidth\slidewidth%
+ \setlength\paperheight\slideheight%
+ \pres@removemargins%
+ }{}%
+ \@ifslides{\pres@removemargins}{}%
+}
+\def\slidesmag#1{\gdef\pres@slidesmag{#1}}
+\def\slidesadjust#1#2{%
+ \if@pres@rotate
+ \setlength{\pres@hadjust}{#2}%
+ \setlength{\pres@vadjust}{#1}%
+ \setlength{\pres@vadjust}{-\pres@vadjust}%
+ \else
+ \setlength{\pres@hadjust}{#1}%
+ \setlength{\pres@vadjust}{#2}%
+ \fi
+}
+
+\@slidesize{4in}{3in}
+\@ifnotes{}{\pagestyle{empty}}
+
+
+% footnote style
+%
+\def\thempfootnote{\@arabic\c@mpfootnote}
+\let\thanks\footnote
+
diff --git a/macros/latex/contrib/talk/talkdoc.pdf b/macros/latex/contrib/talk/talkdoc.pdf
new file mode 100644
index 0000000000..e615163709
--- /dev/null
+++ b/macros/latex/contrib/talk/talkdoc.pdf
Binary files differ
diff --git a/macros/latex/contrib/talk/talkdoc.tex b/macros/latex/contrib/talk/talkdoc.tex
new file mode 100644
index 0000000000..cc633b52ef
--- /dev/null
+++ b/macros/latex/contrib/talk/talkdoc.tex
@@ -0,0 +1,720 @@
+%% talkdoc -- (talkdoc.tex) documentation
+%% The documentation for the talk class
+%% Author: Martin Wiebusch
+%%
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2003/12/01 or later.
+
+\documentclass[12pt]{ltxdoc}
+\usepackage[small,bf]{caption}
+\usepackage{mdwtab}\setlength{\doublerulesep}{0pt}
+
+\addtolength{\oddsidemargin}{0.5in}
+
+\newcommand{\ccmd}[1]{\texttt{\symbol{`\\}\symbol{`@}#1}}
+
+\newcommand{\mref}[2]{\textsl{#1\space\ref{#2}}}
+\newcommand{\mrefs}[1]{\textsl{#1}}
+
+\newcommand{\pkg}[1]{\textsf{#1}}
+\newcommand{\var}[1]{\textrm{$\langle$\textit{#1}$\rangle$}}
+\newcommand{\txt}[1]{\textrm{#1}}
+
+\setlength{\parskip}{\medskipamount}
+
+\renewenvironment{quote}{\list{}{\leftmargin\parindent}\item[]}{\endlist}
+
+\title{The \pkg{talk} Document Class\thanks{This file has version number 1.0,
+ last revised 2005/08/09}}
+\author{Martin Wiebusch}
+
+\sloppy
+
+\begin{document}
+\maketitle
+\begin{abstract}
+ The \pkg{talk} document class allows you to create slides for screen
+ presentations or printing on transparencies. It also allows you to print
+ personal notes for your talk. You can create overlays and display structure
+ information (current section / subsection, table of contents) on your slides.
+ The main feature that distinguishes \pkg{talk} from other presentation classes
+ like \pkg{beamer} or \pkg{prosper} is that it allows the user to define an
+ arbitrary number of \emph{slide styles} and switch between these styles from
+ slide to slide. This way the slide layout can be adapted to the slide
+ content. For example, the title or contents page of a talk can be given a
+ slightly different layout than the other slides.
+
+ The \pkg{talk} class makes no restrictions on the slide design whatsoever. The
+ entire look and feel of the presentation can be defined by the user. The style
+ definitions should be put in a separate sty file. Currently the package comes
+ with only one set of pre-defined slide styles (sidebars.sty). Contributions
+ from people who are artistically more gifted than me are more than welcome!
+\end{abstract}
+\newpage
+\tableofcontents
+%
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Installation and Requirements}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%
+The \pkg{talk} class requires the packages \pkg{amsmath}, \pkg{pgf} version 1.18
+or above, \pkg{multido} and \pkg{hyperref}. They can all be obtained from
+\begin{quote}
+ |http://www.ctan.org|.
+\end{quote}
+
+To install the \pkg{talk} class, you have to copy the files |talk.cls| and
+|sidebars.sty| to a place where \LaTeX\ can find them.
+%
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Using \pkg{talk}}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%
+The usage of the \pkg{talk} class is almost independent of the chosen style
+definitions. Therefore style definitions are most conveniently included through
+separate \emph{style packages}. Currently \pkg{talk} comes with one such file
+called |sidebars.sty|. (I hope that in the future the number of available style
+packages will grow due to contributions from people that are artistically more
+gifted than I am.) The issue of writing your own style definitions is discussed
+in \mref{section}{sec:styles}. In this section we will see how to create a
+presentation using the \pkg{talk} class and some ready-to-use style package like
+|sidebars.sty|.
+
+\begin{figure}
+ \begin{quote}
+ |\documentclass[|\var{options}|]{talk}|\\
+ |\usepackage{|\var{style-def}|}|\\
+ $\vdots$\\
+ \txt{(more package inclusions)}\\
+ $\vdots$\\
+ |\title{|\var{title}|}|\\
+ |\author{|\var{author}|}|\\
+ |\date{|\var{date}|}|\\
+ $\vdots$\\
+ \txt{(global specifications required by \var{style-def})}\\
+ $\vdots$\\
+ |\begin{document}|\\
+ | \begin{slide}[|\var{slide-style}|]{|\var{slide-title}|}|\\
+ | |\txt{(body of first slide)}\\
+ | \end{slide}|\\
+ | \begin{notes}|\\
+ | |\txt{(notes on first slide)}\\
+ | \end{notes}|\\
+ | |$\vdots$\\
+ | |\txt{(more slides and notes)}\\
+ | |$\vdots$\\
+ | \section[|\var{short title}|]{|\var{long title}|}|\\
+ | |$\vdots$\\
+ | |\txt{(more slides and notes)}\\
+ | |$\vdots$\\
+ | \subsection[|\var{short title}|]{|\var{long title}|}|\\
+ | |$\vdots$\\
+ | |\txt{(more slides and notes)}\\
+ | |$\vdots$\\
+ | |\txt{(more sections and subsections)}\\
+ | |$\vdots$\\
+ |\end{document}|
+ \end{quote}
+ \caption{\label{fig:structure} The general structure of a presentation
+ \texttt{tex} file.}
+\end{figure}
+The general structure of a presentation |tex| file is shown in
+\mref{figure}{fig:structure}. Note that you can structure your talk in the
+usual way with |\section| and |\subsection| commands. How these commands are
+handled depends on the loaded style package.
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Class Options}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+\label{ssec:options}
+The \pkg{talk} class is loaded in the first line of the listing in
+\mref{figure}{fig:structure}:
+\begin{quote}
+ |\documentclass[|\var{options}|]{talk}|
+\end{quote}
+The available options are
+\begin{center}
+ |screen|, |slides|, |notes|, |rotate| and |norotate|.
+\end{center}
+The \pkg{talk} class is built upon the |article| class, so it will pass all
+unknown options to |article|. Thus, in principle, all options of the |article|
+class can be used with the \pkg{talk} class as well. However, some options like
+|twocolumn| etc.\ may lead to undesired results.
+
+The options |screen|, |slides| and |notes| determine the \emph{mode}
+in which your presentation is compiled. The options |rotate| and
+|norotate| only take effect in the |slides| mode.
+
+\DescribeMacro{screen}
+Use the |screen| mode to create a screen presentation. With this option
+the paper size is set to the slide size, so that your slides can be displayed
+without white margins using the fullscreen mode of your favorite document
+viewer.
+
+\DescribeMacro{slides\\rotate\\norotate}
+If you use the |slides| mode your presentation is prepared for printout on
+transparencies. The slides are centered horizontally and vertically on normal
+paper. The default paper size is A4, but you can change it by using any of the
+paper size options of the |article| class. The options |rotate| and
+|norotate| determine whether or not the slides are rotated by 90 degrees in
+counterclockwise direction. By default rotation is enabled.
+\DescribeMacro{\slidesmag}
+In |slides| mode the slides can also be magnified. You can set the magnification
+factor with
+\begin{quote}
+ |\slidesmag{|\var{factor}|}|.
+\end{quote}
+
+\DescribeMacro{notes}
+The |notes| mode allows you to print personal notes for your presentation. In
+this mode the slides are inserted in the flowing text, between your annotations.
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Style Packages and Slide Styles}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+Style definitions for the \pkg{talk} class are most conveniently included
+through a separate \emph{style package}. Style packages can be included with the
+usual |\usepackage| command:
+\begin{quote}
+ |\usepackage[|\var{package-options}|]{|\var{style-package}|}|.
+\end{quote}
+The available package options depend on the chosen style package. The principal
+task of a \pkg{talk} style package is to set the width and height of the slides
+and define a number of \emph{slide styles}. To identify the different slide
+styles, the style package should give them \emph{style names} like |title|,
+|framed|, |sidebar|, |plain|, etc. \DescribeMacro{\slidestyle} To switch
+between different slide styles you can use the command
+\begin{quote}
+ |\slidestyle{|\var{style-name}|}|.
+\end{quote}
+To change the slide style for only one slide you can pass a style name as an
+optional argument to the |slide| or |multislide| environment.
+
+\DescribeMacro{sidebars} The |sidebars| package has one option, |compress|,
+which affects the way in which the table of contents is displayed in the
+sidebar. It defines three slide styles called |plain|, |outline| and
+|normal|. The |plain| style has no decorations at all and can be used for the
+title page or for showing large pictures. The |outline| style is designed to
+show the structure of your talk. Use it, for example, for the contents page.
+The |normal| style should be used for all other slides. It has a sidebar showing
+the structure of your talk. The current section is highlighted.
+
+\DescribeMacro{\backgroundcolor}%
+\DescribeMacro{\sidebarcolor}%
+\DescribeMacro{\titlecolor}%
+\DescribeMacro{\sidebartitlecolor}%
+\DescribeMacro{\highlightcolor}%
+Colours can be set with the commands listed in \mref{table}{tab:colorcmds}.
+their syntax is
+\begin{quote}
+ |\|\var{color-command}|{|\var{red-value}|,|\var{green-value}|,|%
+ \var{blue-value}|}|
+\end{quote}
+where \var{color-command} is one of the commands listed in
+\mref{table}{tab:colorcmds} and \var{red-value}, \var{green-value} and
+\var{blue-value} are numbers between 0 and 1.
+\begin{table}
+ \centering
+ \begin{tabular}{lp{3in}}
+ \hlx{hhv[1pt]}
+ Command & Effect \\
+ \hlx{hv[1pt]}
+ |\backgroundcolor| & sets the colour of the slide background\\
+ |\sidebarcolor| & sets the colour of the sidebar\\
+ |\titlecolour| & sets the colour of the slide title\\
+ |\sidebartitlecolor| & sets the colour of the sidebar title\\
+ |\highlightcolor| & sets the colour of highlighted sections and
+ subsections in the sidebar\\
+ \hlx{hh}
+ \end{tabular}
+ \caption{\label{tab:colorcmds}The colour commands of the \pkg{sidebars}
+ package}
+\end{table}
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Global Specifications}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+\DescribeMacro{\title}\DescribeMacro{\author}\DescribeMacro{\date}
+Like the |article| class, \pkg{talk} allows you to specify the title, author
+and date of your talk with the commands
+\begin{quote}
+ |\title[|\var{short-title}|]{|\var{title}|}|\\
+ |\author[|\var{short-author}|]{|\var{author}|}|\\
+ |\date{|\var{date}|}|
+\end{quote}
+In what context the short versions \var{short-title} and \var{short-author} are
+used depends on the style package. The \pkg{sidebars} package displays
+\var{short-title} and \var{short-author} in the side bar. Other style packages
+may also define addtitional commands, that allow you to specify additional
+information like institute, logo, place where the talk was given etc.
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Environments}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+The \pkg{talk} class defines three environments: |slide|, |multislide| and
+|notes|. All typeset material in your talk should be enclosed in one of these
+environments.
+
+\DescribeMacro{slide}
+The |slide| environment is the most important environment in the \pkg{talk}
+class. It allows you to typeset the contents of your slides. Its syntax is:
+\begin{quote}
+ |\begin{slide}[|\var{style-name}|]{|\var{slide-title}|}|\\
+ | |\txt{(slide body)}\\ |\end{slide}|
+\end{quote}
+The \var{style-name} argument is optional. It must be the name of one of the
+slide styles defined in style package you have loaded. For the |sidebars|
+package the available slide styles are |plain|, |outline| and |normal|. If no
+\var{style-name} argument is given, \pkg{talk} uses the slide style specified in
+the last call of the |\slidestyle| command.
+
+\DescribeMacro{notes}
+The |notes| environment allows you to include annotations to your slides in
+the |tex| file. The contents of the |notes| environment are ignored if you
+compile your presentation in the |screen| or |slides| mode.
+
+\DescribeMacro{multislide}
+The |multislide| environment can be used to create overlays. Its syntax is:
+\begin{quote}
+ |\begin{multislide}[|\var{style-name}|]{|\var{sub-slides}|}|%
+ |{|\var{slide-title}|}|\\
+ | |\txt{(slide body)}\\
+ |\end{multislide}|
+\end{quote}
+As for the |slide| environment the optional \var{style-name} argument and the
+\var{slide-title} argument specify the slide style and the slide title. The
+\var{sub-slides} argument has to be an integer number greater than zero. It
+specifies the number of sub-slides, that the |multislide| environment will
+generate. In the body of the |multislide| environment, you can use the commands
+|\fromslide|, |\toslide| and |\onlyslide| to specify which material goes on
+which sub-slide.
+
+\DescribeMacro{\fromslide}\DescribeMacro{\toslide}\DescribeMacro{\onlyslide}
+The syntax of the commands |\fromslide|, |\toslide| and |\onlyslide| is:
+\begin{quote}
+ |\fromslide*{|$n$|}{|\var{material}|}|\\
+ |\toslide*{|$n$|}{|\var{material}|}|\\
+ |\onlyslide*{|$n$|}{|\var{material}|}|
+\end{quote}
+The |\fromslide*| command ignores \var{material} on the first $n-1$ sub-slides.
+The |\toslide*| command ignores \var{material} on all sub-slides after the
+$n$-th. The |\onlyslide*| command ignores \var{material} on all sub-slides exept
+the $n$-th. If you use the unstarred commands |\fromslide|, |\toslide| and
+|\onlyslide| the \var{material} is not ignored but made invisible, so that it
+still uses up the space (pretty much like the |\phantom| command).
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Title and Contents Pages}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+\label{sec:toc}
+Most talks begin with a title page showing the title of the talk, the name of
+the speaker and possibly additional information like the date and place where
+the talk is given, the institute of the speaker etc. For long talks you'll also
+want to show the stucture of your talk at the beginning.
+
+\DescribeMacro{\maketitle}\DescribeMacro{\tableofcontents}
+Style packages for the \pkg{talk} class should therefore redefine the standard
+\LaTeX\ commands |\maketitle| and |\tableofcontents| in such a way that they
+produce suitable title and contents pages. These commands should be used in the
+body of a slide environment. For example, with the |sidebars| style package
+you would create title and contents pages by writing
+\begin{quote}
+ |\begin{slide}[plain]{}|\\
+ | \maketitle|\\
+ |\end{slide}|
+\end{quote}
+and
+\begin{quote}
+ |\begin{slide}[outline]{Contents}|\\
+ | \tableofcontents|\\
+ |\end{slide}|
+\end{quote}
+
+For some talks the table of contents may not fit on one slide. The \pkg{talk}
+class cannot break material into multiple slides automatically, but it allows
+you to split the table of contents manually. To do this you can pass an
+optional argument to the |\tableofcontents| command, which has the following
+form:
+\begin{quote}
+ |\tableofcontents[|\var{fromsec}|.|\var{fromsubsec}%
+ |-|\var{tosec}|.|\var{tosubsec}|]|
+\end{quote}
+where \var{fromsec}, \var{fromsubsec}, \var{tosec} and \var{tosubsec} are
+integer numbers. Their names are self-explaining. Note that the argument of
+|\tableofcontents| must always have the form given above. If you wan to display
+the sections 3 to 5 with all their subsections on one slide, you have to write
+\begin{quote}
+ |\tableofcontents[3.0-5.99]|
+\end{quote}
+(assuming that section 5 does not have more than 99 subsections).
+%
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{The \pkg{talk} Class for Package Writers}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%
+\label{sec:styles}
+The entire look-and-feel of a \pkg{talk} presentation is determined by external
+style packages. The macros provided by the \pkg{talk} class itself only take
+care of more technical issues like
+\begin{itemize}
+ \item magnifying and positioning the slides on the paper,
+ \item creating overlays,
+ \item keeping a table of contents that is accessible on every slide,
+ \item keeping a catalog of slide styles and allowing the user to switch
+ between them.
+\end{itemize}
+To exploit these features, a style package writer needs to know some basic facts
+about the inner workings of the \pkg{talk} class.
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Mode Conditionals}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+As we have seen in \mref{section}{ssec:options} a \pkg{talk} presentation can be
+compiled in three different modes: |slides|, |screen| and |notes|. To implement
+mode-specific behaviour the \pkg{talk} class provides the following |if|
+commands:
+\DescribeMacro{\@ifslides}\DescribeMacro{\@ifscreen}\DescribeMacro{\@ifnotes}
+\begin{quote}
+ |\@ifslides{|\var{if-code}|}{|\var{else-code}|}|\\
+ |\@ifscreen{|\var{if-code}|}{|\var{else-code}|}|\\
+ |\@ifnotes{|\var{if-code}|}{|\var{else-code}|}|
+\end{quote}
+The \var{if-code} is executed if the talk is compiled in |slides|, |screen| or
+|notes| mode, respectively, and the \var{else-code} is executed otherwise.
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Slide Dimensions}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+\DescribeMacro{\slidewidth}\DescribeMacro{\slideheight}
+The width and height of the slides can be accessed through the |\slidewidth| and
+|\slideheight| commands.
+\DescribeMacro{\@slidesize}
+However, to set the slide dimensions you should always use the command
+\begin{quote}
+ |\@slidesize{|\var{width}|}{|\var{height}|}|
+\end{quote}
+as it also adjusts the papersize and slide positioning.
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Global Specifications}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+\DescribeMacro{\@title}\DescribeMacro{\@author}\DescribeMacro{\@date}
+The title, author and date set by the user with the |\title|, |\author| and
+|\date| commands are stored in the macros |\@title|, |\@author| and |\@date|.
+If you intend to display additional information like the speakers institute on
+your slides you should define an |\institute| command in analogy to the commands
+above:
+\begin{quote}
+ |\gdef\@institute{}|\\
+ |\newcommand{\institute}[1]{\gdef\@institute{#1}}|
+\end{quote}
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Counters}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+\DescribeMacro{slide\\subslide}
+In addition to the standard counters of the |article| class, \pkg{talk} defines
+the counters |slide| and |subslide|. The number of the current slide is stored
+in |slide|. The slides of a |multislide| environment have the same |slide|
+number and different |subslide| numbers.
+
+\DescribeMacro{\theslide}\DescribeMacro{\thesubslide}%
+The commands |\theslide| and |\thesubslide| can be used to print the slide or
+subslide number, respectively. They are defined as
+\begin{quote}
+ |\newcommand{\theslide}{\arabic{slide}}|\\
+ |\newcommand{\thesubslide}{\theslide.\arabic{subslide}}|
+\end{quote}
+You can redefine them to change the way the slide and subslide numbers
+are displayed
+
+\DescribeMacro{\theslidelabel}
+For printing labels on your slides you should use the |\theslidelabel|
+command. It calls |\theslide| when you are in a |slide| environment and
+|\thesubslide| when you are in a |multislide| environment.
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Style Definitions}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+To change the look-and-feel of your slides you have to redefine some or all of
+the following commands:
+\begin{quote}
+ |\@makeslide|\\
+ |\@makeslidebackground|\\
+ |\@makeslidecontent|\\
+ |\@makenotesslide|\\
+ |\@maketocsection|\\
+ |\@maketocsubsection|
+\end{quote}
+These commands will be called by the |slide|, |multislide| and |notes|
+environments. Their exact meaning will be explained later on.
+\DescribeMacro{\@newslidestyle}
+To create a \emph{named} slide style, you have to wrap a |\@newslidestyle|
+command around your definitions. A typical style definition takes the form
+\begin{quote}
+ |\@newslidestyle{|\var{style-name}|}{|\\
+ | \renewcommand{\@makeslide}{|\var{stuff}|}|\\
+ | \renewcommand{\@makeslidebackground}{|\var{stuff}|}|\\
+ | \renewcommand{\@makeslidecontent}{|\var{stuff}|}|\\
+ | \renewcommand{\@makenotesslide}{|\var{stuff}|}|\\
+ | \renewcommand{\@maketocsection}[3]{|\var{stuff}|}|\\
+ | \renewcommand{\@maketocsubsection}[4]{|\var{stuff}|}|\\
+ |}|
+\end{quote}
+
+The |\@newslidestyle| command simply dumps its second argument into a macro
+called |\pres@sty@|\var{style-name}. When the style is loaded
+with |\slidestyle{|\var{style-name}|}| or with the optional argument of the
+|slide| environment, all the |\@make|\ldots\ commands are reset to their default
+definitions. Then the macro |\pres@sty@|\var{style-name} is executed.
+
+Note that the |\renewcommand| calls in the second argument of |\@newslidestyle|
+appear in the definition of the |\pres@sty@|\var{style-name} command. Therefore
+the arguments of |\@maketocsection| and |\@maketocsubsection| have to be
+referenced with double hashes, for example
+\begin{quote}
+ |\@newslidestyle{|\var{style-name}|}{|\\
+ | \renewcommand{\@maketocsection}[3]{Section ##1: ##3}|\\
+ |}|
+\end{quote}
+Single hashes would refer to the arguments of |\pres@sty@|\var{style-name}.
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Typesetting Slides}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+\DescribeMacro{\@slidetitle}\DescribeMacro{\@slidebody}
+The |slide| and |multislide| environments store the slide title in the macro
+|\@slidetitle| and the slide body in the macro |\@slidebody|. When you redefine
+the various |\@make|\ldots\ commands you can therefore use |\@slidetitle| and
+|\@slidebody| to insert the title and body of the current slide.
+
+\DescribeMacro{\@makeslide} All the graphical wizardry in \pkg{talk} is done by
+the \pkg{pgf} package. To generate a slide the |slide| environment executes the
+macro |\@makeslide| inside a |pgfpicture| environment. Before the call to
+|\@makeslide| it executes several commands that set the bounding box of the
+picture to a box of width |\slidewidth| and height |\slideheight| and scales and
+rotates the picture in accordance with the on the compilation mode and class
+options. The |\@makeslide| macro should therefore expand to a sequence of valid
+\pkg{pgf} commands which draw the slide inside a box of width |\slidewidth| and
+height |\slideheight|, with the origin located at the lower-left corner.
+\DescribeMacro{\@slidebox} To obtain an LR box containing the properly
+scaled and rotated slide you can use the |\@slidebox| macro.
+
+\DescribeMacro{\@makenotesslide}
+If you compile in the |notes| mode the |slide| and |multislide| environments
+call |\@makenotesslide| to insert the current slide. By default the
+|\@makenotesslide| command simply centers the |\@slidebox|
+horizontally:
+\begin{quote}
+ |\newcommand{\@makenotesslide}{|\\
+ | \par\hspace*{\fill}\@slidebox\hspace*{\fill}\par|\\
+ |}|
+\end{quote}
+You can change this behaviour by redefining the |\@makenotesslide| command. For
+example, if you only want to print the title of each slide in your notes, you
+should include something like
+\begin{quote}
+ |\renewcommand{\@makenotesslide}{|\\
+ | \begin{center}\textbf{\@slidetitle}\end{center}|\\
+ |}|
+\end{quote}
+in your style definition.
+
+To change the way the slides appear in the |screen| and |slides| mode you could
+redefine the |\@makeslide| command. However, usually you'll want to draw the
+slide background with \pkg{pgf} and then typeset the contents of the slide in a
+minipage of width |\slidewidth| and height |\slideheight| placed on top of that
+picture.
+\DescribeMacro{\@makeslidebackground}\DescribeMacro{\@makeslidecontent}
+Therefore the \pkg{talk} class provides two macros |\@makeslidebackground| and
+|\@makeslidecontent| and a default definition for |\@makeslide| which does
+exactly the above: It executes |\@makeslidebackground| inside a |pgfpicture|
+environment, then covers the slide with a minipage of width |\slidewidth| and
+height |\slideheight| and then executes the |\@makeslidecontent| inside the
+minipage environment. Thus the |\@makeslidebackground| macro should expand to a
+series of \pkg{pgf} commands that draw the background of the slide, with the
+origin at the lower-left corner. The |\@makeslidecontent| macro should expand to
+whatever you want to put in the minipage. Here, you start with the current point
+in the upper left corner of the slide.
+
+In this way \pkg{talk} gives you complete artistic freedom in the design of your
+slides: It lets you define the macros that generate the slides while contents
+like the slide title and body are previously stored in macros like
+|\@slidetitle| and |\@slidebody|, so that you can insert them where you
+like. For completeness we now summarise all commands yielding user defined
+contents:
+\begin{description}
+ \item[\ccmd{slidetitle}] Title of the current slide.
+ \item[\ccmd{slidebody}] Body of the current slide.
+ \item[\texttt{\symbol{`\\}theslidelabel}] Label of the current slide. Shows
+ the slide number in a |slide| environment and the slide and subslide number
+ in a |multislide| environment.
+ \item[\ccmd{title}] Title of the presentation.
+ \item[\ccmd{shorttitle}] Short version of the title.
+ \item[\ccmd{author}] Author of the presentation.
+ \item[\ccmd{shortauthor}] Short version of the author.
+ \item[\ccmd{date}] Date specified with the |\date| command (|\today| by
+ default).
+ \item[\ccmd{tableofcontents}] Prints the table of contents. See the next
+ subsection for more information.
+\end{description}
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{The Table of Contents}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+\DescribeMacro{\@tableofcontents}
+The table of contents of your talk can be created with the |\@tableofcontents|
+macro. Its name is slightly misleading because, in fact, it allows you to
+display any kind of structure information on your slides. For example, you can
+use it to print only the title of the current section.
+
+\DescribeMacro{\@maketocsection}\DescribeMacro{\@maketocsubsection}
+The |\@tableofcontents| macro expands to a series of |\@maketocsection| and
+|\@maketocsubsection| commands. By default these commands do nothing. You can
+control the appearence of the table of contents by redefining them. Their syntax
+is
+\begin{quote}
+ |\@maketocsection{|\var{section}|}{|\var{short-title}|}{|\var{long-title}|}|
+ \\[\medskipamount]
+ |\@maketocsubsection{|\var{section}|}{|\var{subsection}|}%|\\
+ | {|\var{short-title}|}{|\var{long-title}|}|
+\end{quote}
+where \var{section} and \var{subsection} are integer numbers.
+
+\DescribeMacro{\@ifcurrentsection}\DescribeMacro{\@ifcurrentsubsection}
+Note that the |\@tableofcontents| macro always expands to the full list of
+sections and subsections. To implement a special treatment for the
+\emph{current} section or subsection you can use the |\@ifcurrentsection| and
+|\@ifcurrentsubsection| commands. Their syntax is
+\begin{quote}
+ |\@ifcurrentsection{|\var{number}|}{|\var{if-code}|}{|\var{else-code}|}|\\
+ |\@ifcurrentsubsection{|\var{number}|}{|\var{if-code}|}{|\var{else-code}|}|
+\end{quote}
+The \var{if-code} is executed if \var{number} matches the current section or
+subsection, respectively, and \var{else-code} is executed otherwise. For
+example, if you want to display the current section in the top left corner of
+each slide, your style definition should look somewhat like
+\begin{quote}
+ |\newslidestyle{|\var{style-name}|}{|\\
+ | \renewcommand{\@maketocsection}[3]{|\\
+ | \@ifcurrentsection{##1}{##3}{}|\\
+ | }|\\
+ | \renewcommand{\@makeslidecontent}{|\\
+ | \@tableofcontents|\\
+ | |$\vdots$\\
+ | }|\\
+ | |$\vdots$\\
+ |}|
+\end{quote}
+
+\DescribeMacro{\tableofcontents}
+Most talks begin with an outline of the talk's contents. As a package writer you
+should therefore provide a |\tableofcontents| command that allows the user to
+print the full table of contents. (\pkg{talk} already defines the
+|\tableofcontents| command, but it does nothing by default.) You can achieve
+this, too, by redefining |\@maketocsection| and |\@maketocsubsection| and then
+calling |\@tableofcontents|.
+
+\DescribeMacro{\@ifinrange}
+However, if the table of contents does not fit on one slide, the user should be
+able to split it, using an optional range argument of the form shown in
+\mref{section}{sec:toc}. It is the package writers task to implement this
+feature, but the parsing of the range argument is done by the |\@ifinrange|
+macro. Its syntax is
+\begin{quote}
+ |\@ifinrange{|\var{sec}|}{|\var{subsec}|}{|\var{range}|}{|\var{if-code}|}{|\var{else-code}|}|
+\end{quote}
+\var{sec} and \var{subsec} are section and subsection numbers and \var{range} is
+a string of the form
+\begin{quote}
+ \var{fromsec}|.|\var{fromsubsec}|-|\var{tosec}|.|\var{tosubsec}
+\end{quote}
+The \var{if-code} is executed if the subsection specified by \var{sec} and
+\var{subsec} lies in the range specified by \var{range}, the \var{else-code} is
+executed otherwise.
+
+A typical definition of the |\tableofcontents| command will therefore look as
+follows:
+\begin{quote}
+ |\renewcommand{\tableofcontents}[1][0.0-99.99]{|\\
+ | \bgroup|\\
+ | \def\@maketocsection##1##2##3{|\\
+ | \@ifinrange{##1}{0}{#1}{|\\
+ | ##1.\space ##3\par|\\
+ | }{}|\\
+ | }|\\
+ | \def\@maketocsubsection##1##2##3##4{|\\
+ | \@ifinrange{##1}{##2}{#1}{|\\
+ | ##1.##2.\space ##3\par|\\
+ | }{}|\\
+ | }|\\
+ | \@tableofcontents|\\
+ | \egroup|\\
+ |}|
+\end{quote}
+If you use grouping (|\bgroup| and |\egroup| or curly brackets) and plain \TeX\
+definitions (|\def| instead of |\renewcommand|), as shown above, your
+definitions remain local to the goup, so you don't have to worry about restoring
+the original definitions of |\@maketocsection| and |\@maketocsubsection|. A more
+sophisticated definition of the |\tableofcontents| command can be found in
+|sidebars.sty|.
+\newpage
+%
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Contact}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%
+For comments, bug reports, feature requests or submitting style packages please
+email to
+\begin{quote}
+ |martin.wiebusch@gmx.net|
+\end{quote}
+
+\bigskip
+\begin{flushright}
+ Martin Wiebusch, \today
+\end{flushright}
+\end{document}
+
+