1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34\startmodule[braillebasic]
35
36\unprotect
37
38\definemeasure [braille:margin] [\paperheight15]
39
40\definelayout
41 [braille]
42 [\c!topspace=\measure{braille:margin},
43 \c!bottomspace=\measure{braille:margin},
44 \c!backspace=\measure{braille:margin},
45 \c!header=\measure{braille:margin},
46 \c!footer=\zeropoint,
47 \c!width=\v!middle,
48 \c!height=\v!middle]
49
50\setuplayout
51 [braille]
52
53\enableexperiments[fonts.compact]
54
55\setupbodyfont
56 [braille,11pt]
57
58\setupwhitespace
59 [\v!big]
60
61\setuphead
62 [\v!chapter]
63 [\c!style=\bfd,
64 \c!color=darkblue,
65 \c!headerstate=\v!high,
66 \c!interaction=\v!all]
67
68\setuphead
69 [\v!section]
70 [\c!style=\bfc,
71 \c!color=darkblue]
72
73\setuphead
74 [\v!subsection]
75 [\c!style=\bfb]
76
77\setuphead
78 [\v!subsubsection]
79 [\c!style=\bfa,
80 \c!after=]
81
82\setuplist
83 [\c!interaction=\v!all]
84
85\setupdocument
86 [\c!before=\directsetup{document:titlepage}]
87
88\setupalign
89 [\v!verytolerant,\v!flushleft]
90
91\setupitemgroup[\v!itemize][1][\c!width=4em,\c!style=\s!bold,\c!color=darkred]
92\setupitemgroup[\v!itemize][2][\c!width=5em,\c!style=\s!bold,\c!color=darkred]
93\setupitemgroup[\v!itemize][3][\c!width=6em,\c!style=\s!bold,\c!color=darkred]
94
95\setuptyping
96 [\c!color=darkyellow]
97
98\setuptype
99 [\c!color=darkyellow]
100
101\setupformulas
102 [\c!color=darkgreen]
103
104\protect
105
106\stopmodule
107
108\continueifinputfile{sbraillebasic.mkxl}
109
110\starttext
111
112\showframe \showglyphs \showboxes \dontcomplain
113
114\startchapter[title=The first]
115
116\startsection[title=Tufte] {\tf \samplefile{tufte}\par} \stopsection
117\startsection[title=Ward] {\bf \samplefile{ward} \par} \stopsection
118\startsection[title=Davis] {\bi \samplefile{davis}\par} \stopsection
119
120\startsection[title=Four]
121
122 Here is some simple inline math: \formula {x2 = 10 \neq \alpha} and here is
123 some (quick and dirty) display:
124
125 \startformula
126 y = \sqrt[2]{\frac{1x2}{2xx24}}
127 \stopformula
128
129 but there are rules for that. So we need to look into those so that:
130
131 \startformula
132 y = \frac{1x2}{2xx24}
133 \stopformula
134
135 and
136
137 \startformula
138 y = \overline{2xx24} \underline{2xx24}
139
140 \stopformula
141
142 come out right.
143
144\stopsection
145
146\stopchapter
147
148\startchapter[title=The second]
149
150The monospaced font has no braille but actually all is kind of monospace apart
151from spacing:
152
153\starttyping
154Lets show some {\bf fancy tex} code,
155assuming that mono has gotten the
156braille glyphs.
157\stoptyping
158
159And some itemize:
160
161\startitemize[n]
162 \startitem first one \stopitem
163 \startitem second one \stopitem
164\stopitemize
165
166\startitemize
167 \startitem first one \stopitem
168 \startitem second one \stopitem
169\stopitemize
170
171\startitemize[a]
172 \startitem first one \stopitem
173 \startitem second one \stopitem
174\stopitemize
175
176\stopchapter
177
178\stoptext
179 |