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\startmodule [bibles]
28
29
30
31
32
33
34
35
36
37\registerctxluafile{mbibles}{}
38
39\enableexperiments[fonts.compact]
40
41\dontcomplain
42
43\setuplayout
44 [topspace=.05ph,
45 bottomspace=.05ph,
46 backspace=.05ph,
47 header=.05ph,
48 grid=yes,
49 footer=0pt,
50 width=middle,
51 height=middle]
52
53
54
55
56
57
58
59
60
61
62
63\starttypescript [serif] [unifraktur] [name]
64 \setups[font:fallback:serif]
65 \definefontsynonym [Serif] [file:unifrakturcooklight] [features=default]
66 \definefontsynonym [SerifBold] [file:unifrakturcook] [features=default]
67\stoptypescript
68
69\starttypescript[unifraktur]
70 \definetypeface [\typescriptone] [rm] [serif] [unifraktur] [default]
71 \definetypeface [\typescriptone] [ss] [serif] [unifraktur] [default]
72 \definetypeface [\typescriptone] [mm] [math] [modern]
73 \definetypeface [\typescriptone] [tt] [mono] [modern]
74\stoptypescript
75
76\definefontfeature
77 [default]
78 [default]
79 [hz=quality,
80 protrusion=quality]
81
82\setupinterlinespace
83 [top=.72]
84
85
86
87
88\setupbodyfont[pagella,9pt]
89
90
91
92
93
94\startsetups balance:example
95 \balancetopskip \strutht
96 \balancebottomskip \strutdp
97 \balanceemergencystretch 0pt
98 \balanceadjdemerits 0
99 \balancetolerance 10
100\stopsetups
101
102\setupwhitespace
103 [none]
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\definecolumnset
174 [bible]
175 [n=2,
176 align={lesswidows,lessclubs,lessbroken,lessorphans}]
177
178\definesubcolumnset[bible][1][1]
179\definesubcolumnset[bible][2][2]
180\definesubcolumnset[bible][3][3]
181\definesubcolumnset[bible][4][4]
182
183\setuppagenumbering
184 [alternative=doublesided]
185
186\setupalign
187
188 [tolerant,granular]
189
190
191
192\newinteger\parpassdefaultone
193\parpassdefaultone\parpassidentifier{quality}
194
195\startsetups align:pass:quality
196 \parpasses 5
197 identifier \parpassdefaultone
198 tolerance 100
199 adjustspacing 0
200 emergencyfactor 0
201 hyphenation 0
202 mathpenaltyfactor 20000
203 orphanlinefactors 4 100 250 500 1000
204 toddlerpenalties 1 options 2 200 50
205 next
206 tolerance 200
207 adjustspacing 3
208 adjustspacingstep 1
209 adjustspacingshrink 5
210 adjustspacingstretch 10
211 next
212 tolerance 300
213 adjustspacing 0
214 next
215 tolerance 200
216 adjustspacing 3
217 adjustspacingshrink 20
218 adjustspacingstretch 40
219 next
220 tolerance 400
221 hyphenation 1
222 extrahyphenpenalty 200
223 adjustspacing 3
224 adjustspacingshrink 30
225 adjustspacingstretch 60
226 emergencystretch 1\bodyfontsize
227 emergencyfactor 1000
228 mathpenaltyfactor 1000
229 \relax
230\stopsetups
231
232\setupalignpass
233 [quality]
234
235
236
237
238
239\setuphead
240 [chapter,section,subsection]
241 [number=no,
242 page=,
243 continue=no,
244 expansion=yes]
245
246\setuphead
247 [chapter]
248 [before=,
249
250 after=\blank[2*line]]
251
252\setuphead
253 [section]
254 [before=,
255
256 beforesection=\blank[2*line]]
257
258\setuphead
259 [subsection]
260 [before=\blank[line]\testcolumn[5],
261 after=\blank[line,samepage],
262
263 beforesection=\blank[2*line]]
264
265\setuphead [chapter] [style=\bfd]
266\setuphead [section] [style=\bfc]
267\setuphead [subsection] [style=\bfa]
268
269
270
271
272
273
274
275
276\definehead [chapter:1] [chapter] [marking=new]
277\definehead [chapter:2] [chapter] [marking=new]
278\definehead [chapter:3] [chapter] [marking=new]
279\definehead [chapter:4] [chapter] [marking=new]
280
281\definehead [title:1] [title] [marking=new]
282\definehead [title:2] [title] [marking=new]
283\definehead [title:3] [title] [marking=new]
284\definehead [title:4] [title] [marking=new]
285
286\definehead [section:1] [section] [marking=new]
287\definehead [section:2] [section] [marking=new]
288\definehead [section:3] [section] [marking=new]
289\definehead [section:4] [section] [marking=new]
290
291\definehead [subsection:1] [subsection] [marking=new]
292\definehead [subsection:2] [subsection] [marking=new]
293\definehead [subsection:3] [subsection] [marking=new]
294\definehead [subsection:4] [subsection] [marking=new]
295
296\setupheader
297 [style=bold]
298
299\setupheadertexts
300 [pagenumber]
301
302\startsetups header:right
303 \doifelsemarking {subsection:3} {
304 \getmarking[section:3]
305 \quad
306 \getmarking[subsection:3]
307 } {
308
309 }
310 \hfill
311 \doifelsemarking {subsection:4} {
312 \getmarking[subsection:4]
313 \quad
314 \getmarking[section:4]
315 } {
316
317 }
318
319
320\stopsetups
321
322\startsetups header:left
323
324
325 \doifelsemarking {subsection:1} {
326 \getmarking[section:1]
327 \quad
328 \getmarking[subsection:1]
329 } {
330
331 }
332 \hfill
333 \doifelsemarking {subsection:2} {
334 \getmarking[subsection:2]
335 \quad
336 \getmarking[section:2]
337 } {
338
339 }
340\stopsetups
341
342\setupheadertexts
343 [] [\directsetup{header:right}]
344 [\directsetup{header:left}] []
345
346\newgluespec \VerseSkip \VerseSkip .5em plus .25em minus .125em \relax
347
348\def\BibleBook {1}
349\def\BibleChapter {1}
350\def\BibleTestament{Old}
351\def\BibleVerse {1}
352
353
354
355
356
357
358
359
360
361
362
363\startxmlsetups xml:bible
364 \page[left]
365 \startcolumnset [bible]
366
367 \localcontrolledrepeat 4 {
368 \startsubcolumnset[#I]\relax
369 \startnamedsection[title:#I][title={\BibleTitleName{\number#I}}]
370 \placelist[chapter:#I][criterium=text]
371 \stopnamedsection
372 \stopsubcolumnset
373 }
374 \flushsubcolumnsets[spread]
375 \stopcolumnset
376 \page[left]
377 \xmlflush{#1}
378\stopxmlsetups
379
380\startxmlsetups xml:testament
381 \page[left]
382 \startcolumnset [bible]
383 \xdef\BibleName{\xmlatt{#1}{name}}
384 \localcontrolledloop 1 4 1 {
385 \startsubcolumnset[#I]\relax
386 \startnamedsection[chapter:#I][title={\BibleTestamentName{\number#I}{\BibleName}}]
387 \placelist[section:#I][criterium=text]
388 \stopnamedsection
389 \stopsubcolumnset
390 }
391 \flushsubcolumnsets[spread]
392 \stopcolumnset
393 \page[left]
394 \xmlflush{#1}
395\stopxmlsetups
396
397\startxmlsetups xml:book
398 \xdef\BibleBook {\xmlatt{#1}{number}}
399 \xdef\BibleChapter{1}
400
401 \startcolumnset [bible]
402 \startsubcolumnset\relax
403 \namedsection[section:1][title={\BibleBookName{1}\BibleBook}]
404 \stopsubcolumnset
405 \localcontrolledloop 2 4 1 {
406 \startsubcolumnset[#I]\relax
407 \namedsection[section:#I][title={\BibleBookName{\number#I}\BibleBook},incrementnumber=no]
408 \stopsubcolumnset
409 }
410 \flushsubcolumnsets[spread]
411 \xmlflush{#1}
412 \stopcolumnset
413
414\stopxmlsetups
415
416\startnotmode[balanceverses]
417
418 \startxmlsetups xml:chapter
419 \xdef\BibleChapter{\xmlatt{#1}{number}}
420 \localcontrolledloop 1 4 1 {
421 \startsubcolumnset[#I]\relax
422
423 \startnamedsection[subsection:#I][title={\BibleChapterName{\number#I} \BibleChapter}]
424 \xmlfilter{bible:#I}{bibletestamentbook[@number="\BibleBook"]chapter[@number="\BibleChapter"]text()}
425
426 \stopnamedsection
427 \stopsubcolumnset
428 }
429 \flushsubcolumnsets[spread]
430 \stopxmlsetups
431
432
433
434
435
436
437
438
439 \startxmlsetups xml:verse
440 {\lefttoright\glyphweight140\relax \xmlatt{#1}{number}}
441 \hskip\VerseSkip
442 \xmlflush{#1}
443 \par
444 \stopxmlsetups
445
446\stopnotmode
447
448\startmode[balanceverses]
449
450 \startxmlsetups xml:chapter
451 \xdef\BibleChapter{\xmlatt{#1}{number}}
452 \localcontrolledloop 1 4 1 {
453 \startsubcolumnset[#I]\relax
454 \namedsection
455 [subsection:#I]
456 [title={\BibleChapterName{\number#I} \BibleChapter}]
457 \stopsubcolumnset
458 }
459 \flushsubcolumnsets[spread]
460 \xmlflush{#1}
461 \stopxmlsetups
462
463 \startxmlsetups xml:verse
464 \xdef\BibleVerse{\xmlatt{#1}{number}}
465 \localcontrolledloop 1 4 1 {
466 \startsubcolumnset[#I]\relax
467 {\lefttoright\glyphweight140\relax \BibleVerse}
468 \hskip\VerseSkip
469 \xmlfilter{bible:#I}{bibletestamentbook[@number="\BibleBook"]chapter[@number="\BibleChapter"]verse[@number="\BibleVerse"]text()}
470 \par
471 \stopsubcolumnset
472 }
473 \flushsubcolumnsets[spread]
474 \stopxmlsetups
475
476\stopmode
477
478\startxmlsetups xml:mysetups
479 \xmlsetsetup{#1}{bibletestamentbookchapterverse}{xml:*}
480\stopxmlsetups
481
482\xmlregistersetup{xml:mysetups}
483
484\startsetups bibles:parallel
485 \localcontrolledloop 1 4 1 {
486 \xmlloadonly{bible:#I}{\BibleFile{\number#I}}{}
487 }
488 \xmlflush{bible:1}
489\stopsetups
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504\stopmodule
505
506\continueifinputfile{mbibles.mkxl}
507
508\usemodule[bibles]
509
510
511
512\mainlanguage[gb]
513
514
515
516
517
518\BibleSetFile{1}{EnglishKJBible.xml}
519\BibleSetFile{2}{PolishBible.xml}
520\BibleSetFile{3}{DutchBible.xml}
521\BibleSetFile{4}{SwedishBible.xml}
522
523\setupsubcolumnset[bible:1][language=english]
524\setupsubcolumnset[bible:2][language=polish]
525\setupsubcolumnset[bible:3][language=dutch]
526\setupsubcolumnset[bible:4][language=swedish]
527
528\starttext
529 \setups[bibles:parallel]
530\stoptext
531
532
533
534
535
536
537
538
539
540 |