git.iko.soy/typeable/pandoc
on db0cda8 help sign in
typeable/pandoc/default.context
147 lines 3.6 kB history raw
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% make chapter, section bookmarks visible when opening document
27\placebookmarks[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][chapter, section]
28\setupinteractionscreen[option=bookmark]
29\setuptagging[state=start]
31$if(papersize)$
32\setuppapersize[$for(papersize)$$papersize$$sep$,$endfor$]
33$endif$
34$if(layout)$
35\setuplayout[$for(layout)$$layout$$sep$,$endfor$]
36$endif$
37$if(pagenumbering)$
38\setuppagenumbering[$for(pagenumbering)$$pagenumbering$$sep$,$endfor$]
39$endif$
40% use microtypography
41\definefontfeature[default][default][protrusion=quality,expansion=quality,onum=yes,pnum=yes]
42\definefontfeature[smallcaps][smallcaps][protrusion=quality,expansion=quality,onum=yes,pnum=yes]
43\setupalign[hz,hanging]
44\setupbodyfontenvironment[default][em=italic] % use italic as em, not slanted
45$if(mainfont)$
46\definefontfamily[mainfont][serif][$mainfont$]
47$endif$
48$if(sansfont)$
49\definefontfamily[sansfont][sans][$sansfont$]
50$endif$
51$if(monofont)$
52\definefontfamily[monofont][mono][$monofont$][features=none]
53$endif$
54$if(mathfont)$
55\definefontfamily[mathfont][math][$mathfont$]
56$endif$
57\setupbodyfont[mainfont$if(fontsize)$,$fontsize$$endif$]
58\setupwhitespace[$if(whitespace)$$whitespace$$else$medium$endif$]
59$if(indenting)$
60\setupindenting[$for(indenting)$$indenting$$sep$,$endfor$]
61$endif$
62$if(interlinespace)$
63\setupinterlinespace[$for(interlinespace)$$interlinespace$$sep$,$endfor$]
64$endif$
66\setuphead[chapter] [style=\tfd,header=empty]
67\setuphead[section] [style=\tfc]
68\setuphead[subsection] [style=\tfb]
69\setuphead[subsubsection] [style=\bf]
70\setuphead[subsubsubsection] [style=\sc]
71\setuphead[subsubsubsubsection][style=\it]
73$if(headertext)$
74\setupheadertexts$for(headertext)$[$headertext$]$endfor$
75$endif$
76$if(footertext)$
77\setupfootertexts$for(footertext)$[$footertext$]$endfor$
78$endif$
79$if(number-sections)$
80$else$
81\setuphead[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][number=no]
82$endif$
84\definedescription
85 [description]
86 [headstyle=bold, style=normal, location=hanging, width=broad, margin=1cm, alternative=hanging]
88\setupitemize[autointro] % prevent orphan list intro
89\setupitemize[indentnext=no]
91\setupfloat[figure][default={here,nonumber}]
92\setupfloat[table][default={here,nonumber}]
94\setupthinrules[width=15em] % width of horizontal rules
96\setuphead[title][
97 style={\tfd\raggedcenter},
98 before={\startalignment[middle]},
99 after={
100$if(subtitle)$
101 \smallskip
102 {\tfa $subtitle$}
103$endif$
104$if(author)$
105 \smallskip
106 {\tfa $for(author)$$author$$sep$\crlf $endfor$}
107$endif$
108$if(date)$
109 \smallskip
110 {\tfa $date$}
111$endif$
112 \bigskip\stopalignment}]
114$for(header-includes)$
115$header-includes$
116$endfor$
118\starttext
119$if(title)$
120\title{$title$}
121$endif$
122$if(abstract)$
123\midaligned{\it Abstract}
124\startnarrower[2*middle]
125$abstract$
126\stopnarrower
127\blank[big]
128$endif$
129$for(include-before)$
130$include-before$
131$endfor$
132$if(toc)$
133\completecontent
134$endif$
135$if(lot)$
136\completelistoftables
137$endif$
138$if(lof)$
139\completelistoffigures
140$endif$
142$body$
144$for(include-after)$
145$include-after$
146$endfor$
147\stoptext