summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/ha-prosper/Run/Styles/Fyma/HAPFyma.sty
blob: 85ff3ad5e9a4c5750f320a285628acbf87a7a395 (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
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
%==============================================================================
%
% HAPFyma -- style file for use with HA-prosper.
%
% Created by: Laurent Jacques
%             http://www.fyma.ucl.ac.be/~ljacques
%             Institute of Theoretical Physics
%             Universiti catholique de Louvain, Belgium
%
% Copyright (c) 2003-2004 Hendri Adriaens. All rights reserved.
%
% 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.
%
% This program consists of the files listed in files.txt present in this package.
%
%==============================================================================
% Changelog:
%
% V.1.1:
%  * Adapting the code to the definition of \HAP@hltocentry and
%  \HAP@twidth
%  * Adapting code to definition of \HAP@tsectionm
%  * Adding parbox in the slide title to cut very long titles. This
%  uses the definition of the new length \FymaMaxTitleLength which is
%  adapted to the slide format and to the presence of toc.
%  * Removing the filled rectangle surrounding selected toc entriy and
%  replacing it by a simple red coloring of the text.
%  * Removing \dblue from \myitem to allow gray coloring when items are
%  deactived
%  * Adding missing gradient (in comparison with the first PPRFyma)
%  * Raising the previous parbox for tsection to obtain a well placed
%  horizontal rule.
%  * Placing a parbox in \HAP@tline for long material (like in the
%  Aggie style). This avoids them to exceed the toc width on slide.
%
% V.1.0: intial release added to HA-prosper 4.1

\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{HAPFyma}[2004/05/16]
\typeout{Fyma style for HA-prosper}
\typeout{(c) 2003-2004 Laurent Jacques, FYMA/UCL, Belgium}
\typeout{Package version: 1.1}
\typeout{ }

\ifHAP@portrait
  \PackageError{HAPFyma}{This template does not support portrait slides}%
  {Sorry, no additional help}%
\fi%

% Controlling the a4paper possibility by defining the condition
% \ifFymaAFourPaper.
% User has just to write \FymaAFour in his preamble
% to obtain the A4 support, otherwise, the us letter
% format is used.
\newif\ifFymaAFourPaper
\def\FymaAFour{\FymaAFourPapertrue}
\def\FymaNotAFour{\FymaAFourPaperfalse}

% Color definitions
\newrgbcolor{ddblue}{0.06 0.25 0.41}
\newrgbcolor{HAP@textc}{0.06 0.25 0.44}
\newrgbcolor{dblue}{0.14 0.34 0.55}
\newrgbcolor{lblue}{0.24 0.45 0.70}
\newrgbcolor{llblue}{0.43 0.61 0.84}
\newrgbcolor{lllblue}{0.88 0.95 1.00}
\newrgbcolor{llllblue}{0.98 0.99 1.00}
\newrgbcolor{HAP@framecolor}{0.06 0.25 0.41}

% Highlighting definitions
\newrgbcolor{HAP@hcolor}{0.14 0.34 0.55}  % Highlight frame color in TOC
\newrgbcolor{HAP@htcolor}{1 0.15 0.24} % Highlight text color in TOC

% Font definitions
\FontTitle{\usefont{T1}{phv}{b}{n}\fontsize{12.4pt}{12pt}\selectfont\dblue}%
  {\usefont{T1}{phv}{b}{n}\fontsize{12.4pt}{12pt}\selectfont\dblue}
\FontText{\usefont{T1}{phv}{m}{n}\fontsize{10pt}{10pt}\selectfont\HAP@textc}%
  {\usefont{T1}{phv}{m}{n}\fontsize{10pt}{10pt}\selectfont\HAP@textc}
\FontLeftFoot{\@fontTextColor\fontsize{4pt}{4pt}\selectfont}%
  {\@fontTextColor\fontsize{4pt}{4pt}\selectfont}
\FontRightFoot{\@fontTextColor\fontsize{4pt}{4pt}\selectfont}%
  {\@fontTextColor\fontsize{4pt}{4pt}\selectfont}

% General function to create the complete border set of the FYMA
% style. Used by TitleSlide, NormalSlide, PartSlide, etc...
\RequirePackage{pst-grad}
\newcommand{\MakeFymaMainGradient}{%
\ifFymaAFourPaper%
\psframe[linestyle=none, fillstyle=gradient,
  gradbegin=lllblue,gradend=white,gradmidpoint=0](-1.37,-0.77)(11.97,8.47)%
\else
\psframe[linestyle=none, fillstyle=gradient,
  gradbegin=lllblue,gradend=white,gradmidpoint=0](-1.37,-0.77)(11.125,8.47)%
\fi
}

\newcommand{\MakeFymaFrame}{%
\ifFymaAFourPaper%
% Top line
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](-1.5,8.5)(12.1,8.4)%
% Top left cross
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](-1.4,8.6)(-1.3,8.25)%
% Top right cross
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](11.9,8.6)(12.0,8.25)%
% Bottom line
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](-1.5,-0.8)(12.1,-0.7)%
% Bottom left cross
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](-1.4,-0.9)(-1.3,-0.55)%
% Bottom right cross
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](11.9,-0.9)(12,-0.55)%
\HAP@PutLF{tl}{-1.22,-.9}%
\HAP@PutRF{tr}{11.7,-.9}%
\else %%% of \ifFymaAFourPaper
% Top line
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](-1.5,8.5)(11.25,8.4)%
% Top left cross
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](-1.4,8.6)(-1.3,8.25)%
% Top right cross
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](11.05,8.6)(11.15,8.25)%
% Bottom line
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](-1.5,-0.8)(11.25,-0.7)%
% Bottom left cross
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](-1.4,-0.9)(-1.3,-0.55)%
% Bottom right cross
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](11.05,-0.9)(11.15,-0.55)%
\HAP@PutLF{tl}{-1.22,-.9}%
\HAP@PutRF{tr}{10.85,-.9}%
\fi%
}

\newcommand{\TitleSlide}[1]{%
\MakeFymaMainGradient%
\MakeFymaFrame%
{#1}}%

\newcommand{\NormalSlide}[1]{%
\MakeFymaMainGradient%
\ifHAP@toc%
% Vertical left band in very light blue
\psframe[linestyle=none, fillstyle=gradient,
  gradbegin=white,gradend=lllblue,gradmidpoint=0](-1.4,8.5)(0.8,-0.8)%
% The TOC
\rput[lt](-1.27,6.55){\begin{minipage}[t]{2cm}\HAP@toc\end{minipage}}%
\fi%
\MakeFymaFrame%
{#1}}%

\newcommand{\WideSlide}[1]{%
\MakeFymaMainGradient%
\MakeFymaFrame%
{#1}}%

\newcommand{\PartSlide}[1]{%
% Drawing four bands before the borders
\ifFymaAFourPaper
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=llllblue](-1.4,8.5)(12,5.9)%
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=llllblue](-1.4,-0.8)(12,2.8)%
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=llllblue](-1.4,8.5)(1.7,-0.8)%
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=llllblue](8.9,8.5)(12,-0.8)%
% Target around title
% Top line
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](1.5,6)(9.1,5.9)%
% Top left cross
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](1.6,6.1)(1.7,5.75)%
% Top right cross
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](8.9,6.1)(9.0,5.75)%
% Bottom line
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](1.5,2.7)(9.1,2.8)%
% Bottom left cross
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](1.6,2.6)(1.7,2.95)%
% Bottom right cross
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](8.9,2.6)(9,2.95)%
\else %%% of \ifFymaAFourPaper
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=llllblue](-1.4,8.5)(11.25,5.9)%
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=llllblue](-1.4,-0.8)(11.25,2.8)%
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=llllblue](-1.4,8.5)(1.7,-0.8)%
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=llllblue](8.4,8.5)(11.25,-0.8)%
% Target around title
% Top line
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](1.5,6)(8.6,5.9)%
% Top left cross
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](1.6,6.1)(1.7,5.75)%
% Top right cross
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](8.4,6.1)(8.5,5.75)%
% Bottom line
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](1.5,2.7)(8.6,2.8)%
% Bottom left cross
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](1.6,2.6)(1.7,2.95)%
% Bottom right cross
\psframe[linestyle=none,fillstyle=solid,linewidth=2pt,
fillcolor=lblue](8.4,2.6)(8.5,2.95)%
\fi%
\MakeFymaFrame%
{#1}}%

%% Embedding Title Slide
\newcommand{\HAPR@titleSlide}{
\ifFymaAFourPaper
\NewSlideStyle[12.3cm]{t}{5.4,2.9}{TitleSlide}%
\else
\NewSlideStyle[12.3cm]{t}{4.9,2.9}{TitleSlide}%
\fi
}

%% Embedding NormalSlide
\newcommand{\HAPR@normalSlide}{
\ifHAP@toc
\ifFymaAFourPaper
\NewSlideStyle[10cm]{tl}{1.2,3.6}{NormalSlide}
\else
\NewSlideStyle[9.5cm]{tl}{1.2,3.6}{NormalSlide}
\fi
\else
\ifFymaAFourPaper
\NewSlideStyle[12.8cm]{tl}{-1.1,3.6}{NormalSlide}
\else
\NewSlideStyle[11.8cm]{tl}{-1.1,3.6}{NormalSlide}
\fi
\fi}%

%% Embedding WideSlide
\newcommand{\HAPR@wideSlide}{
\ifFymaAFourPaper
\NewSlideStyle[12.3cm]{tl}{-1,3.6}{WideSlide}
\else
\NewSlideStyle[11.8cm]{tl}{-1.2,3.6}{WideSlide}
\fi
}

%% Redefining wideslide environment to redefine \slidetitle
\AtBeginDocument{%
  \def\wideslide{\@ifnextchar[\HAP@wideslide{\HAP@wideslide[]}}%
  \def\HAP@wideslide[#1]#2{%
    \def\slidetitle##1{%
      \rput[lt](-1.2,4.5){%
        \settowidth{\FymaTitleLength}{\fontTitle{##1}}%
        \addtolength{\FymaTitleLength}{0.2cm}%
        \psframe[linestyle=none,fillstyle=solid,linewidth=2pt,%
        fillcolor=lblue](-0.05,-0.2)(\FymaTitleLength,-0.25)%
        {\ddblue \fontTitle{##1}}%
        \ \\[-2mm]%
      }%
    }%
    \HAPR@wideSlide
    \begin{slide}[#1]{#2}%
  }%
  \def\endwideslide{\end{slide}\HAPR@normalSlide}%
}

%% Embedding Part Slide
\newcommand{\HAPR@partSlide}{
\ifFymaAFourPaper
\NewSlideStyle[12.3cm]{tl}{-1.1,2.5}{PartSlide}%
\else %%% of \ifFymaAFourPaper
\NewSlideStyle[11.8cm]{tl}{-1.1,2.5}{PartSlide}%
\fi
}
\HAPsetup{template=partslide}

% Slide title definition
\newlength{\FymaTitleLength}
\newlength{\FymaMaxTitleLength}
\newcommand{\slidetitle}[1]{%
  \ifHAP@toc
    \ifFymaAFourPaper
    \setlength{\FymaMaxTitleLength}{10.5cm}
    \else
    \setlength{\FymaMaxTitleLength}{9.5cm}
    \fi
    \rput[lt](1,4.5){%
      \settowidth{\FymaTitleLength}{\fontTitle{#1}}
      \ifdim \FymaTitleLength > \FymaMaxTitleLength
      \setlength{\FymaTitleLength}{\FymaMaxTitleLength}%
      \fi
      \addtolength{\FymaTitleLength}{0.2cm}%
      \psframe[linestyle=none,fillstyle=solid,linewidth=2pt,%
      fillcolor=lblue](-0.05,-0.2)(\FymaTitleLength,-0.25)%
      {\ddblue \fontTitle{\parbox[b]{\FymaMaxTitleLength}{#1}}}%
      \ \\[-2mm]%
  }%
  \else
    \ifFymaAFourPaper
    \setlength{\FymaMaxTitleLength}{12.7cm}
    \else
    \setlength{\FymaMaxTitleLength}{11.7cm}
    \fi
    \rput[lt](-1.1,4.5){%
      \settowidth{\FymaTitleLength}{\fontTitle{#1}}%
      \ifdim \FymaTitleLength > \FymaMaxTitleLength
      \setlength{\FymaTitleLength}{\FymaMaxTitleLength}%
      \fi
      \addtolength{\FymaTitleLength}{0.2cm}%
      \psframe[linestyle=none,fillstyle=solid,linewidth=2pt,%
      fillcolor=lblue](-0.05,-0.2)(\FymaTitleLength,-0.25)%
      {\ddblue \fontTitle{\parbox[b]{\FymaMaxTitleLength}{#1}}}%
      \ \\[-2mm]%
    }%
  \fi
}

% List item definitions
\myitem{1}{\raisebox{1pt}{\fontsize{7pt}{7pt}\ensuremath{\bullet}}}
\myitem{2}{\raisebox{1pt}{\fontsize{7pt}{7pt}\ensuremath{\circ}}}
\myitem{3}{\raisebox{1pt}{\fontsize{5pt}{5pt}\ensuremath{\circ}}}

% Style of table of contents entries
\newcommand{\HAP@tline}[1]{\ensuremath{\bullet}\,%
  \parbox[t]{1.7cm}{\raggedright#1}}
\newcommand{\HAP@tsectionm}{%
  \psline[linecolor=dblue,linewidth=.25pt](-.05,-.05)(2,-.05)%
}
\def\HAP@hltocentry{\parbox[b]{\HAP@twidth}{\raggedright{\HAP@htcolor\HAP@toctext}}}
\newcommand{\HAP@tsectionskip}{2em}
\newcommand{\HAP@titemskip}{0em}

\endinput