1
2
3
4
5
6
7
8
9
10
11\enablemode[cgjpagecolumns]
12
13
14
15\definecolor[NoteColor] [g=1,r=.25,b=.25]
16\definecolor[WarnColor] [r=1,g=.25,b=.25]
17
18\def\todo#1
19 {\startframedtext
20 [background=color,backgroundcolor=NoteColor]
21 {\bf TODO:}#1\par
22 \stopframedtext }
23
24\def\fixme#1
25 {\startframedtext
26 [background=color,backgroundcolor=WarnColor]
27 {\bf FIXME:}#1\par
28 \stopframedtext }
29
30
31
32
33\doifmodeelse
34 {draft}
35 {\def\OnOff{on}\showframe}
36 {\def\OnOff{off}}
37
38
39
40
41\setvariables
42 [CGJournal]
43 [Title={Journal},
44 RunningTitle={Journal},
45 SubTitle={From the base set of variables},
46 Version=1.0,
47 NOFColumns=2,
48 ]
49\setupinteraction[
50 state=start,
51 color=,
52 contrastcolor=,
53 style=,
54 title=Journal,
55 author=context group,
56]
57\placebookmarks[title,chapter,subject,section][chapter]
58\setupinteractionscreen[option={doublesided,bookmark}]
59
60\startmode[onecolumn,fullwidth]
61\setvariables
62 [CGJournal]
63 [NOFColumns=1]
64\stopmode
65
66
67\usetypescriptfile[plex]
68
69
70\starttypescript [cgj]
71 \definetypeface [cgj] [rm] [serif][ibmplex] [default]
72 \definetypeface [cgj] [ss] [sans] [ibmplex] [default]
73 \definetypeface [cgj] [mm] [math] [palatino] [default]
74 \definetypeface [cgj] [tt] [mono] [ibmplex] [default] [rscale=0.9]
75\stoptypescript
76
77\starttypescript [cgjlight]
78 \definetypeface [cgjlight] [rm] [serif][ibmplex] [default]
79 \definetypeface [cgjlight] [ss] [sans] [ibmplexlight] [default]
80 \definetypeface [cgjlight] [mm] [math] [palatino] [default]
81 \definetypeface [cgjlight] [tt] [mono] [ibmplex] [default] [rscale=0.9]
82\stoptypescript
83
84\usebodyfont[cgjlight,ss,10pt]
85\setupbodyfont[cgj,ss,10pt]
86
87\definebodyfontenvironment[10pt][interlinespace=12pt]
88\definebodyfontenvironment[12pt][interlinespace=16pt]
89\definebodyfontenvironment[16pt][interlinespace=20pt]
90\setupinterlinespace[line=12pt]
91\let\sl\it
92
93
94\setupexternalfigures[directory=.Logos]
95
96
97
98\useexternalfigure
99 [Logo]
100 [cgcorplogoloopblackcmyk]
101 [width=30mm,height=19mm]
102
103\useexternalfigure
104 [LogoText]
105 [cgcorplogotextblackcmyk]
106 [width=50mm,height=35.2mm]
107
108
109\definecolor[CGlightblue][c=1,m=.15,y=0,k=0]
110\definecolor[CGdeepblue][c=1,m=.8,y=0,k=.3]
111\definecolor[CGgray][c=0,m=0,y=0,k=.1]
112
113
114\definealternativestyle
115 [Articleheading]
116 [{\switchtobodyfont[16pt,ss]\bf}]
117\definealternativestyle
118 [Articlesubheading]
119 [{\switchtobodyfont[16pt,ss]\tf}]
120\definealternativestyle
121 [Authorname]
122 [{\switchtobodyfont[12pt,ss]\it}]
123\definealternativestyle
124 [Sectionheading]
125 [{\switchtobodyfont[12pt,ss]\bf\setupinterlinespace[line=12pt]}]
126\definealternativestyle
127 [Subsectionheading]
128 [{\switchtobodyfont[cgjlight,10pt,ss]\bf\setupinterlinespace[line=10pt]}]
129\definealternativestyle
130 [IntroCopy]
131 [{\switchtobodyfont[12pt,ss]\tf}]
132\definealternativestyle
133 [PagenumberStyle]
134 [{\switchtobodyfont[cgjlight,10pt,ss]\bf}]
135
136
137\definealternativestyle
138 [BreadcrumbMd]
139 [{\switchtobodyfont[10pt,ss]\bf}]
140\definealternativestyle
141 [BreadcrumbRg]
142 [{\switchtobodyfont[cgjlight,10pt,ss]\bf}]
143\definealternativestyle
144 [BreadcrumbLt]
145 [{\switchtobodyfont[10pt,ss]\tf}]
146\definealternativestyle
147 [BreadcrumbTh]
148 [{\switchtobodyfont[cgjlight,10pt,ss]\tf}]
149
150
151\definealternativestyle
152 [Captionheading]
153 [{\switchtobodyfont[8pt,ss]\bf\setupinterlinespace[line=8pt]}]
154\definealternativestyle
155 [Captiontext]
156 [{\switchtobodyfont[8pt,ss]\tf\setupinterlinespace[line=8pt]}]
157
158
159\definealternativestyle
160 [Signaturestyle]
161 [{\switchtobodyfont[10pt,ss]\it}]
162
163
164\definealternativestyle
165 [Articlefootnotes]
166 [{\switchtobodyfont[8pt,ss]\tf}]
167
168
169
170
171
172\definealternativestyle
173 [IndexContents]
174 [{\switchtobodyfont[16pt,ss]\bf\setupinterlinespace[line=18pt]}]
175\definealternativestyle
176 [IndexArticleTitle]
177 [{\switchtobodyfont[12pt,ss]\tf\setupinterlinespace[line=20pt]}]
178\definealternativestyle
179 [IndexNumber]
180 [{\switchtobodyfont[12pt,ss]\bf\setupinterlinespace[line=20pt]}]
181\definealternativestyle
182 [IndexAuthor]
183 [{\switchtobodyfont[12pt,ss]\it\setupinterlinespace[line=20pt]}]
184
185
186
187
188
189\definealternativestyle
190 [DisplayMonospaced]
191 [{\switchtobodyfont[10pt,tt]\setupinterlinespace[line=12pt]}]
192\definealternativestyle
193 [DisplayMonospacedX]
194 [{\switchtobodyfont[8pt,tt]\setupinterlinespace[line=11pt]}]
195\definealternativestyle
196 [DisplayMonospacedS]
197 [{\switchtobodyfont[9pt,tt]\setupinterlinespace[line=12pt]}]
198
199
200\defineblank[CGblank][6pt]
201\defineblank[BigCGblank][24pt]
202\defineblank[MediumCGblank][12pt]
203
204
205\definepapersize[Journal][width=210mm,height=266mm]
206\setuppapersize[Journal][Journal]
207
208
209
210\definelayout
211 [General]
212 [topspace=20mm,
213 backspace=28mm,
214 header=5mm,
215 headerdistance=5mm,
216 footer=3mm,
217 footerdistance=5mm,
218 width=157mm,
219 height=224mm,
220 marking=on,
221 ]
222
223\definelayout
224 [Content]
225 [topspace=20mm,
226 backspace=28mm,
227 header=5mm,
228 headerdistance=5mm,
229 footer=0mm,
230 footerdistance=0mm,
231 width=157mm,
232 height=224mm,
233 margindistance=4mm,
234 rightmargin=21mm,
235 leftmargin=21mm,
236 marking=on,
237 ]
238
239\definelayout
240 [Imprint]
241 [topspace=20mm,
242 backspace=28mm,
243 header=5mm,
244 headerdistance=5mm,
245 footer=3mm,
246 footerdistance=5mm,
247 width=107mm,
248 height=224mm,
249 margindistance=4mm,
250 rightmargin=45.3mm,
251 leftmargin=21mm,
252 marking=on,
253 ]
254
255\definelayout
256 [SingleColumn]
257 [topspace=20mm,
258 backspace=55mm,
259 header=5mm,
260 headerdistance=5mm,
261 footer=3mm,
262 footerdistance=5mm,
263 width=130mm,
264 height=224mm,
265 margindistance=4mm,
266 leftmargin=48mm,
267 rightmargin=21mm,
268 marking=on,
269 ]
270
271
272\setuppagenumbering[location=,alternative=doublesided]
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287\setuphead
288 [title]
289 [style=Articleheading,
290 after={\blank[BigCGblank]},
291 page=yes]
292\setuphead
293 [part]
294 [placehead=no,
295 after=,
296 before=,
297 page=no,
298 numbercommand=,
299 expansion=yes]
300\setuphead
301 [section,subject]
302 [style=Sectionheading,
303 before={\blank[BigCGblank]},
304 after={\blank[CGblank]},
305 sectionstopper={.},
306 distance=4pt,
307 align={flushleft,nothyphenated},
308 resetnumber=yes,
309 continue=yes,
310 ]
311\setuphead
312 [subsection]
313 [style=Subsectionheading,
314 before={\blank[CGblank]},
315 after={\blank[CGblank]},
316 sectionstopper=,
317 distance=4pt,
318 align={flushleft,nothyphenated},
319 resetnumber=yes,
320 continue=yes,
321 ]
322
323
324
325\setuphead
326 [subsubject]
327 [style=Subsectionheading,
328 before={\blank[CGblank]},
329 after={\blank[CGblank]},
330 sectionstopper=,
331 ]
332
333
334
335
336\unprotect
337
338 \def\listboxproperties {\strc_lists_get_reference_attribute}
339 \def\listrenderingsetup {\the\t_lists_every_renderingtext}
340 \def\listrenderingsynchronize{\the\t_lists_every_renderingsynchronize}
341
342\protect
343
344
345
346\definelistalternative
347 [CGJ:Index]
348 [renderingsetup=CGJ:Indexheading]
349\definelistalternative
350 [CGJ:Index:Chapter]
351 [renderingsetup=CGJ:Indexheading:Chapter]
352
353
354 \startsetups[CGJ:Indexheading:Chapter]
355 \listparameter{before}
356 \vbox \listboxproperties{all} {
357 \forgetall
358 \dontleavehmode
359 \listrenderingsynchronize
360 \hbox to 15mm{
361 \bgroup
362 \useliststyleandcolor{numberstyle}{numbercolor}
363 \currentlistentrypagenumber
364 \egroup}
365
366
367
368
369
370 \bgroup
371 \useliststyleandcolor{textstyle}{textcolor}
372 \smash{\currentlistentrytitle}
373 \egroup
374
375 }
376 \par
377 \listparameter{after}
378 \stopsetups
379
380\startsetups[CGJ:Indexheading]
381 \listparameter{before}
382 \vbox \listboxproperties{all} {
383 \forgetall
384 \dontleavehmode
385 \listrenderingsynchronize
386 \hbox to 15mm{
387 \bgroup
388
389 \useliststyleandcolor{numberstyle}{numbercolor}
390 \currentlistentrypagenumber
391 \egroup}
392
393
394
395
396
397 \bgroup
398 \useliststyleandcolor{textstyle}{textcolor}
399 \currentlistentrytitle
400 \egroup
401 \par
402 }
403 \par
404 \listparameter{after}
405\stopsetups
406
407\setuplist
408 [part]
409 [before={\blank[CGblank]},
410 after=,
411 style=IndexContents,
412 numberstyle=\IndexNumber,
413 textstyle=\IndexArticleTitle,
414 prefix=no,
415 alternative=CGJ:Index:Chapter]
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444\setupcaptions
445 [suffix={.},
446 width=max,
447 headstyle=\Captionheading,
448 style=\Captiontext,
449 distance=2pt
450 ]
451
452\setupcaption[figure][way=bypart]
453\setupcaption[table] [way=bypart]
454
455
456\def\CGJBibData[#1]
457 {\getparameters
458 [CGJ]
459 [SubTitle=,
460 RunningAuthor=,
461 RunningTitle=Example,
462 Email=,
463 Address=,
464 Page=1,
465 Title={My Article},
466 Author={Example Author},
467 Period=,
468 Number=,
469 Year=,
470 TocAuthor=,
471 TocTitle=,
472 #1]
473 \doifnothing
474 {\CGJRunningTitle}
475 {\let\CGJRunningTitle\CGJTitle}
476 \doifnothing
477 {\CGJRunningAuthor}
478 {\let\CGJRunningAuthor\CGJAuthor}
479 \doifnothing
480 {\CGJTocAuthor}
481 {\let\CGJTocAuthor\CGJAuthor}
482 \doifnothing
483 {\CGJTocTitle}
484 {\let\CGJTocTitle\CGJTitle}
485 \setvariables[CGJToc][Author=\CGJTocAuthor,
486 Title=\CGJTocTitle]
487 }
488
489\def\dostartArticle[#1]{
490 \CGJBibData[#1]
491
492
493 \doifelse
494 {\getvariable{CGJournal}{NOFColumns}}
495 {1}
496 {\doifmodeelse{fullwidth}
497 {\setuplayout[General]}
498 {\setuplayout[SingleColumn]}}
499 {\setuplayout
500 [General]}
501 \doifmode{cgjpagecolumns}
502 {\definepagecolumns [cgjpagecolumns][n=\getvariable{CGJournal}{NOFColumns},distance=12pt,page=no]}
503 \bgroup
504 {\switchtobodyfont[16pt]\Articleheading\CGJTitle\par}
505 {\doifsomething{\CGJSubTitle}
506 {\switchtobodyfont[16pt]\Articlesubheading\CGJSubTitle\par}}
507 {\doifsomething
508 {\CGJAuthor}
509 {\switchtobodyfont[12pt]\Authorname \CGJAuthor}\par}
510 \part{\getvariable{CGJToc}{Title}
511 \doifsomething{\getvariable{CGJToc}{Author}}{ \emdash\ }
512 \IndexAuthor\getvariable{CGJToc}{Author}}
513 \godown[16pt]
514 \egroup
515 \hyphenpenalty1000}
516
517\def\startArticle{\dosingleempty\dostartArticle}
518
519\def\signArticle{}
520
521\def\CGJRunningTitle {}
522\def\CGJRunningAuthor {}
523\unprotect
524\def\mystoppagecolumns
525 {\page \endgroup \page_otr_command_set_vsize \page_otr_command_set_hsize \page \endgroup}
526\protect
527
528\def\stopArticle{
529 \par\signArticle
530 \doifmodeelse{cgjcolumnsets}
531 {\stopcolumnset \page}
532 {\doifmodeelse{cgjpagecolumns}
533 {\mystoppagecolumns}
534 {\doifmodeelse{cgjmixedcolumns}
535 {\stopmixedcolumns \page}
536 {\stopcolumns \page}
537 }
538 }
539 }
540
541\def\startAbstract{
542 \bgroup
543 \switchtobodyfont[12pt]
544 \IntroCopy}
545
546
547\def\finishAbstract{
548 \blank[BigCGblank]
549 \doif
550 {\getvariable{CGJournal}{NOFColumns}}
551 {>1}
552 {\setupcolumns
553 [n=\getvariable{CGJournal}{NOFColumns},
554 distance=4mm,
555 balance=yes,
556 ]
557 }
558 \doifmodeelse{cgjcolumnsets}
559 {\definecolumnset[cgjcolumnsets][n=\getvariable{CGJournal}{NOFColumns},balance=yes]
560 \startcolumnset[cgjcolumnsets]}
561 {\doifmodeelse{cgjpagecolumns}
562 {\par\ifnum \getvariable{CGJournal}{NOFColumns}>1 \hbox{}\par\fi\startpagecolumns[cgjpagecolumns]}
563 {\doifmodeelse{cgjmixedcolumns}
564 {\definemixedcolumns[cgjmixedcolumns][n=\getvariable{CGJournal}{NOFColumns},balance=yes,blank={line,fixed}]
565 \startmixedcolumns[cgjmixedcolumns]}
566 {\startcolumns[n=\getvariable{CGJournal}{NOFColumns}]}
567 }
568 }
569}
570
571\def\stopAbstract{
572 \par
573 \egroup
574 \finishAbstract}
575
576\def\noAbstract{\kern 24pt \finishAbstract}
577
578
579
580\startsetups[Header:texts]
581 \setupheadertexts
582 []
583 [{{\BreadcrumbLt\CGJRunningTitle}{\BreadcrumbTh\doifsomething{\CGJRunningAuthor}{\ > }\CGJRunningAuthor}}]
584 [{\BreadcrumbMd contextgroup}{\BreadcrumbRg\ > \getvariable{CGJournal}{RunningTitle}}]
585 []
586\stopsetups
587
588
589
590\startsetups[Footer:texts]
591 \setupfootertexts
592 []
593 [\PagenumberStyle\pagenumber]
594 [\PagenumberStyle\pagenumber]
595 []
596\stopsetups
597
598
599\setuptolerance[tolerant,stretch]
600
601
602
603\setupnotation
604 [footnote]
605 [way=bypart,
606 rule=on]
607
608
609\setupnote
610 [footnote]
611 [frame=off,
612 topframe=off ,
613 framecolor=black,
614 background=,
615 rulecolor=black,
616 rulethickness=1pt,
617 style=Articlefootnotes]
618
619
620
621\setupnarrower[middle=3mm]
622\setupnarrower[left=5mm]
623
624\definetextbackground
625 [typingbg]
626 [frame=off,
627 location=paragraph,
628 background=color,
629 backgroundcolor=CGgray,
630 width=\hsize,
631 leftoffset=2mm,
632 align=flushleft]
633
634\startsetups typing:before
635 \blank[MediumCGblank]
636 \starttextbackground[typingbg][style=DisplayMonospacedS]
637 \hfuzz=7.02pt
638 \setupnarrower[left=2mm]
639 \startnarrower[left]
640\stopsetups
641
642\startsetups typing:before:small
643 \blank[MediumCGblank]
644 \starttextbackground[typingbg][style=DisplayMonospacedX]
645 \hfuzz=6.3pt
646 \setupnarrower[left=2mm]
647 \startnarrower[left]
648\stopsetups
649
650\startsetups typing:after
651 \stopnarrower\par
652 \stoptextbackground
653 \blank[MediumCGblank]
654\stopsetups
655
656\startsetups typing:before:item
657
658 \startframedtext
659 [frame=off,
660 before=,
661 after=,
662 background=color,
663 backgroundcolor=CGgray,
664 width=\the\dimexpr\hsize10.5mm\relax,
665 offset=3mm,
666 align=flushleft,
667 style=DisplayMonospacedS,
668 ]
669 \hfuzz=7.02pt
670\stopsetups
671
672\startsetups typing:after:item
673 \stopframedtext
674
675\stopsetups
676
677\setuptyping
678 [typing]
679 [style=DisplayMonospaced,
680 before=\setups{typing:before},
681 after=\setups{typing:after}]
682
683\definetyping[smalltyping]
684\setuptyping
685 [smalltyping]
686 [style=DisplayMonospacedX,
687 before=\setups{typing:before:small},
688 after=\setups{typing:after}]
689
690
691
692\setupitemgroup
693 [itemize]
694 [each]
695 []
696 [symbol=1,
697 indentnext=no,
698 align=right,
699 before={\blank[MediumCGblank]\startnarrower[left]},
700 after={\stopnarrower\blank[MediumCGblank]},
701 inbetween={\blank[CGblank]},
702 ]
703
704\def\Href#1{\underbar{\hyphenatedurl{#1}}}
705
706\setupformulas[align=flushleft,margin=5mm]
707
708\setupquotation[before={\blank[CGblank]\switchtobodyfont[8pt]\setupinterlinespace[line=12pt]},
709 after={\par\blank[CGblank]}]
710
711\definedescription
712 [description]
713 [location=hanging,
714 width=broad,
715 before={\blank},
716 after={\blank}]
717
718\unexpanded\def\CG {\ConTeXt\ group}
719
720\usemodule[abr02]
721
722\endinput
723 |