summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/modules/mkiv/x-setups-overview.mkiv
blob: f6dff12f5f28ab7ff34a669c72d027e5f1f7cffe (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
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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
%D \module
%D   [       file=setups-overview, % x-set-12,
%D        version=2016.04.05, % 2004.10.31,
%D         remark=setupx.tex: 1998.07.20 and later,
%D          title=\CONTEXT\ Setup Definitions,
%D       subtitle=Macro Definitions,
%D         author={Hans Hagen & Wolfgang Schuster},
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

% context --interface=en --global --result=setup-en         x-setups-overview.mkiv --mode=setups:save
% context --interface=en --global --result=setup-mapping-en x-setups-overview.mkiv --mode=setups:mapping

% \enablemode[setups:save]

% \enablemode[setups:mapping]

\usemodule[setups-basics]

\unprotect

\definecolor[TitleColor][r=.375,g=.125,b=.125]
\definecolor[TitleColor][r=.125,g=.375,b=.125]
\definecolor[TitleColor][r=.125,g=.125,b=.375]
\definecolor[TitleColor][r=.375,g=.375,b=.125]
\definecolor[TitleColor][r=.375,g=.125,b=.375]
\definecolor[TitleColor][r=.125,g=.375,b=.375]

\definecolor[TitleColor][r=.25,g=.20,b=.15]
\definecolor[TitleColor][r=.25,g=.15,b=.20]
\definecolor[TitleColor][r=.20,g=.15,b=.25]
\definecolor[TitleColor][r=.20,g=.25,b=.15]
\definecolor[TitleColor][r=.15,g=.20,b=.25]
\definecolor[TitleColor][r=.15,g=.25,b=.20]

\doifelsemode {setups:traditional} {

    \startinterface english  \loadsetups[cont-en.xml] \stopinterface
    \startinterface dutch    \loadsetups[cont-nl.xml] \stopinterface
    \startinterface german   \loadsetups[cont-de.xml] \stopinterface
    \startinterface french   \loadsetups[cont-fr.xml] \stopinterface
    \startinterface italian  \loadsetups[cont-it.xml] \stopinterface
    \startinterface czech    \loadsetups[cont-cs.xml] \stopinterface
    \startinterface romanian \loadsetups[cont-ro.xml] \stopinterface

} {

    \loadsetups[i-context.xml]

}

\startinterface dutch    \definecolor[LocalColor][r=.75,g=.25,b=.25]    \stopinterface
\startinterface english  \definecolor[LocalColor][r=.25,g=.75,b=.25]    \stopinterface
\startinterface german   \definecolor[LocalColor][r=.25,g=.25,b=.75]    \stopinterface
\startinterface french   \definecolor[LocalColor][r=.75,g=.75,b=.25]    \stopinterface
\startinterface czech    \definecolor[LocalColor][r=.75,g=.25,b=.75]    \stopinterface
\startinterface italian  \definecolor[LocalColor][r=.25,g=.75,b=.75]    \stopinterface
\startinterface romanian \definecolor[LocalColor][r=.5,g=.4,b=.3]       \stopinterface
%                        \definecolor[LocalColor][r=.5,g=.3,b=.4]
%                        \definecolor[LocalColor][r=.4,g=.3,b=.5]
%                        \definecolor[LocalColor][r=.4,g=.5,b=.3]
%                        \definecolor[LocalColor][r=.3,g=.4,b=.5]
%                        \definecolor[LocalColor][r=.3,g=.5,b=.4]

\startinterface english  \definecolor[TitleColor][r=.375,g=.125,b=.125] \stopinterface
\startinterface dutch    \definecolor[TitleColor][r=.125,g=.375,b=.125] \stopinterface
\startinterface german   \definecolor[TitleColor][r=.125,g=.125,b=.375] \stopinterface
\startinterface french   \definecolor[TitleColor][r=.375,g=.375,b=.125] \stopinterface
\startinterface italian  \definecolor[TitleColor][r=.375,g=.125,b=.375] \stopinterface
\startinterface czech    \definecolor[TitleColor][r=.125,g=.375,b=.375] \stopinterface
\startinterface romanian \definecolor[TitleColor][r=.25,g=.20,b=.15]    \stopinterface
%                        \definecolor[TitleColor][r=.25,g=.15,b=.20]
%                        \definecolor[TitleColor][r=.20,g=.15,b=.25]
%                        \definecolor[TitleColor][r=.20,g=.25,b=.15]
%                        \definecolor[TitleColor][r=.15,g=.20,b=.25]
%                        \definecolor[TitleColor][r=.15,g=.25,b=.20]

\definecolor [lightgray] [s=.9]
\definecolor [darkgray]  [s=.1]

\usetypescript[palatino]

\doifelsemode {setups:mapping} {
    \setupbodyfont[palatino,8pt]
} {
    \setupbodyfont[palatino,9pt]
}

\defineoverlay
  [cover]
  [\hbox to \paperwidth{\hss\reuseMPgraphic{cover+back}}]

\defineoverlay
  [back]
  [\hbox to \paperwidth{\reuseMPgraphic{cover+back}\hss}]

\startreusableMPgraphic{cover+back}
    numeric h, w; boolean mapping ; path p, q, r ; color f, d ; pair s ;
    h := OverlayHeight ; w := 2*OverlayWidth ;
    r := unitsquare xyscaled (w,h) ;
    fill r withcolor \MPcolor{lightgray} ;
    mapping := lua.mp.processingmode("setups:mapping") ;
    if mapping :
        set_grid(w,h,w/8,w/160) ;
        pickup pensquare yscaled (w/80) ;
    else :
        set_grid(w,h,w/8,w/16) ;
        pickup pencircle scaled (w/100) ;
    fi ;
    forever :
        s := center r randomized (w,h) ;
        if new_on_grid(xpart s, ypart s) :
            d := .5[\MPcolor{LocalColor},\MPcolor{lightgray}] randomized (.5,.9) ;
            f := \MPcolor{lightgray} randomized (.5,.9) ;
            s := (dx,dy) ;
            if mapping :
                p := (-w/4,0) -- (w/4,0) ;
                p := (-w/4,0) -- origin ;
                q := origin -- ( w/4,0) ;
                draw p shifted s withcolor d ;
                draw q shifted s withcolor f ;
            else :
                p := fullsquare xyscaled(w/4,w/8) ;
                q := (-4w,ypart ulcorner p) -- .5[ulcorner p, urcorner p] -- (4w,ypart urcorner p) ;
                q := q shifted (0,-w/24) ;
                p := p randomized (w/40,w/40) ;
                q := q randomized (0,w/100) ;
                q := q cutafter  (p cutafter  point 3 of p) ;
                q := q cutbefore (p cutbefore point 3 of p) ;
                fill p shifted s withcolor f ;
                draw p shifted s withcolor d ;
                draw q shifted s withcolor d ;
            fi ;
        fi ;
        exitif grid_full ;
    endfor ;
    setbounds currentpicture to r ;
\stopreusableMPgraphic

\definelayout
  [titlepage]
  [\c!backspace=1cm,
   \c!topspace=1cm,
   \c!width=\v!middle,
   \c!height=\v!middle,
   \c!header=0pt,
   \c!footer=0pt]

\setuplayout
  [\c!backspace=2cm,
   \c!topspace=1.5cm,
   \c!bottomspace=0.5cm,
   \c!header=0cm,
   \c!footer=1cm,
   \c!width=\v!middle,
   \c!height=\v!middle]

\doifmode {setups:mapping} {
    \setuplayout
      [\c!backspace=1cm]
}

\setuppagenumbering
  [\c!location=\v!footer,
   \c!alternative=\v!doublesided]

\setupsetup
  [\c!criterium=\v!all]

\setupframedtexts
  [setuptext]
  [\c!before=\blank,
   \c!after=\blank,
   \c!frame=\v!on,
   \c!rulethickness=1pt,
   \c!framecolor=TitleColor]

\setupunderbar
  [\c!rulethickness=1pt,
   \c!rulecolor=TitleColor]

\dontcomplain

\starttext

\setupbackgrounds
  [\v!rightpage]
  [\c!background=cover]

\setuplayout
  [titlepage]

\startsetups text:commands
    \startinterface dutch    \strut commando's   \par \stopinterface
    \startinterface english  \strut commands     \par \stopinterface
    \startinterface german   \strut befehle      \par \stopinterface
    \startinterface french   \strut commandes    \par \stopinterface
    \startinterface czech    \strut p\v{r}ikazy  \par \stopinterface
    \startinterface italian  \strut comandi      \par \stopinterface
    \startinterface romanian \strut comenzile    \par \stopinterface
\stopsetups

\startsetups text:uppercase
    \startinterface dutch    NL\stopinterface
    \startinterface english  EN\stopinterface
    \startinterface german   DE\stopinterface
    \startinterface french   FR\stopinterface
    \startinterface czech    CS\stopinterface
    \startinterface italian  IT\stopinterface
    \startinterface romanian RO\stopinterface
\stopsetups

\startsetups text:lowercase
    \startinterface dutch    \strut nl / nederlands     \par \stopinterface
    \startinterface english  \strut en / english        \par \stopinterface
    \startinterface german   \strut de / deutsch        \par \stopinterface
    \startinterface french   \strut fr / fran\c{c}ais   \par \stopinterface
    \startinterface czech    \strut cs / \v{c}esk\'y    \par \stopinterface
    \startinterface italian  \strut it / italiano       \par \stopinterface
    \startinterface romanian \strut ro / rom\^{a}n\u{a} \par \stopinterface
\stopsetups

\startmakeup[\v!standard]
    \dontcomplain
    \setupalign[\v!left]
    \startcolor[TitleColor]
    \definedfont[RegularBold at 100pt]\setstrut
    \strut Con\TeX t \par
    \definedfont[RegularBold at 50pt]\setstrut
    \setups[text:commands]
    \vfill
    \definedfont[RegularBold at 150pt]\setstrut
    \setups[text:uppercase]
    \stopcolor
\stopmakeup

\setuplayout % needed ?

\setupbackgrounds
  [\v!rightpage]
  [\c!background=]

\startmakeup[\v!standard]
    \dontcomplain
    \startcolor[TitleColor]
    \definedfont[RegularBold at 100pt]\setstrut
    \setupalign[\v!left]
    \strut Con\TeX t \par
    \definedfont[RegularBold at 50pt]\setstrut
    \setups[text:commands]
    \vfill
    \definedfont[RegularBold at 24pt]\setupinterlinespace
    \setups[text:lowercase]
    \par \strut \currentdate \par
    \stopcolor
\stopmakeup

\protect

\doifelsemode {setups:mapping} {
    \placeeverysetupname
} {
    \placeeverysetup
}

\unprotect

\page[\v!yes,\v!blank,\v!right,\v!left]

\setuplayout
  [titlepage]

\setupbackgrounds
  [\v!leftpage]
  [\c!background=back]

\startmakeup[\v!standard][\c!page=]
    \dontcomplain
    \startcolor[TitleColor]
    \definedfont[RegularBold at 24pt]\setupinterlinespace
    \setupalign[\v!left]
    \vfill
    PRAGMA ADE \par
    Ridderstraat 27 \par
    8061GH Hasselt NL \par
    www.pragma-ade.com \par
    \stopcolor
\stopmakeup

\protect

\stoptext