diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-13 00:03:07 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-13 00:03:07 +0000 |
commit | ae93734a22bdfdde08d69ec20c7b9404d8e8dc15 (patch) | |
tree | 2e665de5f8931352c916c54d1047f956eee77ebf /Master/texmf-dist/tex/latex/powerdot/powerdot.cls | |
parent | f847506524ef2b806df63d430c524c226fc3e88f (diff) |
powerdot
git-svn-id: svn://tug.org/texlive/trunk@1210 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/powerdot/powerdot.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/powerdot/powerdot.cls | 1222 |
1 files changed, 1222 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/powerdot/powerdot.cls b/Master/texmf-dist/tex/latex/powerdot/powerdot.cls new file mode 100644 index 00000000000..52051a71875 --- /dev/null +++ b/Master/texmf-dist/tex/latex/powerdot/powerdot.cls @@ -0,0 +1,1222 @@ +%% +%% This is file `powerdot.cls', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% powerdot.dtx (with options: `powerdot') +%% +%% ---------------------------------------------------------- +%% Copyright (C) 2005 Hendri Adriaens and Christopher Ellison +%% ---------------------------------------------------------- +%% +%% This work 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. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% This Current Maintainer of this work is Christopher Ellison. +%% +%% This work consists of all files listed in manifest.txt. +%% +\NeedsTeXFormat{LaTeX2e}[1995/12/01] +\ProvidesClass{powerdot} + [2005/10/09 v1.2 powerdot presentation class (HA,CE)] +\newif\ifpd@overlay +\newif\ifpd@section +\newif\ifpd@ifsetup +\newcounter{note} +\newcounter{slide} +\newcounter{pd@pause} +\newcounter{pd@section} +\newcounter{pd@overlay} +\newcounter{pd@trivlist} +\newcounter{pd@onslidedepth} +\newbox\pd@tba +\newbox\pd@tbb +\newtoks\pd@body +\newwrite\pd@bmout +\newwrite\pd@tocout +\newlength\pd@frsep +\newlength\pd@colsep +\newlength\slidewidth +\newlength\slideheight +\let\pd@cursetup\@empty +\RequirePackage{xkeyval}[2005/07/10] +\define@choicekey*[pd]{class}{orient}[\pd@tempa\pd@orient]{% + landscape,portrait}[landscape]{% + \XKV@addtolist@x\pd@cursetup\pd@tempa +} +\define@choicekey*[pd]{class}{paper}[\pd@tempa\pd@paper]{% + screen,a4paper,letterpaper}[screen]{% + \XKV@addtolist@x\pd@cursetup\pd@tempa +} +\define@choicekey*[pd]{class}{display}[\pd@tempa\pd@display]{% + slides,notes,slidesnotes}[slides]{% + \XKV@addtolist@x\pd@cursetup\pd@tempa +} +\define@choicekey*[pd]{class}{mode}[\pd@tempa\pd@mode]{% + present,print,handout}[present]{% + \XKV@addtolist@x\pd@cursetup\pd@tempa +} +\define@boolkeys[pd]{class}[pd@@]{% + nopsheader,hlentries,hlsections,blackslide,nopagebreaks% +}[true] +\define@cmdkey[pd]{class}[pd@@]{size}[11pt]{% + \def\pd@tempa##1pt{##1}% + \edef\pd@@size{\expandafter\pd@tempa\pd@@size}% +} +\define@cmdkey[pd]{class}[pd@@]{style}[default]{} +\define@key[pd]{class}{fleqn}[]{\input{fleqn.clo}} +\define@key[pd]{class}{leqno}[]{\input{leqno.clo}} +\presetkeys[pd]{class}{% + size,style,orient,paper,display,hlentries,mode}{} +\ProcessOptionsX[pd]<class>\relax +\def\pd@warn{\ClassWarning{powerdot}} +\def\pd@error#1{\ClassError{powerdot}{#1}\@ehd} +\def\pd@noportrait{% + \ifnum\pd@orient=\@ne\ifnum\pd@mode=2\else\pd@error{% + `\pd@@style' style does not support portrait orientation + }\fi\fi +} +\def\@nameedef#1{\expandafter\edef\csname#1\endcsname} +\ifnum\pd@mode>0 + \ifnum\pd@paper=\z@ + \@expandtwoargs\@removeelement{screen}\pd@cursetup\pd@cursetup + \XKV@addtolist@x\pd@cursetup{a4paper} + \def\pd@paper{1} + \pd@warn{you can't use `screen' format for this mode; + \MessageBreak I've switched to a4paper + } + \fi +\fi +\ifnum\pd@mode=2 + \ifnum\pd@orient=\z@ + \@expandtwoargs\@removeelement{landscape}\pd@cursetup\pd@cursetup + \XKV@addtolist@x\pd@cursetup{portrait} + \def\pd@orient{1} + \pd@warn{you can't use `landscape' for handout mode; + \MessageBreak I've switched to portrait + } + \fi +\fi +\ifcase\pd@paper + \def\pd@tempa{papersize={8.25in,11in}} +\or + \def\pd@tempa{papersize={210mm,297mm}} +\or + \def\pd@tempa{papersize={8.5in,11in}} +\fi +\ifnum\pd@orient=\z@ + \edef\pd@tempa{\pd@tempa,landscape} +\else + \edef\pd@tempa{\pd@tempa,portrait} +\fi +\PassOptionsToPackage\pd@tempa{geometry} +\LoadClass{article} +\let\pd@tempa\newcommand +\let\newcommand\def +\input{size\pd@@size.clo} +\let\newcommand\pd@tempa +\ifnum\pd@mode=2 + \RequirePackage[margin=2cm,includefoot]{geometry} +\else + \RequirePackage[mag=2000,margin=0pt,voffset=-\pd@@size pt]{geometry} + \geometry{top=.5\paperheight} +\fi +\let\Gm@showparams\@empty +\RequirePackage[setpagesize=false,dvips,pdfstartview=Fit,% + pageanchor=false,bookmarks=false]{hyperref} +\AtBeginDocument{\def\@pdfborder{0 0 0}} +\RequirePackage{graphicx} +\RequirePackage{pstricks}[2004/05/12] +\RequirePackage{xcolor}[2004/05/09] +\RequirePackage{enumitem}[2004/07/19] +\RequirePackage{float} +\newfloat{table}{H}{lot} +\newfloat{figure}{H}{lof} +\ifnum\pd@mode<2 + \pagestyle{empty} +\fi +\ifnum\pd@mode>0 + \pd@@blackslidefalse +\fi +\setlength\parindent{0pt} +\setlength\slidewidth{.5\paperwidth} +\setlength\slideheight{.5\paperheight} +\ifnum\pd@orient=\z@ + \AtBeginDvi{\special{!/landplus90 true store}} +\fi +\ifpd@@nopsheader\else + \AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}} + \ifcase\pd@paper + \AtBeginDvi{\special{!% + \@percentchar\@percentchar BeginPaperSize: letter + ^^Jletter^^J\@percentchar\@percentchar EndPaperSize + }} + \or + \AtBeginDvi{\special{!% + \@percentchar\@percentchar BeginPaperSize: a4 + ^^Ja4^^J\@percentchar\@percentchar EndPaperSize + }} + \or + \AtBeginDvi{\special{!% + \@percentchar\@percentchar BeginPaperSize: letter + ^^Jletter^^J\@percentchar\@percentchar EndPaperSize + }} + \fi +\fi +\ifcase\pd@paper\def\@pdfpagescrop{0 0 594 842}\fi +\def\@pdfcreator{LaTeX with powerdot class} +\ifpd@@blackslide\def\@pdfstartpage{2}\fi +\AtBeginDocument{% + \let\pd@color\XC@current@color + \ifpd@@blackslide + \begin{blackslide}[toc=,bm=,trans=Replace]{}% + \end{blackslide}% + \fi +} +\AtEndDocument{% + \immediate\write\@auxout{\string\newlabel{lastslide}% + {{}{\the\c@slide}{\relax}{}{}}}% +} +\define@cmdkeys[pd]{global}[pd@@]{lf,rf}[] +\define@key[pd]{global}{theslide}[]{\def\theslide{#1}} +\define@key[pd]{global}{thenote}[]{\def\thenote{#1}} +\define@key[pd]{global}{enumerate}{% + \ifx\enit@enum\@undefined + \def\enit@enum{#1}% + \else + \XKV@addtolist@n\enit@enum{#1}% + \fi +} +\define@key[pd]{global}{itemize}{% + \ifx\enit@item\@undefined + \def\enit@item{#1}% + \else + \XKV@addtolist@n\enit@item{#1}% + \fi +} +\define@key[pd]{global}{list}{% + \ifx\enit@list\@undefined + \def\enit@list{#1}% + \else + \XKV@addtolist@n\enit@list{#1}% + \fi +} +\define@key[pd]{global}{counters}{% + \XKV@addtolist@n\pd@@counters{#1}% +} +\def\pd@@counters{table,figure,equation,footnote,mpfootnote} +\define@cmdkey[pd]{glslide}[pd@@]{trans}{} +\setkeys[pd]{global,glslide}{% + lf,rf,theslide=\arabic{slide}~/~\pageref*{lastslide},% + thenote=note~\arabic{note}~of~slide~\arabic{slide},% + trans=Replace% +} +\AtBeginDocument{% + \disable@keys[pd]{global}{lf,rf,list,counters,theslide,thenote}% +} +\def\pdsetup{\setkeys[pd]{global,glslide}} +\define@cmdkeys[pd]{slide}[pd@@]{toc,bm} +\def\pdifsetup#1{% + \edef\pd@tempb{#1}% + \pd@pdifsetup\pd@tempb{landscape,portrait}% + \pd@pdifsetup\pd@tempb{screen,a4paper,letterpaper}% + \pd@pdifsetup\pd@tempb{slides,notes,slidesnotes}% + \pd@pdifsetup\pd@tempb{present,print,handout}% + \pd@pdifs@tup\pd@tempb +} +\def\pd@pdifsetup#1#2{% + \in@true + \@tempcnta\z@ + \XKV@for@n{#2}\pd@tempa{% + \@expandtwoargs\in@{,\pd@tempa,}{,#1,}% + \ifin@\advance\@tempcnta\@ne\fi + }% + \ifnum\@tempcnta=\z@\XKV@addtolist@x#1{#2}\fi +} +\def\pd@pdifs@tup#1{% + \in@true + \XKV@whilist\pd@cursetup\pd@tempa\ifin@\fi{% + \@expandtwoargs\in@{,\pd@tempa,}{,#1,}% + }% + \ifin@\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi +} +\def\pd@tempa#1{% + \define@key[pd]{template}{#1}[]{% + \ifpd@ifsetup\@namedef{pd@@#1}{##1}\fi + }% +} +\XKV@for@n{% + titlehook,titlepos,titlewidth,titlefont,% + texthook,textpos,textwidth,textfont,textheight,% + tochook,tocpos,tocwidth,tocfont,% + stochook,stocpos,stocwidth,stocfont,% + ntochook,ntocpos,ntocwidth,ntocfont,% + tocfrsep,tocsecsep,tocslidesep,% + tocsecm,toctcolor,tochlcolor,tochltcolor,% + tocsecindent,tocslideindent,% + lfhook,lfpos,lffont,lftemp,% + rfhook,rfpos,rffont,rftemp,% + iacolor% +}\pd@tempb{\expandafter\pd@tempa\expandafter{\pd@tempb}} +\define@cmdkey[pd]{template}[pd@@]{ifsetup}[]{% + \pd@pdifsetup\pd@@ifsetup{landscape,portrait}% + \pd@pdifsetup\pd@@ifsetup{screen,a4paper,letterpaper}% + \pd@pdifsetup\pd@@ifsetup{slides,notes,slidesnotes}% + \pd@pdifsetup\pd@@ifsetup{present,print,handout}% + \pd@pdifs@tup\pd@@ifsetup\pd@ifsetuptrue\pd@ifsetupfalse +} +\setkeys[pd]{template}{% + ifsetup,% + titlehook=Bl,titlepos,titlewidth=\slidewidth,% + titlefont=\raggedright,texthook=lt,textpos,% + textwidth=\slidewidth,textfont=\raggedright,% + textheight=\slideheight,% + tochook=lt,tocpos,tocwidth=.2\slidewidth,% + tocfont=\tiny\raggedright,% + stochook=lt,stocpos,stocwidth=.2\slidewidth,% + stocfont=\tiny\raggedright,% + ntochook=lt,ntocpos,ntocwidth=.2\slidewidth,% + ntocfont=\tiny\raggedright,% + tocfrsep=.5mm,tocsecsep=2ex,tocslidesep=0ex,% + tocsecm,toctcolor=black,tochlcolor=black,tochltcolor=white,% + tocsecindent=0pt,tocslideindent=0pt,% + lfhook=lB,lfpos,lffont=\scriptsize,lftemp=\pd@@lf,% + rfhook=rB,rfpos,rffont=\scriptsize,rftemp=\pd@@rf\ifx\pd@@rf\@empty + \else\ifx\theslide\@empty\else~--~\fi\fi\theslide,% + iacolor=lightgray% +} +\def\pddefinetemplate{\@testopt\pd@pddefinetemplate{}} +\def\pd@pddefinetemplate[#1]#2#3#4{% + \@namedef{#2}{\pd@getargsandbody{#2}}% + \@namedef{end#2}{\pd@slide}% + \ifx\@empty#1\@empty + \@namedef{pd@template@#2@options}{\setkeys[pd]{template}{#3}}% + \@namedef{pd@template@#2@bg}{#4}% + \else + \XKV@ifundefined{pd@template@#1@options}{% + \pd@error{template `#1' undefined}}{% + \pd@namelet{pd@template@#2@options}{pd@template@#1@options}% + \expandafter + \XKV@addtomacro@n\csname pd@template@#2@options\endcsname + {\setkeys[pd]{template}{ifsetup,#3}}% + \pd@namelet{pd@template@#2@bg}{pd@template@#1@bg}\expandafter + \XKV@addtomacro@n\csname pd@template@#2@bg\endcsname{#4}% + }% + \fi +} +\def\pd@namelet#1#2{% + \expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname +} +\def\pd@getargsandbody#1{\@testopt{\pd@get@rgsandbody{#1}}{}} +\def\pd@get@rgsandbody#1[#2]#3{% + \setkeys[pd]{glslide,slide}{#2}% + \def\pd@t@tle{#3}% + \pd@body{}% + \pd@get@rgs@ndbody{#1}% +} +\long\def\pd@get@rgs@ndbody#1#2\end#3{% + \def\pd@tempa{#1}% + \def\pd@tempb{#3}% + \ifx\pd@tempa\pd@tempb + \pd@body\expandafter{\the\pd@body#2}% + \def\pd@tempa{\end{#1}}% + \else + \pd@body\expandafter{\the\pd@body#2\end{#3}}% + \def\pd@tempa{\pd@get@rgs@ndbody{#1}}% + \fi + \pd@tempa +} +\def\pd@slide{% + \def\pd@tempa{note}% + \let\pd@tempb\pd@sl@de + \ifcase\pd@display + \ifx\@currenvir\pd@tempa\let\pd@tempb\relax\fi + \or + \ifx\@currenvir\pd@tempa\else + \def\pd@tempa{titleslide}% + \ifx\@currenvir\pd@tempa\else + \let\pd@tempb\relax + \stepcounter{slide}% + \fi + \fi + \fi + \pd@tempb +} +\def\pd@sl@de{% + \pd@overlayfalse + \def\pd@nooverlays{1}% + \setcounter{pd@overlay}\@ne + \let\pd@labels\@empty + \pd@savecounters + \pd@sl@d@ + \@whilenum\c@pd@overlay<\pd@nooverlays\do{% + \pd@overlaytrue + \pd@restorecounters + \stepcounter{pd@overlay}% + \pd@sl@d@ + }% +} +\def\pd@sl@d@{% + \stepcounter{slide}\newpage + \edef\@currentlabel{\the\c@slide}% + \pst@Verb{InitOL /TheOL (0) def}% + \pst@Verb{(0) BOL}% + \@nameuse{pd@template@\@currenvir @options}% + {\@nameuse{pd@template@\@currenvir @bg}}% + \pd@pdftrans + \ifpd@overlay + \addtocounter{slide}\m@ne + \else + \def\pd@tempa{note}% + \ifx\@currenvir\pd@tempa\else + \pd@maketocbm0% + \hyper@anchorstart{slide.\the\c@slide}\hyper@anchorend + \fi + \fi + \def\pd@reloverlay{1}% + \let\pd@closeitem\relax + \def\pd@currentstate{0}% + \let\pd@currenttype\relax + \setcounter{pd@pause}\@ne + \let\pd@revert\@firstofone + \setcounter{pd@onslidedepth}\z@ + \ifx\pd@@titlepos\@empty\else + \def\pd@tempa{% + \begin{minipage}\pd@@titlewidth + \pd@@titlefont\strut + \ifpd@section + \expandafter\pd@sectiontitle\expandafter{\pd@t@tle}% + \else + \expandafter\pd@slidetitle\expandafter{\pd@t@tle}% + \fi + \end{minipage}% + }% + \rput[\pd@@titlehook](\pd@@titlepos){% + \ifpd@@blackslide + \hyperlink{blackslide}{\pd@tempa}% + \else + \pd@tempa + \fi + }% + \fi + \ifx\pd@@tocpos\@empty\else + \rput[\pd@@tochook](\pd@@tocpos){% + \begin{minipage}\pd@@tocwidth + \let\pd@usedtocfont\pd@@tocfont\pd@puttoc0% + \end{minipage}% + }% + \fi + \ifx\pd@@stocpos\@empty\else + \rput[\pd@@stochook](\pd@@stocpos){% + \begin{minipage}\pd@@stocwidth + \let\pd@usedtocfont\pd@@stocfont\pd@puttoc1% + \end{minipage}% + }% + \fi + \ifx\pd@@ntocpos\@empty\else + \rput[\pd@@ntochook](\pd@@ntocpos){% + \begin{minipage}\pd@@ntocwidth + \let\pd@usedtocfont\pd@@ntocfont\pd@puttoc2% + \end{minipage}% + }% + \fi + \ifx\pd@@lfpos\@empty\else + \rput[\pd@@lfhook](\pd@@lfpos){\pd@@lffont\pd@@lf}% + \fi + \ifx\pd@@rfpos\@empty\else + \rput[\pd@@rfhook](\pd@@rfpos){\pd@@rffont\pd@@rftemp}% + \fi + \ifx\pd@@textpos\@empty\else + \rput[\pd@@texthook](\pd@@textpos){% + \begin{pd@minipage}% + \pd@@textfont\the\pd@body + \end{pd@minipage}% + }% + \fi +} +\def\pd@minipage{% + \leavevmode + \@pboxswfalse + \setlength\@tempdima\pd@@textwidth + \def\@mpargs{{t}{\pd@@textheight}[t]{\pd@@textwidth}}% + \setbox\@tempboxa\vbox\bgroup + \color@begingroup + \hsize\@tempdima + \textwidth\hsize + \columnwidth\hsize + \@parboxrestore + \let\@footnotetext\@mpfootnotetext + \let\@listdepth\@mplistdepth + \@mplistdepth\z@ + \@minipagerestore + \@setminipage +} +\def\endpd@minipage{% + \par + \unskip + \ifvoid\@mpfootins\else + \vfill + \normalcolor + \footnoterule + \unvbox\@mpfootins + \fi + \@minipagefalse + \color@endgroup + \egroup + \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}% +} +\def\pd@savecounters{% + \XKV@for@o\pd@@counters\pd@tempa{% + \expandafter\xdef\csname pd@counter@\pd@tempa\endcsname{% + \expandafter\the\csname c@\pd@tempa\endcsname + }% + }% +} +\def\pd@restorecounters{% + \XKV@for@o\pd@@counters\pd@tempa{% + \setcounter{\pd@tempa}{\csname pd@counter@\pd@tempa\endcsname}% + }% +} +\def\pd@notet{0} +\pddefinetemplate{note}{% + titlepos={.04\slidewidth,.92\slideheight},% + titlefont=\let\pd@slidetitle\@firstofone\color{black}\Large,% + textpos={.07\slidewidth,.82\slideheight},% + textfont=\color{black},textwidth=.86\slidewidth,% + lfpos={.04\slidewidth,.035\slideheight},% + lffont=\color{black}\scriptsize,% + rfpos={.96\slidewidth,.035\slideheight},% + rffont=\color{black}\scriptsize,% + rftemp=\pd@@rf\ifx\pd@@rf\@empty\else + \ifx\thenote\@empty\else~--~\fi\fi\thenote,% +}{% + \addtocounter{slide}\m@ne + \ifnum\c@slide=\pd@notet + \stepcounter{note}% + \else + \setcounter{note}{1}% + \fi + \xdef\pd@notet{\the\c@slide}% + \psline[linewidth=.5pt](0,.87\slideheight)% + (\slidewidth,.87\slideheight)% + \psline[linewidth=.5pt](0,.08\slideheight)% + (\slidewidth,.08\slideheight)% +} +\pddefinetemplate{blackslide}{}{% + \addtocounter{slide}\m@ne + \hyper@anchorstart{blackslide}\hyper@anchorend + \psframe*[linecolor=black](0,0)(\slidewidth,\slideheight)% + {\color{black}% + \rput[cm](.5\slidewidth,.5\slideheight){% + \Acrobatmenu{GoBack}{\setlength\fboxsep{10cm}\fbox{GoBack}}}}% +} +\pddefinetemplate{emptyslide}{textpos={0,\slideheight}}{} +\let\pd@orig@maketitle\maketitle +\def\maketitle{% + \begin{titleslide}[toc=,bm=,trans=Replace]{}% + \let\footnote\thanks + \def\thefootnote{\@fnsymbol\c@footnote}% + {\pd@title{\pd@@titlefont\@title}\par}{% + \vskip2em\pd@@textfont + \begin{tabular}[t]{c}% + \@author + \end{tabular}\par + \vskip1.5em\small\@date + }\par + \small\@thanks + \vfil\null + \end{titleslide}% + \c@footnote\z@ +} +\def\pd@maketocbm#1{% + \def\pd@tempa{\immediate\write\pd@bmout{% + \string\pdbookmark{sec.\the\c@pd@section\ifnum#1=\z@.slide\fi}{% + \ifnum#1=\z@ sec.\the\c@pd@section\fi}{\the\c@slide}% + {\the\@temptokena}% + }}% + \ifx\pd@@bm\@undefined + \@temptokena\expandafter{\pd@t@tle}% + \else + \ifx\pd@@bm\@empty + \let\pd@tempa\relax + \else + \@temptokena\expandafter{\pd@@bm}% + \fi + \fi + \pd@tempa + \def\pd@tempa{\immediate\write\pd@tocout{% + \string\pdcontentsline{#1}{\the\c@slide}{\the\@temptokena}% + }}% + \ifx\pd@@toc\@undefined + \@temptokena\expandafter{\pd@t@tle}% + \else + \ifx\pd@@toc\@empty + \let\pd@tempa\relax + \else + \@temptokena\expandafter{\pd@@toc}% + \fi + \fi + \pd@tempa +} +\def\pdbookmark#1#2#3#4{% + \@tempcnta\pd@pdb@@kmark{#2}% + \advance\@tempcnta\@ne + \@nameedef{pd@be@#2}{\the\@tempcnta}% +} +\def\pd@pdb@@kmark#1{% + \@ifundefined{pd@be@#1}0{\csname pd@be@#1\endcsname}% +} +\def\pd@pdbookmark#1#2#3#4{% + \pdfstringdef\pd@tempa{#4}% + \pdfmark{pdfmark=/OUT,% + Count={\pd@pdb@@kmark{#1}},Dest={slide.#3},% + View={/XYZ null null null},Title={\pd@tempa}% + }% +} +\def\pdcontentsline#1#2#3{% + \ifnum\@tempcnta>\z@ + \@nameedef{pd@te@\the\@tempcnta @start}{\pd@tempa}% + \@namedef{pd@te@\the\@tempcnta @stop}{#2}% + \fi + \def\pd@tempa{#2}% + \advance\@tempcnta\@ne + \@namedef{pd@te@\the\@tempcnta}{% + \pdcontentsline{#1}{#2}{#3}% + }% +} +\AtBeginDocument{% + \InputIfFileExists{\jobname.bm}{}{}% + \let\pdbookmark\pd@pdbookmark + \InputIfFileExists{\jobname.bm}{}{}% + \immediate\openout\pd@bmout\jobname.bm\relax + \@tempcnta\z@ + \def\pd@tempa{0}% + \InputIfFileExists{\jobname.toc}{}{}% + \edef\pd@notocentries{\the\@tempcnta}% + \@tempcntb\pd@tempa + \advance\@tempcntb\@ne + \@nameedef{pd@te@\the\@tempcnta @start}{\pd@tempa}% + \@nameedef{pd@te@\the\@tempcnta @stop}{\the\@tempcntb}% + \immediate\openout\pd@tocout\jobname.toc\relax + \let\pdcontentsline\pd@pdcontentsline +} +\def\pd@puttoc#1{% + \@tempcnta\z@ + \@tempcntb\z@ + \@tempswatrue + \def\pd@toctype{#1}% + \@whilenum\@tempcnta<\pd@notocentries\do{% + \advance\@tempcnta\@ne + \@nameuse{pd@te@\the\@tempcnta}% + }% +} +\def\pd@pdcontentsline#1#2#3{% + \let\pd@tempa\relax + \ifcase\pd@toctype + \ifcase#1\relax + \ifnum\@tempcntb=\z@ + \let\pd@tempa\pd@tocdisplay + \else + \ifnum\@tempcntb=\c@pd@section + \let\pd@tempa\pd@tocdisplay + \fi + \fi + \or + \global\advance\@tempcntb\@ne + \let\pd@tempa\pd@tocdisplay + \or + \global\advance\@tempcntb\@ne + \ifnum\@tempcntb=\c@pd@section + \let\pd@tempa\pd@tocdisplay + \fi + \fi + \or + \ifcase#1\relax\or + \global\advance\@tempcntb\@ne + \let\pd@tempa\pd@tocdisplay + \or + \global\advance\@tempcntb\@ne + \ifnum\@tempcntb=\c@pd@section + \let\pd@tempa\pd@tocdisplay + \fi + \fi + \or + \ifnum#1=\z@ + \ifnum\@tempcntb=\c@pd@section + \let\pd@tempa\pd@tocdisplay + \fi + \else + \global\advance\@tempcntb\@ne + \fi + \fi + \ifpd@@hlentries\ifx\pd@tempa\relax\else + \ifnum#1=\z@ + \ifnum\c@slide<\@nameuse{pd@te@\the\@tempcnta @start}% + \else + \ifnum\c@slide<\@nameuse{pd@te@\the\@tempcnta @stop}% + \let\pd@tempa\pd@tochighlight + \fi + \fi + \else + \ifpd@@hlsections + \ifnum\@tempcntb=\c@pd@section + \let\pd@tempa\pd@tochighlight + \fi + \else + \ifnum#2=\c@slide\ifnum\@nameuse{pd@te@\the + \@tempcnta @stop}=\c@slide\else + \let\pd@tempa\pd@tochighlight + \fi\fi + \fi + \fi + \fi\fi + \ifx\pd@tempa\relax\else + \if@tempswa\@tempswafalse\else + \pd@usedtocfont + \ifnum#1=\z@\vskip\pd@@tocslidesep\else\vskip\pd@@tocsecsep\fi + \fi + \ifnum#1=\z@\else\pd@@tocsecm\fi + \ifcase\pd@toctype + \@tempdimb\pd@@tocwidth + \or + \@tempdimb\pd@@stocwidth + \or + \@tempdimb\pd@@ntocwidth + \fi + \ifnum#1=\z@ + \ifnum\@tempcntb=\z@\@tempdima\z@\else + \@tempdima\pd@@tocslideindent + \advance\@tempdimb-\pd@@tocslideindent + \fi + \hyperlink{slide.#2}{\pd@tempa{\pd@tocslide{#3}}}% + \else + \@tempdima\pd@@tocsecindent + \advance\@tempdimb-\pd@@tocsecindent + \hyperlink{slide.#2}{\pd@tempa{\pd@tocsection{#3}}}% + \fi + \par + \fi +} +\define@choicekey[pd]{toc}{content}[\pd@tempa\pd@content]{% + all,sections,currentsection,future,futuresections}[all]{} +\define@choicekey[pd]{toc}{type}[\pd@tempa\pd@type]{0,1}[0]{} +\presetkeys[pd]{toc}{content,type}{} +\def\tableofcontents{\@testopt\pd@tableofcontents{}} +\def\pd@tableofcontents[#1]{% + \begingroup + \setkeys[pd]{toc}{#1}% + \let\pd@tempc\z@ + \def\pdcontentsline##1##2##3{% + \ifnum##1>\z@\advance\@tempcntb\@ne\fi + \let\pd@tempb\@empty + \def\pd@tempa{\hyperlink{slide.##2}{\pd@tempb##3}\par}% + \ifnum\pd@type=\z@ + \def\pd@tempd{\let\pd@tempa\relax}% + \else + \def\pd@tempd{\def\pd@tempb{\color\pd@@iacolor}}% + \fi + \ifcase##1\or\let\pd@tempc\z@\or + \ifnum\@tempcntb=\c@pd@section + \let\pd@tempc\z@ + \else + \let\pd@tempc\@ne + \fi + \fi + \ifnum\pd@tempc=\@ne\pd@tempd\fi + \ifcase\pd@content\or + \ifnum##1=\z@\let\pd@tempa\relax\fi + \or + \ifnum\@tempcntb=\c@pd@section\else\pd@tempd\fi + \or + \ifnum\@tempcnta<\c@slide\pd@tempd\fi + \or + \ifnum\@tempcntb<\c@pd@section\pd@tempd\fi + \ifnum##1=\z@\pd@tempd\fi + \fi + \ifnum##1>\z@\XKV@addtomacro@n\pd@tempb\bfseries\fi + \ifx\pd@tempa\relax\else + \if@tempswa\@tempswafalse\else + \ifnum##1=\z@\else\vskip5pt\fi + \fi + \ifnum##1=\z@\ifnum\@tempcntb=\z@\else\hskip15pt\fi\fi + \pd@tempa + \fi + }% + \@tempcnta\z@ + \@tempcntb\z@ + \@tempswatrue + \@whilenum\@tempcnta<\pd@notocentries\do{% + \advance\@tempcnta\@ne + \@nameuse{pd@te@\the\@tempcnta}% + }% + \endgroup +} +\define@choicekey*[pd]{section}{tocsection}[\pd@tempa\pd@tempb]{% + false,true,hidden}[true]{} +\define@boolkey[pd]{section}[pd@@]{slide}[true]{} +\define@cmdkey[pd]{section}[pd@@]{template}[slide]{% + \def\pd@tempa{slide}% + \ifx\pd@@template\pd@tempa + \let\pd@@template\pd@@sectemp + \else + \def\pd@tempa{wideslide}% + \ifx\pd@@template\pd@tempa + \let\pd@@template\pd@@widesectemp + \fi + \fi +} +\presetkeys[pd]{section}{tocsection,slide,template}{} +\define@cmdkeys[pd]{section}[pd@@]{sectemp,widesectemp}[slide] +\setkeys[pd]{section}{sectemp,widesectemp} +\AtBeginDocument{\disable@keys[pd]{section}{sectemp,widesectemp}} +\let\pd@orig@section\section +\def\section{\@testopt\pd@section{}} +\def\pd@section[#1]#2{% + \begingroup + \pd@sectiontrue + \setkeys*[pd]{section}{#1}% + \ifnum\pd@tempb=\z@ + \ifpd@@slide + \toks@{#2}% + \@temptokena\expandafter{\XKV@rm}% + \edef\pd@tempa{% + \noexpand\begin{\pd@@template}% + [bm={\the\toks@},toc={\the\toks@},% + \the\@temptokena]{\the\toks@}% + \noexpand\end{\pd@@template}% + }% + \pd@tempa + \fi + \else + \setrmkeys*[pd]{slide}% + \stepcounter{pd@section}% + \stepcounter{slide}% + \def\pd@t@tle{#2}% + \pd@maketocbm\pd@tempb + \addtocounter{slide}\m@ne + \ifpd@@slide + \toks@{#2}% + \@temptokena\expandafter{\XKV@rm}% + \edef\pd@tempa{% + \noexpand\begin{\pd@@template}% + [\the\@temptokena,bm=,toc=]{\the\toks@}% + \noexpand\end{\pd@@template}% + }% + \pd@tempa + \fi + \fi + \endgroup +} +\def\onslide{\XKV@ifstar{\pd@onslide1}{% + \XKV@ifplus{\pd@onslide2}{\pd@onslide0}}% +} +\def\pd@onslide#1#2{% + \pd@testdisp0{#2}% + \if@tempswa + \let\pd@tempa\@firstofone + \else + \ifcase#1\relax + \long\def\pd@tempa##1{% + \pst@Verb{(1) BOL}% + \stepcounter{pd@onslidedepth}% + ##1% + \addtocounter{pd@onslidedepth}\m@ne + \ifnum\c@pd@onslidedepth=\z@\ifnum\pd@currentstate=\z@ + \pst@Verb{(0) BOL}% + \fi\fi + }% + \or + \long\def\pd@tempa##1{\@bsphack\@esphack}% + \or + \long\def\pd@tempa##1{{\color\pd@@iacolor##1}}% + \fi + \fi + \pd@tempa +} +\def\pd@testdisp#1#2{% + \@tempswafalse + \XKV@for@n{#2}\pd@tempa{\expandafter\pd@t@stdisp\pd@tempa--\@nil#1}% +} +\def\pd@t@stdisp#1-#2-#3\@nil#4{% + \ifx\@empty#1\@empty\relax + \ifnum#4=\z@ + \pd@checkrel#2\@nil\@tempcnta + \else + \@tempcnta#2% + \def\pd@reloverlay{1}% + \fi + \pd@compnooverlays\@tempcnta + \ifnum\c@pd@overlay>\@tempcnta\else\@tempswatrue\fi + \else + \ifnum#4=\z@ + \pd@checkrel#1\@nil\@tempcnta + \else + \@tempcnta#1% + \def\pd@reloverlay{#1}% + \fi + \ifx\@empty#2\@empty\relax + \pd@compnooverlays\@tempcnta + \ifx\@empty#3\@empty\relax + \ifnum\c@pd@overlay=\@tempcnta\@tempswatrue\fi + \else + \ifnum\c@pd@overlay<\@tempcnta\else\@tempswatrue\fi + \fi + \else + \ifnum#4=\z@ + \pd@checkrel#2\@nil\@tempcntb + \else + \@tempcntb#2% + \fi + \pd@compnooverlays\@tempcntb + \ifnum\c@pd@overlay<\@tempcnta\else + \ifnum\c@pd@overlay>\@tempcntb\else\@tempswatrue\fi + \fi + \fi + \fi +} +\def\pd@checkrel#1#2\@nil#3{% + \def\pd@tempa{#1}% + \def\pd@tempb{+}% + \ifx\pd@tempa\pd@tempb + #3#2\advance#3\pd@reloverlay + \else#3#1#2\fi +} +\def\pd@compnooverlays#1{% + \ifnum#1>\pd@nooverlays\xdef\pd@nooverlays{\the#1}\fi\relax +} +\let\pd@orig@item\@item +\def\@item[#1]{\@ifnextchar<{\pd@item[#1]}{\pd@item[#1]<>}} +\def\pd@item[#1]<#2>{% + \pd@closeitem + \ifx\pd@@type\pd@currenttype\else + \ifnum\pd@@type=\z@ + \pst@Verb{(1) BOL}% + \else + \pst@Verb{(0) BOL}% + \normalcolor + \fi + \global\let\pd@currenttype\pd@@type + \fi + \ifnum\pd@currentstate=\z@ + \normalcolor\pst@Verb{(0) BOL}% + \pd@hide{#2}% + \else + \color\pd@@iacolor + \fi + \ifx\@empty#2\@empty\else + \def\pd@closeitem{\gdef\pd@currentstate{0}}% + \fi + \pd@orig@item[#1]\leavevmode\ignorespaces +} +\let\pd@orig@@trivlist\@trivlist +\def\@trivlist{% + \global\expandafter\let\csname pd@currentstate\the\c@pd@trivlist + \endcsname\pd@currentstate + \ifnum\pd@@type=\z@\let\pd@closeitem\relax\fi + \stepcounter{pd@trivlist}% + \pd@orig@@trivlist +} +\let\pd@orig@endtrivlist\endtrivlist +\def\endtrivlist{% + \addtocounter{pd@trivlist}\m@ne + \pd@revert{% + \global\expandafter\let\expandafter\pd@currentstate\csname + pd@currentstate\the\c@pd@trivlist\endcsname + }% + \pd@orig@endtrivlist +} +\def\pd@hide#1{% + \ifx\@empty#1\@empty\else + \ifnum\pd@currentstate=\z@ + \pd@testdisp1{#1}% + \if@tempswa\else + \ifnum\pd@@type=\z@ + \pst@Verb{(1) BOL}% + \else + \color\pd@@iacolor + \fi + \gdef\pd@currentstate{1}% + \fi + \fi + \fi +} +\def\pause{\@testopt\pd@p@use1} +\def\pd@p@use[#1]{% + \addtocounter{pd@pause}{#1}% + \expandafter\pd@hide\expandafter{\the\c@pd@pause-}% + \global\let\pd@revert\@gobble + \ignorespaces +} +\define@cmdkey{enumitem}[pd@@]{type}[0]{} +\def\pd@@type{0} +\def\pd@pdftrans{% + \@expandtwoargs\in@{,\pd@@trans,}{% + ,Split,Blinds,Box,Wipe,Dissolve,Glitter,% + Replace,Fly,Push,Cover,Uncover,Fade,}% + \ifin@\else + \pd@warn{Transition `\pd@@trans' might not be understood by + your ps to pdf converter}% + \fi + \pdfmark{% + pdfmark=/PUT,% + Raw={\string{ThisPage\string}% + <</Trans << /S /\pd@@trans\space >> >>% + }% + }% +} +\define@cmdkeys[pd]{twocolumn}[pd@@]{% + lineheight,lfrheight,rfrheight,lcolwidth,rcolwidth,% + topsep,bottomsep,indent,lineprop,lfrprop,rfrprop% +}[] +\define@key[pd]{twocolumn}{colsep}{\setlength\pd@colsep{#1}} +\define@key[pd]{twocolumn}{frsep}{\setlength\pd@frsep{#1}} +\presetkeys[pd]{twocolumn}{frsep=1.5mm,colsep=.06\linewidth,% + lcolwidth=.47\linewidth,rcolwidth=.47\linewidth,topsep=0cm,% + bottomsep=0cm,indent=0cm,lineprop,lfrprop,rfrprop% +}{} +\def\pd@maxdim#1#2{\ifdim#1>#2#1\else#2\fi} +\long\def\twocolumn#1#2#3{% + \setkeys[pd]{twocolumn}{#1}% + \sbox\pd@tba{\begin{minipage}\pd@@lcolwidth#2\end{minipage}}% + \setlength\@tempdima{\the\ht\pd@tba}% + \addtolength\@tempdima{\the\dp\pd@tba}% + \sbox\pd@tbb{\begin{minipage}\pd@@rcolwidth#3\end{minipage}}% + \setlength\@tempdimb{\the\ht\pd@tbb}% + \addtolength\@tempdimb{\the\dp\pd@tbb}% + \setlength\@tempdimc{\pd@maxdim\@tempdima\@tempdimb}% + \ifx\pd@@lfrheight\@undefined\else + \setlength\@tempdimc{\pd@maxdim\pd@@lfrheight\@tempdimc}% + \fi + \ifx\pd@@lineheight\@undefined\else + \setlength\@tempdimc{\pd@maxdim\pd@@lineheight\@tempdimc}% + \fi + \ifx\pd@@rfrheight\@undefined\else + \setlength\@tempdimc{\pd@maxdim\pd@@rfrheight\@tempdimc}% + \fi + \begin{pspicture}(-\pd@@indent,\pd@@topsep)(\linewidth,-\@tempdimc)% + \psset{linewidth=.25pt,linecolor=\pd@color}% + \setlength\@tempdima\pd@@lcolwidth + \addtolength\@tempdima\pd@frsep + \ifx\pd@@lfrheight\@undefined\else + \expandafter\psframe\expandafter[\pd@@lfrprop]% + (-\pd@frsep,\pd@frsep)(\@tempdima,-\pd@@lfrheight)% + \fi + \rput[tl](0,0){\usebox\pd@tba}% + \setlength\@tempdima\pd@@lcolwidth + \addtolength\@tempdima{.5\pd@colsep}% + \ifx\pd@@lineheight\@undefined\else + \expandafter\psline\expandafter[\pd@@lineprop]% + (\@tempdima,\pd@frsep)(\@tempdima,-\pd@@lineheight)% + \fi + \addtolength\@tempdima{.5\pd@colsep}% + \setlength\@tempdimc\@tempdima + \addtolength\@tempdima{-\pd@frsep}% + \setlength\@tempdimb\@tempdima + \addtolength\@tempdimb\pd@@rcolwidth + \addtolength\@tempdimb{2\pd@frsep}% + \ifx\pd@@rfrheight\@undefined\else + \expandafter\psframe\expandafter[\pd@@rfrprop]% + (\@tempdima,\pd@frsep)(\@tempdimb,-\pd@@rfrheight)% + \fi + \rput[tl](\@tempdimc,0){\usebox\pd@tbb}% + \end{pspicture}\par +} +\renewenvironment{thebibliography}[1]{% + \list{\@biblabel{\@arabic\c@enumiv}}{% + \settowidth\labelwidth{\@biblabel{#1}}% + \leftmargin\labelwidth + \advance\leftmargin\labelsep + \@openbib@code + \usecounter{enumiv}% + \let\p@enumiv\@empty + \renewcommand\theenumiv{\@arabic\c@enumiv}% + }% + \sloppy + \clubpenalty4000 + \@clubpenalty \clubpenalty + \widowpenalty4000% + \sfcode`\.\@m +}{% + \def\@noitemerr + {\@latex@warning{Empty `thebibliography' environment}}% + \endlist +} +\def\pddefinelyxtemplate#1#2{\def#1{\pd@lyxgetargsandbody{#2}}} +\def\pd@lyxgetargsandbody#1{\@testopt{\pd@lyxget@rgsandbody{#1}}{}} +\long\def\pd@lyxget@rgsandbody#1[#2]#3#4\lyxend{% + \begingroup + \def\@currenvir{#1}% + \setkeys[pd]{glslide,slide}{#2}% + \def\pd@t@tle{#3}% + \pd@body{#4}% + \pd@slide + \endgroup +} +\def\lyxend{} +\pddefinelyxtemplate\lyxnote{note} +\pddefinelyxtemplate\lyxslide{slide} +\pddefinelyxtemplate\lyxwideslide{wideslide} +\pddefinelyxtemplate\lyxemptyslide{emptyslide} +\AtBeginDocument{% + \@expandtwoargs\in@{,frenchb.ldf,}{,\@filelist,}% + \ifin@ + \let\bbl@frenchindent\relax + \let\bbl@frenchitemize\relax + \let\bbl@frenchlistspacing\relax + \fi +} +\ifnum\pd@mode=\z@ + \AtBeginDocument{% + \let\pd@orig@label\label + \def\label{\pd@label\pd@orig@label}% + \let\pd@orig@label@in@display\label@in@display + \def\label@in@display{\pd@label\pd@orig@label@in@display}% + } + \def\pd@label#1#2{% + \@expandtwoargs\in@{,#2,}{,\pd@labels,}% + \ifin@\else + \global\XKV@addtolist@x\pd@labels{#2}% + #1{#2}% + \fi + } +\else + \def\pd@hide#1{} + \let\pd@pdftrans\relax + \def\pd@onslide#1#2{\@firstofone} + \let\@trivlist\pd@orig@@trivlist + \let\endtrivlist\pd@orig@endtrivlist + \def\pd@item[#1]<#2>{\pd@orig@item[#1]\leavevmode\ignorespaces} +\fi +\ifnum\pd@mode=2 +\def\pd@n@wpage{% + \gdef\pd@newpage{% + \global\let\pd@newpage\pd@n@wpage + \newpage + }% +} +\let\pd@newpage\pd@n@wpage +\def\pd@sl@de{% + \def\pd@tempa{note}% + \ifx\@currenvir\pd@tempa\let\pd@tempb\relax\else + \stepcounter{slide}% + \edef\@currentlabel{\the\c@slide}% + \let\pd@tempb\@empty + \pd@maketocbm0% + \hyper@anchorstart{slide.\the\c@slide}\hyper@anchorend + \fi + \begin{minipage}\linewidth + \psframebox[framesep=7pt,linewidth=1pt]{% + \@tempdima\linewidth + \advance\@tempdima-16pt + \begin{minipage}\@tempdima + \subsection*{\pd@t@tle}% + \the\pd@body + \end{minipage}% + }% + \par\smallskip + \pd@@lf\hfill\ifx\pd@@rf\@empty\else\pd@@rf~--~\fi + \ifx\pd@tempb\relax + \ifnum\c@slide=\pd@notet + \stepcounter{note}% + \else + \setcounter{note}{1}% + \fi + \xdef\pd@notet{\the\c@slide}% + \thenote + \else\theslide\fi + \end{minipage}% + \par\bigskip + \ifpd@@nopagebreaks\else\vfill\pd@newpage\fi +} +\def\maketitle{% + \pd@orig@maketitle + \vskip50pt + \pd@puttoc0% + \newpage + \stepcounter{slide}% +} +\def\pd@pdcontentsline#1#2#3{% + \ifnum#1=\z@ + \ifnum\@tempcntb>\z@\hskip15pt\fi + \hyperlink{slide.#2}{#3}% + \leaders\hbox{\hss.\ \hss}\hfill#2\par + \else + \if@tempswa\else\vskip10pt\fi + \hyperlink{slide.#2}{\bfseries#3}% + {\hfill\bfseries#2}\par + \global\advance\@tempcntb\@ne + \fi + \@tempswafalse +} +\def\pd@section[#1]#2{% + \begingroup + \setkeys*[pd]{section}{#1}% + \setrmkeys*[pd]{slide}% + \def\pd@tempa{% + \stepcounter{slide}% + \def\pd@t@tle{#2}% + \pd@maketocbm\pd@tempb + \hyper@anchorstart{slide.\the\c@slide}\hyper@anchorend + \pd@orig@section*{#2\normalfont\hfill\theslide}% + }% + \ifnum\pd@display=\@ne\ifpd@@slide\stepcounter{slide}\fi\else + \ifnum\pd@tempb=\z@ + \ifpd@@slide\pd@tempa\fi + \else + \stepcounter{pd@section}% + \pd@tempa + \ifpd@@slide\else\addtocounter{slide}\m@ne\fi + \fi + \fi + \endgroup +} +\fi +\IfFileExists{powerdot-\pd@@style.sty}{ + \RequirePackage{powerdot-\pd@@style} +}{ + \pd@error{unknown style `\pd@@style'} +} +\ifx\titleslide\@undefined + \pd@error{`titleslide' environment + not defined by style `\pd@@style'} +\fi +\ifx\slide\@undefined + \pd@error{`slide' environment not + defined by style `\pd@@style'} +\fi +\ifx\pd@title\@undefined\let\pd@title\@firstofone\fi +\ifx\pd@slidetitle\@undefined\let\pd@slidetitle\@firstofone\fi +\ifx\pd@sectiontitle\@undefined\let\pd@sectiontitle\@firstofone\fi +\ifx\pd@tocdisplay\@undefined + \def\pd@tocdisplay#1{% + \hskip\@tempdima + \begin{minipage}[b]\@tempdimb + \pd@usedtocfont\color\pd@@toctcolor#1% + \end{minipage}% + } +\fi +\ifx\pd@tochighlight\@undefined + \def\pd@tochighlight#1{% + \psframebox*[framesep=\pd@@tocfrsep,% + fillcolor=\pd@@tochlcolor,boxsep=false]{% + \hskip\@tempdima + \begin{minipage}[b]\@tempdimb + \pd@usedtocfont\color\pd@@tochltcolor#1% + \end{minipage}% + }% + } +\fi +\ifx\pd@tocslide\@undefined\let\pd@tocslide\@firstofone\fi +\ifx\pd@tocsection\@undefined\let\pd@tocsection\@firstofone\fi +\ifnum\pd@mode=2\color{black}\def\pd@@iacolor{black}\fi +\endinput +%% +%% End of file `powerdot.cls'. |