summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/third/taspresent/t-lightblue.tex
blob: 2a5499a413d0309a26fc34ed76557da1c76385b2 (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
%D \module
%D   [      file=t-lightblue,
%D        version=2007.07.17, 
%D          title=\CONTEXT\ Style File,
%D       subtitle=Presentation Module lightblue,
%D         author=Thomas A. Schmitz,
%D           date=\currentdate,
%D      copyright={Thomas A. Schmitz}]
%C
%C Copyright 2007 Thomas A. Schmitz.
%C This file may be distributed under the GNU General Public License v. 2.0.

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

\writestatus{loading}{module lightblue}

\startmodule[lightblue]

\unprotect

%D The taspresentation module provides a skeleton into which different styles
%D can be hooked. It uses a number of variables and macros which have to be set
%D beforehand. Some parts are optional. We begin with the necessary definitions:

%D We start colors; textcolor is white:

\setupcolors[state=start]

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

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

%D The page layout:

\setuplayout [width=fit,
              leftmargin=.5cm,
	      rightmargin=0cm,
              leftmargindistance=1.5cm,
              rightmargindistance=0pt,
              height=fit, 
              header=2.5cm, 
              footer=0cm, 
              topspace=.2cm, 
              backspace=2.6cm,
	      cutspace=2.9cm,
              bottomspace=.2cm,
	      bottomdistance=1.2cm,
              bottom=1.2cm,
              location=singlesided]

%D We define our colors:

\definecolor [Item]            [r=0,g=.2,b=.4]
\definecolor [a]               [r=.58,g=.84,b=.97]
\definecolor [b]               [r=1,g=1,b=1]
\definecolor [c]               [r=0,g=.2,b=.4]
\definecolor [d]               [r=1,g=.6,b=0]

%D The macro for typesetting the Slidetitle; this is adapted from a sample
%D document that Brooks Moses published on the wiki:

\definelayer[slidetitle]
    [width=\paperwidth,
    height=\paperheight,
    x=2mm,
    y=2mm]

\define[1]\Slidetitle{%
\page\setupheadertexts[{\framed[frame=off,background=color,backgroundcolor=c,height=1.2cm,offset=3pt,top=\vss,bottom=\vss]{\switchtobodyfont[\Titlesize]\color[d]{#1}}}]\setupheader[state=start]}

\setupbottomtexts[{\framed[frame=off,background=color,backgroundcolor=c,height=1.2cm,offset=3pt,top=\vss,bottom=\vss]{\color[d]{\pagenumber}}}]

\setupbottom[state=start]

%D The macro \tex{Maketitle} produces a default title page with the author, the
%D title of the presentation, and the date. Using it is not mandatory.

\define\Maketitle{%
\titback
\null
\vfill
\midaligned{\framed[frame=off,background=color,backgroundcolor=c,height=1.2cm,offset=3pt,top=\vss,bottom=\vss]{\switchtobodyfont[\Titlesize]\color[d]{\getvariable{taspresent}{title}}}}
\blank[2*line]
\midaligned{\color[c]{\getvariable{taspresent}{author}}}
\blank[3*line]
\midaligned{\color[c]{\currentdate}}
\vfill
\null}

%D The following parts are optional; if you don't use backgrounds and are
%D content with CONTEXT's default itemization, you don't have to set these
%D macros. 

%D We let Metapost calculate the background:

\startuniqueMPgraphic{blue1}
StartPage ;
numeric a ;
numeric b ;
numeric c ;
pair zk[] ;
path bl[] ;
a = 2cm ;
b = .7cm ;
c = .2 cm ;
z.k1 = ulcorner Page shifted (a,-a) ;
z.k2 = urcorner Page shifted (0,-a) ;
z.k3 = llcorner Page shifted (a,a) ;
z.k4 = lrcorner Page shifted (0,a) ;
z.k5 = z.k1 shifted (c,-c) ;
z.k6 = z.k2 shifted (0,-c) ;
z.k7 = z.k6 shifted (0,b) ;
z.k8 = z.k5 shifted (-b,b) ;
z.k9 = z.k3 shifted (c,c) ;
z.k10 = z.k4 shifted (0,c) ;
z.k11 = z.k10 shifted (0,-b) ;
z.k12 = z.k9 shifted (-b,-b) ;
bl[1] = urcorner Page -- ulcorner Page -- llcorner Page -- lrcorner Page -- z.k4 -- z.k3 -- z.k1 -- z.k2 -- cycle ;
bl[2] = z.k5 -- z.k6 -- z.k7 -- z.k8 -- cycle ;
bl[3] = z.k9 -- z.k10 -- z.k11 -- z.k12 -- cycle ;
bl[4] = z.k5 -- z.k9 -- z.k12 -- z.k8 --cycle ;
fill bl[1] withcolor \MPcolor{a} ;
linear_shade(bl[2],8,\MPcolor{a},\MPcolor{b}) ;
linear_shade(bl[3],6,\MPcolor{a},\MPcolor{b}) ;
linear_shade(bl[4],5,\MPcolor{a},\MPcolor{b}) ;
StopPage ;
\stopuniqueMPgraphic

%D We define these backgrounds as overlays:

\defineoverlay
[lecbackground]
[\useMPgraphic{blue1}]

%D We use combinations for placing vertical pictures and text side by side, and
%D we want a distance of 1.1 cm between both.

\setupcombinations[distance=1.1cm]

%D These are shortcuts to switch backgrounds:

\define\lecback{\setupbackgrounds[page][background={lecbackground,slidetitle}]}
\define\titback{\setupheader[state=stop]\setupbackgrounds[page][background=lecbackground]}
\define\picback{\setupheader[state=stop]\setupbackgrounds[page][background={lecbackground,slidetitle}]}
\define\noback{\setupbackgrounds[page][background=nobackground]}

\setupbackgrounds[page][background=lecbackground] 

%D The symbol for the first level of itemizations. 

\definesymbol[1][\useMPgraphic{ItSquare}]
\setupitemize[1][inmargin][color=c]

\protect
\stopmodule

\endinput