diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-13 00:08:38 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-13 00:08:38 +0000 |
commit | dd41caba2db5472a4613f0583486e1d74df47a88 (patch) | |
tree | dce9eff43dac75b873d95056b0a16951abcff16f /Master/texmf-dist/tex/latex/talk | |
parent | eeaf08a04fbfb2c1023048d1354ebc5e121a71e9 (diff) |
talk
git-svn-id: svn://tug.org/texlive/trunk@1372 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/talk')
-rw-r--r-- | Master/texmf-dist/tex/latex/talk/sidebars.sty | 161 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/talk/talk.cls | 390 |
2 files changed, 551 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/talk/sidebars.sty b/Master/texmf-dist/tex/latex/talk/sidebars.sty new file mode 100644 index 00000000000..c8b7b07d0e8 --- /dev/null +++ b/Master/texmf-dist/tex/latex/talk/sidebars.sty @@ -0,0 +1,161 @@ +%% 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{\@makeslidebackground}{% + \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}% + }% + }% + \renewcommand{\@makeslidecontent}{% + \begin{pgfpicture}\z@\z@\z@\z@ + \pgfputat{\pgfpoint{5.1in}{-0.2in}}{% + \pgfbox[left,top]{% + \begin{minipage}[t][4.2in]{0.8in}% + \sffamily\tiny% + {\centering\tiny\sffamily\textcolor{sb@sbt}{\@title}\par% + \vspace{1em}\@author\par\vspace{2em}}% + {\parskip=0.8em\@tableofcontents}% + {\vfill\hspace*{\fill}p.\theslidelabel\hspace*{\fill}}% + \end{minipage}% + }% + }% + \pgfputat{\pgfpoint{0.2in}{-0.2in}}{% + \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}% + }% + }% + \end{pgfpicture} + } + \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}{% + \color{sb@bg} + \pgfrect[fill]{\pgfpoint\z@\z@}{\pgfpoint\slidewidth\slideheight}% + \@ifscreen{}{% + \color{black}% + \pgfrect[stroke]{\pgfpoint\z@\z@}{\pgfpoint\slidewidth\slideheight}% + }% + }% + \renewcommand{\@makeslidecontent}{\vspace*{\fill}\@slidebody\vspace*{\fill}}% +} + +\@newslidestyle{outline}{% + \renewcommand{\@makeslidebackground}{% + \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}% + }% + }% + \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/Master/texmf-dist/tex/latex/talk/talk.cls b/Master/texmf-dist/tex/latex/talk/talk.cls new file mode 100644 index 00000000000..794a8d0bae1 --- /dev/null +++ b/Master/texmf-dist/tex/latex/talk/talk.cls @@ -0,0 +1,390 @@ +%% 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}[2005/08/09 v1.0.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} + +% 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} +\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]{\pgfpoint\z@\z@}{\pgfpoint\slidewidth\slideheight} +} +\def\pres@restoredefaults{% + \gdef\@makeslidecontent{\pres@defaultslide} + \gdef\@makeslidebackground{\pres@defaultslidebackground} + \gdef\@makeslide{% + \begin{pgfpicture}\z@\z@\z@\z@% + \@makeslidebackground% + \end{pgfpicture}% + \begin{minipage}[b][\slideheight][t]{\slidewidth}% + \@makeslidecontent% + \end{minipage}% + } + \gdef\@makenotesslide{\par\hspace*{\fill}\@makeslide\hspace*{\fill}\par} + \gdef\@maketocsection##1##2##3{} + \gdef\@maketocsubsection##1##2##3##4{} +} +\pres@restoredefaults + + +% the slide environment +% +\@ifnotes{\def\pres@makeslide{\noindent\@makenotesslide}}{} +\@ifslides{% + \def\pres@makeslide{% + \vspace*{\fill}% + \noindent% + \hspace*{\fill}% + \scalebox{\pres@slidesmag}{% + \if@pres@rotate% + \rotatebox[origin=c]{90}{\@makeslide}% + \else% + \@makeslide% + \fi% + }% + \hspace*{\fill}% + \vspace*{\fill}% + \newpage% + }% +}{} +\@ifscreen{\def\pres@makeslide{\noindent\@makeslide\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}% + \scalebox{\pres@slidesmag}{% + \if@pres@rotate% + \rotatebox[origin=c]{90}{\@makeslide}% + \else% + \@makeslide% + \fi% + }% + \hspace*{\fill}% + \vspace*{\fill}% + \newpage% + }% + }% +}{} +\@ifscreen{% + \def\pres@makemultislide{% + \setcounter{subslide}{0}% + \def\theslidelabel{\thesubslide} + \multido{}{\pres@msmax}{% + \refstepcounter{subslide} + \noindent% + \@makeslide% + \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}} + +\@slidesize{4in}{3in} +\@ifnotes{}{\pagestyle{empty}} + + +% footnote style +% +\def\thempfootnote{\@arabic\c@mpfootnote} +\let\thanks\footnote + |