13497
|
1 |
%==============================================================================
|
|
2 |
% Prosper -- (prosper.cls) Class file
|
|
3 |
% A LaTeX class for creating slides
|
|
4 |
% Author: Frederic Goualard (Frederic.Goualard@cwi.nl)
|
|
5 |
% Centrum voor Wiskunde en Informatica
|
|
6 |
% Amsterdam, The Netherlands
|
|
7 |
%
|
|
8 |
% Copyright (c) 2000 Frederic Goualard
|
|
9 |
% All rights reserved.
|
|
10 |
%
|
|
11 |
% Permission is hereby granted, without written agreement and without
|
|
12 |
% license or royalty fees, to use, copy, modify, and distribute this
|
|
13 |
% software and its documentation for any purpose, provided that the
|
|
14 |
% above copyright notice and the following two paragraphs appear in
|
|
15 |
% all copies of this software.
|
|
16 |
%
|
|
17 |
% IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
|
|
18 |
% SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF
|
|
19 |
% THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE AUTHOR HAS BEEN ADVISED
|
|
20 |
% OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
21 |
%
|
|
22 |
% THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES,
|
|
23 |
% INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
24 |
% AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
|
25 |
% ON AN "AS IS" BASIS, AND THE AUTHOR HAS NO OBLIGATION TO
|
|
26 |
% PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
|
27 |
%
|
|
28 |
% CVSId : $Id$
|
|
29 |
%==============================================================================
|
|
30 |
|
|
31 |
\def\Prosper@Version{1.1}
|
|
32 |
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
|
|
33 |
\ProvidesClass{prosper}[2001/01/23, v. \Prosper@Version]
|
|
34 |
\typeout{(c) 2000 Frederic Goualard, CWI, The Netherlands}
|
|
35 |
\typeout{CVSId: $Id$}
|
|
36 |
\typeout{ }
|
|
37 |
|
|
38 |
\newif\ifDVItoPS
|
|
39 |
\DeclareOption{ps}{\global\DVItoPStrue}
|
|
40 |
\DeclareOption{pdf}{\global\DVItoPSfalse}
|
|
41 |
|
|
42 |
\newif\ifisDraft
|
|
43 |
\DeclareOption{draft}{\global\isDrafttrue%
|
|
44 |
\PassOptionsToClass{draft}{seminar}}
|
|
45 |
\DeclareOption{final}{\global\isDraftfalse%
|
|
46 |
\PassOptionsToClass{final}{seminar}}
|
|
47 |
|
|
48 |
\newif\ifinColor
|
|
49 |
\DeclareOption{slideColor}{\global\inColortrue}
|
|
50 |
\DeclareOption{slideBW}{\global\inColorfalse}
|
|
51 |
|
|
52 |
\newif\ifallPages
|
|
53 |
\DeclareOption{total}{\global\allPagestrue}
|
|
54 |
\DeclareOption{nototal}{\global\allPagesfalse}
|
|
55 |
|
|
56 |
\newif\ifcolorBG
|
|
57 |
\DeclareOption{nocolorBG}{\global\colorBGfalse}
|
|
58 |
\DeclareOption{colorBG}{\global\colorBGtrue}
|
|
59 |
|
|
60 |
\newif\ifAccumulate
|
|
61 |
\DeclareOption{accumulate}{\global\Accumulatetrue}
|
|
62 |
\DeclareOption{noaccumulate}{\global\Accumulatefalse}
|
|
63 |
|
|
64 |
\newif\if@distiller
|
|
65 |
\@distillerfalse
|
|
66 |
\DeclareOption{distiller}{\global\@distillertrue}
|
|
67 |
|
|
68 |
\DeclareOption{YandY}{\gdef\@pdf@driver{dvipsone}}
|
|
69 |
\DeclareOption{ps2pdf}{\gdef\@pdf@driver{ps2pdf}}
|
|
70 |
|
|
71 |
%% Default style file = default
|
|
72 |
\def\Style@chosen{default}
|
|
73 |
\DeclareOption*{\global\let\Style@chosen=\CurrentOption}
|
|
74 |
|
|
75 |
\ExecuteOptions{final,slideBW,total,nocolorBG,noaccumulate,ps,ps2pdf}
|
|
76 |
\ProcessOptions\relax
|
|
77 |
|
|
78 |
\LoadClass[portrait,semlayer,semcolor,leqno]{seminar}
|
|
79 |
\RequirePackage{graphicx}
|
|
80 |
\RequirePackage[\@pdf@driver,bookmarks,%
|
|
81 |
a4paper,%
|
|
82 |
% pdfmenubar=false,%
|
|
83 |
pdfhighlight=/I,%
|
|
84 |
% pdftoolbar=false,%
|
|
85 |
pdffitwindow=true,%
|
|
86 |
pdfcenterwindow=true,%
|
|
87 |
% pdfwindowui=false,%
|
|
88 |
menucolor=menucolor,%
|
|
89 |
% pdfview=Fit,%
|
|
90 |
pdfstartview=Fit]{hyperref}
|
|
91 |
\RequirePackage{ifthen}
|
|
92 |
|
|
93 |
\rotateheaderstrue
|
|
94 |
\slidewidth=222mm
|
|
95 |
\slideheight=150mm
|
|
96 |
\renewcommand{\slideleftmargin}{0.01in}
|
|
97 |
|
|
98 |
|
|
99 |
% Add a bookmark for each master slide
|
|
100 |
\def\@addBookmarkOnSlide#1{%
|
|
101 |
\def\Hy@temp{#1}
|
|
102 |
\pdfmark{pdfmark=/OUT,
|
|
103 |
Raw={/Page \thetrueSlideCounter /View [ /XYZ null null null ]
|
|
104 |
/Title (\expandafter\strip@prefix\meaning\Hy@temp)}
|
|
105 |
}
|
|
106 |
}
|
|
107 |
|
|
108 |
%% Some code to be added when creating a PDF file
|
|
109 |
\def\Cropping@Box{0 0 595 890} % By default: cropping to a4 paper dimensions
|
|
110 |
\ifDVItoPS
|
|
111 |
\else
|
|
112 |
\AtEndOfClass{%
|
|
113 |
\hypersetup{pdfpagescrop=\Cropping@Box}
|
|
114 |
}
|
|
115 |
\if@distiller
|
|
116 |
\else
|
|
117 |
\AtBeginDvi{%
|
|
118 |
\pdfmark{pdfmark=/PAGES,
|
|
119 |
Raw={/Rotate 90}}
|
|
120 |
}
|
|
121 |
\fi
|
|
122 |
\fi
|
|
123 |
\newcommand{\PDFCroppingBox}[1]{%
|
|
124 |
\gdef\Cropping@Box{#1}
|
|
125 |
}
|
|
126 |
|
|
127 |
%% PDFtransition
|
|
128 |
%% Transition from one page to another.
|
|
129 |
%% Possible values:
|
|
130 |
%% (Split, Blinds, Box, Wipe, Dissolve, Glitter, R)
|
|
131 |
\def\Split{} \def\Blinds{} \def\Box{} \def\Wipe{} \def\Dissolve{}
|
|
132 |
\def\Glitter{} \def\R{} \def\Replace{}
|
|
133 |
\newcommand{\PDFtransition}[1]{%
|
|
134 |
\@ifundefined{#1}
|
|
135 |
{%
|
|
136 |
\ClassError{prosper}{Undefined transition #1}{%
|
|
137 |
Possible values: Split, Blinds, Box, Wipe, Dissolve, Glitter, R}}
|
|
138 |
{%
|
|
139 |
\hypersetup{pdfpagetransition={#1}}
|
|
140 |
}
|
|
141 |
}
|
|
142 |
|
|
143 |
%% Default transition between pages (for values, see \PDFtransition)
|
|
144 |
\def\@defaultTransition{R}
|
|
145 |
\newcommand{\DefaultTransition}[1]{\gdef\@defaultTransition{#1}}
|
|
146 |
|
|
147 |
|
|
148 |
\newcommand{\@cartouche}{.}
|
|
149 |
%% \slideCaption : Definition of caption to appear on every slide.
|
|
150 |
\newcommand{\slideCaption}[1]{\gdef\@cartouche{#1}}
|
|
151 |
|
|
152 |
%%-----------------------------------------------------------------------------
|
|
153 |
%% Definitions for fonts and colors
|
|
154 |
%% #1: font and color if slide in color
|
|
155 |
%% #2: font and color if slide in BW
|
|
156 |
\def\@fontTitleColor{\ClassError{prosper}{%
|
|
157 |
no font specified for title in color}{Use macro \string\FontTitle}}
|
|
158 |
\def\@fontTitleBW{\ClassError{prosper}{%
|
|
159 |
no font specified for title in B\string&W}{Use macro \string\FontTitle}}
|
|
160 |
\def\@fontSubtitleColor{\@fontTitleColor\fontsize{16pt}{16pt}\selectfont\itshape}
|
|
161 |
\def\@fontSubtitleBW{\@fontTitleBW\fontsize{14pt}{16pt}\selectfont\itshape}
|
|
162 |
\def\@fontTextColor{\ClassError{prosper}{%
|
|
163 |
no font specified for texte in color}{Use macro \string\FontText}}
|
|
164 |
\def\@fontTextBW{\ClassError{prosper}{%
|
|
165 |
no font specified for text in B\string&W}{Use macro \string\FontText}}
|
|
166 |
\def\@colorFoot{\black}
|
|
167 |
\newcommand{\FontTitle}[2]{
|
|
168 |
\gdef\@fontTitleColor{#1}
|
|
169 |
\gdef\@fontTitleBW{#2}}
|
|
170 |
\newcommand{\FontSubtitle}[2]{
|
|
171 |
\gdef\@fontSubtitleColor{#1}
|
|
172 |
\gdef\@fontSubtitleBW{#2}}
|
|
173 |
\newcommand{\FontText}[2]{
|
|
174 |
\gdef\@fontTextColor{#1}
|
|
175 |
\gdef\@fontTextBW{#2}}
|
|
176 |
\newcommand{\ColorFoot}[1]{\gdef\@colorFoot{#1}}
|
|
177 |
|
|
178 |
\newcommand{\fontTitle}[1]{%
|
|
179 |
{\ifinColor\@fontTitleColor\else\@fontTitleBW\fi #1}}
|
|
180 |
\newcommand{\fontText}[1]{%
|
|
181 |
{\ifinColor\@fontTextColor\else\@fontTextBW\fi #1}}
|
|
182 |
%%- End of definitions for fonts and colors -----------------------------------
|
|
183 |
|
|
184 |
% Width of the text area
|
|
185 |
\newlength{\slideWidth}
|
|
186 |
|
|
187 |
\def\@titleSpacing{\vspace*{10pt}}
|
|
188 |
\newcommand{\titleSpacing}[1]{\gdef\@titleSpacing{#1}}
|
|
189 |
|
|
190 |
%% Redefinition of the slide environment
|
|
191 |
\newcounter{trueSlideCounter}
|
|
192 |
\def\thetrueslideCounter{\arabic{trueSlideCounter}}
|
|
193 |
\let\slide@seminar=\slide
|
|
194 |
\let\endslide@seminar=\endslide
|
|
195 |
\let\slide=\relax
|
|
196 |
\let\endslide=\relax
|
|
197 |
\newenvironment{SlideNormal}[2][\@defaultTransition]{%
|
|
198 |
\StepCounter{trueSlideCounter}
|
|
199 |
\PDFtransition{#1}%
|
|
200 |
\begin{slide@seminar}
|
|
201 |
\ifx#2@
|
|
202 |
\else
|
|
203 |
\@addBookmarkOnSlide{#2}
|
|
204 |
\slidetitle{#2}
|
|
205 |
\fi
|
|
206 |
\begin{posit@Box}
|
|
207 |
\begin{minipage}{\slideWidth}
|
|
208 |
\begin{raggedright}
|
|
209 |
\@DefMyItem
|
|
210 |
\ifinColor\@fontTextColor\else\@fontTextBW\fi
|
|
211 |
}{%
|
|
212 |
\end{raggedright}
|
|
213 |
\end{minipage}\end{posit@Box}\end{slide@seminar}}
|
|
214 |
% Slides in overlays
|
|
215 |
\newenvironment{SlideOverlay}[2][\@defaultTransition]{%
|
|
216 |
\ifDVItoPS
|
|
217 |
\begin{slide@seminar}
|
|
218 |
\slidetitle{#2}
|
|
219 |
\begin{posit@Box}
|
|
220 |
\begin{minipage}{\slideWidth}
|
|
221 |
\begin{raggedright}
|
|
222 |
\@DefMyItem
|
|
223 |
\ifinColor\@fontTextColor\else\@fontTextBW\fi
|
|
224 |
\else %% DVI -> PDF
|
|
225 |
\StepCounter{trueSlideCounter}
|
|
226 |
\PDFtransition{#1}%
|
|
227 |
\begin{slide@seminar}
|
|
228 |
\ifx#2@
|
|
229 |
\else
|
|
230 |
\@ifundefined{@okForBookmark}{%
|
|
231 |
\gdef\@okForBookmark{}
|
|
232 |
\@addBookmarkOnSlide{#2}
|
|
233 |
}{\relax}
|
|
234 |
\slidetitle{#2}
|
|
235 |
\fi
|
|
236 |
\begin{posit@Box}
|
|
237 |
\begin{minipage}{\slideWidth}
|
|
238 |
\begin{raggedright}
|
|
239 |
\@DefMyItem
|
|
240 |
\ifinColor\@fontTextColor\else\@fontTextBW\fi
|
|
241 |
\fi
|
|
242 |
}{%
|
|
243 |
\ifDVItoPS
|
|
244 |
\end{raggedright}
|
|
245 |
\end{minipage}\end{posit@Box}\end{slide@seminar}%
|
|
246 |
\else %% DVI -> PDF
|
|
247 |
\end{raggedright}
|
|
248 |
\end{minipage}\end{posit@Box}\end{slide@seminar}
|
|
249 |
\addtocounter{slide}{-1}%
|
|
250 |
\fi
|
|
251 |
}
|
|
252 |
\let\slide=\SlideNormal
|
|
253 |
\let\endslide=\endSlideNormal
|
|
254 |
|
|
255 |
\newcommand{\NewSlideStyle}[4][11cm]{%
|
|
256 |
\setlength{\slideWidth}{#1}
|
|
257 |
\global\pslongbox{posit@Box}{\rput[#2](#3)}
|
|
258 |
\newslideframe{the#4}{\csname #4\endcsname{##1}}
|
|
259 |
\slidepagestyle{GenericPageStyle}
|
|
260 |
\slideframe{the#4}
|
|
261 |
}
|
|
262 |
|
|
263 |
|
|
264 |
% Definition of the bullet for itemize env.
|
|
265 |
\def\@prosperItemi{{\scriptsize\green%
|
|
266 |
\raisebox{2pt}{\ensuremath{\bullet}}}}
|
|
267 |
\def\@prosperItemii{{\scriptsize\green%
|
|
268 |
\raisebox{2pt}{\ensuremath{\bullet}}}}
|
|
269 |
\def\@prosperItemiii{{\scriptsize\green%
|
|
270 |
\raisebox{2pt}{\ensuremath{\bullet}}}}
|
|
271 |
\newcommand{\myitem}[2]{%
|
|
272 |
\ifnum#1=1
|
|
273 |
\gdef\@prosperItemi{#2}
|
|
274 |
\else
|
|
275 |
\ifnum#1=2
|
|
276 |
\gdef\@prosperItemii{#2}
|
|
277 |
\else
|
|
278 |
\ifnum#1=3
|
|
279 |
\gdef\@prosperItemiii{#2}
|
|
280 |
\else
|
|
281 |
\ClassError{prosper}{Undefined item level}{Available levels: 1,2,3}
|
|
282 |
\fi
|
|
283 |
\fi
|
|
284 |
\fi
|
|
285 |
}
|
|
286 |
|
|
287 |
\def\@DefMyItem{%
|
|
288 |
\global\let\labelitemi=\@prosperItemi
|
|
289 |
\global\let\labelitemii=\@prosperItemii
|
|
290 |
\global\let\labelitemiii=\@prosperItemiii
|
|
291 |
}
|
|
292 |
|
|
293 |
%% displaying of a logo (to be defined in every style)
|
|
294 |
\newcommand{\LogoPosition}[1]{\gdef\@PosLogo{#1}}
|
|
295 |
\def\@PosLogo{\ClassError{prosper}{no default position for positioning the logo given}{Use macro \string\LogoPosition\space in the style file}}
|
|
296 |
\gdef\@thelogo{.}
|
|
297 |
\newcommand{\Logo}{%
|
|
298 |
\@ifnextchar({\Logo@one}{\Logo@two}
|
|
299 |
}
|
|
300 |
\def\Logo@one(#1)#2{%
|
|
301 |
\gdef\@PosLogo{#1}
|
|
302 |
\gdef\@thelogo{#2}
|
|
303 |
}
|
|
304 |
\def\Logo@two#1{%
|
|
305 |
\gdef\@thelogo{#1}
|
|
306 |
}
|
|
307 |
|
|
308 |
\newcommand{\PutLogo}{%
|
|
309 |
\if\@thelogo.\else\rput[lb](\@PosLogo){\@thelogo}\fi
|
|
310 |
}
|
|
311 |
|
|
312 |
\expandafter\ifx\csname realpageref\endcsname\relax%
|
|
313 |
\gdef\realpageref#1{\expandafter\real@setref
|
|
314 |
\csname r@#1\endcsname\@secondoffive{#1}}
|
|
315 |
\else
|
|
316 |
\relax
|
|
317 |
\fi
|
|
318 |
|
|
319 |
\newpagestyle{GenericPageStyle}{\hfill }{\hfill%
|
|
320 |
\ifisDraft
|
|
321 |
{\@colorFoot\tiny \textbf{\jobname.tex}~--~\@Title~--~\@Author~--~\number\day/\number\month/\number\year~--~\timenow~--~p.\thepage\ifallPages/\realpageref{last@page}\fi}
|
|
322 |
\else
|
|
323 |
\ifshowVersion
|
|
324 |
{\@colorFoot\tiny \textbf{\jobname.tex}~--~\@Title~--~\@Author~--~\number\day/\number\month/\number\year~--~\timenow~--~p.\thepage\ifallPages/\realpageref{last@page}\fi}
|
|
325 |
\else
|
|
326 |
{\@colorFoot\tiny \@cartouche~--~p.\thepage\ifallPages/\realpageref{last@page}\fi}
|
|
327 |
\fi\fi
|
|
328 |
}
|
|
329 |
|
|
330 |
\IfFileExists{PPR\Style@chosen.sty}{%
|
|
331 |
\RequirePackage{PPR\Style@chosen}
|
|
332 |
}{\ClassError{prosper}{unknown Prosper style file: PPR\Style@chosen.sty}{%
|
|
333 |
Sorry, no additional help}}
|
|
334 |
|
|
335 |
|
|
336 |
\def\nobabel{%
|
|
337 |
\let\labelitemi\@ltiORI%
|
|
338 |
\let\labelitemii\@ltiiORI%
|
|
339 |
\let\labelitemiii\@ltiiiORI%
|
|
340 |
\let\labelitemiv\@ltivORI}
|
|
341 |
|
|
342 |
% A new itemize environment that does not attempt to justify sentences
|
|
343 |
\let\Itemize=\itemize
|
|
344 |
\let\endItemize=\enditemize
|
|
345 |
\renewenvironment{itemize}{\begin{Itemize}\begin{raggedright}}{%
|
|
346 |
\end{raggedright}\end{Itemize}}
|
|
347 |
|
|
348 |
% itemstep : itemize environment with step-by-step displaying
|
|
349 |
% Warning: no nesting allowed
|
|
350 |
\newcounter{item@step}
|
|
351 |
\newenvironment{itemstep}{%
|
|
352 |
\let\old@item=\item
|
|
353 |
\begin{itemize}%
|
|
354 |
|
|
355 |
\def\item{\StepCounter{item@step}%
|
|
356 |
\FromSlide{\theitem@step}\old@item}
|
|
357 |
}{\end{itemize}\setcounter{item@step}{0}}
|
|
358 |
|
|
359 |
%% Displaying the version caption
|
|
360 |
\newif\ifshowVersion
|
|
361 |
\showVersionfalse
|
|
362 |
\newcommand{\displayVersion}{\global\showVersiontrue}
|
|
363 |
|
|
364 |
\newcommand{\timenow}{%
|
|
365 |
\@tempcnta=\time \divide\@tempcnta by 60 \number\@tempcnta:\multiply
|
|
366 |
\@tempcnta by 60 \@tempcntb=\time \advance\@tempcntb by -\@tempcnta
|
|
367 |
\ifnum\@tempcntb <10 0\number\@tempcntb\else\number\@tempcntb\fi}
|
|
368 |
|
|
369 |
\newcommand{\lastpage@putlabel}{\addtocounter{page}{-1}%
|
|
370 |
\immediate\write\@auxout{\string
|
|
371 |
\newlabel{last@page}{{}{\theslide}{\relax }{}{}}}%
|
|
372 |
\addtocounter{page}{1}}
|
|
373 |
\AtEndDocument{\ifallPages\clearpage\lastpage@putlabel\fi}
|
|
374 |
|
|
375 |
\newcommand{\@Subtitle}{.}
|
|
376 |
\newcommand{\subtitle}[1]{\gdef\@Subtitle{#1}}
|
|
377 |
\renewcommand{\title}[1]{\gdef\@Title{#1}%
|
|
378 |
\if\@cartouche.\gdef\@cartouche{#1}\fi}
|
|
379 |
\renewcommand{\author}[1]{\gdef\@Author{#1}}
|
|
380 |
|
|
381 |
\newcommand{\@email}{.}
|
|
382 |
\newcommand{\email}[1]{\gdef\@email{#1}}
|
|
383 |
|
|
384 |
%\newcommand{\@institution}{.}
|
|
385 |
\newcommand{\institution}[1]{\gdef\@institution{#1}}
|
|
386 |
|
|
387 |
\renewcommand{\maketitle}{
|
|
388 |
%% Tests whether the 'french' style from B. Gaulle is loaded
|
|
389 |
\expandafter\ifx\csname frenchTeXmods\endcsname\relax%
|
|
390 |
\else
|
|
391 |
\PackageWarning{prosper}{This page intentionnally left blank to overcome an incompatibility bug between B. Gaulle 'french' package and the seminar class.}
|
|
392 |
\begin{center}
|
|
393 |
{\black\small
|
|
394 |
\textsf{prosper} class: page intentionnally left blank to overcome an incompatibility bug between B. Gaulle 'french' package and the seminar class.}
|
|
395 |
\end{center}
|
|
396 |
\clearpage \setcounter{page}{0}
|
|
397 |
\fi
|
|
398 |
\begin{slide}{@}
|
|
399 |
\ptsize{10}
|
|
400 |
\begin{center}
|
|
401 |
\@titleSpacing
|
|
402 |
\normalfont
|
|
403 |
{\ifinColor\@fontTitleColor\else\@fontTitleBW\fi\@Title}
|
|
404 |
\if\@Subtitle.\else
|
|
405 |
|
|
406 |
{\ifinColor\@fontSubtitleColor\else\@fontSubtitleBW\fi\@Subtitle}
|
|
407 |
\fi
|
|
408 |
|
|
409 |
\vskip.5em
|
|
410 |
\@Author
|
|
411 |
|
|
412 |
\if\@email.\else
|
|
413 |
\vskip-5pt
|
|
414 |
{\fontsize{7}{7}\selectfont\texttt{\@email}}
|
|
415 |
\fi
|
|
416 |
\expandafter\ifx\csname @institution\endcsname\relax %
|
|
417 |
\else
|
|
418 |
\vskip.8em
|
|
419 |
\@institution
|
|
420 |
\fi
|
|
421 |
\vfill
|
|
422 |
\end{center}
|
|
423 |
\end{slide}
|
|
424 |
}
|
|
425 |
|
|
426 |
%% Overlays environment
|
|
427 |
\newcounter{overlay@page}
|
|
428 |
\newenvironment{Overlays}{%
|
|
429 |
\global\let\slide\SlideOverlay
|
|
430 |
\global\let\endslide\endSlideOverlay
|
|
431 |
\setcounter{overlay@page}{\value{slide}}}{%
|
|
432 |
\global\let\slide\SlideNormal
|
|
433 |
\global\let\endslide\endSlideNormal
|
|
434 |
\global\let\@okForBookmark\relax
|
|
435 |
\setcounter{slide}{\value{overlay@page}}\StepCounter{slide}}
|
|
436 |
|
|
437 |
% overlays environment
|
|
438 |
% Parameter: # of slides in the overlay
|
|
439 |
% slide 0 is the one for PostScript file
|
|
440 |
\newbox\theoverlays
|
|
441 |
\newcounter{overlaysCount}
|
|
442 |
\newcounter{limitOverlays}
|
|
443 |
|
|
444 |
% fromSlide, onlySlide, untilSlide
|
|
445 |
% Masks or not the parameter.
|
|
446 |
% The stared version does not advance the position pointer and does not
|
|
447 |
% interpret its argument (to be used for graphics and commands containing
|
|
448 |
% PStricks links)
|
|
449 |
\long\def\fromSlide{%
|
|
450 |
\@ifnextchar *\fromSlide@E\fromSlide@NE
|
|
451 |
}
|
|
452 |
\long\def\fromSlide@NE#1#2{%
|
|
453 |
\ifDVItoPS
|
|
454 |
\ifAccumulate
|
|
455 |
#2
|
|
456 |
\fi
|
|
457 |
\else
|
|
458 |
\ifnum#1>\value{overlaysCount}
|
|
459 |
{\overlay{1}#2}
|
|
460 |
\else
|
|
461 |
#2
|
|
462 |
\fi
|
|
463 |
\fi
|
|
464 |
}
|
|
465 |
|
|
466 |
\long\def\fromSlide@E*#1#2{%
|
|
467 |
\ifDVItoPS
|
|
468 |
\ifAccumulate
|
|
469 |
#2
|
|
470 |
\fi
|
|
471 |
\else
|
|
472 |
\ifnum#1>\value{overlaysCount}
|
|
473 |
\relax
|
|
474 |
\else
|
|
475 |
#2
|
|
476 |
\fi
|
|
477 |
\fi
|
|
478 |
}
|
|
479 |
|
|
480 |
\long\def\untilSlide{%
|
|
481 |
\@ifnextchar *\untilSlide@E\untilSlide@NE
|
|
482 |
}
|
|
483 |
\long\def\untilSlide@NE#1#2{%
|
|
484 |
\ifDVItoPS
|
|
485 |
\ifAccumulate
|
|
486 |
#2
|
|
487 |
\fi
|
|
488 |
\else
|
|
489 |
\ifnum#1<\value{overlaysCount}
|
|
490 |
{\overlay{1}#2}
|
|
491 |
\else
|
|
492 |
#2
|
|
493 |
\fi
|
|
494 |
\fi
|
|
495 |
}
|
|
496 |
\long\def\untilSlide@E*#1#2{%
|
|
497 |
\ifDVItoPS
|
|
498 |
\ifAccumulate
|
|
499 |
#2
|
|
500 |
\fi
|
|
501 |
\else
|
|
502 |
\ifnum#1<\value{overlaysCount}
|
|
503 |
\relax
|
|
504 |
\else
|
|
505 |
#2
|
|
506 |
\fi
|
|
507 |
\fi
|
|
508 |
}
|
|
509 |
|
|
510 |
\long\def\onlySlide{%
|
|
511 |
\@ifnextchar *\onlySlide@E\onlySlide@NE
|
|
512 |
}
|
|
513 |
\long\def\onlySlide@NE#1#2{%
|
|
514 |
\ifDVItoPS
|
|
515 |
\ifAccumulate
|
|
516 |
#2
|
|
517 |
\fi
|
|
518 |
\else
|
|
519 |
\ifnum#1=\value{overlaysCount}
|
|
520 |
#2
|
|
521 |
\else
|
|
522 |
{\overlay{1}#2}
|
|
523 |
\fi
|
|
524 |
\fi
|
|
525 |
}
|
|
526 |
\long\def\onlySlide@E*#1#2{%
|
|
527 |
\ifDVItoPS
|
|
528 |
\ifAccumulate
|
|
529 |
#2
|
|
530 |
\fi
|
|
531 |
\else
|
|
532 |
\ifnum#1=\value{overlaysCount}
|
|
533 |
#2
|
|
534 |
\fi
|
|
535 |
\fi
|
|
536 |
}
|
|
537 |
|
|
538 |
|
|
539 |
% FromSlide, OnlySlide, UntilSlide
|
|
540 |
% Masks or not the following material. Advances the position pointer
|
|
541 |
\newcommand{\FromSlide}[1]{%
|
|
542 |
\ifDVItoPS
|
|
543 |
\else
|
|
544 |
\ifnum#1>\value{overlaysCount}
|
|
545 |
\overlay{1}
|
|
546 |
\fi
|
|
547 |
\fi
|
|
548 |
}
|
|
549 |
\newcommand{\UntilSlide}[1]{%
|
|
550 |
\ifDVItoPS
|
|
551 |
\else
|
|
552 |
\ifnum#1<\value{overlaysCount}
|
|
553 |
\overlay{1}
|
|
554 |
\fi
|
|
555 |
\fi
|
|
556 |
}
|
|
557 |
\newcommand{\OnlySlide}[1]{%
|
|
558 |
\ifDVItoPS
|
|
559 |
\else
|
|
560 |
\ifnum#1=\value{overlaysCount}
|
|
561 |
\else
|
|
562 |
\overlay{1}
|
|
563 |
\fi
|
|
564 |
\fi
|
|
565 |
}
|
|
566 |
|
|
567 |
% Overlays. Parameter to state the number of slides composing the overlay
|
|
568 |
%\def\stepcounter#1{%
|
|
569 |
% \ifInOverlays
|
|
570 |
% \ifnum\value{overlayscount}<2
|
|
571 |
% \else
|
|
572 |
% \addtocounter{#1}\@ne
|
|
573 |
% \fi
|
|
574 |
% \else
|
|
575 |
% \addtocounter{#1}\@ne
|
|
576 |
% \fi
|
|
577 |
% \begingroup
|
|
578 |
% \let\@elt\@stpelt
|
|
579 |
% \csname cl@#1\endcsname
|
|
580 |
% \endgroup
|
|
581 |
%}
|
|
582 |
|
|
583 |
\newif\ifInOverlays
|
|
584 |
\InOverlaysfalse
|
|
585 |
\long\def\overlays#1#2{%
|
|
586 |
\global\InOverlaystrue
|
|
587 |
\aftergroup\InOverlaysfalse
|
|
588 |
\setcounter{limitOverlays}{#1}
|
|
589 |
\setcounter{overlaysCount}{1}
|
|
590 |
\ifDVItoPS
|
|
591 |
#2
|
|
592 |
\else
|
|
593 |
\begin{Overlays}
|
|
594 |
\bgroup
|
|
595 |
\loop
|
|
596 |
#2
|
|
597 |
\ifnum\value{overlaysCount}<\value{limitOverlays}
|
|
598 |
\StepCounter{overlaysCount}
|
|
599 |
\repeat
|
|
600 |
\egroup
|
|
601 |
\end{Overlays}
|
|
602 |
\fi
|
|
603 |
}
|
|
604 |
|
|
605 |
\def\@listctr{}
|
|
606 |
\AtBeginDocument{%
|
|
607 |
{\begingroup \escapechar\m@ne\xdef\@gtempa{{\string\reset@color}}\endgroup
|
|
608 |
\expandafter\@ifundefined\@gtempa\relax{%
|
|
609 |
\global\let\orig@reset@color=\reset@color
|
|
610 |
\gdef\reset@color{\orig@reset@color\pst@endcolor}}}
|
|
611 |
\let\Label=\label
|
|
612 |
\def\label#1{%
|
|
613 |
\ifInOverlays
|
|
614 |
\ifnum\value{overlaysCount}>1
|
|
615 |
\else
|
|
616 |
\Label{#1}
|
|
617 |
\fi
|
|
618 |
\fi
|
|
619 |
}
|
|
620 |
% For amsmath environments
|
|
621 |
\let\Label@in@display=\label@in@display
|
|
622 |
\def\label@in@display#1{
|
|
623 |
\ifInOverlays
|
|
624 |
\ifnum\value{overlaysCount}>1
|
|
625 |
\else
|
|
626 |
\Label@in@display{#1}
|
|
627 |
\fi
|
|
628 |
\fi
|
|
629 |
}
|
|
630 |
|
|
631 |
\let\overlay@loop=\relax
|
|
632 |
\let\StepCounter=\stepcounter
|
|
633 |
\def\RefStepCounter#1{\StepCounter{#1}%
|
|
634 |
\protected@edef\@currentlabel
|
|
635 |
{\csname p@#1\endcsname\csname the#1\endcsname}%
|
|
636 |
}
|
|
637 |
\def\stepcounter#1{%
|
|
638 |
\ifInOverlays
|
|
639 |
\ifthenelse{\equal{#1}{slide}}{
|
|
640 |
\StepCounter{#1}}{
|
|
641 |
\ifthenelse{\equal{#1}{\@listctr}}{
|
|
642 |
\StepCounter{#1}}{
|
|
643 |
\ifnum\value{overlaysCount}>1
|
|
644 |
\else
|
|
645 |
\StepCounter{#1}
|
|
646 |
\fi}}
|
|
647 |
\else
|
|
648 |
\StepCounter{#1}
|
|
649 |
\fi}
|
|
650 |
% Macro \overlay taken from semlayer.sty
|
|
651 |
\def\overlay#1{%
|
|
652 |
\ifoverlays\ifx\@overlay\relax\nooverlays@err\fi\fi
|
|
653 |
\ifslide
|
|
654 |
\@tempcnta=#1
|
|
655 |
\@testfalse
|
|
656 |
\ifnum\@tempcnta>-1 \ifnum\@tempcnta<10 \@testtrue\fi\fi
|
|
657 |
\if@test
|
|
658 |
\c@overlay=\@tempcnta
|
|
659 |
\ifnum\c@overlay=0
|
|
660 |
\advance\c@slide by -1
|
|
661 |
\RefStepCounter{slide}%
|
|
662 |
\else
|
|
663 |
\advance\c@overlay by -1
|
|
664 |
\RefStepCounter{overlay}%
|
|
665 |
\ifoverlays
|
|
666 |
\xdef\overlay@list{\overlay@list,\the\c@overlay}%
|
|
667 |
\fi
|
|
668 |
\fi
|
|
669 |
\ifoverlays
|
|
670 |
\@overlay{\the\c@overlay}%
|
|
671 |
\fi
|
|
672 |
\else
|
|
673 |
\@seminarerr{\string\overlay\space argument must be
|
|
674 |
an integer between 0 and 9}\@eha
|
|
675 |
\fi
|
|
676 |
\else
|
|
677 |
\@seminarerr{\string\overlay\space can only be used
|
|
678 |
in slide environments}\@eha
|
|
679 |
\fi
|
|
680 |
\ignorespaces}
|
|
681 |
|
|
682 |
} % AtBeginDocument
|
|
683 |
|
|
684 |
|
|
685 |
% \part
|
|
686 |
\let\part=\relax
|
|
687 |
\newcommand{\part}[2][\@defaultTransition]{%
|
|
688 |
\begin{slide}[#1]{@}%
|
|
689 |
\vspace*{1.5cm}\@addBookmarkOnSlide{#2}
|
|
690 |
\begin{center}
|
|
691 |
\fontTitle{#2}
|
|
692 |
\end{center}
|
|
693 |
\end{slide}}
|
|
694 |
|
|
695 |
% Uses #1 if PDF option, otherwise #2
|
|
696 |
\newcommand{\PDForPS}[2]{%
|
|
697 |
\ifDVItoPS
|
|
698 |
#2
|
|
699 |
\else
|
|
700 |
#1
|
|
701 |
\fi
|
|
702 |
}
|
|
703 |
|
|
704 |
% #1 appears on the slide only on PS mode
|
|
705 |
\newcommand{\onlyInPS}[1]{\ifDVItoPS #1\fi}
|
|
706 |
% #1 appears on the slide only on PDF mode
|
|
707 |
\newcommand{\onlyInPDF}[1]{\ifDVItoPS\relax\else #1\fi}
|
|
708 |
|
|
709 |
|
|
710 |
|
|
711 |
% To be used in conjunction with babel/french to allow ones own labels
|
|
712 |
\def\NoFrenchBabelItemize{%
|
|
713 |
\AtBeginDocument{%
|
|
714 |
\renewenvironment{itemize}%
|
|
715 |
{\ifnum \@itemdepth >\thr@@\@toodeep\else
|
|
716 |
\advance\@itemdepth\@ne
|
|
717 |
\edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
|
|
718 |
\expandafter
|
|
719 |
\list
|
|
720 |
\csname\@itemitem\endcsname%
|
|
721 |
{\let\@trivlist\@trivlistORI
|
|
722 |
\settowidth{\labelwidth}{\textendash}%
|
|
723 |
\setlength{\leftmargin}{\labelwidth}%
|
|
724 |
\addtolength{\leftmargin}{\labelsep}%
|
|
725 |
\ifnum\@listdepth=0
|
|
726 |
\setlength{\itemindent}{\parindent}%
|
|
727 |
\else
|
|
728 |
\addtolength{\leftmargin}{\parindent}%
|
|
729 |
\fi
|
|
730 |
\setlength{\itemsep}{\z@}%
|
|
731 |
\setlength{\parsep}{\z@}%
|
|
732 |
\setlength{\topsep}{\z@}%
|
|
733 |
\setlength{\partopsep}{\z@}%
|
|
734 |
\addtolength{\topsep}{-\parskip}%
|
|
735 |
\addtolength{\partopsep}{\parskip}%
|
|
736 |
}%
|
|
737 |
\fi}%
|
|
738 |
{\endlist}
|
|
739 |
}}
|
|
740 |
|
|
741 |
\ptsize{14}
|
|
742 |
|
|
743 |
\endinput
|
|
744 |
|
|
745 |
%%% Local Variables:
|
|
746 |
%%% mode: latex
|
|
747 |
%%% TeX-master: t
|
|
748 |
%%% End:
|