summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/prosper/contrib/PPRcorners.sty
blob: 33b9a92abd4f1ef0eb36d72ceca7dc709657f5e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
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
%=============================================================================
% Prosper -- (PPRcorners) Style file
% A LaTeX class for creating slides
% Author: Jean-Yves Burlett <jean-yves@burlett.org>
%
% Copyright (c) 2002 Jean-Yves Burlett
% All rights reserved.
% 
% Permission is hereby granted, without written agreement and without
% license or royalty fees, to use, copy, modify, and distribute this
% software and its documentation for any purpose, provided that the
% above copyright notice and the following two paragraphs appear in
% all copies of this software.
% 
% IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, 
% SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF 
% THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE AUTHOR HAS BEEN ADVISED 
% OF THE POSSIBILITY OF SUCH DAMAGE.
% 
% THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES,
% INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
% AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
% ON AN "AS IS" BASIS, AND THE AUTHOR HAS NO OBLIGATION TO
% PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
%
% CVSId : $Id: PPRcorners.sty,v 1.1 2003/01/27 14:39:20 exupery Exp $
%=============================================================================

% 
% ---[ Subtilités ]---
%
% Pour de pures raisons esthétiques, j'ai ajouté deux fonctions :
% \slideCaptionLeft{MonTexte} qui permet de définir un cartouche en bas à
%       gauche (contient \@Author par défaut)
% \NothingLeftPastThisPoint{} pose la fin du décompte de page. Cela
%       permet d'avoir des slides en rab pour les réponses aux questions
%       évidentes sans qu'ils soient comptés dans le nombre de pages
% De plus, la commande \NotLastYetMark peut être redéfinie pour
% choisir le marqueur utilisé sur les overlays sauf le dernier (j'ai
% tendance sous le stress à oublier mes animations et cela me permet
% de me souvenir que mon changement de slide sera une animation et pas
% un vrai changement de slide. Oui, c'est idiot). Pour supprimer ça il
% suffit de redéfinir la commande pour ne rien marquer du tout.
%

\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{PPRcorners}[2002/02/18]
\typeout{`corners' style for Prosper ---}
\typeout{(c) 2002 Jean-Yves Burlett <jean-yves@burlett.org>}
\typeout{CVSId: $Id: PPRcorners.sty,v 1.1 2003/01/27 14:39:20 exupery Exp $}

\RequirePackage{amssymb}

%%

\DefaultTransition{Replace}
\psset{unit=1cm}
\ifinColor
\newrgbcolor{cornerblue}{.2 .36 .77}
\else
\newgray{cornerblue}{.5}
\newgray{verylightgray}{.8}
\fi


\FontTitle{%
  \usefont{T1}{ptm}{b}{n}\fontsize{20.74pt}{18pt}\selectfont\black}{%
  \usefont{T1}{ptm}{b}{n}\fontsize{20.74pt}{18pt}\selectfont\black}
\FontText{%
  \usefont{T1}{phv}{m}{n}\fontsize{12.4pt}{12pt}\selectfont\black}{%
  \usefont{T1}{phv}{m}{n}\fontsize{12.4pt}{12pt}\selectfont\black}

\newcommand{\slidetitle}[1]{%
  \ifinColor%
  \rput[tr](317pt,101pt){%
    \includegraphics[width=355pt,height=2pt]{degrade-blanc-bleu.eps}}%
  \else%
  \rput[tr](317pt,101pt){%
    \psframe[linecolor=verylightgray,fillstyle=solid,fillcolor=verylightgray](0pt,0pt)(-355pt,-2pt)}%
  \fi%
  \rput[lB](0pt,102pt)%
  {\fontTitle{#1}}}

\LogoPosition{-1,-1.1}

\newcommand{\FrameWithCorners}[1]{%
                                % (-35pt, -37pt)
  \rput(-15pt,-17pt){%
    \pspolygon[linewidth=0mm,linecolor=cornerblue,fillstyle=solid,fillcolor=cornerblue](0,0)(.5,0)(.5,.2)(.2,.2)(.2,.5)(0,.5)%
  }%
                                % (342pt, 246pt)
  \rput(322pt,226pt){%
    \pspolygon[linewidth=0mm,linecolor=cornerblue,fillstyle=solid,fillcolor=cornerblue](0,0)(-.5,0)(-.5,-.2)(-.2,-.2)(-.2,-.5)(0,-.5)%
  }%
  \PutLogo % Mandatory
  {#1}}

\NewSlideStyle{t}{5.3,2.4}{FrameWithCorners}

\PDFCroppingBox{10 40 594 820}
\RequirePackage{semhelv}

\ifinColor
\myitem{1}{\includegraphics[width=2.8mm]{boulebleue-fondblanc.eps}}
\myitem{2}{\includegraphics[width=2.6mm]{bouleverte-fondblanc.eps}}
\myitem{3}{\includegraphics[width=2.5mm]{boulerouge-fondblanc.eps}}
\else
\myitem{1}{$\blacktriangleright$}
\myitem{2}{$\triangleright$}
\myitem{3}{$\star$}
\fi

\gdef\@captionLeft{}%\@Author} % ATTENTION ! \@Author doit être défini !
\newcommand{\slideCaptionLeft}[1]{\gdef\@captionLeft{#1}}
\newcommand{\NotLastYetMark}{$\triangledown$}

\newcommand{\NothingLeftPastThisPoint}{%
  \ifallPages\lastpage@putlabel\fi%
  \global\thePagesfalse%
}

% trucs

\newif\ifThereAreStillOverlays
\global\ThereAreStillOverlaysfalse

\newif\ifLastPageAlreadyDefined
\global\LastPageAlreadyDefinedfalse

%% grosse inspiration de PPRpascal
% Copyright (c) 2000 Pascal Poizat
% All rights reserved.

\newif\ifthePages
\global\thePagestrue
\newif\iftheCartouche
\global\theCartouchetrue

\renewpagestyle{GenericPageStyle}{\hfill}{%
  \ifshowVersion\else\iftheCartouche\tiny{\@captionLeft}\fi\fi%
  \hfill%
  \ifisDraft{\@colorFoot\tiny%
    \textbf{\jobname.tex}~--~\@Title~--~\@Author~--~\number\day/\number\month/\number\year~--~\timenow\ifthePages~--~p.\thepage\ifallPages/\realpageref{last@page}\fi\fi}%
  \else%
  \ifshowVersion%
  {\@colorFoot\tiny%
    \textbf{\jobname.tex}~--~\@Title~--~\@Author~--~\number\day/\number\month/\number\year~--~\timenow\ifthePages~--~p.\thepage\ifallPages/\realpageref{last@page}\fi\fi}%
  \else%
  \iftheCartouche%
  {\@colorFoot\tiny\ifThereAreStillOverlays\NotLastYetMark\fi%
    \@cartouche\ifthePages~--~p.\thepage\ifallPages/\realpageref{last@page}\fi\fi}%
  \fi%
  \fi%
  \fi%
}
%% fin de l'inspiration

\AtBeginDocument{%
%
% Redéf de lastpage@label pour pouvoir le définir avant la fin
%
  \let\jyb@lastPagePutLabel=\lastpage@putlabel%
  \def\lastpage@putlabel{%
    \ifLastPageAlreadyDefined{}\else\jyb@lastPagePutLabel%
    \global\LastPageAlreadyDefinedtrue\fi}%
%
% on redéfinit \maketitle pour virer le cartouche en bas
%
  \let\jyb@maketitle=\maketitle%
  \def\maketitle{%
    \addtocounter{slide}{-1}%
    \global\thePagesfalse%
    \global\theCartouchefalse%
    \jyb@maketitle%
    \global\thePagestrue%
    \global\theCartouchetrue%
  }%
%
% magouille pour voir si on est en bout d'anim ou pas
%
  \let\jyb@Overlays=\SlideOverlay%
  \def\SlideOverlay{\@ifnextchar[\jybSlideOverlay@two\jybSlideOverlay@one}%
%
  \def\jybSlideOverlay@two[#1]#2{%
    \jyb@Overlays[#1]{#2}%
    \global\ThereAreStillOverlaystrue%
    \fromSlide*{\thelimitOverlays}{\global\ThereAreStillOverlaysfalse}}%
%
  \def\jybSlideOverlay@one#1{%
    \jyb@Overlays{#1}%
    \global\ThereAreStillOverlaystrue%
    \fromSlide*{\thelimitOverlays}{\global\ThereAreStillOverlaysfalse}}%
%
}

\endinput