summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/seminar/semlayer.sty
blob: 0afc8df97850899b24c123b6e52a72bbb567b009 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
%% BEGIN semlayer.sty
%%
%% This is file `semlayer.sty', generated
%% on <1993/4/2> with the docstrip utility (2.0r).
%%
%% The original source files were:
%%
%% semlayer.doc
%%
\def\fileversion{1.0}
\def\filedate{93/04/01}
%%
%% LaTeX style option `semlayer.sty'.
%% For use with LaTeX v2.09 and the `seminar' document style.
%%
%% COPYRIGHT 1993, by Timothy Van Zandt, Timothy.VAN-ZANDT@insead.edu
%%
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.2 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.2 or later is part of all distributions of LaTeX version
%% 1999/12/01 or later.
%%
%%
\addto@hook\before@newslide{%
  \global\def\overlay@list{}%
  \setcounter{overlay}{0}}
\newbox\@@slidebox
\def\process@@slide{%
  \ifx\overlay@list\@empty
    \finish@slide
    \output@slide
  \else
    \setbox\@@slidebox\box\@slidebox
    \make@overlay{0}%
    \finish@slide
    \output@slide
    {\let\theoverlay\theslide\layer@loop{0}}%
    \overlay@loop
  \fi}
\def\overlay@loop{%
  \begingroup
    \overlay@prep
    \c@overlay=1
    \@whilenum\c@overlay<10
      \do{%
        \test@member{\the\c@overlay}{\overlay@list}%
        \if@test
          \make@overlay{\the\c@overlay}%
          \finish@slide
          \output@slide
        \fi
        \layer@loop{\the\c@overlay}%
        \advance\c@overlay by 1}%
  \endgroup}
\def\layer@loop#1{%
  \begingroup
    \layer@prep
    \@for\currlayer:=\layer@list\do{%
    \test@member{#1-\currlayer}{\overlay@list}%
      \if@test
        \make@overlay{#1-\currlayer}%
        \finish@slide
        \output@slide
      \fi}%
  \endgroup}
\def\layer@prep{%
  \ifarticle\pagestyle{\layer@pagestyle}\fi
  \let\thepage\thelayer
  \ifx\thelayerframe\@empty\else\let\theslideframe\thelayerframe\fi
  \let\slidelabel\layerlabel}
\def\overlay@prep{%
  \ifarticle\pagestyle{\overlay@pagestyle}\fi
  \let\thepage\theoverlay
  \ifx\theoverlayframe\@empty\else\let\theslideframe\theoverlayframe\fi
  \let\slidelabel\overlaylabel}
\def\layerframe{\@slideframe{layer}}
\def\overlayframe{\@slideframe{overlay}}
\def\thelayerframe{}
\def\theoverlayframe{}
\def\overlaylabel{\bf Overlay \theoverlay}
\def\layerlabel{\bf Layer \thelayer}
\newcounter{overlay}
\def\theoverlay{\theslide-\alph{overlay}}
\def\currlayer{}
\def\thelayer{\theoverlay-\currlayer}
\newif\ifoverlays
\newif\iflayers
\@ifundefined{@overlay}%
  {\let\@overlay\relax}%
  {\ifarticle\else\overlaystrue\layerstrue\fi}
\def\nooverlays@err{%
  \@seminarerr{You need to use additional macros for overlays,
    e.g., semcolor.sty}\@ehd
  \global\overlaysfalse
  \global\layersfalse}
\@ifundefined{@overlay}{}{}
\def\overlay#1{%
  \ifoverlays\ifx\@overlay\relax\nooverlays@err\fi\fi
  \ifslide
    \@tempcnta=#1
    \@testfalse
    \ifnum\@tempcnta>-1 \ifnum\@tempcnta<10 \@testtrue\fi\fi
    \if@test
      \c@overlay=\@tempcnta
      \ifnum\c@overlay=0
        \advance\c@slide by -1
        \refstepcounter{slide}%
      \else
        \advance\c@overlay by -1
        \refstepcounter{overlay}%
        \ifoverlays
          \xdef\overlay@list{\overlay@list,\the\c@overlay}%
        \fi
      \fi
      \ifoverlays
        \@overlay{\the\c@overlay}%
      \fi
    \else
      \@seminarerr{\string\overlay\space argument must be
        an integer between 0 and 9}\@eha
    \fi
  \else
    \@seminarerr{\string\overlay\space can only be used
      in slide environments}\@eha
  \fi
  \ignorespaces}
\def\colorlayers#1{%
  \edef\@tempc{#1}%
  \edef\layer@list{\layer@list,#1}%
  \def\@tempa##1{%
    \@namedef{##1}{%
      \iflayers\ifx\@overlay\relax\nooverlays@err\fi\fi
      \ifslide
        \iflayers
          \xdef\overlay@list{\overlay@list,\the\c@overlay-##1}%
          \@overlay{\the\c@overlay-##1}%
        \fi
      \else
        \@seminarerr{Color layer `##1' can only be used in
          slide environments}\@eha
      \fi}}
  \@for\@tempb:=\@tempc\do{%
    \expandafter\@tempa\expandafter{\@tempb}}}
\def\layer@list{}
\def\overlaypagestyle#1{\@ifgoodps{#1}{\edef\overlay@pagestyle{#1}}}
\def\layerpagestyle#1{\@ifgoodps{#1}{\edef\layer@pagestyle{#1}}}
\overlaypagestyle{}
\layerpagestyle{}
\endinput
%%
%% End of file `semlayer.sty'.