summaryrefslogtreecommitdiff
path: root/macros/context/contrib/context-simpleslides/tex/context/third/simpleslides/s-simpleslides-Embossed.tex
blob: 8ed078a3e73c37b257689382ed1354e1ed607a3c (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
%D \module
%D   [      file=simpleslides-s--Embossed,
%D        version=2022.07.13,
%D          title=\CONTEXT\ Style File,
%D       subtitle=Presentation Module --- Embossed 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{embossed} style for the presentation
%D module. It is loaded at runtime.

\writestatus{simpleslides}{loading module embossed}

\startmodule[simpleslides-s-Embossed]

\unprotect
%D The page layout:

\setuplayout [width=fit,
              margin=1.3cm,
              height=fit,
              header=1cm,
              footer=1cm,
              topspace=10mm,
              backspace=2cm,
              location=singlesided]

\setuplayout [simpleslides:layout:horizontal][header=1cm]
\setuplayout [simpleslides:layout:vertical]  [header=0cm]
\setuplayout [simpleslides:layout:title]     [header=0cm]

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

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

%D We also specify the position of the slidetitle.

\setuplayer[simpleslides:layer:slidetitle]
    [x=20mm,y=2mm]

%D Next we define a generic frame

\defineframed[simpleslides:framed]
             [frame=off,offset=0pt,
              top=\vss,bottom=\vss]

\defineframed[simpleslides:framed:big]
             [frame=off,offset=0pt,strut=no,
              width=\textwidth,height=2cm,
              top=\vss,bottom=\vss]

%D We define our color scheme:

\definecolor [simpleslides:backgroundcolor]   [r=1,g=1,b=.8]
\definecolor [simpleslides:variantcolor]    [r=.6,g=.2,b=.2]
\definecolor [simpleslides:specialcolor:1] 	[r=.4,g=.2,b=.2]
\definecolor [simpleslides:specialcolor:2] 	[r=.7,g=.2,b=.2]
\definecolor [simpleslides:contrastcolor] 	[r=.2,g=.2,b=.5]
\definecolor [simpleslides:framecolor]      [s=.4]
\definecolor [simpleslides:itemize:color]     [simpleslides:contrastcolor]

%D This module write "Made with ConTeXt" in bold at the bottom. We first define
%D a font for it.

\definefontsynonym [Embossed] [name:texgyreherosbold]

\definefont[EmblemFont] [Embossed at 30pt]

%D Some strings are configurable.

\setuplabeltext [\s!en]    [simpleslidesemblem={Made with \CONTEXT},of=of]
\setuplabeltext [\s!de]    [simpleslidesemblem={Gesetzt mit \CONTEXT},of=von]

\definetextext[simpleslides:sometxt:left] {\TaspresentSometxtLeft}
\definetextext[simpleslides:sometxt:right]{\TaspresentSometxtRight}

\unexpanded\def\TaspresentSometxtLeft#1%
  {\getvalue{simpleslides:framed:big}
                       {\EmblemFont\color[simpleslides:specialcolor:1]
                       {#1}}}

\unexpanded\def\TaspresentSometxtRight#1%
  {\getvalue{simpleslides:framed:big}
                       {\EmblemFont\color[simpleslides:specialcolor:2]
                       {#1}}}

\startuseMPgraphic{simpleslides:MP:ornament}
StartPage ;

save a, b;
numeric a; a = 2cm ;
numeric b; b = 0.9cm ;

z1 = llcorner Page shifted (0,a) ;
z2 = lrcorner Page shifted (0,a) ;

save bottom ; path bottom ;
bottom = llcorner Page -- z1 -- z2 -- lrcorner Page -- cycle ;

fill Page withcolor \MPcolor{simpleslides:backgroundcolor} ;
fill bottom withcolor \MPcolor{simpleslides:variantcolor} ;

draw Page withcolor \MPcolor{simpleslides:framecolor}
          withpen pencircle scaled 12pt ;
draw topboundary bottom withcolor \MPcolor{simpleslides:framecolor}
          withpen pencircle scaled 6pt ;


draw \sometxt[simpleslides:sometxt:left]{\labeltext{simpleslidesemblem} \hfill \pagenumber\ \labeltext{of} \lastpage}
      shifted (1.96cm,0.04cm) ;

draw \sometxt[simpleslides:sometxt:right]{\labeltext{simpleslidesemblem} \hfill \pagenumber\ \labeltext{of} \lastpage}
      shifted (2cm,0) ;

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 presentation title to be in color

\setupTitle[\c!title\c!color=simpleslides:contrastcolor]

%D We also want the slide title in a framed box.

\setupSlideTitle
  [\c!after=,
   \c!alternative=layer,
   \c!color={simpleslides:contrastcolor},
   \c!width=\textwidth,
   \c!height=2cm,
   \c!align=\v!middle]


%D The symbol for the first level of itemizations.

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

\protect
\stopmodule

\endinput