git.iko.soy/typeable/pandoc
on 1.17.02 help sign in
typeable/pandoc/default.context
146 lines 3.7 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][script=latn, protrusion=quality, expansion=quality, itlc=yes, textitalics=yes, onum=yes, pnum=yes]
42\definefontfeature[smallcaps][script=latn, protrusion=quality, expansion=quality, smcp=yes, onum=yes, pnum=yes]
43\setupalign[hz,hanging]
44\setupitaliccorrection[global, always]
45\setupbodyfontenvironment[default][em=italic] % use italic as em, not slanted
46\usemodule[simplefonts$if(fontsize)$,$fontsize$$endif$]
47\setmainfontfallback[DejaVu Serif][range={greekandcoptic, greekextended}, force=yes, rscale=auto]
48$if(mainfont)$
49\setmainfont[$mainfont$]
50$endif$
51$if(sansfont)$
52\setsansfont[$sansfont$][rscale=auto]
53$endif$
54$if(monofont)$
55\setmonofont[$monofont$][features=none, rscale=auto]
56$endif$
57$if(mathfont)$
58\setmathfont[$mathfont$][rscale=auto]
59$endif$
60\setupwhitespace[$if(whitespace)$$whitespace$$else$medium$endif$]
61$if(indenting)$
62\setupindenting[$for(indenting)$$indenting$$sep$,$endfor$]
63$endif$
64$if(interlinespace)$
65\setupinterlinespace[$for(interlinespace)$$interlinespace$$sep$,$endfor$]
66$endif$
68\setuphead[chapter] [style=\tfd,header=empty]
69\setuphead[section] [style=\tfc]
70\setuphead[subsection] [style=\tfb]
71\setuphead[subsubsection] [style=\bf]
72\setuphead[subsubsubsection] [style=\sc]
73\setuphead[subsubsubsubsection][style=\it]
75$if(headertext)$
76\setupheadertexts$for(headertext)$[$headertext$]$endfor$
77$endif$
78$if(footertext)$
79\setupfootertexts$for(footertext)$[$footertext$]$endfor$
80$endif$
81$if(number-sections)$
82$else$
83\setuphead[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][number=no]
84$endif$
86\definedescription
87 [description]
88 [headstyle=bold, style=normal, location=hanging, width=broad, margin=1cm, alternative=hanging]
90\setupitemize[autointro] % prevent orphan list intro
91\setupitemize[indentnext=no]
93\setupfloat[figure][default={here,nonumber}]
94\setupfloat[table][default={here,nonumber}]
96\setupthinrules[width=15em] % width of horizontal rules
98$for(header-includes)$
99$header-includes$
100$endfor$
102\starttext
103$if(title)$
104\startalignment[middle]
105 {\tfd $title$}
106$if(subtitle)$
107 \smallskip
108 {\tfa $subtitle$}
109$endif$
110$if(author)$
111 \smallskip
112 {\tfa $for(author)$$author$$sep$\crlf $endfor$}
113$endif$
114$if(date)$
115 \smallskip
116 {\tfa $date$}
117$endif$
118 \bigskip
119\stopalignment
120$endif$
121$if(abstract)$
122\midaligned{\it Abstract}
123\startnarrower[2*middle]
124$abstract$
125\stopnarrower
126\blank[big]
127$endif$
128$for(include-before)$
129$include-before$
130$endfor$
131$if(toc)$
132\completecontent
133$endif$
134$if(lot)$
135\completelistoftables
136$endif$
137$if(lof)$
138\completelistoffigures
139$endif$
141$body$
143$for(include-after)$
144$include-after$
145$endfor$
146\stoptext