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
|
%D \module
%D [ file=simpleslides-s-SideToc,
%D version=2010.02.09,
%D title=\CONTEXT\ Style File,
%D subtitle=Presentation Module --- SideToc style,
%D author=Aditya Mahajan and Thomas A. Schmitz,
%D date=\currentdate,
%D copyright={Aditya Mahajan and Thomas A. Schmitz}]
%C
%C Copyright 2010 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{SideToc} style for the presentation
%D module. It is loaded at runtime.
\writestatus{simpleslides}{loading Fuzzy Frame style}
\startmodule[simpleslides-s-FuzzyFrame]
\unprotect
%D We create different layouts for the title page, horizontal, and vertical
%D slides.
\setuplayout [simpleslides:layout:vertical]
[leftmargin=0cm,
rightmargin=0cm,
header=0.1cm,
headerdistance=1.7cm,
header=0cm,
headerdistance=0cm,
footer=0cm,
topspace=1cm,
backspace=1cm,
bottomspace=0cm,
bottom=0pt,
location=middle]
\setuplayout [simpleslides:layout:horizontal]
[width=fit,
leftmargin=0cm,
rightmargin=0cm,
height=fit,
header=0.1cm,
headerdistance=1.7cm,
footer=0cm,
topspace=1cm,
backspace=1cm,
bottomspace=0cm,
bottom=0pt,
location=middle]
\setuplayout [simpleslides:layout:title]
[width=fit,
leftmargin=0cm,
rightmargin=0cm,
height=fit,
header=0cm,
headerdistance=0cm,
footer=0cm,
topspace=1cm,
backspace=1cm,
bottomspace=0cm,
bottom=0pt,
location=middle]
\setupcombinations[distance=0.75cm]
%D This is basically the same as the FuzzyTopic style, minus the "Topic" list;
%D I just wanted something with a randomized border and took that style as
%D template.
%D These macros are used for placing figures/pictures:
\define\NormalHeight {\textheight}
\define\NormalWidth {.476\textwidth}
\define\PictureFrameHeight {\textheight}
\define\PictureFrameWidth {.476\textwidth}
\setuplayer
[simpleslides:layer:slidetitle]
[x=1cm,y=0mm]
%D We define our color scheme
\definecolor [simpleslides:contrastcolor] [r=0.23,g=0.31,b=0.59]
\definecolor [simpleslides:backgroundcolor] [s=0.9]
\definecolor [simpleslides:altcontrastcolor] [s=0.95]
\definecolor [simpleslides:textcolor] [s=0]
\definecolor [simpleslides:itemize:color] [simpleslides:contrastcolor]
%D We use \METAPOST to draw the background.
\startuseMPgraphic{simpleslides:MP:title}
StartPage ;
fill Page withcolor \MPcolor{simpleslides:backgroundcolor} ;
for i=1 upto 20 :
draw Page enlarged -5pt randomized 15pt withcolor \MPcolor{simpleslides:contrastcolor} ;
endfor ;
StopPage ;
\stopuseMPgraphic
\startuseMPgraphic{simpleslides:MP:horizontal}
StartPage ;
pickup pencircle scaled .5pt ;
fill Page withcolor \MPcolor{simpleslides:backgroundcolor} ;
for i=1 upto 20 :
draw Page enlarged -5pt randomized 15pt withcolor \MPcolor{simpleslides:contrastcolor} ;
endfor ;
z[1] = ulcorner Page shifted (1cm, -2.2cm) ;
z[2] = urcorner Page shifted (-1cm, -2.2cm) ;
path sep ; sep = z[1] -- z[2] ;
for i=1 upto 20 :
draw sep randomized 15pt withcolor \MPcolor{simpleslides:contrastcolor} ;
endfor ;
StopPage ;
\stopuseMPgraphic
\startuseMPgraphic{simpleslides:MP:vertical}
StartPage ;
pickup pencircle scaled .5pt ;
fill Page withcolor \MPcolor{simpleslides:backgroundcolor} ;
for i=1 upto 20 :
draw Page enlarged -5pt randomized 15pt withcolor \MPcolor{simpleslides:contrastcolor} ;
endfor ;
z[1] = 1/2[ulcorner Page, urcorner Page] shifted (0, -8mm) ;
z[2] = 1/2[llcorner Page, lrcorner Page] shifted (0, 15mm) ;
path sep ; sep = z[1] -- z[2] ;
for i=1 upto 20 :
draw sep randomized 15pt withcolor \MPcolor{simpleslides:contrastcolor} ;
endfor ;
StopPage ;
\stopuseMPgraphic
\startuseMPgraphic{simpleslides:MP:ornament2}
StartPage ;
save d, s, r ; numeric d, s, r ;
d = 4mm ;
s = 0.33 * PaperWidth ;
z[1] = (0,0) shifted (s, 1.5*d) ;
z[2] = z[1] shifted (0, d) ;
save p ; path p[] ;
p[1] = z[1] -- z[2] ;
pickup pencircle scaled 0.5pt ;
r = 150*(PageNumber/NOfPages) ;
z[3] = z[1] shifted (r, -4pt) ;
for i=1 upto 150 :
draw p[1] shifted (i*s/150, 0) randomized 2pt withcolor
(if i < r : \MPcolor{simpleslides:contrastcolor}
else : \MPcolor{simpleslides:altcontrastcolor}
fi) ;
endfor ;
StopPage ;
\stopuseMPgraphic
\startuseMPgraphic{simpleslides:MP:ornament}
StartPage ;
save v, s, l, r ; numeric v, s, l, r ;
save p ; path p ;
v = 0.8cm ;
s = 0.33*PaperWidth ;
z[1] = (0,0) shifted (s,v) ;
z[2] = (PaperWidth,0) shifted (-s,v) ;
l = arclength (z[1] --z[2]) ;
r = (l*PageNumber/NOfPages) ;
z[3] = z[1] shifted (-5mm, -3mm) ;
z[4] = z[1] shifted (-5mm, 3mm) ;
if PageNumber = NOfPages :
z[5] = z[1] shifted (r+5mm,-3mm) ;
z[6] = z[1] shifted (r+5mm,3mm) ;
else:
z[5] = z[1] shifted (r,-3mm) ;
z[6] = z[1] shifted (r,3mm) ;
fi ;
pickup pencircle scaled 3pt ;
p = z[1] -- z[2] ;
pickup pencircle scaled .5pt ;
for i=1 upto 15 :
draw p randomized 12pt withcolor \MPcolor{simpleslides:altcontrastcolor} ;
endfor ;
picture old ; old := currentpicture ;
clip old to z[3] -- z[4] -- z[6] -- z[5] -- cycle ;
draw old withcolor \MPcolor{simpleslides:contrastcolor} ;
StopPage ;
\stopuseMPgraphic
%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:ornament2}]
%D We want the title to placed in color.
\setupTitle
[\c!title=,
\c!author=,
\c!date=\currentdate,
\c!headstyle=,
\c!headcolor={simpleslides:contrastcolor},
\c!align=\v!middle,
\c!before=\vfill,
\c!after=\vfill,
\c!title\c!style={\switchtobodyfont[\TitleSize]},
\c!title\c!color=simpleslides:contrastcolor,
\c!title\c!align=\v!middle,
\c!author\c!style=,
\c!author\c!color={simpleslides:contrastcolor},
\c!author\c!align=\v!middle,
\c!date\c!style=,
\c!date\c!color={simpleslides:contrastcolor},
\c!date\c!align=\v!middle,
\c!before\c!title=,
\c!before\c!author=,
\c!before\c!date=,
\c!after\c!title={\blank[1*line]},
\c!after\c!author={\blank[2*line]},
\c!after\c!date=]
%D We want the slide title on the top
\setupSlideTitle
[\c!after=,
\c!alternative=layer,
\c!width=\textwidth,
\c!height=2.5cm,
\c!color=black]
%D The symbol for the first level of itemizations.
\startuseMPgraphic{simpleslides:itemize:square}
save p ; path p[] ;
save d ; numeric d ; d := 4mm ;
p[1] := unitsquare xyscaled(d,d) ;
p[2] := ulcorner p[1] -- llcorner p[1] ;
pickup pencircle scaled (d/100) ;
for i=1 upto 15 :
draw p[2] shifted (i*d/15, 0) randomized (d/12.5) withcolor \MPcolor{simpleslides:itemize:color} ;
endfor ;
\stopuseMPgraphic
\definesymbol[1][\useMPgraphic{simpleslides:itemize:square}]
\setupitemize[1][color=simpleslides:itemize:color]
\protect
\stopmodule
\endinput
|