summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/third/simple-slides/simpleslides-s-Rounded.tex
blob: 10c15be71397f2a9fe12872b8dd2a21ad2fbd9fa (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
%D \module
%D   [      file=simpleslides-s-Rounded,
%D        version=2009.03.30
%D          title=\CONTEXT\ Style File,
%D       subtitle=Presentation Module Rounded,
%D         author=Aditya Mahajan and Thomas A. Schmitz,
%D           date=\currentdate,
%D      copyright={Aditya Mahajan and Thomas A. Schmitz}]
%C
%C Copyright 2007 Aditya Mahajan and Thomas A. Schmitz
%C This file may be distributed under the GNU General Public License v. 2.0.

%D This file provides the \quotation{Rounded} style for the presentation
%D module. It is loaded at runtime. 

\writestatus{simpleslides}{loading style Rounded}

\startmodule[simpleslides-s-Rounded]

\unprotect

%D The page layout:

\setuplayout [width=fit,
              leftmargin=1.5cm,
	      rightmargin=0cm,
              leftmargindistance=1.2cm,
              rightmargindistance=0pt,
              height=fit, 
              header=5.3cm, 
              footer=0cm, 
              topspace=.4cm, 
              backspace=2.5cm,
	      cutspace=3.2cm,
              bottomspace=0cm,
              bottom=0pt,
              location=singlesided]

\setuplayout [simpleslides:layout:horizontal][header=5.3cm]
\setuplayout [simpleslides:layout:vertical]  [header=2.3cm]
\setuplayout [simpleslides:layout:title]     [header=2.3cm]

%D We also specify the position of the slidetitle.

\setuplayer[simpleslides:layer:slidetitle]
    [y=23mm]

%D These macros are used for placing figures/pictures:

\define\NormalHeight         {\textheight}
\define\NormalWidth          {.476\textwidth}
\define\PictureFrameHeight   {\textheight}
\define\PictureFrameWidth    {.476\textwidth}

%D We define our color scheme:

\definecolor [simpleslides:backgroundcolor]  [s=.95]
\definecolor [simpleslides:contrastcolor]    [r=.58,g=.81,b=.58]
\definecolor [simpleslides:textcolor]        [r=.09,g=.2,b=.41]
\definecolor [simpleslides:variantcolor]     [r=.04,g=.4,b=.4]
\definecolor [simpleslides:itemize:color]    [simpleslides:textcolor]

\setupcolors[textcolor=simpleslides:textcolor]

%D We let \METAPOST\ calculate the background:

\startuseMPgraphic{simpleslides:MP:common}
save a,b,c,d;
numeric a,b,c,d ;

a = 2cm ;   b = 0.7cm ;
c = 6cm ;   d = .7cm ;

save p ; path p[] ;

fill Page withcolor \MPcolor{simpleslides:backgroundcolor} ;

z1 = llcorner Page shifted (a,0) ;
z2 = ulcorner Page shifted (a,-a-b) ;
z3 = ulcorner Page shifted (a+b/4,-a-b/4) ;
z4 = ulcorner Page shifted (a+b,-a) ;
z5 = urcorner Page shifted (0,-a) ;
z6 = ulcorner Page shifted (c,0) ;
z7 = ulcorner Page shifted (c,-a) ;


p[1] = llcorner Page -- z1 -- z2 .. z3 .. z4 -- z7 -- z6 -- 
       ulcorner Page -- cycle ;

fill p[1] withcolor \MPcolor{simpleslides:contrastcolor} ;

\stopuseMPgraphic

\startuseMPgraphic{simpleslides:MP:vertical}
StartPage ;
\includeMPgraphic{simpleslides:MP:common} ;
% The pagenumber cannot be part of MP:common otherwise pdftex ignores it.
draw \sometxt{\framed[frame=off,width=2cm,height=2cm]%
             {\color[simpleslides:backgroundcolor]{\pagenumber}}} ;

StopPage ;
\stopuseMPgraphic

\startuseMPgraphic{simpleslides:MP:horizontal}
StartPage;

\includeMPgraphic{simpleslides:MP:common} ;
draw \sometxt{\framed[frame=off,width=2cm,height=2cm]%
             {\color[simpleslides:backgroundcolor]{\pagenumber}}} ;


z8 = ulcorner Page shifted (a/2,-2.2*a) ;
z9 = z8 shifted (0,-d) ;
z10 = urcorner Page shifted (-a,-2.2*a-d) ;
z11 = z10 shifted (0,d) ;
z12 = z8 shifted (-d/2,-d/2) ;

p[2] = z8 .. z12 .. z9 -- z10 -- z11 -- cycle ;

fill p[2] withcolor \MPcolor{simpleslides:textcolor} ;

StopPage ;
\stopuseMPgraphic

\startuniqueMPgraphic{simpleslides:MP:title}
StartPage ;

save a,b,c,d;
numeric a,b,c,d;

a = 4cm ;   b = 3cm ;
c = 8cm ;   d = .7cm ;

save p; path p[] ;
p[1] = ulcorner Page -- ulcorner Page shifted (PaperWidth/2,0) -- 
       llcorner Page shifted (PaperWidth/2,0) -- llcorner Page -- cycle ;

fill Page withcolor \MPcolor{simpleslides:backgroundcolor} ;
fill p[1] withcolor \MPcolor{simpleslides:contrastcolor} ;

z1 = ulcorner Page shifted (PaperWidth/2,-b) ;
z2 = z1 shifted (-c,0) ;
z3 = z2 shifted (0,-a) ;
z4 = z3 shifted (c,0) ;
z5 = z2 shifted (-1.5cm,-a/2) ;

p[2] = z1 -- z2 .. z5 .. z3 -- z4 -- cycle ;
fill p[2] withcolor \MPcolor{simpleslides:backgroundcolor} ;

z6  = llcorner Page shifted (PaperWidth/2,0) ;
z7  = 1/2[z6,z4] ;
z8  = z7 shifted (-.75*b,d/2) ;
z9  = z8 shifted (0,-d) ;
z10 = z9 shifted (1.3*c,0) ;
z11 = z10 shifted (0,d) ;
z12 = z10 shifted (d/2,d/2) ;

p[3] = z8 -- z9 -- z10 .. z12 .. z11 -- cycle ;
fill p[3] withcolor \MPcolor{simpleslides:textcolor} ;

StopPage ;
\stopuniqueMPgraphic

%D We define these backgrounds as overlays:

\defineoverlay 
  [simpleslides:background:horizontal] 
  [\useMPgraphic{simpleslides:MP:horizontal}] 

\defineoverlay 
  [simpleslides:background:vertical] 
  [\useMPgraphic{simpleslides:MP:vertical}] 

\defineoverlay 
  [simpleslides:background:title] 
  [\useMPgraphic{simpleslides:MP:title}] 

\defineoverlay 
  [simpleslides:background:ornament] 
  [\useMPgraphic{simpleslides:MP:ornament}] 


%D The title page:

\setupTitle
  [\c!before=\strut{\blank[0.25cm]},
   \c!author\c!align=\v!right, 
   \c!before\c!author={\blank[3.1cm]\setupnarrower[left=9cm]
                       \startnarrower[left]},
    \c!after\c!author={\stopnarrower},
   \c!date\c!align=\v!right, 
   \c!before\c!date={\blank[3.7cm]\setupnarrower[left=9cm]
                       \startnarrower[left]},
    \c!after\c!date={\stopnarrower},
   \c!headcolor={simpleslides:textcolor}]


%D The slide title is typeset in a layer

\setupSlideTitle
  [\c!color={simpleslides:variantcolor},
   \c!alternative=layer,
   \c!align=\v!center,
   \c!width=\textwidth,
   \c!style={\switchtobodyfont[\TitleSize]\bf},
   \c!height=2cm,
   \c!after=]

% \definelayer[presauthor]
%     [width=.5\paperwidth,
%     height=.5\paperheight,
%     x=104mm,
%     y=118mm]

%D The symbol for the first level of itemizations. 

\definesymbol[1][\useMPgraphic{simpleslides:itemize:square}]
\setupitemize[1][inmargin][color={simpleslides:itemize:color}]

\protect
\stopmodule

\endinput