summaryrefslogtreecommitdiff
path: root/macros/context/contrib/context-simpleslides/tex/context/third/simpleslides/s-simpleslides-ThickStripes.tex
blob: 52b86f7da23cffce7ff4eb14e6442615fd9c0e04 (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
%D \module
%D   [      file=simpleslides-s-ThickStripes,
%D        version=2009.03.30
%D          title=\CONTEXT\ Style File,
%D       subtitle=Presentation Module --- Thick Stripes style,
%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{ThickStripes} style for the presentation
%D module. It is loaded at runtime. The theme for this style is inspired by the
%D \quotation{Berkeley} theme of the \LaTeX\ Beamer package.

\writestatus{simpleslides}{loading Thick Stripes style}

\startmodule[simpleslides-s-ThickStripes]

\unprotect

%D First, we change the page layout to have more space on the top and the
%D left.

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

%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=29mm]

%D We define our color scheme

\definecolor [simpleslides:backgroundcolor]   [s=.9]
\definecolor [simpleslides:variantcolor]      [r=.15,g=.15,b=.525]
\definecolor [simpleslides:contrastcolor]     [r=.2,g=.2,b=.7]
\definecolor [simpleslides:altcontrastcolor] [s=.4]
\definecolor [simpleslides:itemize:color]     [simpleslides:backgroundcolor]


%D We use \METAPOST to draw the background. The background consists of two
%D stripes and a "clock" at the bottom.

\startuseMPgraphic{simpleslides:MP:title}
StartPage ;
fill Page withcolor \MPcolor{simpleslides:backgroundcolor} ;
StopPage ;
\stopuseMPgraphic

\startuseMPgraphic{simpleslides:MP:ornament}
StartPage ;
save a, b,  theta;
numeric a, b,  theta ;

save t ;
pair  t[] ;

a = 2.5cm ;
b = 1.5cm ;

z[1] = ulcorner Page shifted (a,0) ;
z[2] = llcorner Page shifted (a,0) ;
z[3] = ulcorner Page shifted (0,-a) ;
z[4] = urcorner Page shifted (0,-a) ;
z[5] = ulcorner Page shifted (a,-a) ;

save p ;
path p[] ;
p[1] = ulcorner Page -- z[1] -- z[2] -- llcorner Page -- cycle ;
p[2] = ulcorner Page -- urcorner Page -- z[4] -- z[3] -- cycle ;
p[3] = ulcorner Page -- z[1] -- z[5] -- z[3] -- cycle ;

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

pickup pencircle scaled 5pt ;

if NOfPages > 1:
	theta = (PageNumber - 1)/(NOfPages - 1) ;
	p[4] = unitcircle scaled b rotated 90 shifted (b + ((a-b)/2),(a-b)/2) ;
	fill p[4] withcolor \MPcolor{simpleslides:backgroundcolor} ;
	t[0] = center p[4] ;
	t[1] = point 1 along p[4] ;
	t[2] = point -theta along p[4] ;
	t[3] = point -theta/2 along p[4] ;
	p[5] = t[0] -- t[1] .. t[3] .. t[2] -- cycle ;
	fill p[5] withcolor \MPcolor{simpleslides:altcontrastcolor} ;
fi ;
StopPage ;
\stopuseMPgraphic

%D We define these backgrounds as overlays:

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

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

%D We want the title to placed in color. 

\setupTitle[\c!headcolor={simpleslides:contrastcolor}]

%D We want the slide title on the top

\setupSlideTitle
   [\c!after=,
    \c!alternative=layer,
    \c!width=\textwidth,
    \c!height=2.5cm,
    \c!color=simpleslides:backgroundcolor]

%D The symbol for the first level of itemizations. 

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

\protect
\stopmodule

\endinput