diff options
Diffstat (limited to 'default.context')
-rw-r--r-- | default.context | 143 |
1 files changed, 143 insertions, 0 deletions
diff --git a/default.context b/default.context new file mode 100644 index 0000000..e17d85b --- /dev/null +++ b/default.context | |||
@@ -0,0 +1,143 @@ | |||
1 | $if(context-lang)$ | ||
2 | \mainlanguage[$context-lang$] | ||
3 | $endif$ | ||
4 | $if(context-dir)$ | ||
5 | \setupalign[$context-dir$] | ||
6 | \setupdirections[bidi=on,method=two] | ||
7 | $endif$ | ||
8 | % Enable hyperlinks | ||
9 | \setupinteraction | ||
10 | [state=start, | ||
11 | $if(title)$ | ||
12 | title={$title$}, | ||
13 | $endif$ | ||
14 | $if(subtitle)$ | ||
15 | subtitle={$subtitle$}, | ||
16 | $endif$ | ||
17 | $if(author)$ | ||
18 | author={$for(author)$$author$$sep$; $endfor$}, | ||
19 | $endif$ | ||
20 | $if(keywords)$ | ||
21 | keyword={$for(keywords)$$keywords$$sep$; $endfor$}, | ||
22 | $endif$ | ||
23 | style=$linkstyle$, | ||
24 | color=$linkcolor$, | ||
25 | contrastcolor=$linkcontrastcolor$] | ||
26 | |||
27 | % make chapter, section bookmarks visible when opening document | ||
28 | \placebookmarks[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][chapter, section] | ||
29 | \setupinteractionscreen[option=bookmark] | ||
30 | \setuptagging[state=start] | ||
31 | |||
32 | $if(papersize)$ | ||
33 | \setuppapersize[$for(papersize)$$papersize$$sep$,$endfor$] | ||
34 | $endif$ | ||
35 | $if(layout)$ | ||
36 | \setuplayout[$for(layout)$$layout$$sep$,$endfor$] | ||
37 | $endif$ | ||
38 | $if(pagenumbering)$ | ||
39 | \setuppagenumbering[$for(pagenumbering)$$pagenumbering$$sep$,$endfor$] | ||
40 | $endif$ | ||
41 | |||
42 | % use microtypography | ||
43 | \definefontfeature[default][default][script=latn, protrusion=quality, expansion=quality, itlc=yes, textitalics=yes, onum=yes, pnum=yes] | ||
44 | \definefontfeature[smallcaps][script=latn, protrusion=quality, expansion=quality, smcp=yes, onum=yes, pnum=yes] | ||
45 | \setupalign[hz,hanging] | ||
46 | \setupitaliccorrection[global, always] | ||
47 | |||
48 | \setupbodyfontenvironment[default][em=italic] % use italic as em, not slanted | ||
49 | |||
50 | \definefallbackfamily[mainface][rm][DejaVu Serif][preset=range:greek, force=yes] | ||
51 | \definefontfamily[mainface][rm][$if(mainfont)$$mainfont$$else$Latin Modern Roman$endif$] | ||
52 | \definefontfamily[mainface][mm][$if(mathfont)$$mathfont$$else$Latin Modern Math$endif$] | ||
53 | \definefontfamily[mainface][ss][$if(sansfont)$$sansfont$$else$Latin Modern Sans$endif$] | ||
54 | \definefontfamily[mainface][tt][$if(monofont)$$monofont$$else$Latin Modern Typewriter$endif$][features=none] | ||
55 | \setupbodyfont[mainface$if(fontsize)$,$fontsize$$endif$] | ||
56 | |||
57 | \setupwhitespace[$if(whitespace)$$whitespace$$else$medium$endif$] | ||
58 | $if(indenting)$ | ||
59 | \setupindenting[$for(indenting)$$indenting$$sep$,$endfor$] | ||
60 | $endif$ | ||
61 | $if(interlinespace)$ | ||
62 | \setupinterlinespace[$for(interlinespace)$$interlinespace$$sep$,$endfor$] | ||
63 | $endif$ | ||
64 | |||
65 | \setuphead[chapter] [style=\tfd,header=empty] | ||
66 | \setuphead[section] [style=\tfc] | ||
67 | \setuphead[subsection] [style=\tfb] | ||
68 | \setuphead[subsubsection] [style=\bf] | ||
69 | \setuphead[subsubsubsection] [style=\sc] | ||
70 | \setuphead[subsubsubsubsection][style=\it] | ||
71 | |||
72 | $if(headertext)$ | ||
73 | \setupheadertexts$for(headertext)$[$headertext$]$endfor$ | ||
74 | $endif$ | ||
75 | $if(footertext)$ | ||
76 | \setupfootertexts$for(footertext)$[$footertext$]$endfor$ | ||
77 | $endif$ | ||
78 | $if(number-sections)$ | ||
79 | $else$ | ||
80 | \setuphead[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][number=no] | ||
81 | $endif$ | ||
82 | |||
83 | \definedescription | ||
84 | [description] | ||
85 | [headstyle=bold, style=normal, location=hanging, width=broad, margin=1cm, alternative=hanging] | ||
86 | |||
87 | \setupitemize[autointro] % prevent orphan list intro | ||
88 | \setupitemize[indentnext=no] | ||
89 | |||
90 | \setupfloat[figure][default={here,nonumber}] | ||
91 | \setupfloat[table][default={here,nonumber}] | ||
92 | |||
93 | \setupthinrules[width=15em] % width of horizontal rules | ||
94 | |||
95 | $for(header-includes)$ | ||
96 | $header-includes$ | ||
97 | $endfor$ | ||
98 | |||
99 | \starttext | ||
100 | $if(title)$ | ||
101 | \startalignment[middle] | ||
102 | {\tfd $title$} | ||
103 | $if(subtitle)$ | ||
104 | \smallskip | ||
105 | {\tfa $subtitle$} | ||
106 | $endif$ | ||
107 | $if(author)$ | ||
108 | \smallskip | ||
109 | {\tfa $for(author)$$author$$sep$\crlf $endfor$} | ||
110 | $endif$ | ||
111 | $if(date)$ | ||
112 | \smallskip | ||
113 | {\tfa $date$} | ||
114 | $endif$ | ||
115 | \bigskip | ||
116 | \stopalignment | ||
117 | $endif$ | ||
118 | $if(abstract)$ | ||
119 | \midaligned{\it Abstract} | ||
120 | \startnarrower[2*middle] | ||
121 | $abstract$ | ||
122 | \stopnarrower | ||
123 | \blank[big] | ||
124 | $endif$ | ||
125 | $for(include-before)$ | ||
126 | $include-before$ | ||
127 | $endfor$ | ||
128 | $if(toc)$ | ||
129 | \completecontent | ||
130 | $endif$ | ||
131 | $if(lot)$ | ||
132 | \completelistoftables | ||
133 | $endif$ | ||
134 | $if(lof)$ | ||
135 | \completelistoffigures | ||
136 | $endif$ | ||
137 | |||
138 | $body$ | ||
139 | |||
140 | $for(include-after)$ | ||
141 | $include-after$ | ||
142 | $endfor$ | ||
143 | \stoptext | ||