| 1 |
%%%%%%%%%%%%%%%%%%%%%%%%%%% -*- Mode: Latex -*- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2 |
%% seminar.bg2 --- Corrections for compatibility problems and new bugs |
| 3 |
%% found in the Seminar package, and few new additions |
| 4 |
%% to help overlays management for PDF output files. |
| 5 |
%% (see also the seminar.bug file in Seminar distribution) |
| 6 |
%% |
| 7 |
%% Disclaimer: this file is mine and doesn't engage TVZ! |
| 8 |
%% |
| 9 |
%% Note: insert it after \usepackage{graphicx} if you use `graphicx' |
| 10 |
%% and after \usepackage{longtable} if you use `longtable' |
| 11 |
%% |
| 12 |
%% Author : Denis GIROU (CNRS/IDRIS - France) <[email protected]> |
| 13 |
%% Created the : 1995 |
| 14 |
%% Last mod. by : Denis GIROU (CNRS/IDRIS - France) <[email protected]> |
| 15 |
%% Last mod. the : Fri May 31 20:19:22 2002 |
| 16 |
%% |
| 17 |
%% This file may be distributed and/or modified under the conditions of |
| 18 |
%% the LaTeX Project Public License, either version 1.2 of this license |
| 19 |
%% or (at your option) any later version. The latest version of this |
| 20 |
%% license is in: |
| 21 |
%% |
| 22 |
%% http://www.latex-project.org/lppl.txt |
| 23 |
%% |
| 24 |
%% and version 1.2 or later is part of all distributions of LaTeX version |
| 25 |
%% 1999/12/01 or later. |
| 26 |
%% |
| 27 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 28 |
|
| 29 |
\def\FileVersion{2.3} |
| 30 |
\def\FileDate{2014/05/12} |
| 31 |
\typeout{seminar.bg2: various corrections for the Seminar document class^^J% |
| 32 |
added since seminar.bug and few add-ons for overlays^^J% |
| 33 |
(Version \FileVersion\space of <\FileDate> (DG, hv))} |
| 34 |
|
| 35 |
\RequirePackage{pst-ovl} |
| 36 |
\edef\TheAtCode{\the\catcode`\@} |
| 37 |
\catcode`\@=11 |
| 38 |
|
| 39 |
% 1 - To correct a bug in the note environment |
| 40 |
% (reported by Denis Girou (CNRS/IDRIS) <[email protected]> - 1995) |
| 41 |
\@savsf=1 |
| 42 |
|
| 43 |
|
| 44 |
% 2 - To correct several bugs to generate a list of slides with subsection |
| 45 |
% entries |
| 46 |
% (reported by Denis Girou (CNRS/IDRIS) <[email protected]> - Jul. 18, 1995) |
| 47 |
% - To clear the subheading when a new heading is defined |
| 48 |
% (reported by Axel Thimm - <[email protected]> - June 5, 1997) |
| 49 |
% - To assure coherence between heading and subheading when used |
| 50 |
% in header/footer, for article mode |
| 51 |
% (reported by Axel Thimm - <[email protected]> - June 5, 1997) |
| 52 |
% - Improvements (\refstepcounter and \@addtoreset) by Jeremy Gibbons |
| 53 |
% <[email protected]> - Sep. 30, 1997 |
| 54 |
|
| 55 |
% Used by the \slide@subheading macro but undefined |
| 56 |
\def\theslidesubsection{\theslidesection.\arabic{slidesubsection}} |
| 57 |
|
| 58 |
%% Requires main pst-ovl |
| 59 |
\ifx\PSTovlloaded\endinput\else\input pst-ovl \fi |
| 60 |
|
| 61 |
|
| 62 |
\def\slide@heading[#1]#2{% |
| 63 |
\refstepcounter{slidesection}% |
| 64 |
\@addtoreset{slidesubsection}{slidesection} |
| 65 |
\addtocontents{los}{\protect\l@slide |
| 66 |
{\the\c@slidesection}{\ignorespaces#1}{\@SCTR}}% |
| 67 |
\def\@tempa{#2}% |
| 68 |
\ifx\@tempa\@empty\else |
| 69 |
{\edef\@currentlabel{\csname p@slidesection\endcsname\theslidesection}% |
| 70 |
\makeslideheading{#2}}% |
| 71 |
\fi |
| 72 |
\gdef\theslideheading{#1}% |
| 73 |
\gdef\theslidesubheading{}% |
| 74 |
} |
| 75 |
|
| 76 |
\def\slide@subheading[#1]#2{% |
| 77 |
\refstepcounter{slidesubsection}% |
| 78 |
\addtocontents{los}{\protect\l@subslide |
| 79 |
{\the\c@slidesubsection}{\ignorespaces#1}{\@SCTR}}% |
| 80 |
\def\@tempa{#2}% |
| 81 |
\ifx\@tempa\@empty\else |
| 82 |
{\edef\@currentlabel{\csname p@slidesubsection\endcsname |
| 83 |
\theslidesubsection}\makeslidesubheading{#2}}% |
| 84 |
\fi |
| 85 |
\gdef\theslidesubheading{#1}% |
| 86 |
} |
| 87 |
% 3 - To correct a bug in the \slidecontents macro |
| 88 |
% (reported by Denis Roegel (LORIA) <[email protected]> - Sep. 22, 1996) |
| 89 |
|
| 90 |
\long\def\@gobblethree #1#2#3{} |
| 91 |
|
| 92 |
\def\slide@contents{% |
| 93 |
\def\l@slide##1##2##3{% |
| 94 |
\slide@cline{\slidenumberline{##1}{##2}}{##3}}% |
| 95 |
\let\l@subslide\@gobblethree |
| 96 |
\@startlos} |
| 97 |
|
| 98 |
% 4 - To solve incompatibility between the `graphicx' package and Seminar. |
| 99 |
% The \espfslidesize Seminar macro work only with the old version of |
| 100 |
% the `epsfig' package, so with \includegraphics the PostScript files are |
| 101 |
% always scaled without the possibility to leave them to there natural |
| 102 |
% size. And also these files are not correctly scaled when we switch |
| 103 |
% from normal to article mode under Seminar. So, we must redefined the |
| 104 |
% \epsfslidesize macro of Seminar and modify few internal macros of |
| 105 |
% `graphicx'. |
| 106 |
% (Note: I consider only the `graphicX' package, not the 'graphicS' one) |
| 107 |
% (reported by Karl Tombre (LORIA) <[email protected]> and |
| 108 |
% Denis Roegel (LORIA) <[email protected]> - Jan. 16, 1997) |
| 109 |
|
| 110 |
\def\GraphicsNotScaled{% |
| 111 |
\ifx\Gin@viewport\undefined |
| 112 |
\else % Graphicx package detected |
| 113 |
\def\Gin@i{% |
| 114 |
\def\Gin@req@sizes{% |
| 115 |
\Gin@nat@height=\inverseslidesmag\Gin@nat@height |
| 116 |
\Gin@nat@width=\inverseslidesmag\Gin@nat@width |
| 117 |
\Gin@req@height\Gin@nat@height |
| 118 |
\Gin@req@width\Gin@nat@width}% |
| 119 |
\@ifnextchar[\Gin@ii{\Gin@ii[]}} |
| 120 |
\define@key{Gin}{width}{% |
| 121 |
\@tempdima=##1\@tempdima=\inverseslidesmag\@tempdima\def\Gin@ewidth{\@tempdima}} |
| 122 |
\define@key{Gin}{height}{% |
| 123 |
\@tempdima=##1\@tempdima=\inverseslidesmag\@tempdima\def\Gin@eheight{\@tempdima}} |
| 124 |
\define@key{Gin}{totalheight}{% |
| 125 |
\def\Gin@eresize{\totalheight}% |
| 126 |
\@tempdima=##1\@tempdima=\inverseslidesmag\@tempdima\def\Gin@eheight{\@tempdima}} |
| 127 |
\fi} |
| 128 |
|
| 129 |
\def\epsfslidesize{% |
| 130 |
\let\epsfsize\slide@epsfsize |
| 131 |
\GraphicsNotScaled} |
| 132 |
|
| 133 |
% 5 - To solve incompatibily between the LongTable package and Seminar |
| 134 |
% (reported by Bhaskar Manda (UIUC) <[email protected]> - May 7, 1997) |
| 135 |
% - Problem in article format seen later |
| 136 |
% (reported by Axel Thimm <[email protected]> - June 5, 1997) |
| 137 |
|
| 138 |
% From seminar.cls |
| 139 |
\def\slide@outputLT{% (from \slide@output) |
| 140 |
\@makeslide |
| 141 |
\@testfalse |
| 142 |
\ifnotesonly\else |
| 143 |
\iflandscape |
| 144 |
\ifnum\@landscapeonly>-1 \os@test\fi |
| 145 |
\else |
| 146 |
\ifnum\@landscapeonly<1 \os@test\fi |
| 147 |
\fi |
| 148 |
\fi |
| 149 |
\if@test |
| 150 |
\reset@slideoutput |
| 151 |
\@@makeslideLT |
| 152 |
\process@slide |
| 153 |
\fi |
| 154 |
\refstepcounter{slide}} |
| 155 |
\def\@@makeslideLT{% (from \@@makeslide) |
| 156 |
\overfullslide@warning |
| 157 |
\setbox\@slidebox\hbox{% |
| 158 |
\vfuzz=\slidefuzz\relax |
| 159 |
\vbox to\slide@vsize{% |
| 160 |
\box\@outputbox |
| 161 |
\ifcenterslides\vskip\z@ plus .0001fil \fi |
| 162 |
\unvbox\@slidebox |
| 163 |
\vskip\z@ plus .0001fil}% |
| 164 |
\the\after@slidepage}% |
| 165 |
\wd\@slidebox\textwidth} |
| 166 |
|
| 167 |
% From LongTable |
| 168 |
\def\LT@output{% |
| 169 |
\ifnum\outputpenalty <-\@Mi |
| 170 |
\ifnum\outputpenalty > -\LT@end@pen |
| 171 |
\LT@err{floats and marginpars not allowed in a longtable}\@ehc |
| 172 |
\else |
| 173 |
\setbox\z@\vbox{\unvbox\@cclv}% |
| 174 |
\ifdim \ht\LT@lastfoot>\ht\LT@foot |
| 175 |
\dimen@\pagegoal |
| 176 |
\advance\dimen@-\ht\LT@lastfoot |
| 177 |
\ifdim\dimen@<\ht\z@ |
| 178 |
\setbox\@cclv\vbox{\unvbox\z@\copy\LT@foot\vss}% |
| 179 |
\@makecol |
| 180 |
\slide@outputLT |
| 181 |
\setbox\z@\vbox{\box\LT@head}% |
| 182 |
\fi |
| 183 |
\fi |
| 184 |
\global\@colroom\@colht |
| 185 |
\global\vsize\@colht |
| 186 |
\vbox |
| 187 |
{\unvbox\z@\box\ifvoid\LT@lastfoot\LT@foot\else\LT@lastfoot\fi}% |
| 188 |
\fi |
| 189 |
\else |
| 190 |
\setbox\@cclv\vbox{\unvbox\@cclv\copy\LT@foot\vss}% |
| 191 |
\@makecol |
| 192 |
\slide@outputLT |
| 193 |
\copy\LT@head |
| 194 |
\fi} |
| 195 |
|
| 196 |
% We must adjust \textheight. Sometimes, you must increase it a little by |
| 197 |
% something like \addtolength{\textheight}{5mm} |
| 198 |
% But if you use slides like \begin{slide*}[15cm,10cm] |
| 199 |
% you must define locally \textheight=15cm |
| 200 |
\addtolength{\textheight}{-\headheight} |
| 201 |
|
| 202 |
|
| 203 |
% 6 - To allow automatic changes of language dependent labels, |
| 204 |
% for instance by loading the `french' package after Seminar |
| 205 |
% (suggested by Bernard Gaulle (IDRIS) <[email protected]> - Nov. 20, 1997) |
| 206 |
% From seminar.cls |
| 207 |
\def\slidename{Slide} |
| 208 |
\def\slidelabel{\bf\slidename{} \theslide} |
| 209 |
% From slidesec.sty |
| 210 |
\def\listslidename{List of Slides}% |
| 211 |
\def\listofslides{\section*{\listslidename% |
| 212 |
\@mkboth{\expandafter\MakeUppercase\listslidename}% |
| 213 |
{\expandafter\MakeUppercase\listslidename}}% |
| 214 |
\def\l@slide##1##2##3{% |
| 215 |
\slide@undottedcline{\slidenumberline{##3}{##2}}{}}% |
| 216 |
\let\l@subslide\l@slide |
| 217 |
\@startlos} |
| 218 |
|
| 219 |
|
| 220 |
% 7 - There were several problems when doing a global change of color |
| 221 |
% outside the "slide"environment (using the \color{ColorName} macro |
| 222 |
% of the `color' package) if this change was not done globally |
| 223 |
% (that is to say before the "\begin{document}") but inside the document, |
| 224 |
% for a part of the slides. |
| 225 |
% These problems can be seen specially for screen presentations, |
| 226 |
% when we want to use a dark background, so a light foreground color |
| 227 |
% for the text. |
| 228 |
% First, the header (defining for instance with the `fancyhdr' package) |
| 229 |
% changed of color one slide later and was restored one slide later too |
| 230 |
% if the change of the color was mas inside a group for some slides, |
| 231 |
% and second, the black color was forced by the footer. |
| 232 |
% We solve the first problem by usage of the same technique than the one |
| 233 |
% used by Seminar for global changes based on \special macros and made |
| 234 |
% before the "\begin{document}". We save the \specials in the |
| 235 |
% \saved@specials box and insert it at the beginning of the \@slidebox box |
| 236 |
% with the \insert@specials macro, as for the first slide. |
| 237 |
% And we solve the second problem by suppression of the command in the |
| 238 |
% hook which force the black color (defined in the `semcolor' package). |
| 239 |
% (reported by Denis Girou (CNRS/IDRIS) <[email protected]> - 1999-2002) |
| 240 |
|
| 241 |
% Built from \save@srlidespecials (for all slides excepted the first one) |
| 242 |
\def\save@slidespecials@ii{% |
| 243 |
\begingroup |
| 244 |
\output{% |
| 245 |
\global\setbox\saved@specials=\box\@cclv |
| 246 |
\global\wd\saved@specials=\z@ |
| 247 |
\global\dp\saved@specials=\z@ |
| 248 |
\global\ht\saved@specials=\z@}% |
| 249 |
\hbox{}\penalty-\@M |
| 250 |
\endgroup}% |
| 251 |
|
| 252 |
% The first slide is already managed, so we will define \save@slidespecials@i |
| 253 |
% started to the second one only... |
| 254 |
\def\save@slidespecials@i{}% |
| 255 |
|
| 256 |
\ifarticle\else |
| 257 |
\def\insert@specials{% |
| 258 |
\ifvoid\saved@specials\else |
| 259 |
\setbox\@slidebox\hbox{\box\saved@specials\box\@slidebox}% |
| 260 |
\fi |
| 261 |
\global\let\save@slidespecials@i\save@slidespecials@ii} |
| 262 |
\fi |
| 263 |
|
| 264 |
\addto@hook{\before@newslide}{\save@slidespecials@i} |
| 265 |
\after@slidepage={} |
| 266 |
|
| 267 |
% 7 - To vertically correctly center the footer, if defined |
| 268 |
% (this is mainly visible when using the `fancyhdr' package, and specially |
| 269 |
% when a footer rule line is defined) |
| 270 |
% (reported by Denis Girou (CNRS/IDRIS) - <[email protected]> - April 1998) |
| 271 |
|
| 272 |
% 8 - Add-on to allow "full screen" backgrounds. |
| 273 |
% Seminar originally support only partial backgrounds, which doesn't cover |
| 274 |
% the full page but only the place of the text. It cannot be easily |
| 275 |
% modified, as there are dependancies between the header and the text. |
| 276 |
% So, we choose to define new macros \SeminarNewSlideFrameBackground |
| 277 |
% and \SeminarSlideFrameBackground to manage the full screen backgrounds, |
| 278 |
% designed on the model of the \newslideframe and \slideframe ones. |
| 279 |
% (added by Denis Girou (CNRS/IDRIS) <[email protected]> - Jun. 30, 1999) |
| 280 |
|
| 281 |
\newbox\Seminar@SlideBoxBackground |
| 282 |
|
| 283 |
\ifarticle |
| 284 |
\else |
| 285 |
\def\output@slide{% |
| 286 |
\begingroup |
| 287 |
\hoffset=-\inverseslidesmag in |
| 288 |
\voffset=-\inverseslidesmag in |
| 289 |
\setslidelength\@tempdima{% |
| 290 |
\ifportrait\paperwidth\else\paperheight\fi}% |
| 291 |
\setslidelength\@tempdimb{% |
| 292 |
\ifportrait\paperheight\else\paperwidth\fi}% |
| 293 |
\ifrotateheaders |
| 294 |
\@ifrotateslide{% |
| 295 |
\dimen@=\@tempdima |
| 296 |
\@tempdima=\@tempdimb |
| 297 |
\@tempdimb=\dimen@} |
| 298 |
\fi |
| 299 |
% \oddsidemargin, \evensidemargin, \headheight, \footheight |
| 300 |
% used for scratch: |
| 301 |
% Some page styles like to know \textwidth: |
| 302 |
\setslidelength\headheight\slidetopmargin |
| 303 |
\setslidelength\footheight\slidebottommargin |
| 304 |
\ifautoslidemargins |
| 305 |
\textwidth=\wd\@slidebox |
| 306 |
\oddsidemargin=\@tempdima |
| 307 |
\advance\oddsidemargin-\textwidth |
| 308 |
\divide\oddsidemargin 2 |
| 309 |
\else |
| 310 |
\setslidelength\oddsidemargin\slideleftmargin |
| 311 |
\setslidelength\evensidemargin\sliderightmargin |
| 312 |
\textwidth=\@tempdima |
| 313 |
\advance\textwidth-\oddsidemargin |
| 314 |
\advance\textwidth-\evensidemargin |
| 315 |
\fi |
| 316 |
\setbox\@slidebox=\hbox to \@tempdima{% |
| 317 |
\box\Seminar@SlideBoxBackground |
| 318 |
\kern\oddsidemargin |
| 319 |
\vbox to\@tempdimb{% |
| 320 |
\ifnum\fancyput@flag>-1 |
| 321 |
\hbox{\kern-\oddsidemargin\do@fancyput}% |
| 322 |
\fi |
| 323 |
\let\label\@gobble |
| 324 |
\let\index\@gobble |
| 325 |
\let\glossary\@gobble |
| 326 |
\vbox to\headheight{% |
| 327 |
\vfill |
| 328 |
\hbox{% |
| 329 |
\slideheadfont\relax\strut |
| 330 |
\hbox to\textwidth{\@oddhead}}% |
| 331 |
\kern\z@}% |
| 332 |
\vfill |
| 333 |
\hbox to\textwidth{\hss\box\@slidebox\hss}% |
| 334 |
\vfill |
| 335 |
\vbox to\footheight{% |
| 336 |
\vfill |
| 337 |
\hbox{% |
| 338 |
\slidefootfont\relax\strut |
| 339 |
\hbox to\textwidth{\@oddfoot}}% |
| 340 |
\vfill}}% |
| 341 |
\hss}% |
| 342 |
\ifrotateheaders\@ifrotateslide\rotate@slide\fi |
| 343 |
\insert@specials |
| 344 |
\let\protect\noexpand |
| 345 |
\shipout\box\@slidebox |
| 346 |
\endgroup |
| 347 |
\let\firstmark\botmark} |
| 348 |
\@ifundefined{fancyput@flag}{\def\fancyput@flag{-1}}{} |
| 349 |
\fi |
| 350 |
|
| 351 |
\def\finish@slide{% |
| 352 |
\theSlideFrameBackground |
| 353 |
\theslideframe |
| 354 |
\add@slidelabel\slidelabel} |
| 355 |
|
| 356 |
|
| 357 |
\def\SeminarNewSlideFrameBackground#1{% |
| 358 |
\@ifnextchar[{\@SeminarNewSlideFrameBackground{#1}}% |
| 359 |
{\@SeminarNewSlideFrameBackground{#1}[]}} |
| 360 |
\def\@SeminarNewSlideFrameBackground#1[#2]{% |
| 361 |
\@namedef{semsfbops@#1}{#2}% |
| 362 |
\@namedef{semsfb@#1}##1} |
| 363 |
|
| 364 |
\def\SeminarSlideFrameBackground{\Seminar@SlideFrameBackground{Slide}} |
| 365 |
\def\Seminar@SlideFrameBackground#1{% |
| 366 |
\@ifstar{\@testtrue\Seminar@@SlideFrameBackground{#1}}% |
| 367 |
{\@testfalse\Seminar@@SlideFrameBackground{#1}}} |
| 368 |
\def\Seminar@@SlideFrameBackground#1{% |
| 369 |
\@ifnextchar[{\Seminar@@@SlideFrameBackground{#1}}% |
| 370 |
{\Seminar@@@SlideFrameBackground{#1}[]}} |
| 371 |
\def\Seminar@@@SlideFrameBackground#1[#2]#3{% |
| 372 |
\def\@tempa{none}% |
| 373 |
\def\@tempb{#3}% |
| 374 |
\ifx\@tempa\@tempb |
| 375 |
\@namedef{the#1FrameBackground}{\relax}% |
| 376 |
\else |
| 377 |
\ifx\@tempb\@empty |
| 378 |
\@namedef{the#1FrameBackground}{}% |
| 379 |
\else |
| 380 |
\@ifundefined{semsfb@#3}% |
| 381 |
{\@seminarerr{Background slide frame `#3' undefined}\@eha}% |
| 382 |
{\if@test |
| 383 |
\Seminar@@@@SlideFrameBackground{#1}[#2]{#3}% |
| 384 |
\else |
| 385 |
\@namedef{the#1FrameBackground}{% |
| 386 |
\setbox\Seminar@SlideBoxBackground=\hbox{{% |
| 387 |
\@nameuse{semsfbops@#3}#2% |
| 388 |
\@nameuse{semsfb@#3}{\box\Seminar@SlideBoxBackground}}}}% |
| 389 |
\fi}% |
| 390 |
\fi |
| 391 |
\fi} |
| 392 |
\def\Seminar@@@@SlideFrameBackground#1[#2]#3{% |
| 393 |
\expandafter\let\expandafter\@tempa\csname the#1FrameBackground\endcsname |
| 394 |
\edef\next{% |
| 395 |
\noexpand\def\expandafter\noexpand\csname the#1FrameBackground\endcsname}% |
| 396 |
\expandafter\next\expandafter{\@tempa |
| 397 |
\setbox\Seminar@SlideBoxBackground=\hbox{{% |
| 398 |
\@nameuse{semsfbops@#3}% |
| 399 |
#2% |
| 400 |
\@nameuse{semsfb@#3}{\box\Seminar@SlideBoxBackground}}}}}% |
| 401 |
|
| 402 |
\SeminarSlideFrameBackground{none} |
| 403 |
|
| 404 |
|
| 405 |
% 9 - For screen presentations, and specially animated graphics, |
| 406 |
% we need more than 10 overlays. We increase the limit to 676 (26^2). |
| 407 |
% (added by Denis Girou (CNRS/IDRIS) <[email protected]> - Dec. 5, 2001) |
| 408 |
|
| 409 |
\def\overlay#1{% |
| 410 |
\ifoverlays\ifx\@overlay\relax\nooverlays@err\fi\fi |
| 411 |
\ifslide |
| 412 |
\@tempcnta=#1 |
| 413 |
\@testfalse |
| 414 |
\ifnum\@tempcnta>-2 \ifnum\@tempcnta<677 \@testtrue\fi\fi |
| 415 |
\if@test |
| 416 |
\c@overlay=\@tempcnta |
| 417 |
\ifnum\c@overlay=0 |
| 418 |
\advance\c@slide by -1 |
| 419 |
\refstepcounter{slide}% |
| 420 |
\else |
| 421 |
\advance\c@overlay by -1 |
| 422 |
\refstepcounter{overlay}% |
| 423 |
\ifoverlays |
| 424 |
\xdef\overlay@list{\overlay@list,\the\c@overlay}% |
| 425 |
\fi |
| 426 |
\fi |
| 427 |
\ifoverlays |
| 428 |
\@overlay{\the\c@overlay}% |
| 429 |
\fi |
| 430 |
\else |
| 431 |
\@seminarerr{\string\overlay\space argument must be |
| 432 |
an integer between 0 and 676}\@eha |
| 433 |
\fi |
| 434 |
\else |
| 435 |
\@seminarerr{\string\overlay\space can only be used |
| 436 |
in slide environments}\@eha |
| 437 |
\fi |
| 438 |
\ignorespaces} |
| 439 |
|
| 440 |
\def\overlay@loop{% |
| 441 |
\begingroup |
| 442 |
\overlay@prep |
| 443 |
\c@overlay=1 |
| 444 |
\@whilenum\c@overlay<677 |
| 445 |
\do{% |
| 446 |
\test@member{\the\c@overlay}{\overlay@list}% |
| 447 |
\if@test |
| 448 |
\make@overlay{\the\c@overlay}% |
| 449 |
\finish@slide |
| 450 |
\output@slide |
| 451 |
\fi |
| 452 |
\layer@loop{\the\c@overlay}% |
| 453 |
\advance\c@overlay by 1}% |
| 454 |
\endgroup} |
| 455 |
|
| 456 |
\def\theoverlay{{% |
| 457 |
\ifnum\c@overlay>26 |
| 458 |
\@tempcnta=\c@overlay |
| 459 |
\advance\@tempcnta\m@ne |
| 460 |
\divide\@tempcnta by 26 |
| 461 |
\multiply\@tempcnta by 26 |
| 462 |
\@tempcntb=\c@overlay |
| 463 |
\advance\@tempcntb-\@tempcnta |
| 464 |
\@tempcnta=\c@overlay |
| 465 |
\advance\@tempcnta\m@ne |
| 466 |
\divide\@tempcnta by 26 |
| 467 |
\theslide-\@alph{\@tempcnta}\@alph{\@tempcntb}% |
| 468 |
\else |
| 469 |
\theslide-\alph{overlay}% |
| 470 |
\fi}} |
| 471 |
|
| 472 |
|
| 473 |
% 10 - Addition for management of cumulative and progressive overlays. |
| 474 |
% Due to PSTricks, Seminar had since the beginning the required |
| 475 |
% capabilities to manage overlays in various ways. The only thing |
| 476 |
% to do is to redefine the PSTricks \pst@initoverlay macro in the |
| 477 |
% relevant way. |
| 478 |
% (added by Denis Girou (CNRS/IDRIS) <[email protected]> - 1999-2001) |
| 479 |
|
| 480 |
% From `semcolor' |
| 481 |
\def\make@overlay#1{% |
| 482 |
\setbox\@slidebox=\hbox{% |
| 483 |
\pst@initoverlay{#1}% |
| 484 |
\pst@Verb{0 \tx@BOL }% |
| 485 |
\copy\@@slidebox |
| 486 |
\pst@Verb{-1 \tx@BOL }}} |
| 487 |
|
| 488 |
% We must redefine too the /BeginOL macro form pstricks.pro, as "all" is now -1 |
| 489 |
% \def\pst@initoverlay#1{\pst@Verb{\tx@InitOL /TheOL (#1) def}} |
| 490 |
\def\pst@initoverlay#1{% |
| 491 |
\pst@Verb{ |
| 492 |
/BeginOL { |
| 493 |
dup -1 eq exch TheOL eq or |
| 494 |
{IfVisible not |
| 495 |
{Visible /IfVisible true def} |
| 496 |
if} |
| 497 |
{IfVisible |
| 498 |
{Invisible /IfVisible false def} |
| 499 |
if} |
| 500 |
ifelse} def |
| 501 |
\tx@InitOL end |
| 502 |
/TheOL #1 def}} |
| 503 |
|
| 504 |
\def\pst@overlay#1{% |
| 505 |
\edef\curr@overlay{#1}% |
| 506 |
\pst@Verb{#1 \tx@BOL }% |
| 507 |
\aftergroup\pst@endoverlay} |
| 508 |
\def\pst@endoverlay{% |
| 509 |
\pst@Verb{\curr@overlay\space \tx@BOL }} |
| 510 |
|
| 511 |
% Cumulative overlays |
| 512 |
% =================== |
| 513 |
|
| 514 |
% Cumulative overlays, to force to print all preceding ones |
| 515 |
\def\SeminarCumulativeOverlays{% |
| 516 |
\def\pst@initoverlay##1{% |
| 517 |
\pst@Verb{ |
| 518 |
/BeginOL { |
| 519 |
dup -1 eq exch TheOL le or |
| 520 |
{IfVisible not |
| 521 |
{Visible /IfVisible true def} |
| 522 |
if} |
| 523 |
{IfVisible |
| 524 |
{Invisible /IfVisible false def} |
| 525 |
if} |
| 526 |
ifelse} def |
| 527 |
\tx@InitOL end |
| 528 |
/TheOL ##1 def}}% |
| 529 |
} |
| 530 |
|
| 531 |
% Alternative method for same goal (needed when PSTricks nodes are used) |
| 532 |
\def\SeminarAltCumulativeOverlays{% |
| 533 |
\def\pst@initoverlay##1{% |
| 534 |
\pst@Verb{ |
| 535 |
\tx@InitOL end |
| 536 |
/Visible {initclip} def |
| 537 |
/Invisible {CP newpath OLUnit itransform moveto clip newpath moveto} def |
| 538 |
/TheOL ##1 def}} |
| 539 |
} |
| 540 |
|
| 541 |
% Progressive overlays |
| 542 |
% =================== |
| 543 |
|
| 544 |
% Progressive overlays (at step i, only overlays 0 and i are shown) |
| 545 |
\def\SeminarProgressiveOverlays{% |
| 546 |
\def\pst@initoverlay##1{% |
| 547 |
\pst@Verb{% |
| 548 |
/BeginOL {% |
| 549 |
/NumOL ED |
| 550 |
NumOL -1 eq NumOL 0 eq NumOL TheOL eq or or |
| 551 |
{IfVisible not |
| 552 |
{Visible /IfVisible true def} |
| 553 |
if} |
| 554 |
{IfVisible |
| 555 |
{Invisible /IfVisible false def} |
| 556 |
if} |
| 557 |
ifelse} def |
| 558 |
\tx@InitOL end |
| 559 |
/TheOL ##1 def}}} |
| 560 |
|
| 561 |
% Alternative method for the same goal (needed when PSTricks nodes are used) |
| 562 |
\def\SeminarAltProgressiveOverlays{% |
| 563 |
\def\pst@initoverlay##1{% |
| 564 |
\pst@Verb{% |
| 565 |
/BeginOL {% |
| 566 |
/NumOL ED |
| 567 |
NumOL -1 eq NumOL 0 eq NumOL TheOL eq or or |
| 568 |
{IfVisible not |
| 569 |
{Visible /IfVisible true def} |
| 570 |
if} |
| 571 |
{IfVisible |
| 572 |
{Invisible /IfVisible false def} |
| 573 |
if} |
| 574 |
ifelse} def |
| 575 |
\tx@InitOL end |
| 576 |
/Visible {initclip} def |
| 577 |
/Invisible {CP newpath OLUnit itransform moveto clip newpath moveto} def |
| 578 |
/TheOL ##1 def}}} |
| 579 |
|
| 580 |
% Generation of the next overlay (minor add-on) |
| 581 |
% ============================================= |
| 582 |
% (it increment automatically the number of the current overlay) |
| 583 |
\providecommand{\SeminarNextOverlay}[1]{% |
| 584 |
\addtocounter{overlay}{1}% |
| 585 |
\begin{overlay}{\the\c@overlay}#1\end{overlay}} |
| 586 |
|
| 587 |
% To force all items in the various list environments to appear |
| 588 |
% in their own overlay (minor add-on) |
| 589 |
% ============================================================= |
| 590 |
\let\itemORIG\item |
| 591 |
|
| 592 |
\def\SeminarItemInOverlay{% |
| 593 |
\def\item{% |
| 594 |
\addtocounter{overlay}{1}% |
| 595 |
\overlay{\the\c@overlay}% |
| 596 |
\itemORIG}} |
| 597 |
|
| 598 |
\catcode`\@=\TheAtCode\relax |
| 599 |
\endinput |
| 600 |
%% END seminar.bg2 |