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\newif\ifMapsInColumns
39
40\doifmode {asym} {\enablemode[onecolumn]}
41\doifmode {single} {\enablemode[asym,onecolumn]}
42\doifnotmode{onecolumn}{\MapsInColumnstrue}
43
44
45
46
47
48\definebodyfontenvironment [7pt][
49 interlinespace=8pt,
50 big=8pt,
51 small=6pt
52]
53
54\definebodyfontenvironment [8pt][
55 interlinespace=9pt,
56 big=9pt,
57 small=7pt,
58 x=6pt
59]
60
61\definebodyfontenvironment [9pt][
62 interlinespace=10pt,
63 big=10pt,
64 small=8pt,
65 x=7pt,
66 script=6pt
67]
68
69\definebodyfontenvironment [10pt][
70 interlinespace=11pt,
71 big=11pt,
72 a=11pt,
73 small=9pt,
74 x=8pt,
75 script=7pt
76]
77
78\definebodyfontenvironment [11pt][
79 interlinespace=11pt,
80 big=11pt,
81 small=10pt,
82 x=9pt,
83 script=8pt
84]
85
86\definebodyfontenvironment [14pt][
87 interlinespace=14pt,
88 big=18pt,
89 small=11pt,
90 x=10pt
91]
92
93\definebodyfontenvironment [18pt][
94 interlinespace=18pt,
95 big=24pt,
96 small=14pt,
97 x=10pt
98]
99
100\definebodyfontenvironment [24pt][
101 interlinespace=24pt,
102 big=24pt,
103 small=18pt,
104 x=11pt
105]
106
107
108
109\definefontfeature[mapsdef][default][mode=node,onum=yes,lnum=no]
110
111\starttypescript [serif] [libertine] [name]
112 \setups[font:fallback:serif]
113 \definefontsynonym [Serif] [file:LinLibertineR.otf] [features=mapsdef]
114 \definefontsynonym [SerifItalic] [file:LinLibertineRI.otf] [features=mapsdef]
115 \definefontsynonym [SerifSlanted] [file:LinLibertineRI.otf] [features=mapsdef]
116 \definefontsynonym [SerifBold] [file:LinLibertineRB.otf] [features=mapsdef]
117 \definefontsynonym [SerifBoldItalic] [file:LinLibertineRBI.otf] [features=mapsdef]
118 \definefontsynonym [SerifBoldSlanted] [file:LinLibertineRBI.otf] [features=mapsdef]
119 \definefontsynonym [SerifCaps] [file:LinLibertineR.otf] [features=smallcaps]
120\stoptypescript
121
122\starttypescript [maps]
123 \definetypeface [maps] [rm] [serif] [libertine] [default]
124 \definetypeface [maps] [mm] [math] [euler] [default] [rscale=0.9]
125 \definetypeface [maps] [tt] [mono] [modern] [default]
126 \definetypeface [maps] [ss] [sans] [modern] [default] [rscale=0.95]
127\stoptypescript
128
129\setupbodyfont[maps,10pt,rm]
130
131\setupinterlinespace[line=11pt]
132
133
134\setupfontsynonym[handling=pure]
135
136\setupalign[hanging]
137
138
139
140
141\setupindenting [yes,next,11pt]
142
143
144
145
146\definepapersize
147 [maps]
148 [width=21cm,height=26.5cm]
149
150\setuppapersize
151 [maps][maps]
152
153\setuplayout
154 [topspace=40pt,
155 height=688pt,
156 header=33pt,
157 margin=106pt,
158 leftmargindistance=11pt,
159 rightmargindistance=11pt]
160
161\setupblank[5.5pt]
162
163\setuppagenumbering [location=]
164
165\definetyping [widetyping]
166
167\setupheader [style=\ss]
168\setupfooter [style=\ss]
169
170\def\AuHead{\MapsRunningAuthor}
171\def\TiHead{\ifnum\pageno=\MapsPage \relax \MapsRunningAuthor \else \MapsRunningTitle\fi}
172
173
174
175
176
177\setupheads
178 [number=no,
179 align=flushleft]
180
181\unexpanded\def\hfonti {\ssbfa}
182\unexpanded\def\hfontii {\ssbf}
183\unexpanded\def\hfontiii {\rm\bi}
184\unexpanded\def\runin #1{#1.}
185
186\setuphead [section,subject]
187 [style=\hfonti,
188 before={\blank[line]},
189 after={\blank[halfline]}]
190\setuphead [subsection,subsubject]
191 [style=\hfontii,
192 before={\blank[halfline]},
193 after={}]
194\setuphead [subsubsection,subsubsubject]
195 [style=\hfontiii,
196 deeptextcommand=\runin,
197 distance=6pt,
198 alternative=text,
199 before={\blank[halfline]}]
200
201\startmode[nosubsub]
202\setuphead [section,subject]
203 [style=\hfontii,
204 before={\blank[line]},
205 after={}]
206\setuphead [subsection,subsubject]
207 [style=\hfontiii,
208 deeptextcommand=\runin,
209 alternative=text,
210 distance=6pt,
211 before={\blank[halfline]}]
212\stopmode
213
214
215
216
217
218\setupfloats
219 [location=left,
220 before={\ss}]
221
222\setupcaptions
223 [align=flushleft,
224 headstyle={\ssbf},
225 style={\ssx},
226 suffix=.,
227 distance=6pt,
228 inbetween={\blank[halfline]}]
229
230
231
232
233\setupitemize
234 [1]
235 [symbol=8]
236
237\setupitemize
238 [each]
239 [before={\blank[line]},
240 after={\blank[line]},
241 inbetween=,
242 indentnext=no,
243 width=12pt,
244 distance=0pt]
245
246
247
248
249\definecomplexorsimpleempty\startouteritemize
250
251\def\complexstartouteritemize[#1]
252 {\begingroup
253 \setupitemize[width=0pt,inbetween={\blank},before={\blank},after={\blank}]
254 \startitemize[#1]
255 \let\doitem\item
256 \def\item{\doitem[]\hbox{}\kern12pt\rightskip=0pt}}
257
258\def\stopouteritemize
259 {\stopitemize\endgroup}
260
261\definedescription
262 [description]
263 [alternative=hanging,width=fit]
264
265
266
267
268\setuptyping
269 [style={\switchtobodyfont[small,tt]},
270 option=none,
271 indentnext=no]
272
273
274
275
276
277
278\setupnotation
279 [footnote]
280 [margin=0cm,
281 before={},
282 after={},
283 way=bypage,
284 number=no]
285
286\setupnote
287 [footnote]
288 [location=page,
289 spacebefore=,
290 before=,
291 after=]
292
293\unexpanded\def\thanks#1{\xdef\MapsThanks{#1}*}
294
295\setuptabulate
296 [before=\blank,
297 inner=\ss,
298 after=\blank]
299
300\def\startIntroEntry#1
301 {\bgroup
302 \setupalign[right]
303 \setuptolerance[verytolerant]
304 \setupindenting[no]
305 \noindent
306 \switchtobodyfont[9pt]
307 \setuplocalinterlinespace[line=10pt]
308 \parfillskip 0pt plus 1fill
309 \rightskip6pt plus 1fill
310 \ss
311 \bgroup\bf #1\par\egroup
312 \ignorespaces }
313
314\def\stopIntroEntry
315 {\par\egroup
316 \blank[line] }
317
318\def\defineIntroEntry[#1][#2]
319 {\setvalue{start#1}{\startIntroEntry{#2}}
320 \setvalue {stop#1}{\stopIntroEntry}}
321
322\defineIntroEntry[Keywords][Keywords]
323\defineIntroEntry[Abstract][Abstract]
324
325
326\def\MapsBibData[#1]
327 {\getparameters [Maps]
328 [SubTitle=,
329 RunningAuthor=,
330 RunningTitle=,
331 Email=,
332 Address=,
333 Page=1,
334 Title=,
335 Author=,
336 Period=,
337 Number=,
338 Year=,
339 SkipHeader=,
340 SkipFooter=,
341 Abstract=,
342 Keywords=,
343 Thanks=,
344 #1]
345 \doifnothing{\MapsPeriod}
346 {\ifnum \normalmonth<6 \gdef\MapsPeriod{VOORJAAR}\else \gdef\MapsPeriod{NAJAAR}\fi}
347 \doifinstringelse{oorjaar}{\MapsPeriod}{\gdef\MapsPeriod{VOORJAAR}}{}
348 \doifinstringelse{pring}{\MapsPeriod}{\gdef\MapsPeriod{VOORJAAR}}{}
349 \doifinstringelse{ajaar}{\MapsPeriod}{\gdef\MapsPeriod{NAJAAR}}{}
350 \doifinstringelse{utumn}{\MapsPeriod}{\gdef\MapsPeriod{NAJAAR}}{}
351 \doifnothing{\MapsYear}{\gdef\MapsYear{\the\year}}
352 \doifnothing{\MapsNumber}
353 {\ifnum \normalmonth<6
354 \xdef\MapsNumber{\the\numexpr (\the\year1990)*2\relax}
355 \else
356 \xdef\MapsNumber{\the\numexpr (\the\year1990)*21\relax}
357 \fi }
358 \doifnothing\MapsRunningAuthor
359 {\global\let\MapsRunningAuthor\MapsAuthor}
360 \doifnothing\MapsRunningTitle
361 {\global\let\MapsRunningTitle\MapsTitle}}
362
363\def\doarticleheader
364 {\startbaselinecorrection
365 \bgroup
366 \hsize= 457pt
367 \enforced\let\\\crlf
368 \blank[35pt,force]
369 \switchtobodyfont[24pt]
370 \startalign[flushleft,verytolerant,extremestretch]
371 {\noindent\bf\language=1\MapsTitle\par}
372 \ifx\MapsSubTitle\empty
373 \blank[line]
374 \else
375 \bgroup
376 \blank[12pt]
377 \switchtobodyfont[14pt]\noindent \it
378 \advance \rightskip 0pt plus 2em
379 \MapsSubTitle\par
380 \egroup
381 \blank[line]
382 \fi
383 \stopalign
384 \egroup
385 \setupalign[width]
386 \switchtobodyfont[rm,10pt]
387 \stopbaselinecorrection }
388
389\newif\ifintroentries
390
391\def\dostartArticle[#1]
392 {\MapsBibData[#1]
393 \pageno=\MapsPage
394 \setnumber[realpage][\MapsPage]
395 \setnumber[userpage][\MapsPage]
396 \doifnothing{\MapsSkipHeader}{\doarticleheader}
397 \ifMapsInColumns
398 \startcolumns\hyphenpenalty1000
399 \else
400 \clubpenalty10000
401 \widowpenalty10000
402 \fi
403 \introentriesfalse
404 \startbaselinecorrection
405 \doifsomething{\MapsAbstract}{\startAbstract \MapsAbstract \stopAbstract \introentriestrue }
406 \doifsomething{\MapsKeywords}{\startKeywords \MapsKeywords \stopKeywords \introentriestrue }
407 \stopbaselinecorrection
408 \ifintroentries
409 \blank[2*line]
410 \fi
411 \doifsomething\MapsThanks
412 {\expanded{\footnote[thanks]{*\quad\strut\MapsThanks}}
413 \kern 22pt }
414 \let\footnote\endnote }
415
416\def\startArticle
417 {\dosingleempty\dostartArticle}
418
419\def\signArticle
420 {\doifnothing
421 {\MapsSkipFooter}
422 {\blank[line]
423 \enforced\let\\\crlf
424 \noindent\switchtobodyfont[ss,9pt]
425 \MapsAuthor
426 \doifsomething{\MapsAddress}{\\\MapsAddress}
427 \doifsomething{\MapsEmail}{\\\MapsEmail}}
428 \switchtobodyfont[10pt]
429 \def\signArticle{}}
430
431
432
433\def\footnum#1{#1.}
434
435\setupnotation
436 [endnote]
437 [alternative=serried,
438 style={\switchtobodyfont[9pt]},
439 margin=0cm,
440 width=12pt,
441 before=,
442 after=,
443 margin=0cm,
444 numbercommand=\footnum]
445
446\setupnote
447 [endnote]
448 [location=none]
449
450\def\endnotessubjectname{Footnotes}
451\def\endnotesubjectname{Footnote}
452
453\def\stopArticle
454 {\ifcase\rawcountervalue[endnote]\relax
455 \or
456 \startsubject[title=\endnotesubjectname]
457 \placenotes[endnote]
458 \stopsubject
459 \else
460 \startsubject[title=\endnotessubjectname]
461 \placenotes[endnote]
462 \stopsubject
463 \fi
464 \par\signArticle
465 \ifMapsInColumns \stopcolumns \fi
466 \page }
467
468\installpagebreakmethod{last}{}
469
470
471
472\unexpanded\def\XeTeX
473 {X\lower.5ex\hbox{\kern.1em\mirror{E}}\kern.1667em\TeX}
474
475\unexpanded\def\LaTeX
476 {{\setbox\scratchbox\hbox{L}
477 \scratchdimen\ht\scratchbox
478 \setbox\scratchbox\hbox{\switchtobodyfont[script]A}
479 L\kern.55\wd\scratchbox
480 \raise\scratchdimen\hbox{\lower\ht\scratchbox\copy\scratchbox}
481 \kern.2\wd\scratchbox\TeX}}
482
483\unexpanded\def\CONTEXT {Con{\TeX}t}
484\unexpanded\def\ConTeXt {Con{\TeX}t}
485\unexpanded\def\METAFONT {Metafont}
486\unexpanded\def\METAPOST {MetaPost}
487\unexpanded\def\POSTSCRIPT{PostScript}
488
489\unexpanded\def\acro#1{{\switchtobodyfont[9pt]#1}}
490
491\definefontfeature[smallcapitals] [smcp=yes]
492\def\sc{\addff{smallcapitals}}
493
494\def\NTG{{\sc ntg}}
495\def\TUG{{\sc tug}}
496
497
498
499\setuplayout
500 [width=457pt]
501
502\setupcolumns
503 [n=2,tolerance=verytolerant,distance=11pt]
504
505\setuplayout
506 [backspace=70.3pt,grid=yes]
507
508\setuppagenumbering
509 [alternative=doublesided]
510
511\setuptyping
512 [blank=halfline]
513
514\setupheadertexts
515 [\TiHead]
516 [{\cap{\MapsPeriod\ \MapsYear}\quad\bf \pagenumber\hskip30pt\hbox{}}]
517 [{\hbox{}\hskip30pt{\bf \pagenumber}\quad \cap {maps\ \MapsNumber}}]
518 [\AuHead]
519
520\setupfootertexts
521
522\startmode[onecolumn]
523
524\setuplayout[width=340pt]
525
526\startmode[asym]
527 \setuppagenumbering
528 [alternative={singlesided,doublesided}]
529 \doifmodeelse
530 {single}
531 {\setupheadertexts
532 [\TiHead]
533 [{\cap{\MapsPeriod\ \MapsYear}\quad\bf \pagenumber\hskip147pt\hbox{}}]
534 [{\hbox{}\hskip30pt{\bf \pagenumber}\quad \cap {maps\ \MapsNumber}}]
535 [\AuHead\hskip110pt]}
536 {\setuptyping
537 [widetyping]
538 [oddmargin=117pt]
539 \setuplayout[backspace=187.3pt]
540 \setupheadertexts
541 [{\hbox{}\hskip117pt\TiHead}]
542 [{\cap{\MapsPeriod\ \MapsYear}\quad\bf \pagenumber\hskip30pt\hbox{}}]
543 [{\hbox{}\hskip147pt{\bf \pagenumber}\quad \cap {maps\ \MapsNumber}}]
544 [\AuHead]}
545\stopmode
546
547\startnotmode[asym]
548 \setupheadertexts
549 [\TiHead]
550 [{\cap{\MapsPeriod\ \MapsYear}\quad\bf \pagenumber\hskip147pt\hbox{}}]
551 [{\hbox{}\hskip147pt{\bf \pagenumber}\quad \cap {maps\ \MapsNumber}}]
552 [\AuHead]
553\stopnotmode
554
555\stopmode
556
557
558\def\fulltextwidth{457pt}
559
560\def\startfullwidth
561 {\par\begingroup
562 \doifmode
563 {onecolumn}
564 {\hsize=\fulltextwidth
565 \doifmodeelse
566 {asym}
567 {\doifmodeelse{single}{\textwidth=\fulltextwidth }{\leftskip117pt }}
568 {\ifodd\pageno \else \leftskip117pt \hsize=340pt \fi }}}
569
570\def\stopfullwidth
571 {\par\endgroup}
572
573
574
575\setupalign
576 [tolerant,fixed]
577
578\continueifinputfile{smaps.mkiv}
579
580
581
582
583
584
585
586
587\usebtxdataset[samplmaps.bib]
588\usebtxdefinitions[apa]
589
590\starttext
591\startArticle[
592
593 Title={An example document for the Maps module, demonstrating its
594 various features\thanks{Thanks should be short}
595 },
596 RunningTitle=An example document,
597 SubTitle=with an optional subtitle,
598
599 Author=Anton Ulrich Thor,
600 Email=a.u.thor@uu.am.dw,
601 Address=Institute of Indefinite Studies\\
602 Unseen University\\
603 Ankh Morpork,
604
605 Period=voorjaar,
606 Number=36,
607 Year=2008,
608 Page=1,
609
610 Language=english,
611
612 Abstract={
613This is a sample input file for the Maps module version 2.0,
614which mimics the associated \LaTeX\ class file.
615It demonstrates various standard and nonstandard features.
616\crlf
617Use of the abstract and keywords environments is highly appreciated.},
618 Keywords={Maps, \ConTeXt\ module, sample}]
619
620\startsection[title=Ordinary Text]
621
622The ends of words and sentences are marked
623 by spaces. It doesnt matter how many
624spaces you type; one is as good as 100. The
625end of a line counts as a space.
626
627One or more blank lines denote the end
628of a paragraph.
629
630Footnotes\footnote{This is an example of an endnote.} are converted to
631endnotes\endnote{This is another one, with more text to it, to see how
632it will wrap to the next line.}. These will automatically be typeset at
633the end of the article. The title of the notes section is defined by the
634command \type{\endnotessubjectname} (for multiple notes) or
635\type{\endnotesubjectname} (in case of a single note).
636
637\stopsection
638
639\startsection[title=Fonts]
640The Maps uses Linux Libertine for main text,
641with Latin Modern Sans and Mono, and Euler for math. The Linux Libertine
642OpenType fonts are part of \TeX\ Live. If they are not found,
643Latin Modern Serif fallbacks will be used.
644
645\stopsection
646
647\startsection[title=Sectioning]
648
649The maps module defaults to unnumbered sections. If you really must,
650you can restore section numbering with \emph{e.g.}
651\type{\setupheads[number=yes]}
652
653\startsubsection[title=Subsection]
654This is a secondlevel section header. You can go down one more
655level:
656
657
658
659\startsubsubsection[title=A subsubsection]
660This is supposed to be a runin header, so make sure you start the
661text right after \type{\startsubsubsection}.
662
663\stopsubsubsection
664
665\startsubsubsection[title=Tip]
666If you only need one or two levels of header, then you can get a
667better layout with the \type{nosubsub} document option.
668The Maps editors may decide to turn on this option for you.
669\stopsubsubsection
670
671\stopsubsection
672
673\stopsection
674
675\startsection[title=Lists]
676
677Another frequentlydisplayed structure is a list.
678The following is an example of an \emph{itemized}
679list.
680\startitemize
681 \item This is the first item of an itemized list.
682 Each item in the list is marked with a \quote{tick}.
683 \item This is the second item of the list. It
684 contains another list nested inside it. The inner
685 list is an \emph{enumerated} list.
686
687 \startitemize[n]
688 \startitem This is the first item of an enumerated
689 list that is nested within the itemized list.
690 \stopitem
691 \item This is the second item of the inner list.
692 \ConTeXt\ allows you to nest lists deeper than
693 you really should.
694 \stopitem
695 \stopitemize
696
697 \noindent
698 This is the rest of the second item of the outer
699 list. It is no more interesting than any other
700 part of the item.
701 \startitem This is the third item of the list. \stopitem
702\stopitemize
703
704In a twocolumn layout, protracted indenting doesnt look very
705good. Therefore, the Maps module provides an \type{outeritemize}
706environment:
707
708\startouteritemize
709\item This is the first item of a nonindented itemized list,
710 produced with the \mono{outeritemize} environment.
711\item This is the second item.
712\stopouteritemize
713
714Now an enumerated version:
715
716\startouteritemize[n]
717\item This is the first item of a nonindented enumerated list,
718 produced with the \mono{outeritemize} environment.
719\item This is the second item.
720\stopouteritemize
721
722There is also a definition for description lists:
723
724\startdescription{cow}
725A milkproducing animal that grazes grass and has multiple stomachs
726\stopdescription
727\startdescription{kangoroo}
728An Australian hopping animal
729\stopdescription
730
731\stopsection
732
733\startsection[title=Wide typesetting in singlecolumn layout]
734
735For both singlecolumn layouts, there are environments \type{fullwidth} and
736\type{widetyping} which typeset their content across the full page,
737including most of the wide margin.
738
739\startfullwidth
740x x x x x x x x x x x x x x x x x x x x x
741x x x x x x x x x x x x x x x x x x x x x
742x x x x x x x x x x x x x x x x x x x x x
743x x x x x x x x x x x x x x x x x x x x x
744\stopfullwidth
745
746\startwidetyping
747{}\/$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
748\stopwidetyping
749The implementation of \type{fullwidth} is rather simplistic and
750may easily break, in which case more sophisticated hackery will be
751needed.
752
753\stopsection
754
755\startsection[title=Assembling your submission]
756
757Please check whether all nonstandard modules and all
758nonstandard fonts are included. We do have a current \TeX{} Live but,
759although we do have access to CTAN, finding the right stuff by
760name can occasionally be a challenge.
761
762Avoid jpeg compression for screenshots. Conversion to pdf may
763sometimes result in jpeg compression as well. Use \emph{e.g.} png
764format instead.
765
766Finally, a pdf of your article is appreciated. This way, we can
767check more reliably whether your article compiles
768correctly on our own systems.
769
770\stopsection
771\startsection[title=References]
772
773If you have references, use whatever suits you. A few sample references:
774see \cite[knuth], or \cite[lamport].
775
776\stopsection
777
778\startsection[title=References]
779 \placelistofpublications
780\stopsection
781\stopArticle
782\stoptext
783
784 |