git.iko.soy/typeable/pandoc
on 2.5 help sign in
typeable/pandoc/test/writers-lang-and-dir.context
123 lines 3.2 kB history raw
1% Enable hyperlinks
2\setupinteraction
3 [state=start,
4 style=,
5 color=,
6 contrastcolor=]
8% make chapter, section bookmarks visible when opening document
9\placebookmarks[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][chapter, section]
10\setupinteractionscreen[option=bookmark]
11\setuptagging[state=start]
14% use microtypography
15\definefontfeature[default][default][script=latn, protrusion=quality, expansion=quality, itlc=yes, textitalics=yes, onum=yes, pnum=yes]
16\definefontfeature[smallcaps][script=latn, protrusion=quality, expansion=quality, smcp=yes, onum=yes, pnum=yes]
17\setupalign[hz,hanging]
18\setupitaliccorrection[global, always]
20\setupbodyfontenvironment[default][em=italic] % use italic as em, not slanted
22\definefallbackfamily[mainface][rm][CMU Serif][preset=range:greek, force=yes]
23\definefontfamily[mainface][rm][Latin Modern Roman]
24\definefontfamily[mainface][mm][Latin Modern Math]
25\definefontfamily[mainface][ss][Latin Modern Sans]
26\definefontfamily[mainface][tt][Latin Modern Typewriter][features=none]
27\setupbodyfont[mainface]
29\setupwhitespace[medium]
31\setuphead[chapter] [style=\tfd,header=empty]
32\setuphead[section] [style=\tfc]
33\setuphead[subsection] [style=\tfb]
34\setuphead[subsubsection] [style=\bf]
35\setuphead[subsubsubsection] [style=\sc]
36\setuphead[subsubsubsubsection][style=\it]
38\setuphead[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][number=no]
40\definedescription
41 [description]
42 [headstyle=bold, style=normal, location=hanging, width=broad, margin=1cm, alternative=hanging]
44\setupitemize[autointro] % prevent orphan list intro
45\setupitemize[indentnext=no]
47\setupfloat[figure][default={here,nonumber}]
48\setupfloat[table][default={here,nonumber}]
50\setupthinrules[width=15em] % width of horizontal rules
52\setupxtable[frame=off]
53\setupxtable[head][topframe=on,bottomframe=on]
54\setupxtable[body][]
55\setupxtable[foot][bottomframe=on]
58\starttext
60\section[title={Empty Divs and Spans},reference={empty-divs-and-spans}]
62Some text and
64div contents
66and more text.
68Next paragraph with a span and a word-thatincludesaspanright?
70\section[title={Directionality},reference={directionality}]
72Some text and
74\startalignment[righttoleft]
75rtl div contents
77\stopalignment
79and more text.
81\startalignment[lefttoright]
82and a ltr div. with a {\righttoleft rtl span}.
84\stopalignment
86Next paragraph with a {\righttoleft rtl span} and a
87word-that-includesa{\lefttoright ltrspan}right?
89\section[title={Languages},reference={languages}]
91Some text and
93\start\language[de]
94German div contents
96\stop
98and more text.
100Next paragraph with a \start\language[en-gb]British span\stop and a
101word-that-includesa\start\language[de-ch]Swiss German span\stop right?
103Some \start\language[es]Spanish text\stop .
105\section[title={Combined},reference={combined}]
107Some text and
109\start\language[fr]
110\startalignment[righttoleft]
111French rtl div contents
113\stopalignment
114\stop
116and more text.
118Next paragraph with a \start\language[en-gb]{\lefttoright British ltr
119span}\stop and a
120word-that-includesa\start\language[de-ch]{\lefttoright Swiss German ltr
121span}\stop right?
123\stoptext