summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/third/taspresent/t-horizontalblue.tex
blob: f586e058293342a59fdb088477592e60a7e1141f (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
%D \module
%D   [      file=t-horizontalblue,
%D        version=2007.07.17, 
%D          title=\CONTEXT\ Style File,
%D       subtitle=Presentation Module horizontalblue,
%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{horizontalblue} style for the presentation
%D module. It is loaded at runtime. The look of this style was inspired by the
%D \quotation{Copenhagen} theme of the \LaTeX\ {\tt beamer} package.

\writestatus{loading}{module horizontalblue}

\startmodule[horizontalblue]

\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:

\setupcolors[state=start]

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

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

%D The page layout:

\setuplayout [width=fit,
              margin=0cm,
              height=14.7cm,
              header=1.75cm, 
              footer=1.2cm, 
              topspace=1cm, 
              backspace=1cm,
              location=singlesided]

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

\define[1]\Slidetitle{\page\setlayer[slidetitle]%
     {\framed[frame=off,width=\textwidth,height=2.2cm,offset=0pt,top=\vss,bottom=\vss]{\switchtobodyfont[\Titlesize]\color[c]{#1}}}}

%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
\framed[frame=off,width=\textwidth,height=.75\textheight,top=\vss,bottom=\vss,align=middle]{\switchtobodyfont[\Titlesize]\color[c]{\bf \getvariable{taspresent}{title}}\switchtobodyfont[\Normalsize]\blank[line]\getvariable{taspresent}{author}\blank[2*line]\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 define our colors:

\definecolor [a]                [s=.95]
\definecolor [b] 	        [r=.58,g=.58,b=.82]
\definecolor [c]                [r=.2,g=.2,b=.73]
\definecolor [Item]             [r=.2,g=.2,b=.73]

%D We let Metapost calculate the background:

\startuniqueMPgraphic{vertical} 
StartPage ;
pair zd[] ;
path pb[] ;
fill Page withcolor \MPcolor{a} ;
z.d1 = ulcorner Page shifted (0,-5pt) ;
z.d2 = urcorner Page shifted (0,-5pt) ;
pb[1] = ulcorner Page -- z.d1 -- z.d2 -- urcorner Page -- cycle ;
z.d3 = llcorner Page shifted (0,5pt) ;
z.d4 = lrcorner Page shifted (0,5pt) ;
pb[3] = llcorner Page -- z.d3 -- z.d4 -- lrcorner Page -- cycle ;
pb[4] = pb[3] shifted (0,.75cm) ;
fill pb[1] withcolor \MPcolor{b} ;
fill pb[3] withcolor \MPcolor{b} ;
fill pb[4] withcolor \MPcolor{b} ;
StopPage ;
\stopuniqueMPgraphic 

\startuniqueMPgraphic{horizontal}
StartPage ;
pair zd[] ;
path pb[] ;
z.d1 = ulcorner Page shifted (0,-5pt) ;
z.d2 = urcorner Page shifted (0,-5pt) ;
pb[1] = ulcorner Page -- z.d1 -- z.d2 -- urcorner Page -- cycle ;
pb[2] = pb[1] shifted (0,-2cm) ;
fill pb[2] withcolor \MPcolor{b} ;
StopPage ;
\stopuniqueMPgraphic

%D We define these backgrounds as overlays:

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

\defineoverlay 
[picbackground] 
[\useMPgraphic{vertical}] 

%D We define the footer

\setupfooter[color=c,style={\switchtobodyfont[10pt]},strut=yes]
\setupfootertexts[{\framed[frame=off,height=.45cm,width=\textwidth]{\getvariable{taspresent}{title}\hfill \pagenumber \ of \lastpage}}]

%D These are shortcuts to switch backgrounds:

\define\lecback{\setuplayout[header=1.75cm]\setupfooter[state=start]\setupbackgrounds[page][background={picbackground,lecbackground,slidetitle}]}
\define\titback{\setuplayout[header=1.75cm]\setupfooter[state=stop]\setupbackgrounds[page][background={picbackground,lecbackground}]}
\define\picback{\setuplayout[header=0cm]\setupfooter[state=start]\setupbackgrounds[page][background={picbackground}]}
\define\noback{\setupbackgrounds[page][background=nobackground]}

%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 The symbol for the first level of itemizations. 

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

\protect
\stopmodule

\endinput