| 1 |
%% BEGIN slidesec.sty |
| 2 |
\def\fileversion{v0.9} |
| 3 |
\def\filedate{92/05/07} |
| 4 |
%% |
| 5 |
%% Style option slidesec.sty, for use with LaTeX 2.09 or SliTeX. |
| 6 |
%% |
| 7 |
%% COPYRIGHT 1992, by Timothy Van Zandt, [email protected] |
| 8 |
%% |
| 9 |
%% |
| 10 |
%% This file may be distributed and/or modified under the conditions of |
| 11 |
%% the LaTeX Project Public License, either version 1.2 of this license |
| 12 |
%% or (at your option) any later version. The latest version of this |
| 13 |
%% license is in: |
| 14 |
%% |
| 15 |
%% http://www.latex-project.org/lppl.txt |
| 16 |
%% |
| 17 |
%% and version 1.2 or later is part of all distributions of LaTeX version |
| 18 |
%% 1999/12/01 or later. |
| 19 |
%% |
| 20 |
%% |
| 21 |
% DISCLAIMER: |
| 22 |
% |
| 23 |
% Someone who actually uses something like this should rewrite it. |
| 24 |
% |
| 25 |
% DESCRIPTION: |
| 26 |
% |
| 27 |
% This file contains macros for sections, headings, tables of contents, |
| 28 |
% and lists of slides, for slides. It can probably be used with your |
| 29 |
% favorite LaTeX slide package (e.g., seminar.sty). |
| 30 |
% However: |
| 31 |
%% If the counter used to keep track of slides is not slide , |
| 32 |
%% then change the following line: |
| 33 |
\def\@SCTR{\theslide} |
| 34 |
%% |
| 35 |
% ACKNOWLEDGEMENTS: |
| 36 |
% |
| 37 |
% The idea comes from Young U. Ryu's lslides.sty. |
| 38 |
% |
| 39 |
% USAGE: |
| 40 |
% |
| 41 |
% \slideheading[#1]{#2} |
| 42 |
% * Analogous to \section. |
| 43 |
% * [#1] is optional; \slideheading{#1} is same as \slideheading[#1]{#2}. |
| 44 |
% * Advances slidesection counter. |
| 45 |
% * Sets \theslideheading to #1; can be used, e.g., in headers and footers. |
| 46 |
% * Adds #1 to slide contents file. |
| 47 |
% * If #2 is non-empty, invokes \makeslideheading{#2} to make a heading. |
| 48 |
% Default definition of \makeslideheading is |
| 49 |
% \begin{center}\large\bf #2 \end{center} |
| 50 |
% but you can redefine this to suit your tastes. |
| 51 |
% |
| 52 |
% \slidesubheading[#1]{#2} |
| 53 |
% * Analogous to \subsection. |
| 54 |
% * Like \slideheading, but add "sub" to all the names. |
| 55 |
% |
| 56 |
% \slideheading and \slidesubheading are meant to be used at most once in |
| 57 |
% a slide, but this is not a binding restriction. |
| 58 |
% |
| 59 |
% You may want to define abbreviated forms. E.g., |
| 60 |
% \newcommand{heading}{\slideheading} |
| 61 |
% \newcommand{subheading}{\slidesubheading} |
| 62 |
% |
| 63 |
% \listofslides |
| 64 |
% * Analogous to \listoftables. |
| 65 |
% |
| 66 |
% \slidecontents |
| 67 |
% * Analogous to \tableofcontents |
| 68 |
% |
| 69 |
% \Slidecontents |
| 70 |
% * List \slidecontents, but puts some check marks and stuff to |
| 71 |
% indicate what you have covered so far and what is coming up. |
| 72 |
% Meant to be used in the middle of a presentation. |
| 73 |
% |
| 74 |
% To change fonts and otherwise customize what you get from \listofslides, |
| 75 |
% \slidecontents, and \Slidecontents, you have to hack at the definitions |
| 76 |
% of these macros. |
| 77 |
% |
| 78 |
% BUGS: |
| 79 |
% |
| 80 |
% These macros have not been tested very much. |
| 81 |
% |
| 82 |
% IMPLEMENTATION: |
| 83 |
% |
| 84 |
\@ifundefined{@startlos}{}{\endinput} |
| 85 |
\typeout{File `slidesec.sty' \fileversion\space\space |
| 86 |
\filedate\space\space <tvz>} |
| 87 |
% |
| 88 |
% If we use \@starttoc{los} to read in \jobname.los, then its contents |
| 89 |
% are destroyed and we can't read it again. \@startlos is like \@starttoc, |
| 90 |
% but it sets the flae \los@flag to 1, and then we add a few commands |
| 91 |
% to \enddocument that open \filename.los if \los@flag=1. |
| 92 |
% |
| 93 |
\def\los@flag{0}% |
| 94 |
\def\@startlos{% |
| 95 |
\begingroup\makeatletter\@input{\jobname.los}\endgroup |
| 96 |
\gdef\los@flag{1}\global\@nobreakfalse} |
| 97 |
\newtoks\@temptokenb |
| 98 |
\@temptokena{% |
| 99 |
\ifnum\los@flag=1\if@filesw |
| 100 |
\newwrite\tf@los\immediate\openout\tf@los\jobname.los\relax |
| 101 |
\fi\fi} |
| 102 |
\expandafter\@temptokenb\expandafter{\enddocument} |
| 103 |
\edef\enddocument{\the\@temptokena\the\@temptokenb} |
| 104 |
% |
| 105 |
\newcounter{slidesection} |
| 106 |
\newcounter{slidesubsection} |
| 107 |
\def\theslidesection{\arabic{slidesection}} |
| 108 |
\def\thesubslidesection{\theslidesection.\arabic{subslidesection}} |
| 109 |
% |
| 110 |
\def\slideheading{\@dblarg\slide@heading}% |
| 111 |
\def\slide@heading[#1]#2{% |
| 112 |
\stepcounter{slidesection}% |
| 113 |
\addtocontents{los}{\protect\l@slide |
| 114 |
{\the\c@slidesection}{\ignorespaces#1}{\@SCTR}}% |
| 115 |
\gdef\theslideheading{#1}% |
| 116 |
\def\@tempa{#2}% |
| 117 |
\ifx\@tempa\@empty\else |
| 118 |
{\edef\@currentlabel{\csname p@slidesection\endcsname\theslidesection}% |
| 119 |
\makeslideheading{#2}}% |
| 120 |
\fi} |
| 121 |
\def\slidesubheading{\@dblarg\slide@subheading} |
| 122 |
\def\slide@subheading[#1]#2{% |
| 123 |
\stepcounter{slidesection}% |
| 124 |
\addtocontents{los}{\protect\l@subslide |
| 125 |
{\the\c@slidesubsection}{\ignorespaces#1}{\@SCTR}}% |
| 126 |
\gdef\theslidesubheading{#1}% |
| 127 |
\def\@tempa{#2}% |
| 128 |
\ifx\@tempa\@empty\else |
| 129 |
{\edef\@currentlabel{\csname p@slidesubsection\endcsname |
| 130 |
\theslidesubsection}\makeslideheading{#2}}% |
| 131 |
\fi} |
| 132 |
\def\theslideheading{}\def\theslidesubheading{} |
| 133 |
% |
| 134 |
\def\makeslideheading#1{% |
| 135 |
\begin{center}\large\bf #1\end{center}} |
| 136 |
\def\makeslidesubheading{\makeslideheading} |
| 137 |
% |
| 138 |
\def\@undottedtocline#1#2#3#4#5{\vskip \z@ plus .2pt |
| 139 |
\bgroup |
| 140 |
\leftskip #2\relax \parindent #2\relax\@afterindenttrue |
| 141 |
\interlinepenalty\@M |
| 142 |
\leavevmode |
| 143 |
\@tempdima #3\relax \advance\leftskip \@tempdima |
| 144 |
\hbox{}\hskip -\leftskip |
| 145 |
#4\par |
| 146 |
\egroup} |
| 147 |
\def\slide@dottedcline{\@dottedtocline{1}{1.5em}{2.3em}} |
| 148 |
\def\slide@undottedcline{\@undottedtocline{1}{1.5em}{2.3em}} |
| 149 |
\def\slide@cline{\slide@dottedcline} |
| 150 |
% |
| 151 |
\def\slidenumberline#1{\hbox to\@tempdima{\hss#1\hskip 1em}} |
| 152 |
% |
| 153 |
\def\listofslides{\section*{List of Slides% |
| 154 |
\@mkboth{LIST OF SLIDES}{LIST OF SLIDES}}% |
| 155 |
\def\l@slide##1##2##3{% |
| 156 |
\slide@undottedcline{\slidenumberline{##3}{##2}}{}}% |
| 157 |
\let\l@subslide\l@slide |
| 158 |
\@startlos} |
| 159 |
% |
| 160 |
\def\slidecontents{\@ifstar% |
| 161 |
{\def\slide@cline{\slide@undottedcline}\slide@contents}% |
| 162 |
{\def\slide@cline{\slide@dottedcline}\slide@contents}} |
| 163 |
\def\slide@contents{% |
| 164 |
\def\l@slide##1##2##3{% |
| 165 |
\slide@cline{\slidenumberline{$\bullet$}{##2}}{##3}}% |
| 166 |
\let\l@subslide\@gobbletwo |
| 167 |
\@startlos} |
| 168 |
% |
| 169 |
\def\Slidecontents{\@ifstar% |
| 170 |
{\def\slide@cline{\slide@undottedcline}\Slide@contents}% |
| 171 |
{\def\slide@cline{\slide@dottedcline}\Slide@contents}} |
| 172 |
\def\Slide@contents{% |
| 173 |
\def\l@slide##1##2##3{% |
| 174 |
\ifcase\lslide@flag |
| 175 |
\message{##1 ** \the\c@slidesection} |
| 176 |
\ifnum##1>\c@slidesection |
| 177 |
\def\lslide@flag{1}{\large\slide@cline{% |
| 178 |
\slidenumberline{$\Rightarrow\bullet$}{##2}}{##3}}% |
| 179 |
\else |
| 180 |
{\large\slide@cline{% |
| 181 |
\slidenumberline{$\surd\;\bullet$}{##2}}{##3}}% |
| 182 |
\fi |
| 183 |
\or |
| 184 |
\def\lslide@flag{2}{\large\slide@cline{% |
| 185 |
\slidenumberline{$\bullet$}{##2}}{##3}}% |
| 186 |
\or |
| 187 |
{\large\slide@cline{% |
| 188 |
\slidenumberline{$\bullet$}{##2}}{##3}}% |
| 189 |
\fi}% |
| 190 |
\def\l@subslide##1##2##3{% |
| 191 |
\ifnum\lslide@flag=1 |
| 192 |
\@undottedtocline{2}{3.8em}{3.2em}{##2}{}% |
| 193 |
\fi}% |
| 194 |
\def\lslide@flag{0}% |
| 195 |
\@startlos} |
| 196 |
% |
| 197 |
\endinput |
| 198 |
%% END slidesec.sty |