git.iko.soy/typeable/pandoc
on 2.0.2 help sign in
typeable/pandoc/test/writers-lang-and-dir.context
118 lines 3.0 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][DejaVu 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
53\starttext
55\section[empty-divs-and-spans]{Empty Divs and Spans}
57Some text and
59div contents
61and more text.
63Next paragraph with a span and a word-thatincludesaspanright?
65\section[directionality]{Directionality}
67Some text and
69\startalignment[righttoleft]
70rtl div contents
72\stopalignment
74and more text.
76\startalignment[lefttoright]
77and a ltr div. with a {\righttoleft rtl span}.
79\stopalignment
81Next paragraph with a {\righttoleft rtl span} and a
82word-that-includesa{\lefttoright ltrspan}right?
84\section[languages]{Languages}
86Some text and
88\start\language[de]
89German div contents
91\stop
93and more text.
95Next paragraph with a \start\language[en-gb]British span\stop and a
96word-that-includesa\start\language[de-ch]Swiss German span\stop right?
98Some \start\language[es]Spanish text\stop .
100\section[combined]{Combined}
102Some text and
104\start\language[fr]
105\startalignment[righttoleft]
106French rtl div contents
108\stopalignment
109\stop
111and more text.
113Next paragraph with a \start\language[en-gb]{\lefttoright British ltr
114span}\stop and a
115word-that-includesa\start\language[de-ch]{\lefttoright Swiss German ltr
116span}\stop right?
118\stoptext