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
|
%D \module
%D [ file=simpleslides-f-default,
%D version=2009.03.30
%D title=\CONTEXT\ Style File,
%D subtitle=Presentation Module simpleslides --- Default font setup,
%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.
\writestatus{simpleslides}{loading default font setup}
\startmodule[simpleslides-f-default]
\unprotect
\setupbodyfontenvironment[default][em=italic]
%D The fontsize is set via the \type{size}||key; it will be used in numerous
%D setup||commands. In earlier versions, I had used the \tex{processaction}
%D mechanism to define the \tex{NormalSize} and \tex{TitleSize}, but Aditya
%D rightly pointed out that this is somewhat inflexible. I now set the font
%D dimensions directly; \tex{TitleSize} is calculated from \tex{NormalSize}. I
%D do a few tests to get nice sizes.
\newdimen\simpleslidesNormalSize
\newdimen\simpleslidesTitleSize
\newdimen\simpleslidesSlideTitleSize
\simpleslidesNormalSize=\moduleparameter{simpleslides}{size}\relax
\ifdim\simpleslidesNormalSize<16pt%
\simpleslidesTitleSize=1.6\simpleslidesNormalSize\relax%
\else%
\ifdim\simpleslidesNormalSize<20pt%
\simpleslidesTitleSize=1.4142\simpleslidesNormalSize\relax%
\else%
\simpleslidesTitleSize=30pt\relax%
\fi%
\fi%
\simpleslidesSlideTitleSize = \simpleslidesTitleSize
\def\NormalSize {\the\simpleslidesNormalSize}
\def\TitleSize {\the\simpleslidesTitleSize}
\def\SlideTitleSize {\the\simpleslidesSlideTitleSize}
\beginOLDTEX
\setupencoding[default=ec]
\endOLDTEX
%D The bodyfont needs to be defined so \CONTEXT\ can calculate size switches,
%D math formulas, etc.
\starttypescript [serif] [default] [size]
\definebodyfont [14pt,15pt,16pt,17pt,20pt,25pt,\NormalSize,\TitleSize] [rm] [default]
\stoptypescript
\starttypescript [sans] [default] [size]
\definebodyfont [14pt,15pt,16pt,17pt,20pt,25pt,\NormalSize,\TitleSize] [ss] [default]
\stoptypescript
\definebodyfontenvironment[\NormalSize]
\definebodyfontenvironment[\TitleSize]
%D Setups define which font will be used. The module provides simple keywords
%D for using a small set of predefined fonts: Latin Modern, Latin Modern Sans,
%D Adventor (the TeXGyre clone of Gothic), Schola (the TeXGyre clone of
%D Schoolbook), Bonum (the TeXGyre clone of Bookman), Termes (the TeXGyre clone
%D of Times), Pagella (the TeXGyre clone of Palatino), Heros (the TeXGyre clone
%D of Helvetica), and Chancery (the TeXGyre clone of Chancery). Since the
%D definition of typescripts etc. varies according to the \TeX-engine used, we
%D have to branch the code here. This is awkward, but for the time being, I see
%D no other way.
\startsetups simpleslides:font:LatinModern
\setupbodyfont[\NormalSize]
\stopsetups
\startsetups simpleslides:font:LatinModernSans
\setupbodyfont[ss,\NormalSize]
\stopsetups
\beginLUATEX
\usetypescriptfile[type-otf] %Isn't this included by default?
\endLUATEX
\beginXETEX
\usetypescriptfile[type-otf]
\endXETEX
\beginOLDTEX
\usetypescriptfile[type-gyr]
\endOLDTEX
%AM: For all the fonts, I have used traditional names rather than TeX Gyre
%names.
%D It is difficult to write a typescript that will work with both \MKII\ and
%D \MKIV. If the sixth argument is absent, \CONTEXT\ does the right thing. When
%D the sixth argument is present, e.g., \type{rscale=1.1}, then we also need
%D \type{encoding=something} for the style to work in \MKII. We hope that \MKIV\
%D simply ignores the \type{encoding} setting.
\startsetups simpleslides:font:Bookman
\starttypescript[bookman]
\definetypeface [bookman] [rm] [serif] [bookman] [default]
\definetypeface [bookman] [ss] [sans] [adventor] [default]
\definetypeface [bookman] [tt] [mono] [modern] [default] [rscale=1.075]
\definetypeface [bookman] [mm] [math] [pagella] [default]
\stoptypescript
\usetypescript[bookman]
\setupbodyfont[bookman,\NormalSize]
\stopsetups
\beginLUATEX
%AM: Was Chorus
\startsetups simpleslides:font:Chancery
\starttypescript[serif] [chancery]
\definefontsynonym [ChanceryRoman] [file:texgyrechorus-mediumitalic] [features=default]
\stoptypescript
\starttypescript [serif] [chancery]
\definefontsynonym [Serif] [ChanceryRoman] [features=default]
\definefontsynonym [SerifItalic] [Serif]
\definefontsynonym [SerifBold] [Serif]
\definefontsynonym [SerifBoldItalic] [Serif]
\definefontsynonym [SerifCaps] [Serif]
\stoptypescript
\starttypescript [chancery]
\definetypeface [chancery] [rm] [serif] [chancery] [default]
\stoptypescript
\usetypescript[chancery]
\setupbodyfont[chancery,\NormalSize]
\stopsetups
\endLUATEX
\beginOLDTEX
\startsetups simpleslides:font:Chancery
\loadmapfile[qzc-ec.map]
\starttypescript[serif] [chancery]
\definefontsynonym [ChanceryRoman] [ec-qzcmi] [encoding=ec]
\stoptypescript
\starttypescript [serif] [chancery]
\definefontsynonym [Serif] [ChanceryRoman]
\definefontsynonym [SerifItalic] [Serif]
\definefontsynonym [SerifBold] [Serif]
\definefontsynonym [SerifBoldItalic] [Serif]
\definefontsynonym [SerifCaps] [Serif]
\stoptypescript
\starttypescript [chancery]
\definetypeface [chancery] [rm] [serif] [chancery] [encoding=ec]
\stoptypescript
\usetypescript[chancery]
\setupbodyfont[chancery,\NormalSize]
\stopsetups
\endOLDTEX
\startsetups simpleslides:font:Gothic
\starttypescript[gothic]
\definetypeface [gothic] [rm] [serif] [schola] [default]
\definetypeface [gothic] [ss] [sans] [adventor] [default]
\definetypeface [gothic] [tt] [mono] [modern] [default]
[encoding=\defaultencoding,rscale=1.075]
\definetypeface [gothic] [mm] [math] [palatino] [default]
\stoptypescript
\usetypescript[gothic]
\setupbodyfont[gothic,ss,\NormalSize]
\stopsetups
\startsetups simpleslides:font:Helvetica
\usetypescript[postscript]
\setupbodyfont[postscript,ss,\NormalSize]
\stopsetups
\beginLUATEX
%AM: Was Pagella
\startsetups simpleslides:font:Palatino
\usetypescript[palatino]
\setupbodyfont[palatino,\NormalSize]
\stopsetups
\endLUATEX
\beginOLDTEX
\startsetups simpleslides:font:Palatino
\definetypeface [palatino] [rm] [serif] [palatino] [default] [encoding=texnansi]
\definetypeface [palatino] [tt] [mono] [modern] [default] [encoding=texnansi]
\setupbodyfont[palatino,\NormalSize]
\stopsetups
\endOLDTEX
\startsetups simpleslides:font:Schoolbook
\starttypescript[schoolbook]
\definetypeface [schoolbook] [rm] [serif] [schola] [default]
\definetypeface [schoolbook] [ss] [sans] [adventor] [default]
\definetypeface [schoolbook] [tt] [mono] [modern] [default] [rscale=1.075]
\definetypeface [schoolbook] [mm] [math] [pagella] [default]
\stoptypescript
\usetypescript[schoolbook]
\setupbodyfont[schoolbook,\NormalSize]
\stopsetups
\beginLUATEX
\startsetups simpleslides:font:Times
\usetypescript[postscript]
\setupbodyfont[postscript,\NormalSize]
\stopsetups
\endLUATEX
\beginOLDTEX
\startsetups simpleslides:font:Times
\starttypescript [postscript]
\definetypeface [postscript] [rm] [serif] [times] [default]
\definetypeface [postscript] [ss] [sans] [helvetica] [default] [rscale=.9]
\definetypeface [postscript] [tt] [mono] [courier] [default] [rscale=1.1]
\definetypeface [postscript] [mm] [math] [times] [default]
\stoptypescript
\usetypescript[postscript]
\setupbodyfont[postscript,\NormalSize]
\stopsetups
\endOLDTEX
\doifsetupselse{simpleslides:font:\moduleparameter{simpleslides}{font}}
{\setups{simpleslides:font:\moduleparameter{simpleslides}{font}}}
{\setups{simpleslides:font:LatinModern}%
\message{There is no setup for
"font=\moduleparameter{simpleslides}{font}". Latin Modern Sans will be
used as a fallback}}
\protect
\stopmodule
|