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