git.iko.soy/typeable/pandoc
on 2f9ba8e help sign in
typeable/pandoc/default.context
144 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$for(header-includes)$
97$header-includes$
98$endfor$
100\starttext
101$if(title)$
102\startalignment[middle]
103 {\tfd $title$}
104$if(subtitle)$
105 \smallskip
106 {\tfa $subtitle$}
107$endif$
108$if(author)$
109 \smallskip
110 {\tfa $for(author)$$author$$sep$\crlf $endfor$}
111$endif$
112$if(date)$
113 \smallskip
114 {\tfa $date$}
115$endif$
116 \bigskip
117\stopalignment
118$endif$
119$if(abstract)$
120\midaligned{\it Abstract}
121\startnarrower[2*middle]
122$abstract$
123\stopnarrower
124\blank[big]
125$endif$
126$for(include-before)$
127$include-before$
128$endfor$
129$if(toc)$
130\completecontent
131$endif$
132$if(lot)$
133\completelistoftables
134$endif$
135$if(lof)$
136\completelistoffigures
137$endif$
139$body$
141$for(include-after)$
142$include-after$
143$endfor$
144\stoptext