| 1 |
% BEGIN seminar.doc |
| 2 |
%% |
| 3 |
\def\fileversion{1.0} |
| 4 |
\def\filedate{93/04/01} |
| 5 |
%% |
| 6 |
%% LaTeX document style `seminar', for use with LaTeX v2.09. |
| 7 |
%% This is a style for typesetting notes and slides. |
| 8 |
%% |
| 9 |
%% COPYRIGHT 1993, by Timothy Van Zandt, [email protected] |
| 10 |
%% |
| 11 |
%% |
| 12 |
%% This file may be distributed and/or modified under the conditions of |
| 13 |
%% the LaTeX Project Public License, either version 1.2 of this license |
| 14 |
%% or (at your option) any later version. The latest version of this |
| 15 |
%% license is in: |
| 16 |
%% |
| 17 |
%% http://www.latex-project.org/lppl.txt |
| 18 |
%% |
| 19 |
%% and version 1.2 or later is part of all distributions of LaTeX version |
| 20 |
%% 1999/12/01 or later. |
| 21 |
%% |
| 22 |
%% |
| 23 |
% ************************************************************************** |
| 24 |
% This is `seminar.doc', the documented code for `seminar.sty'. |
| 25 |
% You can copy this to `seminar.sty' and use it as is. |
| 26 |
% You can also create a stripped input file `seminar.sty' using sem-make.tex. |
| 27 |
% You can print the documented code using sem-code.tex. |
| 28 |
% sem-make.tex and sem-code.tex are distributed with seminar.sty. |
| 29 |
% ************************************************************************** |
| 30 |
% |
| 31 |
% \EndDocPreamble |
| 32 |
% |
| 33 |
% \CheckSum{3062} |
| 34 |
% \CharacterTable |
| 35 |
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z |
| 36 |
% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z |
| 37 |
% Digits \0\1\2\3\4\5\6\7\8\9 |
| 38 |
% Exclamation \! Double quote \" Hash (number) \# |
| 39 |
% Dollar \$ Percent \% Ampersand \& |
| 40 |
% Acute accent \' Left paren \( Right paren \) |
| 41 |
% Asterisk \* Plus \+ Comma \, |
| 42 |
% Minus \- Point \. Solidus \/ |
| 43 |
% Colon \: Semicolon \; Less than \< |
| 44 |
% Equals \= Greater than \> Question mark \? |
| 45 |
% Commercial at \@ Left bracket \[ Backslash \\ |
| 46 |
% Right bracket \] Circumflex \^ Underscore \_ |
| 47 |
% Grave accent \` Left brace \{ Vertical bar \| |
| 48 |
% Right brace \} Tilde \~} |
| 49 |
% |
| 50 |
% |
| 51 |
% \section{Overview} |
| 52 |
% |
| 53 |
% In principle, a slides style is a simple matter; just a question of |
| 54 |
% resetting the magnification and changing a few page parameters. However, |
| 55 |
% allowing notes and slides to be put in the same file but treated |
| 56 |
% differently, and allowing everything to be printed in various formats, |
| 57 |
% complicates things a bit. |
| 58 |
% |
| 59 |
% The code starts by checking that the file is not loaded, and announcing the |
| 60 |
% file on the terminal. |
| 61 |
% \begin{macrocode} |
| 62 |
\@ifundefined{@seminarerr}{}{\endinput} |
| 63 |
\typeout{% |
| 64 |
Document Style: `seminar' v\fileversion \space <\filedate> (tvz)} |
| 65 |
% \end{macrocode} |
| 66 |
% |
| 67 |
% |
| 68 |
% \section{Useful hacks} |
| 69 |
% |
| 70 |
% \begin{macro}{\test@member} |
| 71 |
% The second argument to "\test@member" is a comma-separated list. |
| 72 |
% "\test@member" checks whether the first argument is a member of this list |
| 73 |
% (after expanding both the list and the first argument), setting "\if@test" |
| 74 |
% appropriately. |
| 75 |
% \begin{macrocode} |
| 76 |
\def\test@member#1#2{% |
| 77 |
\edef\@tempg{,#2,#1,}% |
| 78 |
\edef\@temph{####1,#1,}% |
| 79 |
\expandafter\def\expandafter\@temph\@temph##2\@nil{% |
| 80 |
\def\@tempg{##2}% |
| 81 |
\ifx\@tempg\@empty\@testfalse\else\@testtrue\fi}% |
| 82 |
\expandafter\@temph\@tempg\@nil} |
| 83 |
% \end{macrocode} |
| 84 |
% \end{macro} |
| 85 |
% |
| 86 |
% \begin{macro}{\addto@hook} |
| 87 |
% The first argument of "\addto@hook" is a token register. "\addto@hook" adds |
| 88 |
% its second argument to this register. This is a standard macro in the Mainz |
| 89 |
% distribution,. |
| 90 |
% \begin{macrocode} |
| 91 |
\def\addto@hook#1#2{#1\expandafter{\the#1#2}} |
| 92 |
% \end{macrocode} |
| 93 |
% \end{macro} |
| 94 |
% |
| 95 |
% \begin{macro}{\reset@font} |
| 96 |
% "\reset@font" is part of later releases of \LaTeX. |
| 97 |
% \begin{macrocode} |
| 98 |
\@ifundefined{reset@font}{\def\reset@font{\normalsize\rm}}{} |
| 99 |
% \end{macrocode} |
| 100 |
% \end{macro} |
| 101 |
% |
| 102 |
% \begin{macro}{\@seminarerr} |
| 103 |
% "\@seminarerr" is analogous to "\@latexerr". |
| 104 |
% \begin{macrocode} |
| 105 |
\def\@seminarerr#1#2{% |
| 106 |
\edef\@tempc{#2}\expandafter\errhelp\expandafter{\@tempc}% |
| 107 |
\typeout{^^JSeminar.sty error.\space\space\space |
| 108 |
Type \space H <return> \space for immediate help.^^J}% |
| 109 |
\errmessage{#1^^J}} |
| 110 |
% \end{macrocode} |
| 111 |
% \end{macro} |
| 112 |
% |
| 113 |
% \begin{macro}{\notslide@err} |
| 114 |
% \begin{macrocode} |
| 115 |
\def\notslide@err#1{Cannot use \string#1 in slide environments} |
| 116 |
% \end{macrocode} |
| 117 |
% \end{macro} |
| 118 |
% |
| 119 |
% \begin{macro}{\new@slidebox} |
| 120 |
% Since "\newbox" is "\outer". |
| 121 |
% \begin{macrocode} |
| 122 |
\def\new@slidebox{\alloc@4\box\chardef\insc@unt} |
| 123 |
% \end{macrocode} |
| 124 |
% \end{macro} |
| 125 |
% |
| 126 |
% \begin{macro}{\slidewidth,\slideheight} |
| 127 |
% \begin{macrocode} |
| 128 |
\newdimen\slidewidth \slidewidth 8.5in |
| 129 |
\newdimen\slideheight \slideheight 6.3in |
| 130 |
% \end{macrocode} |
| 131 |
% \end{macro} |
| 132 |
% |
| 133 |
% \begin{macro}{\paperwidth,\paperheight} |
| 134 |
% "\paperwidth" and "\paperheight" are used by "sem-page.sty" to set the page |
| 135 |
% parameters. "\twoup" also uses the values. |
| 136 |
% \begin{macrocode} |
| 137 |
\@ifundefined{paperwidth}{\def\paperwidth{8.5in}}{} |
| 138 |
\@ifundefined{paperheight}{\def\paperheight{11in}}{} |
| 139 |
% \end{macrocode} |
| 140 |
% \end{macro} |
| 141 |
% |
| 142 |
% \begin{macro}{\addto@preamblecmds} |
| 143 |
% Various commands used in this style are added to "\@preamblecmds". This |
| 144 |
% macros makes it easier to do this as we go along. Argument is a list of |
| 145 |
% commands separated by "\do". |
| 146 |
% \begin{macrocode} |
| 147 |
\def\addto@preamblecmds#1{% |
| 148 |
\begingroup |
| 149 |
\def\do{\noexpand\do\noexpand}% |
| 150 |
\xdef\@preamblecmds{\@preamblecmds\do#1}% |
| 151 |
\endgroup} |
| 152 |
\addto@preamblecmds{\addto@preamblecmds\do\@preamblecmds} |
| 153 |
% \end{macrocode} |
| 154 |
% \end{macro} |
| 155 |
% |
| 156 |
% |
| 157 |
% \section{Auxilary files and style options} |
| 158 |
% |
| 159 |
% The formats and selections are specified using style options, but these do |
| 160 |
% not correspond to independent files. |
| 161 |
% It is possible to set the flags before inputting "seminar.sty". |
| 162 |
% \begin{macrocode} |
| 163 |
\def\sem@temp#1{\@ifundefined{if#1}% |
| 164 |
{\def\@tempa{\csname newif\endcsname} |
| 165 |
\expandafter\@tempa\csname if#1\endcsname}{}} |
| 166 |
\sem@temp{article}{} |
| 167 |
\sem@temp{slidesonly}{} |
| 168 |
\sem@temp{notes}{} |
| 169 |
\sem@temp{notesonly}{} |
| 170 |
\sem@temp{notesonlystar}{} |
| 171 |
\sem@temp{portrait}{} |
| 172 |
\def\ds@article{\articletrue} |
| 173 |
\def\ds@slidesonly{\slidesonlytrue\notesfalse\notesonlyfalse} |
| 174 |
\def\ds@notes{\notestrue\slidesonlyfalse\notesonlyfalse} |
| 175 |
\def\ds@notesonly{\notesonlytrue\slidesonlyfalse\notesfalse} |
| 176 |
\@namedef{ds@notesonly*}{\ds@notesonly\notesonlystartrue} |
| 177 |
\def\ds@portrait{\portraittrue} |
| 178 |
\@namedef{ds@a4}{% |
| 179 |
\def\paperwidth{210mm} |
| 180 |
\def\paperheight{297mm} |
| 181 |
\slidewidth 222mm |
| 182 |
\slideheight 152mm\relax} |
| 183 |
% \end{macrocode} |
| 184 |
% This style is based in part on the \LaTeX{} "article" style, which we now |
| 185 |
% input. "article.sty" takes care of executing the options. |
| 186 |
% \begin{macrocode} |
| 187 |
\@@input article.sty |
| 188 |
\ifnotesonly\else\notesonlystarfalse\fi |
| 189 |
\@@input sem-page.sty |
| 190 |
% \end{macrocode} |
| 191 |
% |
| 192 |
% \section{Document hooks} |
| 193 |
% |
| 194 |
% \begin{macro}{\document} |
| 195 |
% "\document" is redefined to incorporate hooks, in the following order: |
| 196 |
% \begin{LVerbatim} |
| 197 |
% \endgroup |
| 198 |
% \the\before@document |
| 199 |
% \begingroup |
| 200 |
% \document |
| 201 |
% \the\after@document |
| 202 |
% \xcomment@hook |
| 203 |
% \end{LVerbatim} |
| 204 |
% "\before@document" and "\after@document" are token registers that can be |
| 205 |
% added to using "\addto@hook". These will be used for things like invoking |
| 206 |
% "\landscape". "\xcomment@hook" is a command sequence that will be used to |
| 207 |
% invoke the "xcomment" macros for commenting out the notes in the |
| 208 |
% "slidesonly" selection. |
| 209 |
% |
| 210 |
% Messing with the definition of "\document" creates potential conflicts with |
| 211 |
% other optional style files that do the same. However, we add these commands |
| 212 |
% in a very friendly way: (i) it shouldn't cause problems even if "\document" |
| 213 |
% does not have its standard definition, and (ii) if some other macros |
| 214 |
% subsequently change the definition of "\document" in the same way, |
| 215 |
% "seminar.sty" should not break. Styles designed specifically for use with |
| 216 |
% "seminar.sty" should use "\before@document" and "\after@document" to add |
| 217 |
% their own modifications to the "\document" command. \codelabel{document} |
| 218 |
% |
| 219 |
% In the code below, "\before@document" and "\after@document" are used as |
| 220 |
% temporary token registers during the modification of "\document". |
| 221 |
% \begin{macrocode} |
| 222 |
\newtoks\before@document |
| 223 |
\newtoks\after@document |
| 224 |
\let\xcomment@hook\relax |
| 225 |
\before@document{\endgroup\the\before@document\begingroup} |
| 226 |
\after@document{\the\after@document\xcomment@hook} |
| 227 |
\expandafter\@temptokena\expandafter{\document} |
| 228 |
\edef\document{\the\before@document\the\@temptokena\the\after@document} |
| 229 |
\before@document{} |
| 230 |
\after@document{} |
| 231 |
% \end{macrocode} |
| 232 |
% \codelabel*{document*} |
| 233 |
% \end{macro} |
| 234 |
% |
| 235 |
% \begin{macro}{\enddocument} |
| 236 |
% Now we do something similar with "\end@document", adding the token register |
| 237 |
% "\before@enddocument" to the beginning of the definition of "\enddocument". |
| 238 |
% This might be used, for example, to warn the user to print in landscape |
| 239 |
% mode. |
| 240 |
% \begin{macrocode} |
| 241 |
\newtoks\before@enddocument |
| 242 |
\before@enddocument{\the\before@enddocument} |
| 243 |
\expandafter\@temptokena\expandafter{\enddocument} |
| 244 |
\edef\enddocument{\the\before@enddocument\the\@temptokena} |
| 245 |
\before@enddocument{} |
| 246 |
% \end{macrocode} |
| 247 |
% \end{macro} |
| 248 |
% |
| 249 |
% \begin{macro}{\landscape} |
| 250 |
% "\printlandscape" is invoked at the beginning of landscape documents. It is |
| 251 |
% defined here to warn the user to print in landscape mode. |
| 252 |
% \begin{macrocode} |
| 253 |
\newif\ifprintlandscape |
| 254 |
\ifportrait |
| 255 |
\ifarticle\printlandscapetrue\fi |
| 256 |
\else |
| 257 |
\ifarticle\else\printlandscapetrue\fi |
| 258 |
\fi |
| 259 |
\addto@hook\before@document{\ifprintlandscape\printlandscape\fi} |
| 260 |
\addto@preamblecmds{\printlandscape} |
| 261 |
\def\printlandscape{\addto@hook\before@enddocument{% |
| 262 |
\typeout{^^J% |
| 263 |
*******************************************************^^J% |
| 264 |
***** !! PRINT THIS DOCUMENT IN LANDSCAPE MODE !! *****^^J% |
| 265 |
*******************************************************}}} |
| 266 |
% \end{macrocode} |
| 267 |
% \end{macro} |
| 268 |
% |
| 269 |
% |
| 270 |
% \section{Slide-making macros} |
| 271 |
% |
| 272 |
% \begin{macro}{\slide,\endslide,\slide*,\endslide*} |
| 273 |
% Let's start from the outside and move in. |
| 274 |
% \begin{macrocode} |
| 275 |
\def\slide{% |
| 276 |
\NestedSlide@Error{slide}% |
| 277 |
\landscapetrue |
| 278 |
\@ifnextchar[{\begin@slide}{\begin@slide[\slidewidth,\slideheight]}} |
| 279 |
\def\endslide{\end@slide} |
| 280 |
\@namedef{slide*}{% |
| 281 |
\NestedSlide@Error{slide*}% |
| 282 |
\landscapefalse |
| 283 |
\@ifnextchar[{\begin@slide}{\begin@slide[\slidewidth,\slideheight]}}% |
| 284 |
\@namedef{endslide*}{\end@slide} |
| 285 |
% \end{macrocode} |
| 286 |
% \end{macro} |
| 287 |
% |
| 288 |
% \begin{macro}{\theslide} |
| 289 |
% "slide" is the counter for slides. "slide@count" keeps track of the number |
| 290 |
% of slides in the current slide environment. |
| 291 |
% \begin{macrocode} |
| 292 |
\newcounter{slide} |
| 293 |
\def\theslide{\arabic{slide}} |
| 294 |
\newcount\slide@count |
| 295 |
% \end{macrocode} |
| 296 |
% \end{macro} |
| 297 |
% |
| 298 |
% \begin{macro}{\@slidebox} |
| 299 |
% Each slide is stored in the box "\@slidebox". The current page of notes |
| 300 |
% might be saved in "\not@slidebox". |
| 301 |
% \begin{macrocode} |
| 302 |
\newbox\@slidebox |
| 303 |
\newbox\not@slidebox |
| 304 |
% \end{macrocode} |
| 305 |
% \end{macro} |
| 306 |
% |
| 307 |
% \begin{macro}{\ifslide,\iflandscape} |
| 308 |
% "\ifslide" is true in any slide environment. This allows commands to be |
| 309 |
% active only in slide environments (important for overlays, for example). |
| 310 |
% "\iflandscape" is true for landscape slides, and false for portrait slides. |
| 311 |
% This allows embellishments to customize their behavior, although it is not |
| 312 |
% actually used by any of the macros defined in "seminar.sty". |
| 313 |
% \begin{macrocode} |
| 314 |
\newif\ifslide |
| 315 |
\newif\iflandscape |
| 316 |
% \end{macrocode} |
| 317 |
% \end{macro} |
| 318 |
% |
| 319 |
% \begin{macro}{\@landscapeonly,\landscapeonly,\portraitonly} |
| 320 |
% "\@landscapeonly" is defined to be "1" if only landscape slides should be |
| 321 |
% printed, "-1" if only portrait slides should be printed, and "0" if both |
| 322 |
% orientations should be printed. |
| 323 |
% \begin{macrocode} |
| 324 |
\def\@landscapeonly{0} |
| 325 |
\def\landscapeonly{\def\@landscapeonly{1}} |
| 326 |
\def\portraitonly{\def\@landscapeonly{-1}} |
| 327 |
% \end{macrocode} |
| 328 |
% \end{macro} |
| 329 |
% |
| 330 |
% \begin{macro}{\NestedSlide@Error} |
| 331 |
% We will check for nested slide environments, and attempt to recover the best |
| 332 |
% we can. Otherwise, forgetting the end of a slide environment could cause |
| 333 |
% \TeX{} to procede to the end of the document without generating any input, |
| 334 |
% and then give unlightening error messages. |
| 335 |
% \begin{macrocode} |
| 336 |
\def\NestedSlide@Error#1{% |
| 337 |
\ifslide |
| 338 |
\endgroup |
| 339 |
\@seminarerr{Nested slide environments. Perhaps missing |
| 340 |
\string\end{\@currenvir}. May be fatal}\@ehd |
| 341 |
\expandafter\end\expandafter{\@currenvir}% |
| 342 |
\ifslide\expandafter\end\expandafter{\@currenvir}\fi |
| 343 |
\begingroup |
| 344 |
\def\@currenvir{#1}% |
| 345 |
\fi} |
| 346 |
% \end{macrocode} |
| 347 |
% \end{macro} |
| 348 |
% |
| 349 |
% \begin{macro}{\begin@slide} |
| 350 |
% This is the meat of "\slide" and "\slide*". |
| 351 |
% \begin{macrocode} |
| 352 |
\def\begin@slide[#1,#2]{% |
| 353 |
\slide@clearpage |
| 354 |
\setlength\slidewidth{#1}% |
| 355 |
\setlength\slideheight{#2}% |
| 356 |
% \end{macrocode} |
| 357 |
% The current contents of the page is saved in "\not@slidebox", and then the |
| 358 |
% output routine is set to "\slide@output". |
| 359 |
% \begin{macrocode} |
| 360 |
\begingroup |
| 361 |
\ifarticle |
| 362 |
\output{% |
| 363 |
\advance\count@ 1 |
| 364 |
\global\setbox\not@slidebox\box\@cclv}% |
| 365 |
\par\@@par\penalty-\@M |
| 366 |
\fi |
| 367 |
\output{\slide@output}% |
| 368 |
% \end{macrocode} |
| 369 |
% The flag "\ifslide" is set, and the counter "\slide@count", which keeps |
| 370 |
% track of the number of slides in the current slide environment, is |
| 371 |
% initialized. |
| 372 |
% \begin{macrocode} |
| 373 |
\slidetrue |
| 374 |
\ifarticle\global\slide@count=\z@\fi |
| 375 |
\refstepcounter{slide}% |
| 376 |
\ifnotesonlystar\xdef\first@slidemarker{\the\c@slide}\fi |
| 377 |
\def\do##1{\setcounter{##1}\z@}\slide@reset |
| 378 |
% \end{macrocode} |
| 379 |
% Save current "\textheight" and "\textwidth", to be used later by the output |
| 380 |
% routine in the "slides" format. |
| 381 |
% \begin{macrocode} |
| 382 |
\ifarticle\else |
| 383 |
\edef\page@textheight{\number\textheight sp}% |
| 384 |
\edef\page@textwidth{\number\textwidth sp}% |
| 385 |
\fi |
| 386 |
\set@slidesize |
| 387 |
% \end{macrocode} |
| 388 |
% Now we finish customizing the slide environment. |
| 389 |
% \begin{macrocode} |
| 390 |
\slidebox@restore |
| 391 |
\the\slide@hook |
| 392 |
\the\before@newslide |
| 393 |
\everyslide} |
| 394 |
% \end{macrocode} |
| 395 |
% \end{macro} |
| 396 |
% |
| 397 |
% \begin{macro}{\end@slide} |
| 398 |
% This is "\endslide" and "\endslide*". We first make sure that there are |
| 399 |
% balanced groups so that the normal output routine is restored. |
| 400 |
% \begin{macrocode} |
| 401 |
\def\end@slide{% |
| 402 |
\par\penalty-\@M |
| 403 |
\xdef\@tempg{\@currenvir}% |
| 404 |
\endgroup |
| 405 |
\ifslide |
| 406 |
\@seminarerr{Perhaps missing `\string\end{\@tempg}', |
| 407 |
\iffalse{\fi`\string}' or `\string\endgroup'}\@ehd |
| 408 |
\def\next{\endgroup\ifslide\expandafter\next\fi}% |
| 409 |
\next |
| 410 |
\fi |
| 411 |
% \end{macrocode} |
| 412 |
% If there is anything on the page, it was inserted with "\aftergroup" and |
| 413 |
% should be discarded. (This can happen with color commands, for example.) |
| 414 |
% \begin{macrocode} |
| 415 |
\begingroup |
| 416 |
\output{\setbox\@tempboxa\box\@cclv}% |
| 417 |
\@@par\penalty-\@M |
| 418 |
\endgroup |
| 419 |
% \end{macrocode} |
| 420 |
% The slide counter was stepped when the last slide was output. Now we need to |
| 421 |
% set it back one. With the "article" format, we now have to output all the |
| 422 |
% acculumulated slides. |
| 423 |
% \begin{macrocode} |
| 424 |
\global\advance\c@slide-1 |
| 425 |
\def\do##1{\setcounter{##1}{\@nameuse{saved@c@##1}}}% |
| 426 |
\slide@reset |
| 427 |
\ifarticle\outputloop@savedslides\fi |
| 428 |
\the\after@slide} |
| 429 |
% \end{macrocode} |
| 430 |
% \end{macro} |
| 431 |
% |
| 432 |
% \begin{macro}{\slideclearpagetrue,\slideclearpagefalse,\slide@clearpage} |
| 433 |
% \begin{macrocode} |
| 434 |
\let\slideclearpagetrue\relax |
| 435 |
\let\slideclearpagefalse\relax |
| 436 |
\ifarticle |
| 437 |
\def\slide@clearpage{\par\penalty\z@} |
| 438 |
\ifnotes |
| 439 |
\def\slideclearpagetrue{\def\slide@clearpage{\clearpage}} |
| 440 |
\def\slideclearpagefalse{\def\slide@clearpage{\par\penalty\z@}} |
| 441 |
\else |
| 442 |
\ifnotesonly |
| 443 |
\def\slideclearpagetrue{\def\slide@clearpage{\clearpage}} |
| 444 |
\def\slideclearpagefalse{\def\slide@clearpage{\par\penalty\z@}} |
| 445 |
\fi |
| 446 |
\fi |
| 447 |
\else |
| 448 |
\def\slide@clearpage{\clearpage} |
| 449 |
\fi |
| 450 |
% \end{macrocode} |
| 451 |
% \end{macro} |
| 452 |
% |
| 453 |
% \begin{macro}{\slide@hook,\everyslide,\after@slide} |
| 454 |
% "\slide@hook" and "\everyslide" are hooks for modifying the slide |
| 455 |
% environments. "\slide@hook" is a token register. Commands can be added to it |
| 456 |
% without destroying previously added commands using the "\addto@hook" |
| 457 |
% command. |
| 458 |
% "\everyslide" is an ordinary command sequence to be used by users. |
| 459 |
% "\after@slide" can be used to initialize things for notes. |
| 460 |
% \begin{macrocode} |
| 461 |
\newtoks\slide@hook |
| 462 |
\def\everyslide{} |
| 463 |
\newtoks\after@slide |
| 464 |
% \end{macrocode} |
| 465 |
% \end{macro} |
| 466 |
% |
| 467 |
% |
| 468 |
% \section{$\setminus$slidebox@restore\label{everyslide}} |
| 469 |
% |
| 470 |
% \begin{macro}{\slidebox@restore} |
| 471 |
% "\slidebox@restore" sets up the spacing parameters at the beginning of every |
| 472 |
% slide. The component commands are defined following this macro. |
| 473 |
% \begin{macrocode} |
| 474 |
\def\slidebox@restore{% |
| 475 |
\def\thepage{\theslide}% |
| 476 |
\def\newpage{\newslide}% |
| 477 |
\def\clearpage{\newslide}% |
| 478 |
\def\thispagestyle{\notslide@err{\thispagestyle}}% |
| 479 |
\pagestyle{\slide@pagestyle}% |
| 480 |
\@twocolumnfalse |
| 481 |
\def\twocolumn{\notslide@err{\twocolumn}}% |
| 482 |
\def\onecolumn{\notslide@err{\onecolumn}}% |
| 483 |
\def\marginpar{\notslide@err{\marginpar}}% |
| 484 |
\def\thanks{\slidethanks}% |
| 485 |
\def\maketitle{\slidemaketitle}% |
| 486 |
\fix@floats |
| 487 |
\fix@whatsits |
| 488 |
\slide@footnotes |
| 489 |
\def\do##1{\expandafter\xdef\csname |
| 490 |
saved@c@##1\endcsname{\the\@nameuse{c@##1}}}% |
| 491 |
\slide@reset |
| 492 |
\topskip\z@ \maxdepth\z@ |
| 493 |
\slide@listparameters |
| 494 |
\slidefonts |
| 495 |
\def\baselinestretch{\slidestretch}% |
| 496 |
\def\arraystretch{\slidearraystretch}% |
| 497 |
\sem@ptsize{\slide@ptsize}} |
| 498 |
% \end{macrocode} |
| 499 |
% \end{macro} |
| 500 |
% |
| 501 |
% \begin{macro}{\thedate,\theauthor,\thetitle,\thethanks} |
| 502 |
% The "\date", "\author" and "\title" commands are redefined so that they save |
| 503 |
% their information in accessible command sequences, "\thedate", "\theauthor" |
| 504 |
% and "\thetitle". "\thanks" is saved so that it can be restored during slide |
| 505 |
% environments. "\thethanks" is set to "\@thanks" so that it is easier to |
| 506 |
% redefine "\slidemaketitle" in the preamble. |
| 507 |
% \begin{macrocode} |
| 508 |
\def\date#1{\gdef\@date{#1}\gdef\thedate{#1}} |
| 509 |
\def\author#1{\gdef\@author{#1}\gdef\theauthor{#1}} |
| 510 |
\def\title#1{\gdef\@title{#1}\gdef\thetitle{#1}} |
| 511 |
\date{\today} |
| 512 |
\let\slidethanks\thanks |
| 513 |
\def\thethanks{\@thanks}% |
| 514 |
% \end{macrocode} |
| 515 |
% \end{macro} |
| 516 |
% |
| 517 |
% \begin{macro}{\slidemaketitle} |
| 518 |
% \begin{macrocode} |
| 519 |
\def\slidemaketitle{% |
| 520 |
\par |
| 521 |
\begin{center}\bf |
| 522 |
{\large \thetitle}\par\vskip 1ex |
| 523 |
\begin{tabular}[t]{c} \theauthor \end{tabular}\par\vskip 1ex |
| 524 |
\thedate |
| 525 |
\end{center}% |
| 526 |
\thethanks\par} |
| 527 |
% \end{macrocode} |
| 528 |
% \end{macro} |
| 529 |
% |
| 530 |
% \begin{macro}{\fix@floats} |
| 531 |
% Floats are neutralized, but the captions work as usual. This makes it easier |
| 532 |
% to just transfer a float from some other document to a slide. This only |
| 533 |
% works if end of floating environment is "\def"ined to be "\end@float", |
| 534 |
% rather than "\let" to be "\end@float", or if "\@float{foo}" is ended by |
| 535 |
% "\endfoo". This should get 99\% of the cases. |
| 536 |
% \begin{macrocode} |
| 537 |
\def\fix@floats{% |
| 538 |
\def\@xfloat##1[##2]{% |
| 539 |
\expandafter\let\csname end##1\endcsname\end@float |
| 540 |
\par\medskip\vbox\bgroup\def\@captype{##1}\parindent\z@ |
| 541 |
\ignorespaces}% |
| 542 |
\def\end@float{\par\vskip\z@\egroup\medskip}% |
| 543 |
\def\@dblfloat{\@float}\def\end@dblfloat{\end@float}% |
| 544 |
\def\endfigure{\end@float}\def\endtable{\end@float}} |
| 545 |
% \end{macrocode} |
| 546 |
% \end{macro} |
| 547 |
% |
| 548 |
% \begin{macro}{\fix@whatsits} |
| 549 |
% The whatsits "\write", "\openout" and "\closeout" are problematic in slides |
| 550 |
% for two reasons: |
| 551 |
% \begin{enumerate} |
| 552 |
% \item First, an otherwise empty vertical list with a whatsit is not empty. |
| 553 |
% Thus, if a slide begins with a "\write" command, followed by a line a text, |
| 554 |
% "\parskip" is inserted before the text. This can be quite noticable in a |
| 555 |
% slide environment, since by default "\parskip" is about 2.5\% of the height |
| 556 |
% of a slide. This problem is likely to arise because it is convenient to put |
| 557 |
% a slide's "\label" command first. |
| 558 |
% \item Second, the slides are omitted in the "notesonly" selection, but we |
| 559 |
% want to preserve cross-referencing. |
| 560 |
% \end{enumerate} |
| 561 |
% We solve both problems by making the three whatsits mentioned above |
| 562 |
% "\immediate" within the slide environments. This might cause unforeseen |
| 563 |
% problems for some macros. It also introduces a known problem: slide |
| 564 |
% cross-references may not be accurate if \TeX\ is doing the page breaking |
| 565 |
% automatically. |
| 566 |
% \begin{macrocode} |
| 567 |
\let\normal@write\write |
| 568 |
\let\normal@read\read |
| 569 |
\let\normal@openout\openout |
| 570 |
\let\normal@closeout\closeout |
| 571 |
\def\fix@whatsits{% |
| 572 |
\def\write{\immediate\normal@write}% |
| 573 |
\def\read{\immediate\normal@read}% |
| 574 |
\def\openout{\immediate\normal@openout}% |
| 575 |
\def\closeout{\immediate\normal@closeout}} |
| 576 |
% \end{macrocode} |
| 577 |
% \end{macro} |
| 578 |
% |
| 579 |
% \begin{macro}{\slide@footins,\theslidefootnote,\slide@footnotes} |
| 580 |
% We want to set up a parallel footnote system for slides. It acts just like |
| 581 |
% regular footnotes, but |
| 582 |
% \begin{LVerbatim} |
| 583 |
% \interfootnotelinepenalty\@M |
| 584 |
% \end{LVerbatim} |
| 585 |
% means that footnotes will not be split across pages. |
| 586 |
% \begin{macrocode} |
| 587 |
\newinsert\slide@footins |
| 588 |
\skip\slide@footins=\bigskipamount |
| 589 |
\count\slide@footins=1000 |
| 590 |
\dimen\slide@footins=4in |
| 591 |
\def\theslidefootnote{\alph{footnote}} |
| 592 |
\def\slide@footnotes{% |
| 593 |
\def\thefootnote{\theslidefootnote}% |
| 594 |
\let\footins\slide@footins |
| 595 |
\interfootnotelinepenalty\@M} |
| 596 |
% \end{macrocode} |
| 597 |
% \end{macro} |
| 598 |
% |
| 599 |
% \begin{macro}{\slidefonts,\ifslidefonts} |
| 600 |
% "\slidefonts" should set up any special fonts for the slides. |
| 601 |
% \begin{macrocode} |
| 602 |
\def\slidefonts{} |
| 603 |
% \end{macrocode} |
| 604 |
% \end{macro} |
| 605 |
% |
| 606 |
% \begin{macro}{\slidestretch,\slidearraystretch} |
| 607 |
% \begin{macrocode} |
| 608 |
\def\slidestretch{1.18} |
| 609 |
\def\slidearraystretch{1.2} |
| 610 |
% \end{macrocode} |
| 611 |
% \end{macro} |
| 612 |
% |
| 613 |
% \begin{macro}{\raggedslides} |
| 614 |
% "\ragggedslides[0pt]" means justified, "\raggedslides[1fil]" means |
| 615 |
% "\raggedright". Ideally, we would also like a version that breaks lines the |
| 616 |
% same way as with justified text, but then doesn't stretch any glue to |
| 617 |
% justify the margin. This is impossible, but "\raggedslides[1em]", e.g., is |
| 618 |
% meant to be an intermediate case. |
| 619 |
% \begin{macrocode} |
| 620 |
\def\raggedslides{\@ifnextchar[{\@raggedslides}{\@raggedslides[1fil]}} |
| 621 |
\def\@raggedslides[#1]{% |
| 622 |
\edef\slide@@rightskip{#1}% |
| 623 |
\ifslide\slide@rightskip\fi} |
| 624 |
\def\slide@rightskip{% |
| 625 |
\@rightskip\z@ plus \slide@@rightskip\relax \rightskip\@rightskip} |
| 626 |
\def\slide@@rightskip{1fil} |
| 627 |
% \end{macrocode} |
| 628 |
% \end{macro} |
| 629 |
% |
| 630 |
% |
| 631 |
% \begin{macro}{\slide@listparameters} |
| 632 |
% The list parameters are generally tightened up, compared to the usual |
| 633 |
% spacing in "article.sty", to compensate for the large "\parskip" and |
| 634 |
% "\baselinestretch". |
| 635 |
% \begin{macrocode} |
| 636 |
\newcount\slide@listdepth |
| 637 |
\def\slide@listparameters{% |
| 638 |
\let\@listdepth\slide@listdepth |
| 639 |
\slide@listdepth\z@ |
| 640 |
\def\@listi{\slide@listi}% |
| 641 |
\def\@listii{\slide@listii}% |
| 642 |
\def\@listiii{\slide@listiii}% |
| 643 |
\let\@listiv\relax\let\@listv\relax\let\@listvi\relax} |
| 644 |
\def\slide@listi{% |
| 645 |
\leftmargin\leftmargini |
| 646 |
\labelwidth\leftmargini \advance\labelwidth-\labelsep |
| 647 |
\parsep\parskip \divide\parsep2 |
| 648 |
\partopsep\slidepartopsep\relax |
| 649 |
\advance\partopsep-\parskip |
| 650 |
\ifdim\partopsep<\z@\partopsep\z@\fi |
| 651 |
\itemsep\slideitemsep\relax |
| 652 |
\ifdim\parsep<\itemsep |
| 653 |
\topsep\itemsep \advance\topsep-\parsep |
| 654 |
\else |
| 655 |
\itemsep\parsep \topsep\z@ |
| 656 |
\fi} |
| 657 |
\def\slide@listii{% |
| 658 |
\leftmargin\leftmarginii |
| 659 |
\labelwidth\leftmarginii \advance\labelwidth-\labelsep |
| 660 |
\divide\itemsep2 \divide\parsep2 |
| 661 |
\divide\topsep2 \divide\partopsep2\relax}% |
| 662 |
\def\slide@listiii{% |
| 663 |
\leftmargin\leftmarginiii |
| 664 |
\labelwidth\leftmarginiii \advance\labelwidth-\labelsep |
| 665 |
\itemsep \z@ \parsep\z@ \topsep\z@}% |
| 666 |
\def\slideleftmargini{1.8em} |
| 667 |
\def\slideleftmarginii{1.4em} |
| 668 |
\def\slideleftmarginiii{1em} |
| 669 |
\def\slidelabelsep{.5em} |
| 670 |
\def\slideitemsep{.8ex minus .2ex} |
| 671 |
\def\slidepartopsep{1ex minus .2ex} |
| 672 |
% \end{macrocode} |
| 673 |
% \codelabel{defaultpar*}% |
| 674 |
% \end{macro} |
| 675 |
% |
| 676 |
% \section{Slide output routines: $\setminus$output} |
| 677 |
% |
| 678 |
% \begin{macro}{\save@slidespecials} |
| 679 |
% First, a trick to make sure that "\special"'s in the preamble end up on the |
| 680 |
% first page of the document, even if the first slide is omitted, or if the |
| 681 |
% first item in the document is a float (in which case \LaTeX\ discards |
| 682 |
% "\special"'s). "\@textop" is used to insert the specials if the first page |
| 683 |
% is processed by \LaTeX's usual output routines, and "\insert@specials" is |
| 684 |
% used to insert the specials if the first page is a slide in the "slides" |
| 685 |
% format (see the definition of "\output@slide" below). |
| 686 |
% \begin{macrocode} |
| 687 |
\newbox\saved@specials |
| 688 |
\def\save@slidespecials{% |
| 689 |
\begingroup |
| 690 |
\output{% |
| 691 |
\global\setbox\saved@specials=\box\@cclv |
| 692 |
\global\wd\saved@specials=\z@ |
| 693 |
\global\dp\saved@specials=\z@ |
| 694 |
\global\ht\saved@specials=\z@}% |
| 695 |
\hbox{}\penalty-\@M |
| 696 |
\global\let\saved@texttop\@texttop |
| 697 |
\gdef\@texttop{% |
| 698 |
\ifvoid\saved@specials\else\box\saved@specials\nointerlineskip\fi |
| 699 |
\saved@texttop |
| 700 |
\global\let\@texttop\saved@texttop}% |
| 701 |
\endgroup} |
| 702 |
\addto@hook\after@document{\save@slidespecials} |
| 703 |
\ifarticle\else |
| 704 |
\def\insert@specials{% |
| 705 |
\ifvoid\saved@specials\else |
| 706 |
\setbox\@slidebox\hbox{\box\saved@specials\box\@slidebox}% |
| 707 |
\fi |
| 708 |
\global\let\insert@specials\relax} |
| 709 |
\fi |
| 710 |
% \end{macrocode} |
| 711 |
% \end{macro} |
| 712 |
% |
| 713 |
% \begin{macro}{\extraslideheight} |
| 714 |
% This increases the height of a slide for the purpose of page-breaking. We |
| 715 |
% use unscaled dimensions so that \TeX's warnings about overfull "\vbox"'s |
| 716 |
% will be comparable. |
| 717 |
% \begin{macrocode} |
| 718 |
\def\extraslideheight#1{% |
| 719 |
\@tempdima #1\relax |
| 720 |
\edef\X@SlideHeight{\number\@tempdima sp} |
| 721 |
\ifslide\set@slidesize\fi} |
| 722 |
\extraslideheight{6pt} |
| 723 |
% \end{macrocode} |
| 724 |
% \end{macro} |
| 725 |
% |
| 726 |
% \begin{macro}{\set@slidesize} |
| 727 |
% In addition to setting "\hsize" and "\vsize", this sets the \LaTeX\ |
| 728 |
% parameters such as "\textheight" and "\textwidth" so that slides seem like a |
| 729 |
% regular page, whatever format is being used. |
| 730 |
% \begin{macrocode} |
| 731 |
\def\set@slidesize{% |
| 732 |
\iflandscape |
| 733 |
\hsize=\inverseslidesmag\slidewidth |
| 734 |
\vsize=\inverseslidesmag\slideheight |
| 735 |
\else |
| 736 |
\hsize=\inverseslidesmag\slideheight |
| 737 |
\vsize=\inverseslidesmag\slidewidth |
| 738 |
\fi |
| 739 |
\edef\slide@vsize{\number\vsize sp}% |
| 740 |
\textheight\vsize |
| 741 |
\advance\vsize\X@SlideHeight\relax |
| 742 |
\textwidth\hsize\columnwidth\hsize\linewidth\hsize} |
| 743 |
% \end{macrocode} |
| 744 |
% \end{macro} |
| 745 |
% |
| 746 |
% \begin{macro}{\newslide} |
| 747 |
% This includes things you want to initialize whenever a new page is started |
| 748 |
% \begin{macrocode} |
| 749 |
\def\newslide{% |
| 750 |
\par\penalty-\@M |
| 751 |
\def\do##1{\setcounter{##1}\z@}\slide@reset |
| 752 |
\the\before@newslide |
| 753 |
\set@slidesize} |
| 754 |
\newtoks\before@newslide |
| 755 |
% \end{macrocode} |
| 756 |
% \end{macro} |
| 757 |
% |
| 758 |
% \begin{macro}{\slidereset,\addtoslidereset} |
| 759 |
% "\addto@slidereset{foo,bar}" sets "\slide@reset" to |
| 760 |
% \begin{quote} |
| 761 |
% "\slide@reset\do{foo}\do{bar}" |
| 762 |
% \end{quote} |
| 763 |
% \begin{macrocode} |
| 764 |
\def\slide@reset{\do{footnote}} |
| 765 |
\def\slidereset#1{\def\slide@reset{}\addtoslidereset{#1}} |
| 766 |
\def\addtoslidereset#1{% |
| 767 |
\edef\@tempa{#1}\expandafter\addto@slidereset\@tempa,\@nil,} |
| 768 |
\def\addto@slidereset#1,{% |
| 769 |
\ifx\@nil#1\else |
| 770 |
\@ifundefined{c@#1}% |
| 771 |
{\@seminarerr{Counter `#1' not defined}\@ehd}% |
| 772 |
{\expandafter\def\expandafter\slide@reset\expandafter{% |
| 773 |
\slide@reset\do{#1}}}% |
| 774 |
\expandafter\addto@slidereset |
| 775 |
\fi} |
| 776 |
% \end{macrocode} |
| 777 |
% \end{macro} |
| 778 |
% |
| 779 |
% \begin{macro}{\slide@output} |
| 780 |
% "\os@test" checks whether according to some "\onlyslides" or "\notslides" |
| 781 |
% command, this slide should not be output; "\os@test" is defined in Section |
| 782 |
% \ref{os}. |
| 783 |
% \begin{macrocode} |
| 784 |
\def\slide@output{% |
| 785 |
\@makeslide |
| 786 |
\@testfalse |
| 787 |
\ifnotesonly\else |
| 788 |
\iflandscape |
| 789 |
\ifnum\@landscapeonly>-1 \os@test\fi |
| 790 |
\else |
| 791 |
\ifnum\@landscapeonly<1 \os@test\fi |
| 792 |
\fi |
| 793 |
\fi |
| 794 |
\if@test |
| 795 |
\reset@slideoutput |
| 796 |
\@@makeslide |
| 797 |
\process@slide |
| 798 |
\fi |
| 799 |
\refstepcounter{slide}} |
| 800 |
% \end{macrocode} |
| 801 |
% \end{macro} |
| 802 |
% |
| 803 |
% \begin{macro}{\reset@slideoutput} |
| 804 |
% Some things should be reset for the slide embellishments. E.g., you don't |
| 805 |
% want slide labels or headers and footers to be affected by the current font. |
| 806 |
% \begin{macrocode} |
| 807 |
\def\reset@slideoutput{% |
| 808 |
\let\par\@@par |
| 809 |
\reset@font |
| 810 |
\def\baselinestretch{1}% |
| 811 |
\@nameuse{1\@ptsize @semptsize}% |
| 812 |
\catcode`\ =10 |
| 813 |
\let\-\@dischyph \let\'\@acci \let\`\@accii \let\=\@acciii} |
| 814 |
% \end{macrocode} |
| 815 |
% \end{macro} |
| 816 |
% |
| 817 |
% \begin{macro}{\ifcenterslides} |
| 818 |
% This is the flag for vertically centering slides. |
| 819 |
% \begin{macrocode} |
| 820 |
\newif\ifcenterslides |
| 821 |
\centerslidestrue |
| 822 |
% \end{macrocode} |
| 823 |
% \end{macro} |
| 824 |
% |
| 825 |
% \begin{macro}{\@makeslide,\@@makeslide} |
| 826 |
% Take care of footnotes and verticle positioning. |
| 827 |
% \begin{macrocode} |
| 828 |
\def\@makeslide{% |
| 829 |
\setbox\@slidebox\vbox{% |
| 830 |
\unvbox\@cclv |
| 831 |
\ifvoid\slide@footins\else |
| 832 |
\vskip\skip\slide@footins |
| 833 |
\footnoterule |
| 834 |
\unvbox\slide@footins |
| 835 |
\fi |
| 836 |
\vskip\z@}} |
| 837 |
\def\@@makeslide{% |
| 838 |
\overfullslide@warning |
| 839 |
\setbox\@slidebox\hbox{% |
| 840 |
\vfuzz=\slidefuzz\relax |
| 841 |
\vbox to\slide@vsize{% |
| 842 |
\ifcenterslides\vskip\z@ plus .0001fil \fi |
| 843 |
\unvbox\@slidebox |
| 844 |
\vskip\z@ plus .0001fil}% |
| 845 |
\the\after@slidepage}% |
| 846 |
\wd\@slidebox\textwidth} |
| 847 |
\def\overfullslide@warning{% |
| 848 |
\dimen@\ht\@slidebox |
| 849 |
\advance\dimen@-\slide@vsize\relax |
| 850 |
\ifdim\dimen@>\slidefuzz\relax |
| 851 |
\@warning{Slide \theslide\space overfull by \the\dimen@}% |
| 852 |
\fi} |
| 853 |
\def\slidefuzz{2pt} |
| 854 |
% \end{macrocode} |
| 855 |
% \end{macro} |
| 856 |
% |
| 857 |
% \begin{macro}{\after@slidepage} |
| 858 |
% "\after@slidepage" is executed at the end of each page of a slide |
| 859 |
% environment during the slide output routine. It is meant to reset things |
| 860 |
% that might have been set by "\special"'s within the slide. |
| 861 |
% \begin{macrocode} |
| 862 |
\newtoks\after@slidepage |
| 863 |
% \end{macrocode} |
| 864 |
% \end{macro} |
| 865 |
% |
| 866 |
% |
| 867 |
% \section{Rotation} |
| 868 |
% |
| 869 |
% Rotation macros must be implemented by "\special"'s, such as in |
| 870 |
% "semcolor.sty". The interface for rotation is built into "seminar.sty", |
| 871 |
% however. |
| 872 |
% |
| 873 |
% \begin{macro}{\ifrotateheaders} |
| 874 |
% In the "slides" format, the slides can either be rotated before being placed |
| 875 |
% on the page, or the whole page can be rotated, including headers. |
| 876 |
% "\ifrotateheaders" controls which procedure is used. |
| 877 |
% \begin{macrocode} |
| 878 |
\newif\ifrotateheaders |
| 879 |
% \end{macrocode} |
| 880 |
% \end{macro} |
| 881 |
% |
| 882 |
% \begin{macro}{\sliderotation} |
| 883 |
% \begin{macrocode} |
| 884 |
\def\sliderotation#1{\@ifundefined{semsr@#1}% |
| 885 |
{\@latexerr{Slide rotation `#1' not defined.}\@eha}% |
| 886 |
{\@nameuse{semsr@#1}}} |
| 887 |
% \end{macrocode} |
| 888 |
% \end{macro} |
| 889 |
% |
| 890 |
% \begin{macro}{\semsr@none,\semsr@left,\semsr@right} |
| 891 |
% A slide rotation should define "\rotate@slide" to rotate "\@slidebox".. |
| 892 |
% \begin{macrocode} |
| 893 |
\def\semsr@left{% |
| 894 |
\def\rotate@slide{% |
| 895 |
\setbox\@slidebox\hbox{\leftsliderotation{\box\@slidebox}}}} |
| 896 |
\def\semsr@right{% |
| 897 |
\def\rotate@slide{% |
| 898 |
\setbox\@slidebox\hbox{\rightsliderotation{\box\@slidebox}}}} |
| 899 |
\def\semsr@none{\let\rotate@slide\relax} |
| 900 |
\sliderotation{none} |
| 901 |
% \end{macrocode} |
| 902 |
% \end{macro} |
| 903 |
% |
| 904 |
% \begin{macro}{\leftsliderotation,\rightsliderotation} |
| 905 |
% \begin{macrocode} |
| 906 |
\def\leftsliderotation#1{% |
| 907 |
\@seminarerr{\string\leftsliderotation\space has not been defined}% |
| 908 |
\@ehd} |
| 909 |
\let\rightsliderotation\leftsliderotation |
| 910 |
% \end{macrocode} |
| 911 |
% \end{macro} |
| 912 |
% |
| 913 |
% |
| 914 |
% \begin{macro}{\@ifrotateslide} |
| 915 |
% \begin{macrocode} |
| 916 |
\def\@ifrotateslide#1{% |
| 917 |
\ifx\rotate@slide\relax\else |
| 918 |
\iflandscape\ifportrait#1\fi\else\ifportrait\else#1\fi\fi |
| 919 |
\fi} |
| 920 |
% \end{macrocode} |
| 921 |
% \end{macro} |
| 922 |
% |
| 923 |
% |
| 924 |
% \section{Slide output routines: $\setminus$process@slide\label{slideoutput}} |
| 925 |
% |
| 926 |
% This is the version-dependent stuff, where we decide what to do with the |
| 927 |
% slide. |
| 928 |
% |
| 929 |
% \begin{macro}{\process@slide} |
| 930 |
% "\process@@slide" is kept separate because it can be redefined for doing |
| 931 |
% overlays. |
| 932 |
% \begin{macrocode} |
| 933 |
\def\process@slide{% |
| 934 |
\slideframewidth=\inverseslidesmag\slideframewidth |
| 935 |
\slideframesep=\inverseslidesmag\slideframesep |
| 936 |
\fboxrule\slideframewidth |
| 937 |
\fboxsep\slideframesep |
| 938 |
\ifarticle |
| 939 |
\@ifrotateslide\rotate@slide |
| 940 |
\else |
| 941 |
\ifrotateheaders\else\@ifrotateslide\rotate@slide\fi |
| 942 |
\fi |
| 943 |
\process@@slide} |
| 944 |
\def\process@@slide{\finish@slide\output@slide} |
| 945 |
% \end{macrocode} |
| 946 |
% \end{macro} |
| 947 |
% |
| 948 |
% \begin{macro}{\finish@slide} |
| 949 |
% \begin{macrocode} |
| 950 |
\def\finish@slide{% |
| 951 |
\theslideframe |
| 952 |
\add@slidelabel\slidelabel} |
| 953 |
% \end{macrocode} |
| 954 |
% \end{macro} |
| 955 |
% |
| 956 |
% \begin{macro}{\output@slide} |
| 957 |
% In the "article" format, the slides are saved until the end of the slide |
| 958 |
% environment. |
| 959 |
% \begin{macrocode} |
| 960 |
\ifarticle |
| 961 |
\def\output@slide{% |
| 962 |
\global\advance\slide@count1 |
| 963 |
\@ifundefined{slidebox@\the\slide@count}% |
| 964 |
{{\globaldefs=1\expandafter |
| 965 |
\new@slidebox\csname slidebox@\the\slide@count\endcsname}}{}% |
| 966 |
\expandafter\global\expandafter\setbox\csname |
| 967 |
slidebox@\the\slide@count\endcsname\box\@slidebox} |
| 968 |
% \end{macrocode} |
| 969 |
% In the "slides" format, we use a modification of \LaTeX's "\@outputpage". |
| 970 |
% "\do@fancyput" is stuck in here in case "fancybox.sty" is being used. |
| 971 |
% "\fancyput@flag" is initialized in case it is not |
| 972 |
% \begin{macrocode} |
| 973 |
\else |
| 974 |
\def\output@slide{% |
| 975 |
\begingroup |
| 976 |
\hoffset=-\inverseslidesmag in |
| 977 |
\voffset=-\inverseslidesmag in |
| 978 |
\setslidelength\@tempdima{% |
| 979 |
\ifportrait\paperwidth\else\paperheight\fi} |
| 980 |
\setslidelength\@tempdimb{% |
| 981 |
\ifportrait\paperheight\else\paperwidth\fi} |
| 982 |
\ifrotateheaders |
| 983 |
\@ifrotateslide{% |
| 984 |
\dimen@=\@tempdima |
| 985 |
\@tempdima=\@tempdimb |
| 986 |
\@tempdimb=\dimen@} |
| 987 |
\fi |
| 988 |
% \oddsidemargin, \evensidemargin, \headheight, \footheight |
| 989 |
% used for scratch: |
| 990 |
\setslidelength\oddsidemargin\slideleftmargin |
| 991 |
\setslidelength\evensidemargin\sliderightmargin |
| 992 |
\setslidelength\headheight\slidetopmargin |
| 993 |
\setslidelength\footheight\slidebottommargin |
| 994 |
% Some page styles like to know \textwidth: |
| 995 |
\textwidth=\@tempdima |
| 996 |
\advance\textwidth-\oddsidemargin |
| 997 |
\advance\textwidth-\evensidemargin |
| 998 |
\setbox\@slidebox=\hbox to \@tempdima{% |
| 999 |
\kern\oddsidemargin |
| 1000 |
\vbox to\@tempdimb{% |
| 1001 |
\ifnum\fancyput@flag>-1 |
| 1002 |
\hbox{\kern-\oddsidemargin\do@fancyput}% |
| 1003 |
\fi |
| 1004 |
\let\label\@gobble |
| 1005 |
\let\index\@gobble |
| 1006 |
\let\glossary\@gobble |
| 1007 |
\vbox to\headheight{% |
| 1008 |
\vfill |
| 1009 |
\hbox{% |
| 1010 |
\slideheadfont\relax\strut |
| 1011 |
\hbox to\textwidth{\@oddhead}}% |
| 1012 |
\kern\z@}% |
| 1013 |
\vfill |
| 1014 |
\hbox to\textwidth{\hss\box\@slidebox\hss}% |
| 1015 |
\vfill |
| 1016 |
\vbox to\footheight{% |
| 1017 |
\hbox{% |
| 1018 |
\slidefootfont\relax\strut |
| 1019 |
\hbox to\textwidth{\@oddfoot}}% |
| 1020 |
\vfill}}% |
| 1021 |
\hss}% |
| 1022 |
\ifrotateheaders\@ifrotateslide\rotate@slide\fi |
| 1023 |
\insert@specials |
| 1024 |
\shipout\box\@slidebox |
| 1025 |
\endgroup |
| 1026 |
\let\firstmark\botmark} |
| 1027 |
\@ifundefined{fancyput@flag}{\def\fancyput@flag{-1}}{} |
| 1028 |
\fi |
| 1029 |
% \end{macrocode} |
| 1030 |
% \end{macro} |
| 1031 |
% |
| 1032 |
% \begin{macro}{\output@savedslide} |
| 1033 |
% Now we take care of the saved slides in the "article" format. Lots of things |
| 1034 |
% can happen. |
| 1035 |
% \begin{macrocode} |
| 1036 |
\newskip\slidesep |
| 1037 |
\slidesep\intextsep |
| 1038 |
\ifarticle |
| 1039 |
\def\fps@fslide{htbp} |
| 1040 |
\def\ftype@fslide{32} |
| 1041 |
\def\float@savedslide{% |
| 1042 |
\begingroup\@float{fslide}% |
| 1043 |
\centerline{\box\@slidebox}% |
| 1044 |
\end@float\endgroup}% |
| 1045 |
\@namedef{float*@savedslide}{% |
| 1046 |
\begingroup\@dblfloat{fslide}% |
| 1047 |
\centerline{\box\@slidebox}% |
| 1048 |
\end@dblfloat\endgroup}% |
| 1049 |
\def\center@slide{\hbox{% |
| 1050 |
\kern-\@totalleftmargin |
| 1051 |
\hbox to \columnwidth{\hss\box\@slidebox\hss}}}% |
| 1052 |
\def\onepercol@savedslide{% |
| 1053 |
\vbox to .996\textheight{\vss\center@slide\vss}\goodbreak}% |
| 1054 |
\def\twopercol@savedslide{% |
| 1055 |
\[email protected]\textheight |
| 1056 |
\advance\dimen@-\slidesep |
| 1057 |
\ifdim\ht\@slidebox>\dimen@ |
| 1058 |
\onepercol@savedslide |
| 1059 |
\else |
| 1060 |
\vbox to .498\textheight{\vss\center@slide\vss}\goodbreak |
| 1061 |
\fi} |
| 1062 |
\def\here@savedslide{% |
| 1063 |
\addvspace\slidesep\center@slide\addvspace\slidesep} |
| 1064 |
\@namedef{here*@savedslide}{% |
| 1065 |
\goodbreak \hrule \@height\z@ \nobreak \vskip\slidesep \nobreak |
| 1066 |
\center@slide |
| 1067 |
\nobreak \vskip\slidesep \nobreak \hrule\@height\z@ \goodbreak} |
| 1068 |
\fi |
| 1069 |
\ifarticle |
| 1070 |
\def\slideplacement#1{\@ifundefined{#1@savedslide}% |
| 1071 |
{\@seminarerr{Slide placement `#1' undefined}\@ehd}% |
| 1072 |
{\expandafter\let\expandafter\output@savedslide |
| 1073 |
\csname #1@savedslide\endcsname}} |
| 1074 |
\else |
| 1075 |
\def\slideplacement#1{} |
| 1076 |
\fi |
| 1077 |
\ifarticle |
| 1078 |
\ifnotes |
| 1079 |
\ifportrait |
| 1080 |
\slideplacement{float} |
| 1081 |
\else |
| 1082 |
\slideplacement{float*} |
| 1083 |
\fi |
| 1084 |
\else |
| 1085 |
\ifportrait |
| 1086 |
\slideplacement{onepercol} |
| 1087 |
\else |
| 1088 |
\slideplacement{twopercol} |
| 1089 |
\fi |
| 1090 |
\fi |
| 1091 |
\fi |
| 1092 |
% \end{macrocode} |
| 1093 |
% \end{macro} |
| 1094 |
% |
| 1095 |
% \begin{macro}{\outputloop@savedslides} |
| 1096 |
% This is the loop that spits out each of the saved slides. We start by |
| 1097 |
% reinserting whatever was on the current page when the slide environment |
| 1098 |
% started. |
| 1099 |
% \begin{macrocode} |
| 1100 |
\ifarticle |
| 1101 |
\def\outputloop@savedslides{% |
| 1102 |
\global\maxdepth\@maxdepth |
| 1103 |
\ifvoid\not@slidebox\else |
| 1104 |
\dimen@=\dp\not@slidebox |
| 1105 |
\unvbox\not@slidebox |
| 1106 |
\hrule height\z@ |
| 1107 |
\prevdepth\dimen@ |
| 1108 |
\penalty\z@ |
| 1109 |
\fi |
| 1110 |
\edef\slide@@count{\the\slide@count\relax}% |
| 1111 |
\slide@count\z@ |
| 1112 |
\loop |
| 1113 |
\ifnum\slide@count<\slide@@count |
| 1114 |
\advance\slide@count1 |
| 1115 |
\expandafter\setbox\expandafter\@slidebox\expandafter\box |
| 1116 |
\csname slidebox@\the\slide@count\endcsname |
| 1117 |
\output@savedslide |
| 1118 |
\repeat |
| 1119 |
\ifnotesonlystar\make@slidemarker\fi} |
| 1120 |
\fi |
| 1121 |
% \end{macrocode} |
| 1122 |
% \end{macro} |
| 1123 |
% |
| 1124 |
% \begin{macro}{\make@slidemarker} |
| 1125 |
% \begin{macrocode} |
| 1126 |
\def\make@slidemarker{% |
| 1127 |
\addvspace\slidesep |
| 1128 |
\moveleft\@totalleftmargin |
| 1129 |
\vbox{% |
| 1130 |
\hsize\columnwidth |
| 1131 |
\hrule height 1pt |
| 1132 |
\kern 8pt |
| 1133 |
\hbox to \columnwidth{% |
| 1134 |
\hss |
| 1135 |
\LARGE\bf\the@slidemarker |
| 1136 |
\hss}% |
| 1137 |
\kern 8pt |
| 1138 |
\hrule height 1pt}% |
| 1139 |
\addvspace\slidesep} |
| 1140 |
\def\the@slidemarker{% |
| 1141 |
Slide% |
| 1142 |
\ifnum\c@slide=\first@slidemarker\else |
| 1143 |
s {\c@slide\first@slidemarker\relax\theslide} --\fi |
| 1144 |
{ }\theslide}% |
| 1145 |
% \end{macrocode} |
| 1146 |
% \end{macro} |
| 1147 |
% |
| 1148 |
% |
| 1149 |
% \section{Page numbering in the {\tt slides} format} |
| 1150 |
% |
| 1151 |
% In the "slides" format, we let the "page" counter be stepped as usual by the |
| 1152 |
% output routine, but we don't use it for anything except perhaps to keep |
| 1153 |
% track of the absolute page number. Instead, we have a counter "note" to keep |
| 1154 |
% track of the pages of notes, and "\thepage" is set to "\thenote" for notes |
| 1155 |
% and "\theslide" for slides (and "\theoverlay" for overlays and "\thelayer" |
| 1156 |
% for layers). |
| 1157 |
% |
| 1158 |
% \begin{macro}{\c@note} |
| 1159 |
% The "note" counter has to be stepped by the output routine, and reset by the |
| 1160 |
% slide environments. In the "article" format, we just make the "note" counter |
| 1161 |
% the same as the "page" counter. |
| 1162 |
% \begin{macrocode} |
| 1163 |
\ifarticle |
| 1164 |
\let\c@note\c@page |
| 1165 |
\def\p@note{\p@page} |
| 1166 |
\def\thenote{\thepage} |
| 1167 |
\else |
| 1168 |
\newcounter{note} |
| 1169 |
\def\thenote{\theslide-\arabic{note}} |
| 1170 |
\def\thepage{\thenote} |
| 1171 |
\addto@hook\after@slide{\setcounter{note}{1}} |
| 1172 |
\expandafter\def\expandafter\@outputpage\expandafter{% |
| 1173 |
\@outputpage\stepcounter{note}} |
| 1174 |
\fi |
| 1175 |
% \end{macrocode} |
| 1176 |
% \end{macro} |
| 1177 |
% |
| 1178 |
% Which counter should the dvi driver pay attention to when numbering the |
| 1179 |
% pages in the "slides" format? This makes a difference when using the dvi |
| 1180 |
% driver to select pages. If the driver numbers pages by the slide number, |
| 1181 |
% then it is easier to use the driver to print selected slides. |
| 1182 |
% However, this can be cumbersome when there are many pages of notes or |
| 1183 |
% overlays, especially if the driver cannot pick out the $n^{th}$ occurence of |
| 1184 |
% a page, because many pages will have the same page number. In this case, |
| 1185 |
% keeping track of physical page numbers may be preferred. We allow both |
| 1186 |
% options. |
| 1187 |
% |
| 1188 |
% By default, the dvi driver pays attention to the slide counter; i.e., this |
| 1189 |
% counter is assigned register 0 |
| 1190 |
% \begin{macrocode} |
| 1191 |
\ifarticle\else |
| 1192 |
\let\c@page\c@slide |
| 1193 |
\countdef\c@slide=0 |
| 1194 |
\c@slide=0 |
| 1195 |
\c@page=1 |
| 1196 |
\fi |
| 1197 |
% \end{macrocode} |
| 1198 |
% |
| 1199 |
% \begin{macro}{\truepagenumbers} |
| 1200 |
% This switches back to having the driver recognize physical page numbers. |
| 1201 |
% \begin{macrocode} |
| 1202 |
\ifarticle |
| 1203 |
\let\truepagenumbers\relax |
| 1204 |
\else |
| 1205 |
\def\truepagenumbers{% |
| 1206 |
\let\c@slide\c@page |
| 1207 |
\countdef\c@page=0 |
| 1208 |
\c@page=1 |
| 1209 |
\c@slide=0 |
| 1210 |
\let\truepagenumbers\relax} |
| 1211 |
\fi |
| 1212 |
\addto@preamblecmds{\truepagenumbers} |
| 1213 |
% \end{macrocode} |
| 1214 |
% \end{macro} |
| 1215 |
% |
| 1216 |
% |
| 1217 |
% \section{Slide frames} |
| 1218 |
% |
| 1219 |
% \begin{macro}{\slideframewidth,\slideframesep} |
| 1220 |
% \begin{macrocode} |
| 1221 |
\newdimen\slideframewidth \slideframewidth 4pt |
| 1222 |
\newdimen\slideframesep \slideframesep .3in |
| 1223 |
% \end{macrocode} |
| 1224 |
% \end{macro} |
| 1225 |
% |
| 1226 |
% \begin{macro}{\newslideframe,\slideframe} |
| 1227 |
% \begin{macrocode} |
| 1228 |
\def\newslideframe#1{% |
| 1229 |
\@ifnextchar[{\@newslideframe{#1}}{\@newslideframe{#1}[]}} |
| 1230 |
\def\@newslideframe#1[#2]{% |
| 1231 |
\@namedef{semsfops@#1}{#2}% |
| 1232 |
\@namedef{semsf@#1}##1} |
| 1233 |
\newslideframe{plain}{\fbox{#1}} |
| 1234 |
% \end{macrocode} |
| 1235 |
% \end{macro} |
| 1236 |
% |
| 1237 |
% \begin{macro}{\slideframe,\@slideframe} |
| 1238 |
% \begin{macrocode} |
| 1239 |
\def\slideframe{\@slideframe{slide}} |
| 1240 |
\def\@slideframe#1{% |
| 1241 |
\@ifstar{\@testtrue\@@slideframe{#1}}{\@testfalse\@@slideframe{#1}}} |
| 1242 |
\def\@@slideframe#1{% |
| 1243 |
\@ifnextchar[{\@@@slideframe{#1}}{\@@@slideframe{#1}[]}} |
| 1244 |
\def\@@@slideframe#1[#2]#3{% |
| 1245 |
\def\@tempa{none}% |
| 1246 |
\def\@tempb{#3}% |
| 1247 |
\ifx\@tempa\@tempb |
| 1248 |
\@namedef{the#1frame}{\relax}% |
| 1249 |
\else |
| 1250 |
\ifx\@tempb\@empty |
| 1251 |
\@namedef{the#1frame}{}% |
| 1252 |
\else |
| 1253 |
\@ifundefined{semsf@#3}% |
| 1254 |
{\@seminarerr{Slide frame `#3' undefined}\@eha}% |
| 1255 |
{\if@test |
| 1256 |
\@@@@slideframe{#1}[#2]{#3}% |
| 1257 |
\else |
| 1258 |
\@namedef{the#1frame}{\setbox\@slidebox=\hbox{{% |
| 1259 |
\@nameuse{semsfops@#3}#2\@nameuse{semsf@#3}{\box\@slidebox}}}}% |
| 1260 |
\fi}% |
| 1261 |
\fi |
| 1262 |
\fi} |
| 1263 |
\def\@@@@slideframe#1[#2]#3{% |
| 1264 |
\expandafter\let\expandafter\@tempa\csname the#1frame\endcsname |
| 1265 |
\edef\next{% |
| 1266 |
\noexpand\def\expandafter\noexpand\csname the#1frame\endcsname}% |
| 1267 |
\expandafter\next\expandafter{\@tempa |
| 1268 |
\setbox\@slidebox=\hbox{{% |
| 1269 |
\@nameuse{semsfops@#3}% |
| 1270 |
#2% |
| 1271 |
\@nameuse{semsf@#3}{\box\@slidebox}}}}}% |
| 1272 |
\slideframe{plain} |
| 1273 |
% \end{macrocode} |
| 1274 |
% \end{macro} |
| 1275 |
% |
| 1276 |
% |
| 1277 |
% \section{Slide styles\label{slidestyles}} |
| 1278 |
% |
| 1279 |
% \begin{macro}{\slidestyle} |
| 1280 |
% \begin{macrocode} |
| 1281 |
\def\slidestyle#1{\@ifundefined{ss@#1}% |
| 1282 |
{\@seminarerr{Slide style `#1' undefined}\@eha}% |
| 1283 |
{\@nameuse{ss@#1}}} |
| 1284 |
% \end{macrocode} |
| 1285 |
% \end{macro} |
| 1286 |
% |
| 1287 |
% \begin{macro}{\ss@empty,\ss@plain,\ss@plainbottom} |
| 1288 |
% The "plain" slide style places the slide label on the left side of the |
| 1289 |
% framed slide, centered vertically. The caption is set in a box with zero |
| 1290 |
% width so that it does not affect the centering of the slide on the page. In |
| 1291 |
% the "plainbottom" style, the label is centered at the bottom of the slide. |
| 1292 |
% \begin{macrocode} |
| 1293 |
\def\ss@empty{\let\add@slidelabel\@gobble} |
| 1294 |
\def\ss@left{\def\add@slidelabel##1{% |
| 1295 |
\setbox\@slidebox=\hbox{% |
| 1296 |
\vbox to \ht\@slidebox{\vss |
| 1297 |
\hbox to 0pt{\hss##1\hskip 15pt}% |
| 1298 |
\vss}\box\@slidebox}}} |
| 1299 |
\def\ss@bottom{\def\add@slidelabel##1{% |
| 1300 |
\setbox\@slidebox=\vbox{\copy\@slidebox\vskip 9pt |
| 1301 |
\hbox to\wd\@slidebox{\hss##1\hss}}}}% |
| 1302 |
\ifarticle |
| 1303 |
\ifportrait\slidestyle{bottom}\else\slidestyle{left}\fi |
| 1304 |
\else |
| 1305 |
\slidestyle{empty} |
| 1306 |
\fi |
| 1307 |
% \end{macrocode} |
| 1308 |
% \end{macro} |
| 1309 |
% |
| 1310 |
% \begin{macro}{\slidelabel} |
| 1311 |
% \begin{macrocode} |
| 1312 |
\def\slidelabel{\bf Slide \theslide} |
| 1313 |
% \end{macrocode} |
| 1314 |
% \end{macro} |
| 1315 |
% |
| 1316 |
% |
| 1317 |
% \section{Page styles} |
| 1318 |
% |
| 1319 |
% \begin{macro}{\newpagestyle,\renewpagestyle} |
| 1320 |
% The next two commands allow one to define new pages styles in the preamble |
| 1321 |
% of a document without playing around with the catcode of "@". |
| 1322 |
% \begin{macrocode} |
| 1323 |
\def\newpagestyle#1#2#3{% |
| 1324 |
\expandafter\newcommand\csname ps@#1\endcsname{% |
| 1325 |
\def\@oddhead{#2}\let\@evenhead\@oddhead |
| 1326 |
\def\@oddfoot{#3}\let\@evenfoot\@oddfoot}} |
| 1327 |
\def\renewpagestyle#1#2#3{% |
| 1328 |
\expandafter\renewcommand\csname ps@#1\endcsname{% |
| 1329 |
\def\@oddhead{#2}\let\@evenhead\@oddhead |
| 1330 |
\def\@oddfoot{#3}\let\@evenfoot\@oddfoot}} |
| 1331 |
% \end{macrocode} |
| 1332 |
% \end{macro} |
| 1333 |
% |
| 1334 |
% \begin{macro}{\slidepagestyle} |
| 1335 |
% \begin{macrocode} |
| 1336 |
\def\@ifgoodps#1{% |
| 1337 |
\@ifundefined{ps@#1}{\@seminarerr{Page style `#1' undefined}\@eha}} |
| 1338 |
\def\slidepagestyle#1{% |
| 1339 |
\@ifgoodps{#1}% |
| 1340 |
{\ifslide\pagestyle{#1}\else\edef\slide@pagestyle{#1}\fi}} |
| 1341 |
\def\ps@{} |
| 1342 |
\slidepagestyle{} |
| 1343 |
% \end{macrocode} |
| 1344 |
% \end{macro} |
| 1345 |
% |
| 1346 |
% \begin{macro}{\ps@align} |
| 1347 |
% \begin{macrocode} |
| 1348 |
\ifarticle |
| 1349 |
\def\ps@align{} |
| 1350 |
\else |
| 1351 |
\def\ps@align{% |
| 1352 |
\def\@oddhead{\thepage\hfil+}\let\@evenhead\@oddhead |
| 1353 |
\def\@oddfoot{+\hfil+}\let\@evenfoot\@oddfoot} |
| 1354 |
\fi |
| 1355 |
% \end{macrocode} |
| 1356 |
% \end{macro} |
| 1357 |
% |
| 1358 |
% \begin{macro}{\slideheadfont,\slidefootfont} |
| 1359 |
% \begin{macrocode} |
| 1360 |
\def\slideheadfont{\scriptsize} |
| 1361 |
\def\slidefootfont{\scriptsize} |
| 1362 |
% \end{macrocode} |
| 1363 |
% \end{macro} |
| 1364 |
% |
| 1365 |
% |
| 1366 |
% \section{Magnification} |
| 1367 |
% |
| 1368 |
% \begin{macro}{\magstep,\magstepminus} |
| 1369 |
% We extend the definition of "\magstep"$n$ to $n=0,\ldots,9$, and define an |
| 1370 |
% analogous macro for reduction. The argument of "\@magstep" {\em must be a |
| 1371 |
% count register}. |
| 1372 |
% \begin{macrocode} |
| 1373 |
\def\magstep#1{\ifcase#1 \@m\or 1200\or 1440\or 1728\or |
| 1374 |
2074\or 2488\or 2986\or 3583\or 4300\or 5160\fi\relax} |
| 1375 |
\def\magstepminus#1{% |
| 1376 |
\ifcase#1 \@m\or 833\or 694\or 579\or 482\or 401\fi\relax} |
| 1377 |
\def\@magstep#1{% |
| 1378 |
\ifnum#1<\z@\magstepminus{-#1}\else\magstep#1\fi} |
| 1379 |
% \end{macrocode} |
| 1380 |
% \end{macro} |
| 1381 |
% |
| 1382 |
% \begin{macro}{\invert@mag} |
| 1383 |
% If "\cs" is a command sequence (not a count register) that expands to an |
| 1384 |
% integer $n>0$, then "\invert@mag\cs" sets "\cs" to $1000 n^{-1}$. E.g., |
| 1385 |
% after the commands |
| 1386 |
% \begin{Ex} |
| 1387 |
% "\def\mymag{\magstep2}" |
| 1388 |
% "\invert@mag\mymag" |
| 1389 |
% \end{Ex} |
| 1390 |
% the meaning of "\mymag" is ".694444". We use dimension registers to access |
| 1391 |
% \TeX's internal arithmetic routines. |
| 1392 |
% \begin{macrocode} |
| 1393 |
{\catcode`\p=12\catcode`\t=12 |
| 1394 |
\gdef\@@inv@@mag#1pt#2{\def#2{#1}}} |
| 1395 |
\def\invert@mag#1{\@tempdima=1000pt |
| 1396 |
\divide\@tempdima by #1\relax |
| 1397 |
\expandafter\@@inv@@mag\the\@tempdima#1} |
| 1398 |
% \end{macrocode} |
| 1399 |
% \end{macro} |
| 1400 |
% |
| 1401 |
% \begin{macro}{\@slidesmag,\@articlemag} |
| 1402 |
% "\@slidesmag" and "\@articlemag" define "\inverseslidesmag" and |
| 1403 |
% "\inverseartmag" for use by "\setslidelength", etc., using the "\invert@mag" |
| 1404 |
% routine defined above. They also set the magnification of the document in |
| 1405 |
% the "slides" or "article" format. Their arguments can be any magnification. |
| 1406 |
% \begin{macrocode} |
| 1407 |
\def\@slidesmag#1{% |
| 1408 |
\@tempcnta=#1\relax% |
| 1409 |
\ifnum\@tempcnta>0 |
| 1410 |
\edef\inverseslidesmag{\the\@tempcnta}% |
| 1411 |
\invert@mag\inverseslidesmag |
| 1412 |
\ifarticle\else\mag\@tempcnta\fi |
| 1413 |
\else |
| 1414 |
\@seminarerr{\string\@slidesmag\space argument must be an |
| 1415 |
integer equal to 1000 times the magnification}\@eha |
| 1416 |
\fi} |
| 1417 |
\def\@articlemag#1{% |
| 1418 |
\@tempcnta=#1\relax% |
| 1419 |
\ifnum\@tempcnta>0 |
| 1420 |
\edef\inverseartmag{\the\@tempcnta}% |
| 1421 |
\invert@mag\inverseartmag |
| 1422 |
\ifarticle\mag\@tempcnta\fi |
| 1423 |
\else |
| 1424 |
\@seminarerr{\string\articlemag\space argument must be an |
| 1425 |
integer equal to 1000 times the magnification}\@eha |
| 1426 |
\fi} |
| 1427 |
\addto@preamblecmds{\@slidesmag\do\@articlemag} |
| 1428 |
% \end{macrocode} |
| 1429 |
% \end{macro} |
| 1430 |
% |
| 1431 |
% \begin{macro}{\slidesmag,\articlemag} |
| 1432 |
% "\slidesmag" and "\articlemag" are an interface to "\@slidesmag" and |
| 1433 |
% "\@articlemag", and allow only "\magstep" type magnifications. |
| 1434 |
% \begin{macrocode} |
| 1435 |
\newdimen\semin |
| 1436 |
\newdimen\semcm |
| 1437 |
\def\@semmagerr#1{% |
| 1438 |
\@seminarerr{\string#1 argument must be an integer |
| 1439 |
between -5 and 9}\@eha} |
| 1440 |
\def\slidesmag#1{% |
| 1441 |
\@tempcnta=#1\relax |
| 1442 |
\ifnum\@tempcnta>-6 |
| 1443 |
\ifnum\@tempcnta<10 |
| 1444 |
\edef\the@slidesmag{\the\@tempcnta}% |
| 1445 |
\@slidesmag{\@magstep\@tempcnta}% |
| 1446 |
\else |
| 1447 |
\@semmagerr\slidesmag |
| 1448 |
\fi |
| 1449 |
\else |
| 1450 |
\@semmagerr\slidesmag |
| 1451 |
\fi |
| 1452 |
\setslidelength\semin\seminlength |
| 1453 |
\setslidelength\semcm\semcmlength} |
| 1454 |
\def\seminlength{1in} |
| 1455 |
\def\semcmlength{1cm} |
| 1456 |
\def\articlemag#1{% |
| 1457 |
\@tempcnta=#1\relax |
| 1458 |
\ifnum\@tempcnta>-6 |
| 1459 |
\ifnum\@tempcnta<10 |
| 1460 |
\edef\the@articlemag{\the\@tempcnta}% |
| 1461 |
\@articlemag{\@magstep\@tempcnta}% |
| 1462 |
\else |
| 1463 |
\@semmagerr\articlemag |
| 1464 |
\fi |
| 1465 |
\else |
| 1466 |
\@semmagerr\articlemag |
| 1467 |
\fi} |
| 1468 |
\addto@preamblecmds{\slidesmag\do\articlemag} |
| 1469 |
% \end{macrocode} |
| 1470 |
% \end{macro} |
| 1471 |
% |
| 1472 |
% \begin{macro}{\setslidelength,\addtoslidelength} |
| 1473 |
% \begin{macrocode} |
| 1474 |
\def\setslidelength#1#2{% |
| 1475 |
#1=#2\relax |
| 1476 |
#1=\inverseslidesmag#1}% |
| 1477 |
\def\addtoslidelength#1#2{% |
| 1478 |
\dimen@=#2\relax |
| 1479 |
\advance#1 by \inverseslidesmag\dimen@} |
| 1480 |
% \end{macrocode} |
| 1481 |
% \end{macro} |
| 1482 |
% |
| 1483 |
% \begin{macro}{\setartlength,\addtoartlength} |
| 1484 |
% \begin{macrocode} |
| 1485 |
\def\setartlength#1#2{% |
| 1486 |
#1=#2\relax |
| 1487 |
#1=\inverseartmag#1} |
| 1488 |
\def\addtoartlength#1#2{% |
| 1489 |
\dimen@=#2\relax |
| 1490 |
\advance#1 by \inverseartmag\dimen@} |
| 1491 |
% \end{macrocode} |
| 1492 |
% \end{macro} |
| 1493 |
% |
| 1494 |
% \begin{macro}{\slide@epsfsize,\epsfslidesize} |
| 1495 |
% \begin{macrocode} |
| 1496 |
\def\slide@epsfsize#1#2{% |
| 1497 |
\ifdim\epsfxsize=0pt |
| 1498 |
\ifdim\epsfysize=0pt |
| 1499 |
\inverseslidesmag#1% |
| 1500 |
\else |
| 1501 |
0pt |
| 1502 |
\fi |
| 1503 |
\else |
| 1504 |
\inverseslidesmag\epsfxsize |
| 1505 |
\fi |
| 1506 |
\epsfysize |
| 1507 |
\ifdim\epsfysize=0pt |
| 1508 |
\ifdim\epsfxsize=0pt |
| 1509 |
\inverseslidesmag#2% |
| 1510 |
\else |
| 1511 |
0pt |
| 1512 |
\fi |
| 1513 |
\else |
| 1514 |
\inverseslidesmag\epsfysize |
| 1515 |
\fi} |
| 1516 |
\def\epsfslidesize{\let\epsfsize\slide@epsfsize} |
| 1517 |
% \end{macrocode} |
| 1518 |
% \end{macro} |
| 1519 |
% |
| 1520 |
% Now the default magnifications are set: |
| 1521 |
% \begin{macrocode} |
| 1522 |
\slidesmag{4} |
| 1523 |
\articlemag{0} |
| 1524 |
% \end{macrocode} |
| 1525 |
% |
| 1526 |
% |
| 1527 |
% \section{Page parameters\label{pageparameters}} |
| 1528 |
% |
| 1529 |
% When the the document begins, the page parameters are scaled depending on |
| 1530 |
% the format and the magnification for that format, so that it is as if the |
| 1531 |
% parameters were set with "true" dimensions. This allows a user to change the |
| 1532 |
% magnification in the preamble without having to go back and rescale the page |
| 1533 |
% parameters. |
| 1534 |
% |
| 1535 |
% \begin{macro}{\do@pageparameters} |
| 1536 |
% First, we define "\do@pageparameters" like "\do@specials", but with all the |
| 1537 |
% page parameters listed on page 163 of Lamport's \LaTeX{} User's Guide and |
| 1538 |
% Reference Manual. Parameters can be added the same way commands are added to |
| 1539 |
% "\@preamblecmds". |
| 1540 |
% \begin{macrocode} |
| 1541 |
\def\do@pageparameters{% |
| 1542 |
\do\oddsidemargin |
| 1543 |
\do\evensidemargin |
| 1544 |
\do\marginparwidth |
| 1545 |
\do\marginparsep |
| 1546 |
\do\topmargin |
| 1547 |
\do\headheight |
| 1548 |
\do\headsep |
| 1549 |
\do\textheight |
| 1550 |
\do\textwidth |
| 1551 |
\do\topskip |
| 1552 |
\do\footskip |
| 1553 |
\do\footheight} |
| 1554 |
% \end{macrocode} |
| 1555 |
% \end{macro} |
| 1556 |
% |
| 1557 |
% \begin{macro}{\scale@pageparameters} |
| 1558 |
% Now we define "\scale@pageparameters", which is invoked at the beginning of |
| 1559 |
% the document, to scale the page parameters. |
| 1560 |
% \begin{macrocode} |
| 1561 |
\ifarticle |
| 1562 |
\def\scale@pageparameters{% |
| 1563 |
\begingroup |
| 1564 |
\def\do##1{\global##1=\inverseartmag##1\relax}% |
| 1565 |
\do@pageparameters |
| 1566 |
\endgroup} |
| 1567 |
\else |
| 1568 |
\def\scale@pageparameters{% |
| 1569 |
\begingroup |
| 1570 |
\def\do##1{\global##1=\inverseslidesmag##1\relax}% |
| 1571 |
\do@pageparameters |
| 1572 |
\endgroup} |
| 1573 |
\fi |
| 1574 |
\addto@hook\before@document{\scale@pageparameters} |
| 1575 |
\addto@preamblecmds{\scale@pageparameters\do\do@pageparameters} |
| 1576 |
% \end{macrocode} |
| 1577 |
% \end{macro} |
| 1578 |
% |
| 1579 |
% \section{Omitting and including notes} |
| 1580 |
% |
| 1581 |
% \begin{macro}{\allversions,\endallversions,\allversions*,\endallversions*} |
| 1582 |
% The "allversions" environments are processed in any version. |
| 1583 |
% \begin{macrocode} |
| 1584 |
\def\allversions{} |
| 1585 |
\let\endallversions\relax |
| 1586 |
\@namedef{allversions*}{\@bsphack\globaldefs=1} |
| 1587 |
\@namedef{endallversions*}{\@esphack} |
| 1588 |
% \end{macrocode} |
| 1589 |
% \end{macro} |
| 1590 |
% |
| 1591 |
% \begin{macro}{\slide@list,\addtoslidelist} |
| 1592 |
% "\slide@list" stores the list of environments that are to be included with |
| 1593 |
% the "slidesonly" selection. Environments are added to it using the |
| 1594 |
% "\addtoslidelist" command. |
| 1595 |
% \begin{macrocode} |
| 1596 |
\def\slide@list{slide,slide*,allversions,allversions*} |
| 1597 |
\def\addtoslidelist#1{\xdef\slide@list{\slide@list,#1}} |
| 1598 |
\addto@preamblecmds{\addtoslidelist} |
| 1599 |
% \end{macrocode} |
| 1600 |
% \end{macro} |
| 1601 |
% |
| 1602 |
% \begin{macro}{\xcomment@hook} |
| 1603 |
% The macro "\@xcomment", defined in "xcomment.sty", does the actual omitting |
| 1604 |
% of notes in the "slidesonly" format. Only environments in "\slide@list" are |
| 1605 |
% processed. |
| 1606 |
% \begin{macrocode} |
| 1607 |
\ifslidesonly |
| 1608 |
\@ifundefined{xcomment@@@}{\@@input xcomment.sty }{} |
| 1609 |
\def\xcomment@hook{\@xcomment{@@@}{\slide@list}} |
| 1610 |
\newxcomment[]{note} |
| 1611 |
\else |
| 1612 |
\def\note{\@bsphack}% |
| 1613 |
\def\endnote{\@esphack}% |
| 1614 |
\fi |
| 1615 |
\def\noxcomment{\def\xcomment@hook{}} |
| 1616 |
% \end{macrocode} |
| 1617 |
% \end{macro} |
| 1618 |
% |
| 1619 |
% |
| 1620 |
% \section{Omitting and including slides\label{os}} |
| 1621 |
% |
| 1622 |
% This is pretty bad code, but it works. |
| 1623 |
% |
| 1624 |
% \begin{macro}{\onlyslides,\notslides} |
| 1625 |
% "\onlyslides" and "\notslides" store their arguments, which should expand to |
| 1626 |
% a comma separated list of numbers and ranges, in the command sequence |
| 1627 |
% "\os@list". It is not immediately expanded, because the argument may contain |
| 1628 |
% references that are not yet defined; recall that the ".aux" file is |
| 1629 |
% processed at the beginning of the document. |
| 1630 |
% \begin{macrocode} |
| 1631 |
\def\os@list{} |
| 1632 |
\newif\if@os |
| 1633 |
\def\onlyslides#1{\def\os@list{#1}\@ostrue |
| 1634 |
\def\os@warning{\@warning{\string\onlyslides\space argument |
| 1635 |
contains undefined references}}} |
| 1636 |
\def\notslides#1{\def\os@list{#1}\@osfalse |
| 1637 |
\def\os@warning{\@warning{\string\notslides\space argument |
| 1638 |
contains undefined references}}} |
| 1639 |
\addto@preamblecmds{\onlyslides\do\notslides} |
| 1640 |
% \end{macrocode} |
| 1641 |
% \end{macro} |
| 1642 |
% |
| 1643 |
% |
| 1644 |
% \begin{macro}{\os@expandlist} |
| 1645 |
% "\os@expandlist" is invoked at the beginning of the document, after the |
| 1646 |
% ".aux" files has been processed. |
| 1647 |
% \begin{macrocode} |
| 1648 |
\addto@hook\after@document{% |
| 1649 |
\ifx\os@list\@empty\else\os@expandlist\fi} |
| 1650 |
% \end{macrocode} |
| 1651 |
% "\os@expandlist" first expands the list, and then processes each |
| 1652 |
% comma-separated entry with "\os@expandrange". |
| 1653 |
% \begin{macrocode} |
| 1654 |
\def\os@expandlist{% |
| 1655 |
\let\os@@warning\relax |
| 1656 |
\begingroup |
| 1657 |
\def\ref##1{\@ifundefined{r@##1}{?}% |
| 1658 |
{\noexpand\@car\@nameuse{r@##1}\noexpand\@nil}}% |
| 1659 |
\edef\@tempd{\os@list}% |
| 1660 |
\xdef\os@list{}% |
| 1661 |
\@for\@tempc:=\@tempd |
| 1662 |
\do{\expandafter\os@expandrange\@tempc-:-:\@nil}% |
| 1663 |
\os@@warning |
| 1664 |
\endgroup |
| 1665 |
\let\os@expandrange\relax |
| 1666 |
\let\os@checknum\relax |
| 1667 |
\let\os@expandlist\relax} |
| 1668 |
% \end{macrocode} |
| 1669 |
% \end{macro} |
| 1670 |
% |
| 1671 |
% \begin{macro}{\os@expandrange} |
| 1672 |
% "\os@expandrange" expands entries of the form $m$-$n$ to $(m-1)$+$(n+1)$, |
| 1673 |
% which will simplify checking slide numbers against the list ("+" is used as |
| 1674 |
% a separator instead of "-" to allow for negative numbers). Entries that |
| 1675 |
% consist of a single number $n$ are treated like a range $n$-$n$. |
| 1676 |
% \begin{macrocode} |
| 1677 |
\def\os@expandrange#1-#2-#3\@nil{% |
| 1678 |
\def\@tempa{?}\def\@tempb{#1}% |
| 1679 |
\ifx\@tempa\@tempb |
| 1680 |
\let\os@@warning\os@warning |
| 1681 |
\else |
| 1682 |
\@tempcnta=#1\relax |
| 1683 |
\def\@tempb{#2}% |
| 1684 |
\ifx\@tempa\@tempb |
| 1685 |
\let\os@@warning\os@warning |
| 1686 |
\else |
| 1687 |
\def\@tempa{:}% |
| 1688 |
\ifx\@tempa\@tempb |
| 1689 |
\@tempcntb=\@tempcnta |
| 1690 |
\else |
| 1691 |
\@tempcntb=#2\relax |
| 1692 |
\fi |
| 1693 |
\advance\@tempcnta by -1 |
| 1694 |
\advance\@tempcntb by 1 |
| 1695 |
\ifx\os@list\@empty |
| 1696 |
\xdef\os@list{\the\@tempcnta+\the\@tempcntb}% |
| 1697 |
\else |
| 1698 |
\xdef\os@list{\os@list,\the\@tempcnta+\the\@tempcntb}% |
| 1699 |
\fi |
| 1700 |
\fi |
| 1701 |
\fi} |
| 1702 |
% \end{macrocode} |
| 1703 |
% \end{macro} |
| 1704 |
% |
| 1705 |
% |
| 1706 |
% \begin{macro}{\os@test} |
| 1707 |
% "\os@test" checks whether a slide should be processed. For each entry |
| 1708 |
% $m$-$n$ in the list "\os@list", if the slide number is greater than $m$ and |
| 1709 |
% less than $n$, "\if@test" is set to "\if@os". Recall that "\if@os" is |
| 1710 |
% "\iftrue" is "\os@list" is a list of slides to be included, and is |
| 1711 |
% "\iffalse" if "\os@list" is a list of slides to be excluded. |
| 1712 |
% \begin{macrocode} |
| 1713 |
\def\os@test{% |
| 1714 |
\@testtrue |
| 1715 |
\iflandscape |
| 1716 |
\ifnum\@landscapeonly=-1 \@testfalse\fi |
| 1717 |
\else |
| 1718 |
\ifnum\@landscapeonly=1 \@testfalse\fi |
| 1719 |
\fi |
| 1720 |
\if@test |
| 1721 |
\ifx\os@list\@empty\else |
| 1722 |
\if@os\@testfalse\fi |
| 1723 |
\@for\@tempa:=\os@list\do{\expandafter\os@testrange\@tempa\@nil}% |
| 1724 |
\fi |
| 1725 |
\fi} |
| 1726 |
\def\os@testrange#1+#2\@nil{% |
| 1727 |
\ifnum\c@slide>#1 |
| 1728 |
\ifnum\c@slide<#2 |
| 1729 |
\if@os\@testtrue\else\@testfalse\fi |
| 1730 |
\fi |
| 1731 |
\fi} |
| 1732 |
% \end{macrocode} |
| 1733 |
% \end{macro} |
| 1734 |
% |
| 1735 |
% |
| 1736 |
% \begin{macro}{\onlynotestoo} |
| 1737 |
% \begin{macrocode} |
| 1738 |
\def\onlynotestoo{% |
| 1739 |
\ifnotes\@testtrue\else\ifnotesonly\@testtrue\else\@testfalse\fi\fi |
| 1740 |
\if@test |
| 1741 |
\@ifundefined{xcomment@@@}{% |
| 1742 |
\edef\sem@temp{\the\catcode`\@}% |
| 1743 |
\catcode`\@=11 |
| 1744 |
\@@input xcomment.sty |
| 1745 |
\catcode`\@=\sem@temp\relax}{}% |
| 1746 |
\def\xcomment@hook{\@xcomment{@@@}{\slide@list}}% |
| 1747 |
\addto@hook\after@slide\onlynotes@too |
| 1748 |
\fi} |
| 1749 |
\def\onlynotes@too{% |
| 1750 |
\os@test |
| 1751 |
\if@test\gdef\do@end{}\else\gdef\do@end{\xc@begin}\fi} |
| 1752 |
\addto@preamblecmds\onlynotestoo |
| 1753 |
% \end{macrocode} |
| 1754 |
% \end{macro} |
| 1755 |
% |
| 1756 |
% |
| 1757 |
% \section{Font size declarations\label{fontsize}} |
| 1758 |
% |
| 1759 |
% \begin{macro}{\ptsize} |
| 1760 |
% The "\ptsize{"$n$"}" command invokes a macro so that the font size |
| 1761 |
% declarations are defined as in "art"$n$".sty", except that the font size |
| 1762 |
% declarations only affect the sizes of fonts, and not the list or display |
| 1763 |
% parameters. These parameters are set at the beginning of each slide |
| 1764 |
% environment. "\ptsize" should only be used in slide environments. |
| 1765 |
% \begin{macrocode} |
| 1766 |
\def\ptsize#1{% |
| 1767 |
\@ifundefined{#1@semptsize}% |
| 1768 |
{\@seminarerr{\string\ptsize\space `#1' not valid.}\@eha}% |
| 1769 |
{\ifslide |
| 1770 |
\sem@ptsize{#1}\large\normalsize |
| 1771 |
\else |
| 1772 |
\edef\slide@ptsize{#1}% |
| 1773 |
\fi}} |
| 1774 |
\edef\slide@ptsize{1\@ptsize}% |
| 1775 |
\def\slidefontsizes{\ptsize} %For backwards compatibility?? |
| 1776 |
% \end{macrocode} |
| 1777 |
% \end{macro} |
| 1778 |
% |
| 1779 |
% \begin{macro}{\slide@setsize} |
| 1780 |
% This is a variant of "\@setsize" that makes the minimum space between lines |
| 1781 |
% be "\slideskip" times the extra space between lines. |
| 1782 |
% \begin{macrocode} |
| 1783 |
\def\slide@setsize#1#2#3#4{% |
| 1784 |
\@setsize{#1}{#2}{#3}{#4}% |
| 1785 |
\set@slideskip{#2}} |
| 1786 |
\def\slide@@setsize#1#2#3#4{% |
| 1787 |
\slide@setsize{#1}{#2}{#3}{#4}\slidedisplayskips} |
| 1788 |
\def\set@slideskip#1{% |
| 1789 |
\normallineskiplimit=#1 |
| 1790 |
\advance\normallineskiplimit-\normalbaselineskip |
| 1791 |
\multiply\normallineskiplimit-1 |
| 1792 |
\normallineskiplimit\slideskip\normallineskiplimit |
| 1793 |
\ifdim\normallineskiplimit<1pt\normallineskiplimit=1pt\fi |
| 1794 |
\normallineskip=\normallineskiplimit |
| 1795 |
minus \slideshrink\normallineskiplimit |
| 1796 |
\dimen@=\normalbaselineskip |
| 1797 |
\normalbaselineskip=\dimen@ minus \slideshrink\normallineskiplimit |
| 1798 |
\normalbaselines} |
| 1799 |
\def\slideskip{.75} |
| 1800 |
\def\slideshrink{.25} |
| 1801 |
% \end{macrocode} |
| 1802 |
% \end{macro} |
| 1803 |
% |
| 1804 |
% \begin{macro}{\slidedisplayskips} |
| 1805 |
% "\slidedisplayskips" sets the displays skips to smaller values than they |
| 1806 |
% would usually have in the "article" document style. |
| 1807 |
% \begin{macrocode} |
| 1808 |
\def\slidedisplayskips{% |
| 1809 |
\abovedisplayskip 1.75ex minus .35ex |
| 1810 |
\belowdisplayskip \abovedisplayskip |
| 1811 |
\abovedisplayshortskip .2ex minus .2ex |
| 1812 |
\belowdisplayshortskip 1ex minus .2ex} |
| 1813 |
% \end{macrocode} |
| 1814 |
% \end{macro} |
| 1815 |
% |
| 1816 |
% \begin{macro}{\sem@ptsize} |
| 1817 |
% \begin{macrocode} |
| 1818 |
\def\sem@ptsize#1{% |
| 1819 |
\@nameuse{#1@semptsize}% |
| 1820 |
\large\normalsize |
| 1821 |
\leftmargini\slideleftmargini\relax |
| 1822 |
\leftmarginii\slideleftmarginii\relax |
| 1823 |
\leftmarginiii\slideleftmarginiii\relax |
| 1824 |
\labelsep\slidelabelsep\relax |
| 1825 |
\parskip\slideparskip\relax |
| 1826 |
\parindent\slideparindent\relax |
| 1827 |
\slide@rightskip |
| 1828 |
\slide@listi |
| 1829 |
\skip\footins\slidefootins\relax |
| 1830 |
\footnotesep\slidefootnotesep\relax} |
| 1831 |
\def\slidefootins{2ex minus .8ex} |
| 1832 |
\def\slidefootnotesep{1.2ex} |
| 1833 |
\def\slideparindent{\z@} |
| 1834 |
\def\slideparskip{1ex minus .2ex} |
| 1835 |
% \end{macrocode} |
| 1836 |
% \end{macro} |
| 1837 |
% |
| 1838 |
% \begin{macro}{\8@semptsize} |
| 1839 |
% \begin{macrocode} |
| 1840 |
\@namedef{8@semptsize}{% |
| 1841 |
\def\@normalsize{\slide@@setsize\normalsize{9.5pt}\viiipt\@viiipt}% |
| 1842 |
\def\small{\slide@@setsize\small{8pt}\viipt\@viipt}% |
| 1843 |
\def\footnotesize{\slide@@setsize\footnotesize{8pt}\vipt\@vipt}% |
| 1844 |
\def\scriptsize{\slide@setsize\scriptsize{7pt}\vipt\@vipt}% |
| 1845 |
\def\tiny{\slide@setsize\tiny{6pt}\vpt\@vpt}% |
| 1846 |
\def\large{\slide@setsize\large{12pt}\xpt\@xpt}% |
| 1847 |
\def\Large{\slide@setsize\Large{14pt}\xiipt\@xiipt}% |
| 1848 |
\def\LARGE{\slide@setsize\LARGE{17pt}\xivpt\@xivpt}% |
| 1849 |
\def\huge{\slide@setsize\huge{20pt}\xviipt\@xviipt}% |
| 1850 |
\def\Huge{\slide@setsize\Huge{25pt}\xxpt\@xxpt}} |
| 1851 |
% \end{macrocode} |
| 1852 |
% \end{macro} |
| 1853 |
% |
| 1854 |
% \begin{macro}{\9@semptsize} |
| 1855 |
% \begin{macrocode} |
| 1856 |
\@namedef{9@semptsize}{% |
| 1857 |
\def\@normalsize{\slide@@setsize\normalsize{11pt}\ixpt\@ixpt}% |
| 1858 |
\def\small{\slide@@setsize\small{9.5pt}\viiipt\@viiipt}% |
| 1859 |
\def\footnotesize{\slide@@setsize\footnotesize{8pt}\viipt\@viipt}% |
| 1860 |
\def\scriptsize{\slide@setsize\scriptsize{7pt}\vipt\@vipt}% |
| 1861 |
\def\tiny{\slide@setsize\tiny{6pt}\vpt\@vpt}% |
| 1862 |
\def\large{\slide@setsize\large{12pt}\xpt\@xpt}% |
| 1863 |
\def\Large{\slide@setsize\Large{14pt}\xiipt\@xiipt}% |
| 1864 |
\def\LARGE{\slide@setsize\LARGE{17pt}\xivpt\@xivpt}% |
| 1865 |
\def\huge{\slide@setsize\huge{20pt}\xviipt\@xviipt}% |
| 1866 |
\def\Huge{\slide@setsize\Huge{25pt}\xxpt\@xxpt}} |
| 1867 |
% \end{macrocode} |
| 1868 |
% \end{macro} |
| 1869 |
% |
| 1870 |
% \begin{macro}{\10@semptsize} |
| 1871 |
% \begin{macrocode} |
| 1872 |
\@namedef{10@semptsize}{% |
| 1873 |
\def\@normalsize{\slide@@setsize\normalsize{12pt}\xpt\@xpt}% |
| 1874 |
\def\small{\slide@@setsize\small{11pt}\ixpt\@ixpt}% |
| 1875 |
\def\footnotesize{\slide@@setsize\footnotesize{9.5pt}\viiipt\@viiipt}% |
| 1876 |
\def\scriptsize{\slide@setsize\scriptsize{8pt}\viipt\@viipt}% |
| 1877 |
\def\tiny{\slide@setsize\tiny{6pt}\vpt\@vpt}% |
| 1878 |
\def\large{\slide@setsize\large{14pt}\xiipt\@xiipt}% |
| 1879 |
\def\Large{\slide@setsize\Large{18pt}\xivpt\@xivpt}% |
| 1880 |
\def\LARGE{\slide@setsize\LARGE{22pt}\xviipt\@xviipt}% |
| 1881 |
\def\huge{\slide@setsize\huge{25pt}\xxpt\@xxpt}% |
| 1882 |
\def\Huge{\slide@setsize\Huge{30pt}\xxvpt\@xxvpt}} |
| 1883 |
% \end{macrocode} |
| 1884 |
% \end{macro} |
| 1885 |
% |
| 1886 |
% \begin{macro}{\11@semptsize} |
| 1887 |
% \begin{macrocode} |
| 1888 |
\@namedef{11@semptsize}{% |
| 1889 |
\def\@normalsize{\slide@@setsize\normalsize{13.6pt}\xipt\@xipt}% |
| 1890 |
\def\small{\slide@@setsize\small{12pt}\xpt\@xpt}% |
| 1891 |
\def\footnotesize{\slide@@setsize\footnotesize{11pt}\ixpt\@ixpt}% |
| 1892 |
\def\scriptsize{\slide@setsize\scriptsize{9.5pt}\viiipt\@viiipt}% |
| 1893 |
\def\tiny{\slide@setsize\tiny{7pt}\vipt\@vipt}% |
| 1894 |
\def\large{\slide@setsize\large{14pt}\xiipt\@xiipt}% |
| 1895 |
\def\Large{\slide@setsize\Large{18pt}\xivpt\@xivpt}% |
| 1896 |
\def\LARGE{\slide@setsize\LARGE{22pt}\xviipt\@xviipt}% |
| 1897 |
\def\huge{\slide@setsize\huge{25pt}\xxpt\@xxpt}% |
| 1898 |
\def\Huge{\slide@setsize\Huge{30pt}\xxvpt\@xxvpt}} |
| 1899 |
% \end{macrocode} |
| 1900 |
% \end{macro} |
| 1901 |
% |
| 1902 |
% \begin{macro}{\12@semptsize} |
| 1903 |
% \begin{macrocode} |
| 1904 |
\@namedef{12@semptsize}{% |
| 1905 |
\def\@normalsize{\slide@@setsize\normalsize{14.5pt}\xiipt\@xiipt}% |
| 1906 |
\def\small{\slide@@setsize\small{13.6pt}\xipt\@xipt}% |
| 1907 |
\def\footnotesize{\slide@@setsize\footnotesize{12pt}\xpt\@xpt}% |
| 1908 |
\def\scriptsize{\slide@setsize\scriptsize{9.5pt}\viiipt\@viiipt}% |
| 1909 |
\def\tiny{\slide@setsize\tiny{7pt}\vipt\@vipt}% |
| 1910 |
\def\large{\slide@setsize\large{18pt}\xivpt\@xivpt}% |
| 1911 |
\def\Large{\slide@setsize\Large{22pt}\xviipt\@xviipt}% |
| 1912 |
\def\LARGE{\slide@setsize\LARGE{25pt}\xxpt\@xxpt}% |
| 1913 |
\def\huge{\slide@setsize\huge{30pt}\xxvpt\@xxvpt}% |
| 1914 |
\let\Huge\huge} |
| 1915 |
% \end{macrocode} |
| 1916 |
% \end{macro} |
| 1917 |
% |
| 1918 |
% |
| 1919 |
% \begin{macro}{\14@semptsize} |
| 1920 |
% \begin{macrocode} |
| 1921 |
\@namedef{14@semptsize}{% |
| 1922 |
\def\@normalsize{\slide@@setsize\normalsize{18pt}\xivpt\@xivpt}% |
| 1923 |
\def\small{\slide@@setsize\small{14.5pt}\xiipt\@xiipt}% |
| 1924 |
\def\footnotesize{\slide@@setsize\footnotesize{13.6pt}\xipt\@xipt}% |
| 1925 |
\def\scriptsize{\slide@setsize\scriptsize{12pt}\xpt\@xpt}% |
| 1926 |
\def\tiny{\slide@setsize\tiny{9.5pt}\viiipt\@viiipt}% |
| 1927 |
\def\large{\slide@setsize\large{22pt}\xviipt\@xviipt}% |
| 1928 |
\def\Large{\slide@setsize\Large{25pt}\xxpt\@xxpt}% |
| 1929 |
\def\LARGE{\slide@setsize\LARGE{30pt}\xxvpt\@xxvpt}% |
| 1930 |
\let\huge\LARGE |
| 1931 |
\let\Huge\LARGE} |
| 1932 |
% \end{macrocode} |
| 1933 |
% \end{macro} |
| 1934 |
% |
| 1935 |
% \begin{macro}{\17@semptsize} |
| 1936 |
% \begin{macrocode} |
| 1937 |
\@namedef{17@semptsize}{% |
| 1938 |
\def\@normalsize{\slide@@setsize\normalsize{22pt}\xviipt\@xviipt}% |
| 1939 |
\def\small{\slide@@setsize\small{18pt}\xivpt\@xivpt}% |
| 1940 |
\def\footnotesize{\slide@@setsize\footnotesize{14.5pt}\xiipt\@xiipt}% |
| 1941 |
\def\scriptsize{\slide@setsize\scriptsize{13.6pt}\xipt\@xipt}% |
| 1942 |
\def\tiny{\slide@setsize\tiny{12pt}\xpt\@xpt}% |
| 1943 |
\def\large{\slide@setsize\large{25pt}\xxpt\@xxpt}% |
| 1944 |
\def\Large{\slide@setsize\Large{30pt}\xxvpt\@xxvpt}% |
| 1945 |
\let\LARGE\Large |
| 1946 |
\let\huge\Large |
| 1947 |
\let\Huge\Large} |
| 1948 |
% \end{macrocode} |
| 1949 |
% \end{macro} |
| 1950 |
% |
| 1951 |
% |
| 1952 |
% \section{The $\setminus$twoup macro} |
| 1953 |
% |
| 1954 |
% \begin{macro}{\twoup} |
| 1955 |
% See "2up.sty" for details. |
| 1956 |
% \begin{macrocode} |
| 1957 |
\def\twoup{\@ifnextchar[{\@twoup}{\@twoup[0]}} |
| 1958 |
\ifarticle |
| 1959 |
\ifportrait |
| 1960 |
\def\@twoup[#1]{% |
| 1961 |
\@tempcnta=\the@articlemag\relax |
| 1962 |
\@tempcntb=\@tempcnta |
| 1963 |
\advance\@tempcntb by #1\relax |
| 1964 |
\advance\@tempcntb by -2\relax |
| 1965 |
\ifnum\@tempcntb>-6\relax |
| 1966 |
\@@input 2up.tex |
| 1967 |
\source{\@magstep\@tempcnta}{\paperheight}{\paperwidth}% |
| 1968 |
\target{\@magstep\@tempcntb}{\paperwidth}{\paperheight}% |
| 1969 |
\targetlayout{topbottom}% |
| 1970 |
\printlandscapefalse |
| 1971 |
\else |
| 1972 |
\@seminarerr{Article magnification is too low for |
| 1973 |
\string\twoup\space to handle}\@eha |
| 1974 |
\fi |
| 1975 |
\def\articlemag##1{\@semtwoupmagerr\articlemag}} |
| 1976 |
\else |
| 1977 |
\def\@twoup[#1]{% |
| 1978 |
\@tempcnta=\the@articlemag\relax |
| 1979 |
\@tempcntb=\@tempcnta |
| 1980 |
\advance\@tempcntb by #1\relax |
| 1981 |
\advance\@tempcntb by -2\relax |
| 1982 |
\ifnum\@tempcntb>-6\relax |
| 1983 |
\@@input 2up.tex |
| 1984 |
\source{\@magstep\@tempcnta}{\paperwidth}{\paperheight}% |
| 1985 |
\target{\@magstep\@tempcntb}{\paperheight}{\paperwidth}% |
| 1986 |
\if@twoside |
| 1987 |
\targetlayout{twosided}% |
| 1988 |
\fi |
| 1989 |
\printlandscapetrue |
| 1990 |
\else |
| 1991 |
\@seminarerr{Article magnification is too low for |
| 1992 |
\string\twoup\space to handle}\@eha |
| 1993 |
\fi |
| 1994 |
\def\articlemag##1{\@semtwoupmagerr\articlemag}} |
| 1995 |
\fi |
| 1996 |
\else |
| 1997 |
\ifportrait |
| 1998 |
\def\@twoup[#1]{% |
| 1999 |
\@tempcnta=\the@slidesmag\relax |
| 2000 |
\@tempcntb=\@tempcnta |
| 2001 |
\advance\@tempcntb by #1\relax |
| 2002 |
\advance\@tempcntb by -3\relax |
| 2003 |
\ifnum\@tempcntb>-6\relax |
| 2004 |
\@@input 2up.tex |
| 2005 |
\source{\@magstep\@tempcnta}{\paperwidth}{\paperheight}% |
| 2006 |
\advance\@tempcnta by -3 |
| 2007 |
\target{\@magstep\@tempcnta}{\paperheight}{\paperwidth}% |
| 2008 |
\printlandscapetrue |
| 2009 |
\else |
| 2010 |
\@seminarerr{Slides magnification is too low for |
| 2011 |
\string\twoup\space to handle}\@eha |
| 2012 |
\fi |
| 2013 |
\def\slidesmag##1{\@semtwoupmagerr\slidesmag}} |
| 2014 |
\else |
| 2015 |
\def\@twoup[#1]{% |
| 2016 |
\@tempcnta=\the@slidesmag\relax |
| 2017 |
\@tempcntb=\@tempcnta |
| 2018 |
\advance\@tempcntb by #1\relax |
| 2019 |
\advance\@tempcntb by -3\relax |
| 2020 |
\ifnum\@tempcntb>-6\relax |
| 2021 |
\@@input 2up.tex |
| 2022 |
\source{\@magstep\@tempcnta}{\paperheight}{\paperwidth}% |
| 2023 |
\target{\@magstep\@tempcntb}{\paperwidth}{\paperheight}% |
| 2024 |
\targetlayout{topbottom}% |
| 2025 |
\printlandscapefalse |
| 2026 |
\else |
| 2027 |
\@seminarerr{Slides magnification is too low for |
| 2028 |
\string\twoup\space to handle}\@eha |
| 2029 |
\fi |
| 2030 |
\def\slidesmag##1{\@semtwoupmargerr\slidesmag}}% |
| 2031 |
\fi |
| 2032 |
\fi |
| 2033 |
\def\@semtwoupmagerr#1{% |
| 2034 |
\@seminarerr{\string#1 must come before \string\twoup}\@eha} |
| 2035 |
\addto@preamblecmds{\twoup\do\@twoup} |
| 2036 |
% \end{macrocode} |
| 2037 |
% \end{macro} |
| 2038 |
% |
| 2039 |
% |
| 2040 |
% \section{Configuration file} |
| 2041 |
% |
| 2042 |
% \begin{macrocode} |
| 2043 |
\openin1 seminar.con |
| 2044 |
\ifeof1\else\closein1 \relax\@@input seminar.con\fi |
| 2045 |
% \end{macrocode} |
| 2046 |
% |
| 2047 |
\endinput |
| 2048 |
% END: seminar.doc |