summaryrefslogtreecommitdiff
path: root/doc/context/sources/general/manuals/mk/mk-environment.tex
blob: 3472f3b047ef0b8d00a1e48e84e32154dbe0fb0c (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
% language=uk

\startenvironment mk-environment

\enablemode[dynamic-arabic] % to be checked, we loose colors

\usemodule[abr-02]

\usemodule[timing]

\useMPlibrary[dum]

\dontcomplain

\logo [METAPOST] {MetaPost}

\setupsorting[logo][style=\sc]

\startsetups ShowCollect
    \blank
    \flushtokens[demo]
    \blank
    \showtokens[demo]
    \blank
\stopsetups

\startsetups CollapseCollectA
    \blank
    \testtokens[demo]
    \flushtokens[demo]
    \blank
    \showtokens[demo]
    \blank
\stopsetups

\startsetups CollapseCollectB
    \blank
    \flushtokens[demo]
    \blank
    \testtokens[demo]
    \showtokens[demo]
    \blank
\stopsetups

% \startmode[atpragma]
%     \usetypescriptfile[type-ghz]
%     \usetypescript[optima-nova-os][texnansi]
%     \setupbodyfont[optima-os,sans,12pt]
% \stopmode

% \startnotmode[atpragma]
%     \usetypescript[palatino][ec]
%     \setupbodyfont[12pt,palatino]
% \stopnotmode

% \starttypescript [sans] [optima,optima-nova] [afm]
%     \definefontsynonym [OptimaLT]                  [lte50019] [encoding=\typescriptthree,features=complete]
%     \definefontsynonym [OptimaLT-Italic]           [lte52401] [encoding=\typescriptthree,features=complete]
%     \definefontsynonym [OptimaLT-Bold]             [lte50021] [encoding=\typescriptthree,features=complete]
%     \definefontsynonym [OptimaLT-BoldItalic]       [lte54379] [encoding=\typescriptthree,features=complete]
%     \definefontsynonym [OptimaLT-Medium]           [lte53505] [encoding=\typescriptthree,features=complete]
%     \definefontsynonym [OptimaLT-MediumItalic]     [lte53506] [encoding=\typescriptthree,features=complete]
%     \definefontsynonym [OptimaLT-DemiBold]         [lte53507] [encoding=\typescriptthree,features=complete]
%     \definefontsynonym [OptimaLT-DemiBoldItalic]   [lte53508] [encoding=\typescriptthree,features=complete]
%     \definefontsynonym [OptimaLT-Black]            [lte53509] [encoding=\typescriptthree,features=complete]
%     \definefontsynonym [OptimaLT-BlackItalic]      [lte53510] [encoding=\typescriptthree,features=complete]
%     \definefontsynonym [OptimaLT-ExtraBlack]       [lte53511] [encoding=\typescriptthree,features=complete]
%     \definefontsynonym [OptimaLT-ExtraBlackItalic] [lte53512] [encoding=\typescriptthree,features=complete]
% \stoptypescript

% \starttypescript [sans] [optima-nova-os] [name]
%     \definefontsynonym [Sans]            [OptimaNova-RegularOsF]    [features=complete]
%     \definefontsynonym [SansItalic]      [OptimaNova-ItalicOsF]     [features=complete]
%     \definefontsynonym [SansBold]        [OptimaNova-BoldOsF]       [features=complete]
%     \definefontsynonym [SansBoldItalic]  [OptimaNova-BoldItalicOsF] [features=complete]
%     \definefontsynonym [SansSlanted]     [OptimaNova-ItalicOsF]     [features=complete]
%     \definefontsynonym [SansBoldSlanted] [OptimaNova-BoldItalicOsF] [features=complete]
%     \definefontsynonym [SansCaps]        [OptimaNova-RegularSC]     [features=complete]
% \stoptypescript

\starttypescript[optima-nova-os]
    \definetypeface[optima-os][ss][sans][optima-nova-os] [default][features=complete]
    \definetypeface[optima-os][rm][sans][optima-nova-os] [default][features=complete]
    \definetypeface[optima-os][tt][mono][latin-modern]   [default][features=default,rscale=1.1]
    \definetypeface[optima-os][mm][math][latin-modern]   [default][features=default,rscale=1.1]
    \quittypescriptscanning
\stoptypescript

% \startmode[atpragma]
%     \usetypescriptfile[type-ghz]
%     \usetypescript[optima-nova-os][afm]
%     \setupbodyfont[optima-os,sans,12pt]
% \stopmode

\startmode[atpragma]
    \usetypescriptfile[type-hgz]
    \usetypescript[optima-nova-os] % [afm]
    \setupbodyfont[optima-os,sans,12pt]
\stopmode

\startnotmode[atpragma]
    \startsetups normalbodyfont
        \setupbodyfont[12pt,palatino]
    \stopsetups
\stopnotmode

\setups[normalbodyfont]

\definelayer
  [page]
  [width=\paperwidth,
   height=\paperheight]

\setuplayout
  [location=middle,
   marking=on,
   width=middle,
   height=middle,
   footer=1.5cm,
   header=1.5cm,
   topspace=1.5cm]

\startmode[book]

%     \definepapersize
%       [mine]
%       [width=21cm,
%        height=24cm]

%     \setuppapersize
%       [mine]
%       [mine] % [oversized]

%     \setuplayout % width = 15cm
%       [topspace=1.25cm,
%        backspace=2.5cm,
%        cutspace=3.5cm]

%     \setuplayout
%         [scale=.80]

    \setuplayout
      [marking=on,
       scale=\luaexpr{24/28}]

\stopmode

\stopmode

\setupcolors
  [state=start]

\setupwhitespace
  [big]

\setuplist[chapter,section][width=5em]

\definecolor[mktransparentred]   [r=.8,a=1,t=.5]
\definecolor[mktransparentgreen] [g=.8,a=1,t=.5]
\definecolor[mktransparentblue]  [b=.8,a=1,t=.5]
\definecolor[mktransparentyellow][r=.8,g=.8,a=1,t=.5]
\definecolor[mktransparentgray]  [s=.8,a=1,t=.5]

\definecolor[mkcolor]            [r=.8]
\definecolor[mkred]              [r=.8]
\definecolor[mkgreen]            [g=.8]
\definecolor[mkblue]             [b=.8]
\definecolor[mktransparent]      [mktransparentred]

\setuptype
  [color=mkcolor]

\setuptyping
  [color=mkcolor]

\definestartstop
  [notabene]
  [color=mkcolor]

\setupitemgroup
  [itemize]
  [each]
  [color=mkcolor,headcolor=mkcolor]

\setuppagenumbering
  [alternative=doublesided,
   location=]

\setupsection
  [chapter]
  [conversion=R]

\setupsection
  [section]
  [conversion=R]

\setupcaptions
  [conversion=R]

\setupfootertexts
  []
  [{\getmarking[chapter]\quad\pagenumber}]
  [{\pagenumber\quad\getmarking[chapter]}]
  []

\setuphead[chapter][style=\bfc,color=mkcolor]
\setuphead[section][style=\bfa,color=mkcolor]

\stopenvironment