1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
|
% \iffalse
%<*never>
\documentclass{ltxdoc}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{xspace,url}
\usepackage[english]{babel}
\newcommand{\prosper}{\textsf{prosper}\xspace}
\newcommand{\pprprv}{\textsf{ppr-prv}\xspace}
\setlength{\parindent}{15pt}
\MakeShortVerb{\|}
\AtBeginDocument{\CodelineIndex\EnableCrossrefs}
\AtEndDocument{\PrintIndex}
\GetFileInfo{ppr-prv.cls}
\begin{document}
\def\fileversion{v 0.13c}
\def\filedate{2005/09/02}
\def\docdate{2004/03/21}
\DocInput{ppr-prv.dtx}
\end{document}
%</never>
% \fi
% \CheckSum{1289}
% \iffalse meta-comment
%
%========================================================================
% ppr-prv class: "Prosper Preview", a class to produce a printable
% version of prosper slides
% Copyright (C) 2003-2004 Mathieu Goutelle
% mgoutell[at]users[dot]sourceforge[dot]net
%
% This program may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.2
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.2 or later is part of all distributions of LaTeX
% version 1999/12/01 or later.
% CVSId: $Id: ppr-prv.dtx,v 1.9 2005/09/04 19:10:39 mgoutell Exp $
%========================================================================
%
% \fi
%% \CharacterTable
%% {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
%% 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
%% Digits \0\1\2\3\4\5\6\7\8\9
%% Exclamation \! Double quote \" Hash (number) \#
%% Dollar \$ Percent \% Ampersand \&
%% Acute accent \' Left paren \( Right paren \)
%% Asterisk \* Plus \+ Comma \,
%% Minus \- Point \. Solidus \/
%% Colon \: Semicolon \; Less than \<
%% Equals \= Greater than \> Question mark \?
%% Commercial at \@ Left bracket \[ Backslash \\
%% Right bracket \] Circumflex \^ Underscore \_
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%
% \urlstyle{sf}
% \title{The \pprprv class: Prosper Preview}
% \author{Mathieu \textsc{Goutelle}}
% \date{\fileversion, \docdate}
% \maketitle
% \tableofcontents
%
% \section{Introduction}
%
% \subsection{Presentation}
% This class is used with LaTeX presentations using the \prosper class. \pprprv
% stands for "Prosper Preview". The aim of this class is to produce a printable
% version of the slides written with \prosper, with two slides per page.
%
% The result tries to be as accurate as possible. The major problem is the support
% of the starred version of the \{only,until,from\}Slide macros: the result is
% approximately what you can expect... It is far from perfect, just because the
% content of this macros are heaped over each other. But, it is difficult to
% handle these overlays on a sheet of paper!
%
% You can send comments, bugs report or proposed improvements to the author by
% email: \url{mgoutell[at]users[dot]sourceforge[dot]net}.
%
% \subsection{Use of \pprprv}
%
% The installation of ppr-prv files follows the same scheme as any other package
% installation on your distrib. You can consult this page from the UK TeX FAQ:
% \url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=instpackages}.
%
% To use ppr-prv, you just have to change the |\documentclass| from |prosper| to
% |ppr-prv|. You don't need to change another thing to your \prosper document: all
% the macros and options of \prosper are normally fully supported by \pprprv. You
% can change the footer of each "slide" by changing |\slidename| and |\no|. By
% default, it is defined as: |\newcommand{\slidename}{slide}| and
% |\newcommand{\no}{\#}|. Since version 0.07, it uses Babel to support various
% languages (english, french, german and all their variants): if Babel is loaded,
% the footer is adapted to the chosen language. You can off course change it
% manually with |\renewcommand{\slidename}{...}| and |\renewcommand{\no}{...}| after
% |\begin{document}|.
%
% There is a new option for \pprprv since v0.11: |nopagebreak|. This can be used
% to let \LaTeX{} decide where to break the page instead of every two slides. It
% may be used for producing a more compact document. The macro |\NoPageBreak| has
% exactly the same meaning, except that it can be used at any time in the
% document. \pprprv also used since v0.11 the |geometry| package to define the
% layout of the page. You can change it by using |\geometry{...}| (see the
% documentation of this package for more details).
%
% If you use the patch for Prosper written by Hendri Adriaens
% (\url{http://stuwww.uvt.nl/~hendri/Downloads/haprosper.html}), you can use
% \pprprv as well since v. 0.09: features like toc, toc section and notes are
% fully supported. The use is exactly the same if you either load the patch or
% not. You just have to change your |documentclass| from |prosper| to |ppr-prv|
% and let the class do the work of redefining the macros for you. Since v. 0.09
% is the first release with a support for the patch, it may remain some bugs.
% Don't hesitate to report them to the author of \pprprv.
%
% I have tried not to depend on |pstricks| in \pprprv. It means that, if you don't
% use |pstricks| in your slide, you can use pdf\LaTeX{} to compile your \pprprv
% document, even if the compilation can lead to |Non-PDF special ignored!|
% warnings. Obviously, it doesn't work if you have some |pstricks| stuff in your
% slide contents or if you don't provide the figures in a format pdf\LaTeX{} can
% understand (PDF, PNG, JPG, MetaPost e.g.): in these cases, you still need to
% use \LaTeX{} to produce your document.
%
% A common mistake is to use floating environment in slides. It may work with
% regular \prosper document. But with \pprprv, it may leads to error message
% such as |Not in outer par mode| or |Float lost|. \pprprv tries to handle this
% issue by defining the floats as non-floating. But, if you specify some
% placement options (like [hbtp]), you will get these errors. By the way, you
% \textbf{really} don't need floats in slides!
%
% \StopEventually{}
%
% \section{Details of the code}
%
% \subsection{Preamble and options}
% We define first the version and all the stuff we need (or not) to begin
% \begin{macrocode}
%<*class>
\def\PPRPRV@Version{v. 0.13}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{ppr-prv}[2005/09/02, \PPRPRV@Version]
\typeout{(c) 2003-2005 Mathieu Goutelle}
%</class>
% \end{macrocode}
%
% Then we define the \prosper options to handle the one useful in our case
% (e.g. draft, footer) and ignore the others. There is also the declaration of
% the |nopagebreak| option specific to \pprprv.
% \begin{macrocode}
%<*class>
\newif\ifDVItoPS
\DeclareOption{ps}{\global\DVItoPStrue}
\DeclareOption{pdf}{\global\DVItoPSfalse}
\newif\ifisDraft
\DeclareOption{draft}{\global\isDrafttrue}
\DeclareOption{final}{\global\isDraftfalse}
\newif\ifinColor
\DeclareOption{slideColor}{}
\DeclareOption{slideBW}{}
\newif\ifallPages
\DeclareOption{total}{}
\DeclareOption{nototal}{}
\newif\ifcolorBG
\DeclareOption{nocolorBG}{}
\DeclareOption{colorBG}{}
\newif\ifAccumulate
\DeclareOption{accumulate}{}
\DeclareOption{noaccumulate}{}
\newif\ifnoFooter
\DeclareOption{noFooter}{\global\noFootertrue}
\noFooterfalse
\newif\if@distiller
\@distillerfalse
\DeclareOption{distiller}{\global\@distillertrue}
\newif\if@nopagebreak
\@nopagebreakfalse
\DeclareOption{nopagebreak}{\global\@nopagebreaktrue}
\DeclareOption{YandY}{\gdef\@pdf@driver{dvipsone}}
\DeclareOption{ps2pdf}{\gdef\@pdf@driver{ps2pdf}}
\DeclareOption{vtex}{\gdef\@pdf@driver{vtex}}
%% Default style file = default
\def\Style@chosen{default}
\DeclareOption*{\global\let\Style@chosen=\CurrentOption}
%</class>
% \end{macrocode}
%
% Here we pass all options a user want to add to specify the paper and font
% sizes to the article class and geometry package.
% \begin{macrocode}
%<*class>
\DeclareOption{a4paper}{%
\PassOptionsToClass{\CurrentOption}{article}%
\PassOptionsToPackage{\CurrentOption}{geometry}%
}
\DeclareOption{a5paper}{%
\PassOptionsToClass{\CurrentOption}{article}%
\PassOptionsToPackage{\CurrentOption}{geometry}%
}
\DeclareOption{b5paper}{%
\PassOptionsToClass{\CurrentOption}{article}%
\PassOptionsToPackage{\CurrentOption}{geometry}%
}
\DeclareOption{letterpaper}{%
\PassOptionsToClass{\CurrentOption}{article}%
\PassOptionsToPackage{\CurrentOption}{geometry}%
}
\DeclareOption{legalpaper}{%
\PassOptionsToClass{\CurrentOption}{article}%
\PassOptionsToPackage{\CurrentOption}{geometry}%
}
\DeclareOption{executivepaper}{%
\PassOptionsToClass{\CurrentOption}{article}%
\PassOptionsToPackage{\CurrentOption}{geometry}%
}
\DeclareOption{landscape}{%
\PassOptionsToClass{\CurrentOption}{article}%
\PassOptionsToPackage{\CurrentOption}{geometry}%
}
\PassOptionsToClass{10pt,11pt,12pt,oneside,twoside,final,draft,
leqno,fleqn,openbib}{article}
%</class>
% \end{macrocode}
% Then, we define a default behaviour, which is exactly the same as the \prosper
% one, except we add options for article (a4paper and 10pt).
% \begin{macrocode}
%<*class>
\ExecuteOptions{final,slideBW,total,nocolorBG,noaccumulate,ps,ps2pdf,a4paper,10pt}
\ProcessOptions\relax
%</class>
% \end{macrocode}
%
% \subsection{Main code}
% As a first action, we load the article class and save some macros for further use.
% \begin{macrocode}
%<*class>
%% Preliminary stuff
\LoadClass{article}
%% I save here the old value of the macros I need and which may be
%% modified by HA-prosper and define a test for detecting HA-prosper.
\newif\if@HAprosper\global\@HAprosperfalse
\let\old@section\section
\let\old@subsection\subsection
\let\old@itemize\itemize
\let\old@enditemize\enditemize
\let\old@enumerate\enumerate
\let\old@endenumerate\endenumerate
%</class>
% \end{macrocode}
%
% We then load |pstricks|, |graphicx| and |hyperref| to exactly mimic the
% \prosper environment and some others for internal use (|textcomp| and
% |geometry|). The |keyval| package is for HA-\prosper support.
% \begin{macrocode}
%<*class>
\RequirePackage{pstricks}
\RequirePackage{textcomp}
\RequirePackage{graphicx}
\RequirePackage[hmargin=2cm,vmargin=2cm,noheadfoot]{geometry}
\RequirePackage{keyval,ifpdf}
\ifpdf\gdef\@pdf@driver{pdftex}\fi
\RequirePackage[\@pdf@driver,plainpages=false,colorlinks=true]{hyperref}
%</class>
% \end{macrocode}
%
% Here we want to suppress the common error of using floats in slides: we
% redefine them as non-floats.
% \begin{macrocode}
%<*class>
\RequirePackage{float}
\newfloat{figure}{H}{lof}
\newfloat{table}{H}{lot}
%</class>
% \end{macrocode}
%
% \DescribeMacro{NoPageBreak}
% The |\NoPageBreak| macro has the same meaning has the |nopagebreak| option,
% except it can be used at any time in the document. To revert the effect of
% |\NoPageBreak|, the |\PageBreak| macro is defined. We define also the indent
% to 0pt and we don't want folio nor head/foot.
% \begin{macrocode}
%<*class>
\newcommand{\NoPageBreak}{\global\@nopagebreaktrue}
\newcommand{\PageBreak}{\global\@nopagebreakfalse}
\setlength{\parindent}{0pt}
\pagestyle{empty}
%</class>
% \end{macrocode}
%
% For the support for the HA-propser package, we need to define some \prosper
% internals to avoid the HA patch to complain about a missing length or macro.
% \begin{macrocode}
%<*class>
%% Support for the HA-propser package: we try here to mimic the prosper
%% class to avoid the HA patch to complain about a missing length or
%% macro.
\let\normal@write\write
\newlength{\slideWidth}
\setlength{\slideWidth}{\linewidth}
\newlength{\slidewidth}
\setlength{\slidewidth}{\linewidth}
\newlength{\slideheight}
\newcounter{trueSlideCounter}
\newcounter{overlaysCount}
\newcounter{item@step}
\newcommand{\slidetitle}[1]{}
\newcommand{\slideframe}[1]{}
\newcommand{\NewSlideStyle}[4][]{}
\newcommand{\newslideframe}[2]{}
\newcommand{\slidepagestyle}[1]{}
\def\@fontTextColor{}
\def\@fontTextBW{}
\def\@fontTitleColor{}
\def\@fontTitleBW{}
\def\@fontSubtitleColor{}
\def\@fontSubtitleBW{}
\def\ptsize#1{}
\newenvironment{slide@seminar}{}{}
\def\@DefMyItem{}
\def\@titleSpacing{\vspace*{10pt}}
\newif\ifInOverlays\InOverlaysfalse
\newcounter{limitOverlays}
\def\@cleanupOverlay{}
%</class>
% \end{macrocode}
%
% Here are some \textsf{seminar} internal we need also for HA-\prosper.
% \begin{macrocode}
%<*class>
%% Commands from Seminar
\newcounter{slide}
\newcommand{\renewpagestyle}[3]{}
\def\slidefonts{}
\newif\ifarticle\articletrue
%</class>
% \end{macrocode}
%
% This test will be used to decide if we need to insert a page break before
% printing the current slide.
% \begin{macrocode}
%<*class>
% Test to see if we need a pageskip
\newif\if@needsnewpage\global\@needsnewpagetrue
%</class>
% \end{macrocode}
%
% \DescribeMacro{part}
% We redefine the |\part| command first to suppress the optional transition
% argument and second to handle pagebreak and slides counter.
% \begin{macrocode}
%<*class>
%% Definition of the part command to suppress the optional transition argument
\let\part\relax
\newcommand{\part}[2][]{%
\if@needsnewpage
\if@nopagebreak\else\ifodd\theslideii\else\mbox{}\clearpage\fi\fi
\global\@needsnewpagefalse
\fi
\refstepcounter{slidei}%
\old@section*{#2}%
}
%</class>
% \end{macrocode}
%
% \DescribeMacro{maketitle}
% The |\maketitle| command is completely redefined since the |article| one isn't
% relevant: \prosper define some extra field we need to handle here.
% \begin{macrocode}
%<*class>
%% Handle all the maketitle stuff
\let\@cartouche\@empty
\newcommand{\slideCaption}[1]{\gdef\@cartouche{#1}}
\let\@Subtitle\@empty
\newcommand{\subtitle}[1]{\gdef\@Subtitle{#1}}
\let\old@Title\title
\renewcommand{\title}[1]{\gdef\@Title{#1}}
\let\@email\@empty
\newcommand{\email}[1]{\gdef\@email{#1}}
\let\@institution\@empty
\newcommand{\institution}[1]{\gdef\@institution{#1}}
\gdef\@Author{}
\renewcommand{\author}[1]{\gdef\@Author{#1}}
\renewcommand{\maketitle}{
\thispagestyle{empty}\setcounter{page}{0}%
\refstepcounter{slidei}%
\mbox{}\vfill
\begin{center}%
{\LARGE \@Title \par}%
\ifx\@Subtitle\@empty\else\vskip 2em{\large\@Subtitle\par}\fi
\vskip 6em%
{\large\@Author
\ifx\@email\@empty\else\vskip 1em\@email\fi
\ifx\@institution\@empty\else\vskip 1em\@institution\par\fi}%
\end{center}%
\vfill\mbox{}\clearpage
\global\@needsnewpagefalse
}
%</class>
% \end{macrocode}
%
% \DescribeEnv{Itemize}\DescribeEnv{itemstep}
% We redefine the |Itemize| and |itemstep|. They have the same behaviour as the
% original |itemize| of |article|. We have to ignore the optional argument of
% |itemstep|.
% \begin{macrocode}
%<*class>
%% Definition of the Itemize environment ;)
\let\Itemize\itemize
\let\endItemize\enditemize
%% Definition of the itemstep environment to gobble the optional argument.
\newenvironment{itemstep}[1][]%
{\itemize}
{\enditemize}
%</class>
% \end{macrocode}
%
% \DescribeEnv{slide}
% We define here the |slide| environment. We first define |prv@slide| because we
% will need it later on, for the support of HA-prosper.
%
% |\@size@overlay| will contain the height of the current slide and will be used
% to correctly draw the frame around slides. This height is computed as the
% maximum real height of the different overlays (espcially those defined with a
% Slide* macros) of the slide and is equal at least to 4cm, to avoid a really
% little frame when the user wants exactly two slides per page. The
% |\@slide@content| box contains the content of the slide. The first counter is
% for the number printed in footer, i.e. exactly the same as the one in
% \prosper. The second is used internally to print exactly two slides per page
% (without counting part for example).
% \begin{macrocode}
%<*class>
%% \@size@overlay contains the height of the current slide if we are using
%% overlays. It is equal at least to 4cm to try to avoid really little frame
%% when the user wants exactly two slides per page.
\newlength{\@size@tmp}
\global\@size@tmp\z@
\newlength{\@size@overlay}
%% Definition of the slide environment
\newsavebox{\@slide@content} % will contain the slide
%% Slide counter to be printed on the bottom of each slide
\newcounter{slidei}\setcounter{slidei}{0}
%% Slide counter to print just two slides per page (even when there is a
%% \part...)
\newcounter{slideii}\setcounter{slideii}{0}
\newenvironment{prv@slide}[1]{%
\if@needsnewpage
\if@nopagebreak\else\ifodd\theslideii\mbox{}\clearpage\fi\fi
\fi
\global\@needsnewpagetrue
\if@nopagebreak
\global\setlength{\@size@overlay}{\z@}%
\else
\global\setlength{\@size@overlay}{4cm}%
\fi
\begin{lrbox}{\@slide@content}\begin{minipage}{\linewidth}%
\old@subsection*{#1}%
}{%
\end{minipage}\end{lrbox}%
\settoheight{\@size@tmp}{\@slide@content}%
\begin{minipage}{\linewidth}
\fbox{%
\usebox{\@slide@content}%
\ifdim\@size@overlay>\@size@tmp
\addtolength{\@size@overlay}{\baselineskip}%
\rule[-\@size@overlay]{1pt}{0pt}%
\fi
}%
\ifnoFooter\else
\ifhmode\\\fi
\makebox[\linewidth][r]{%
\footnotesize
\ifx\@cartouche\@empty\else\@cartouche~---~\fi
\slidename~\no\theslidei}%
\fi
\end{minipage}
\par\if@nopagebreak\bigskip\else\vfill\fi
}
\newenvironment{slide}[2][]
{%
\refstepcounter{slidei}\stepcounter{slideii}%
\begin{prv@slide}{#2}%
}
{\end{prv@slide}}
%</class>
% \end{macrocode}
%
% At the end of the document, we print an invisible box to attach the |\vfill|
% and be sure the last slide doesn't flush to the bottom of the page.
% \begin{macrocode}
%<*class>
\AtEndDocument{\if@nopagebreak\else\ifodd\theslideii\vfill\mbox{}\else\fi\fi}
%</class>
% \end{macrocode}
%
% Here, we ignore a lot of \prosper macros.
% \begin{macrocode}
%<*class>
%% For the \Logo, don't do anything !
\newcommand{\Logo}{%
\@ifnextchar({\Logo@one}{\Logo@two}%
}
\def\Logo@one(#1)#2{}
\def\Logo@two#1{}
%% For the \Font*, don't do anything !
\newcommand{\FontTitle}[2]{}
\newcommand{\FontSubtitle}[2]{}
\newcommand{\FontText}[2]{}
%</class>
% \end{macrocode}
%
% In the following code, we handle the overlays. The tricky part is the
% definition of the starred version of \{only,until,from\}Slide macros. For
% these, we need to measure the content of the material before smashing it in a
% Opt height box. We put this height in the |\@size@overlay| length we use
% previously in |prv@slide| to draw a frame with the correct height.
% \begin{macrocode}
%<*class>
%% Definition of the whole overlay stuff: a bit annoying...
\newcommand{\overlays}[2]{#2} % We ignore overlays
\def\FromSlide#1{\relax}
\def\UntilSlide#1{\relax}
\def\OnlySlide#1{\relax}
\long\def\fromSlide@NE#1#2{#2}
\long\def\untilSlide@NE#1#2{#2}
\long\def\onlySlide@NE#1#2{#2}
\newbox\PRV@tempbox
\long\def\fromSlide@E#1#2{%
\sbox\PRV@tempbox{\begin{minipage}{\linewidth}#2\end{minipage}}%
\setlength{\@size@tmp}{\the\ht\PRV@tempbox}%
\addtolength{\@size@tmp}{\the\dp\PRV@tempbox}%
\ifdim\@size@tmp>\@size@overlay\global\@size@overlay\@size@tmp\fi
\vbox to 0pt\bgroup\usebox{\PRV@tempbox}\egroup
\vskip -\baselineskip\ignorespaces
}
\long\def\untilSlide@E#1#2{%
\sbox\PRV@tempbox{\begin{minipage}{\linewidth}#2\end{minipage}}%
\setlength{\@size@tmp}{\the\ht\PRV@tempbox}%
\addtolength{\@size@tmp}{\the\dp\PRV@tempbox}%
\ifdim\@size@tmp>\@size@overlay\global\@size@overlay\@size@tmp\fi
\vbox to 0pt\bgroup\usebox{\PRV@tempbox}\egroup
\vskip -\baselineskip\ignorespaces
}
\long\def\onlySlide@E#1#2{%
\sbox\PRV@tempbox{\begin{minipage}{\linewidth}#2\end{minipage}}%
\setlength{\@size@tmp}{\the\ht\PRV@tempbox}%
\addtolength{\@size@tmp}{\the\dp\PRV@tempbox}%
\ifdim\@size@tmp>\@size@overlay\global\@size@overlay\@size@tmp\fi
\vbox to 0pt\bgroup\usebox{\PRV@tempbox}\egroup
\vskip -\baselineskip\ignorespaces
}
\def\fromSlide{\@ifstar{\fromSlide@E}{\fromSlide@NE}}
\def\untilSlide{\@ifstar{\untilSlide@E}{\untilSlide@NE}}
\def\onlySlide{\@ifstar{\onlySlide@E}{\onlySlide@NE}}
%</class>
% \end{macrocode}
%
% We define some \prosper macros we don't really need in \pprprv. But we
% obviously need to define it...
% \begin{macrocode}
%<*class>
%% All the things I may have forgotten if I haven't read the docs
%% carefully enough
\newcommand{\PDFtransition}[1]{}
\newcommand{\DefaultTransition}[1]{}
\def\NoFrenchBabelItemize{\relax}
\newcommand{\ColorFoot}[1]{}
\newif\ifshowVersion
\showVersionfalse
\newcommand{\displayVersion}{\global\showVersiontrue}
\def\fontTitle#1{#1}
\def\fontText#1{#1}
\newcommand{\myitem}[2]{}
%% Stolen from the prosper.cls code
\newcommand{\PDForPS}{%
\ifDVItoPS
\let\prosper@next\@secondoftwo
\else
\let\prosper@next\@firstoftwo
\fi
\prosper@next}
%% #1 appears on the slide only on PS mode
\newcommand{\onlyInPS}{%
\ifDVItoPS
\let\prosper@next\@iden
\else
\let\prosper@next\@gobble
\fi
\prosper@next}
%% #1 appears on the slide only on PDF mode
\newcommand{\onlyInPDF}{%
\ifDVItoPS
\let\prosper@next\@gobble
\else
\let\prosper@next\@iden
\fi
\prosper@next}
%</class>
% \end{macrocode}
%
% \subsection{AtBeginDocument code}
% Finally, we add some |\AtBeginDocument| hackery. The purpose is first to
% support multi-language with Babel and we need to know if this package is
% loaded.
% \begin{macrocode}
%<*class>
\AtBeginDocument{% Multi-language support with Babel
%</class>
% \end{macrocode}
%
% If we detect Babel, we test the loaded language and define the footer macros
% according to this.
% \begin{macrocode}
%<*class>
\@ifpackageloaded{babel}{%
\def\@test{french}%
\ifx\languagename\@test
\newcommand{\slidename}{transparent}%
\providecommand{\no}{n\textdegree}%
\fi
\def\@test{english}%
\ifx\languagename\@test
\newcommand{\slidename}{slide}%
\providecommand{\no}{\#}%
\fi
\def\@test{british}%
\ifx\languagename\@test
\newcommand{\slidename}{slide}%
\providecommand{\no}{\#}%
\fi
\def\@test{canadian}%
\ifx\languagename\@test
\newcommand{\slidename}{slide}%
\providecommand{\no}{\#}%
\fi
\def\@test{USenglish}%
\ifx\languagename\@test
\newcommand{\slidename}{slide}%
\providecommand{\no}{\#}%
\fi
\def\@test{UKenglish}%
\ifx\languagename\@test
\newcommand{\slidename}{slide}%
\providecommand{\no}{\#}%
\fi
\def\@test{german}%
\ifx\languagename\@test
\newcommand{\slidename}{transparent}%
\providecommand{\no}{Nr.}%
\fi
\def\@test{germanb}%
\ifx\languagename\@test
\newcommand{\slidename}{transparent}%
\providecommand{\no}{Nr.}%
\fi
\def\@test{austrian}%
\ifx\languagename\@test
\newcommand{\slidename}{transparent}%
\providecommand{\no}{Nr.}%
\fi
\def\@test{ngerman}%
\ifx\languagename\@test
\newcommand{\slidename}{transparent}%
\providecommand{\no}{Nr.}%
\fi
\def\@test{naustrian}%
\ifx\languagename\@test
\newcommand{\slidename}{transparent}%
\providecommand{\no}{Nr.}%
\fi
}{}
\providecommand{\slidename}{slide}%
\providecommand{\no}{\#}%
}
%</class>
% \end{macrocode}
%
% \subsection{Support for HA-\protect\prosper}
% If we detect HA-\prosper, we need to redefine all the macros added by this
% patch. All this stuff goes into the \texttt{HAP-ppr-prv.def} file, which is
% loaded at the end of HA-\prosper if it detects \pprprv.
% \begin{macrocode}
%<*HAPdef>
%% Support for the HA-prosper package: redefinition of the
%% functionnalities added by this patch.
\@ifpackageloaded{HA-prosper}{%
\global\@HAprospertrue
% \def\HAP@ReqVersion{v3.9}
% \ifx\HAP@Version\undefined\else%
% \ifx\HAP@ReqVersion\HAP@Version\else%
% \ClassError{ppr-prv}{HA-prosper \HAP@Version\space and
% ppr-prv \PPRPRV@Version\space are incompatible}%
% {Read the documentation of HA-prosper.}%
% \fi%
% \fi
\renewenvironment{itemstep}[1][]{\old@itemize}{\old@enditemize}%
\renewenvironment{enumstep}[1][]{\old@enumerate}{\old@endenumerate}%
\define@key{PRV@keys@slide}{toc}{\def\@tockey{#1}}
\define@key{PRV@keys@slide}{bm}{}
\define@key{PRV@keys@slide}{trans}{}
\define@key{PRV@keys@slide}{sound}{}
\define@key{PRV@keys@slide}{template}{}
\def\xitem{\@ifnextchar<{\PRV@xitem}{\PRV@xitem<>}}
\def\PRV@xitem<#1>{\item}
\def\email#1{#1}
\def\institution#1{#1}
\renewcommand{\NewSlideStyle}[4][]{}
%</HAPdef>
% \end{macrocode}
%
% \DescribeEnv{slide}
% We first redefine the |slide| environment to first handle the optional keys
% for defining toc entries. But it is roughly |prv@slide|... The |wideslide|
% environment is set to |slide|.
%
% There is also some stuff here in case HA-prosper is loaded: since this package
% change |itemize|-like environments |AtBeginDocument|, we need to redefine it
% after... and after |AtBeginDocument| means just before printing the slides. We
% do this only in the first slide by testing the value of |\itemize|.
%
% \begin{macrocode}
%<*HAPdef>
\renewenvironment{slide}[2][]{%
\refstepcounter{slidei}\stepcounter{slideii}%
\setcounter{trueSlideCounter}{\theslidei}%
\let\@tockey\@undefined
\setkeys{PRV@keys@slide}{#1}%
\def\@tempa{#2}%
\ifx\@tempa\@empty
\ifx\@tockey\@undefined\else
\ifx\@tockey\@empty\else
\HAP@contentsline{0}{\@tockey}{\theslidei}{}%
\fi
\fi
\else
\ifx\@tockey\@undefined
\HAP@contentsline{0}{#2}{\theslidei}{}%
\else
\ifx\@tockey\@empty\else
\HAP@contentsline{0}{\@tockey}{\theslidei}{}%
\fi
\fi
\fi
\ifx\itemize\old@itemize\else
\global\let\itemize\old@itemize
\global\let\enditemize\old@enditemize
\global\let\enumerate\old@enumerate
\global\let\endenumerate\old@endenumerate
\fi
\begin{prv@slide}{#2}%
}
{%
\end{prv@slide}%
}
\renewenvironment{wideslide}[2][]{\begin{slide}[#1]{#2}}{\end{slide}}
%</HAPdef>
% \end{macrocode}
%
% \DescribeEnv{dualslide}
% The |dualslide| environment is a bit more complicated to redefine, just
% because we want to get rid of |pstricks|. So we do everything with \LaTeX{}
% boxes and some spaces adjustments.
% \begin{macrocode}
%<*HAPdef>
\newsavebox{\@slide@left}%
\newsavebox{\@slide@right}%
\newlength{\ht@slide}%
\def\dualslide{\@ifnextchar[\@dualslide{\@@@dualslide[][][]}}%
\def\@dualslide[#1]{%
\@ifnextchar[{\@@dualslide[#1]}{\@@@dualslide[#1][#1][#1]}}%
\def\@@dualslide[#1][#2]{%
\@ifnextchar[{\@@@dualslide[#1][#2]}{\@@@dualslide[#1][#2][#1]}}%
\long\def\@@@dualslide[#1][#2][#3]#4#5#6{%
\setlength{\HAP@colsep}{.04\linewidth}%
\setlength{\HAP@lcolwidth}{.47\linewidth}%
\setlength{\HAP@rcolwidth}{.47\linewidth}%
\setlength{\HAP@topsep}{0cm}%
\setlength{\HAP@bottomsep}{.3cm}%
\setlength{\HAP@indent}{0cm}%
\setkeys{HAP@keys@dual}{#4}%
\sbox{\@slide@left}{\begin{minipage}[t]{\HAP@lcolwidth}#5\end{minipage}}%
\sbox{\@slide@right}{\begin{minipage}[t]{\HAP@rcolwidth}#6\end{minipage}}%
\setlength{\ht@slide}{\the\ht\@slide@left}%
\addtolength{\ht@slide}{-0.5\baselineskip}%
\addtolength{\ht@slide}{\HAP@topsep}%
\leavevmode\null\kern\the\HAP@indent
\raisebox{-\ht@slide}{\usebox{\@slide@left}}%
\kern\the\HAP@colsep
\setlength{\ht@slide}{\the\ht\@slide@right}%
\addtolength{\ht@slide}{-0.5\baselineskip}%
\addtolength{\ht@slide}{\HAP@topsep}%
\raisebox{-\ht@slide}{\usebox{\@slide@right}}%
\par\vspace*{\HAP@bottomsep}%
}
%</HAPdef>
% \end{macrocode}
%
% We ignore again overlays...
% \begin{macrocode}
%<*HAPdef>
\renewcommand{\overlays}[2]{#2} % We ignore overlays (again...)
%</HAPdef>
% \end{macrocode}
%
% \DescribeMacro{maketitle}
% The redefinition of |\maketitle| is exactly the same as the previous one,
% except that we add the support for the optional toc entry definition.
% \begin{macrocode}
%<*HAPdef>
\renewcommand{\maketitle}[1][]{%
\refstepcounter{slidei}%
\setcounter{trueSlideCounter}{\theslidei}%
\let\@tockey\@undefined
\setkeys{PRV@keys@slide}{#1}%
\ifx\@tockey\@undefined
\else
\ifx\@tockey\@empty\else
\HAP@contentsline{0}{\@tockey}{\theslidei}{}%
\fi
\fi
\thispagestyle{empty}\setcounter{page}{0}%
\mbox{}\vfill
\begin{center}%
{\LARGE \@title \par}%
\ifx\@Subtitle\@empty\else\vskip 2em{\large\@Subtitle\par}\fi
\vskip 6em%
{\large\begin{tabular}[t]{c}\@author\end{tabular}\par}%
\end{center}%
\vfill\HAP@toc
\vfill\mbox{}\clearpage
\global\@needsnewpagefalse
}
%</HAPdef>
% \end{macrocode}
%
% \DescribeMacro{pcontentsline}
% Here is defined the |\pcontentsline| macro for defining the toc layout printed
% on the first page.
% \begin{macrocode}
%<*HAPdef>
\renewcommand{\fontToc}{}
\newlength{\PRV@indenttoc}
\setlength{\PRV@indenttoc}{0pt}
\renewcommand{\pcontentsline}[5]{%
\if1#1%
\setlength{\PRV@indenttoc}{0pt}%
\fi
\hspace*{\PRV@indenttoc}#2%
\if1#5\else\leaders\hbox{\hss.\ \hss}\hfill\slidename~\no#3\fi\\
\if1#1%
\setlength{\PRV@indenttoc}{10pt}%
\fi
}%
%</HAPdef>
% \end{macrocode}
%
% All the sectioning commands of HA-\prosper are redefined here. We only handle
% the toc entry, so it is much less complicated than in HA-\prosper!
% \begin{macrocode}
%<*HAPdef>
% Redefinition of tsection command to remove what is not needed
\newcounter{MG@tempTrueSlideCounter}
\renewcommand{\tsection}{%
\@ifstar
{\@ifnextchar[{\@tsection{0}{2}}{\@tsection{0}{2}[]}}%
{\@ifnextchar[{\@tsection{0}{1}}{\@tsection{0}{1}[]}}%
}%
\def\@tsection#1#2[#3]#4{%
\setcounter{MG@tempTrueSlideCounter}{\thetrueSlideCounter}%
\stepcounter{MG@tempTrueSlideCounter}%
\HAP@contentsline{1}{#4}{\theMG@tempTrueSlideCounter}{1}%
}%
% Redefinition of the part command to deal with the toc key
\renewcommand{\part}[2][]{%
\if@needsnewpage
\if@nopagebreak\else\ifodd\theslideii\else\mbox{}\clearpage\fi\fi
\global\@needsnewpagefalse
\fi
\refstepcounter{slidei}%
\setcounter{trueSlideCounter}{\theslidei}%
\let\@tockey\@undefined
\setkeys{PRV@keys@slide}{#1}%
\ifx\@tockey\@undefined
\HAP@contentsline{0}{#2}{\theslidei}{}%
\else
\ifx\@tockey\@empty\else
\HAP@contentsline{0}{\@tockey}{\theslidei}{}%
\fi
\fi
\old@section*{#2}%
}%
\renewcommand{\tsectionandpart}{\@ifstar{\tsectionandpart@E}{\tsectionandpart@NE}}
\newcommand{\tsectionandpart@E}[2][]{%
\let\@tockey\@undefined
\setkeys{PRV@keys@slide}{#1}%
\ifcase
\ifx\@tockey\@undefined\@ne\fi
\ifx\@tockey\@empty\@ne\fi
\z@
\tsection*{\@tockey}%
\else
\tsection*{#2}%
\fi
\part[toc={}]{#2}%
}
\newcommand{\tsectionandpart@NE}[2][]{%
\let\@tockey\@undefined
\setkeys{PRV@keys@slide}{#1}%
\ifcase
\ifx\@tockey\@undefined\@ne\fi
\ifx\@tockey\@empty\@ne\fi
\z@
\tsection{\@tockey}%
\else
\tsection{#2}%
\fi
\part[toc={}]{#2}%
}
%</HAPdef>
% \end{macrocode}
%
% Since HA-\prosper enhances the footer (left and right), we try to take
% advantages of this.
% \begin{macrocode}
%<*HAPdef>
\let\l@foot\@empty
\let\r@foot\@empty
\@ifundefined{HAP@leftfoot}{}{\gdef\l@foot{\HAP@leftfoot}}
\@ifundefined{HAP@rightfoot}{}{\gdef\r@foot{\HAP@rightfoot}}
\gdef\@cartouche{\l@foot\hfill\r@foot}
\renewcommand{\LeftFoot}[1]{%
\gdef\l@foot{#1}%
\gdef\@cartouche{\l@foot\hfill\r@foot}%
}%
\renewcommand{\RightFoot}[1]{%
\gdef\r@foot{#1}%
\gdef\@cartouche{\l@foot\hfill\r@foot}%
}%
%</HAPdef>
% \end{macrocode}
%
% \DescribeEnv{notes}
% Again, HA-\prosper adds a |notes| environment. We print it just between the
% slides, in a |quote| environment.
% \begin{macrocode}
%<*HAPdef>
\ifHAP@slidesonly\else
\renewenvironment{notes}[1]{%
\old@subsection*{#1}\bgroup\quote\footnotesize\sffamily
}{%
\endquote\egroup
\ifHAP@notesonly\else
\par
\if@nopagebreak
\bigskip
\else
\vfill
\ifodd\theslideii\else\mbox{}\clearpage\fi
\fi
\fi
\global\@needsnewpagefalse
}%
\fi
%</HAPdef>
% \end{macrocode}
%
% \DescribeMacro{OnSlide}\DescribeMacro{onSlide}
% HA-\prosper adds also two extra macros for overlays: |\onSlide| and
% |\OnSlide|. To handle it is relatively simple since we only have to
% ``flatten'' overlays (see |\onlySlide| definition above).
% \begin{macrocode}
%<*HAPdef>
\def\OnSlide#1{\relax}
\long\def\onSlide@NE#1#2{#2}
\long\def\onSlide@E#1#2{%
\sbox\PRV@tempbox{\begin{minipage}{\linewidth}#2\end{minipage}}%
\setlength{\@size@tmp}{\the\ht\PRV@tempbox}%
\addtolength{\@size@tmp}{\the\dp\PRV@tempbox}%
\ifdim\@size@tmp>\@size@overlay\global\@size@overlay\@size@tmp\fi
\vbox to 0pt\bgroup\usebox{\PRV@tempbox}\egroup
\vskip -\baselineskip\ignorespaces
}
\def\onSlide{\@ifstar\onSlide@E\onSlide@NE}
}%
{%
\global\@HAprosperfalse%
}
%</HAPdef>
% \end{macrocode}
%
% \setcounter{IndexColumns}{2}
% \Finale
%
\endinput
|