Debian Codegraph @

tables/da-dk-g16-lit_1993.ctb

raw
1 # Liblouis: Danish table for 6 dots grade 1 forward translation (literary) 1993
2 #
3 # Copyright (C) 2014, 2016-2021, 2023, Bue Vester-Andersen <[email protected]>
4 #
5 # This file is part of liblouis.
6 #
7 # liblouis is free software: you can redistribute it and/or modify it
8 # under the terms of the GNU Lesser General Public License as
9 # published by the Free Software Foundation, either version 2.1 of the
10 # License, or (at your option) any later version.
11 #
12 # liblouis is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # Lesser General Public License for more details.
16 #
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with liblouis. If not, see
19 # <http://www.gnu.org/licenses/>.
20 #
21 #------------
22 #
23 # This is the Danish 6 dots grade 1 table for forward translation (literary / not back-translateable) 1993.
24 #
25 # The output from this table is mainly ment for embossing and not suited for back-translation.
26 #
27 # Version: Bue Vester-Andersen, December 2022
28
29 ### Table Metadata
30
31 #-name: Dansk fuldskrift 6-punkt 1993
32 #-index-name: Danish, uncontracted, 6-dot, 1993
33 #-display-name: Danish 6-dot uncontracted braille (1993 standard)
34
35 #+language: da
36 #+type: literary
37 #+contraction: no
38 #+grade: 1
39 #+dots: 6
40 #+direction: forward
41 #+system: ddp
42 #+version: 1993
43
44 # Display opcodes
45 include da-dk-octobraille_1993.dis
46
47 ### Spaces
48
49 # These ctrl-chars have to have a representation, so that they can be properly converted back and forth.
50 space \t 2478 CHARACTER TABULATION
51 space \n 678 LINE FEED (LF)
52 space \v 1368 LINE TABULATION
53 space \f 12378 FORM FEED (FF)
54 space \r 257 CARRIAGE RETURN (CR)
55 space \x00a0 a
56
57 include spaces.uti
58
59 ### Character definitions
60
61 # Definition of dot cells
62 punctuation ! 235 EXCLAMATION MARK
63 punctuation " 2356 QUOTATION MARK
64 sign & 12346 AMPERSAND
65 punctuation ' 4 APOSTROPHE
66 punctuation ( 236 LEFT PARENTHESIS
67 punctuation ) 356 RIGHT PARENTHESIS
68 punctuation * 35 ASTERISK
69 punctuation , 2 COMMA
70 punctuation - 36 HYPHEN-MINUS
71 punctuation . 3 FULL STOP
72 punctuation / 34 SLASH
73 punctuation : 25 COLON
74 punctuation ; 23 SEMICOLON
75 punctuation ? 26 QUESTION MARK
76 include latinLetterDef6Dots.uti
77
78 include digits6Dots.uti
79
80 punctuation \x00a7 346 SECTION SIGN (0xa7)
81
82 lowercase \x00e5 16 LATIN LETTER A WITH RING ABOVE
83 lowercase \x00e6 345 LATIN LETTER AE
84 lowercase \x00f8 246 LATIN LETTER O WITH STROKE
85 lowercase \x00fc 1256 LATIN LETTER U WITH DIAERESIS
86 math \x00f7 256 DIVISION SIGN
87
88 # Uppercase letters
89 base uppercase \x00c5 \x00e5 LATIN LETTER A WITH RING ABOVE
90 base uppercase \x00c6 \x00e6 LATIN LETTER AE
91 base uppercase \x00d8 \x00f8 LATIN LETTER O WITH STROKE
92 base uppercase \x00dc \x00fc LATIN CAPITAL LETTER U WITH DIAERESIS
93
94 # cover all other Braille patterns
95 include braille-patterns.cti
96
97 # Characters with two or more cells
98
99 punctuation # 45-3456 NUMBER SIGN
100 sign $ 45-256 DOLLAR SIGN
101 math % 245-356 PERCENT SIGN
102 #sign & 6-12346 AMPERSAND
103 #punctuation * 6-35 ASTERISK
104 math + 45-235 PLUS SIGN
105 math < 45-134 LESS-THAN SIGN
106 math = 45-2356 EQUALS SIGN
107 math > 45-234 GREATER-THAN SIGN
108 sign @ 45-1 COMMERCIAL AT
109 punctuation [ 5-236 LEFT SQUARE BRACKET
110 punctuation \\ 45-16 REVERSE SLASH
111 punctuation ] 5-356 RIGHT SQUARE BRACKET
112 punctuation ^ 45-346 CIRCUMFLEX ACCENT
113 punctuation _ 45-36 LOW LINE
114 punctuation ` 4 GRAVE ACCENT
115 punctuation { 45-246 LEFT CURLY BRACKET
116 punctuation | 45-456 VERTICAL LINE
117 punctuation } 45-135 RIGHT CURLY BRACKET
118 punctuation ~ 45-6 TILDE
119
120 # Misc unicode characters
121 include da-dk-6miscChars_1993.cti
122
123 # Litdigits
124 include litdigits6Dots.uti
125
126 undefined 26
127
128 ### Braille indicators and special characters
129
130 #hyphen - 36
131
132 letsign 6
133
134 # No letsign before normal letters or letters with accents
135 # Letters with accents are handled by pass2.
136 noletsign ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅÄÖÜ\x0152
137 noletsign abcdefghijklmnopqrstuvwxyzæøåäöü\x00df\x0149\x0153
138
139 # Emphasis opcodes
140 emphclass italic
141 emphclass underline
142 emphclass bold
143
144 begemphphrase italic 56
145 endemphphrase italic after 56
146
147 begemphphrase bold 56
148 endemphphrase bold after 56
149
150 begemphphrase underline 56
151 endemphphrase underline after 56
152
153 capsletter 46
154 begcapsword 456
155 endcapsword 6
156
157 numsign 3456
158
159 #class of none-space characters that demand double dashes
160 # Used in context lines later.
161 #must be the first class defined.
162 attribute charsWDoubleDash .,?!/:"'() # class w
163
164 ### Correct
165
166 # Chars that don't require a space before percent and permille:
167 attribute charsBeforePercent "(\x201e\x0084\x201c\x0093\x201d\x0094\x00ab\x00bb #class x
168 noback correct `["%"] *
169 noback correct `["\x2030"] *
170 noback correct !$sx["%"] "\s%"
171 noback correct !$sx["\x2030"] "\s\x2030"
172 noback correct `["\x0089"] *
173 noback correct !$sx["\x0089"] "\s\x2030"
174
175 # Chars to be treated like digits when switching back to letter mode
176 attribute extraDigits \x00bc\x00bd\x00be
177
178 #Use the "correct" opcode to convert chars that can't be back-translated
179 # and make the table more simple.
180
181 # Dashes
182 attribute dashes \x2013\x2014\x0096\x0097\x00ad
183 noback correct %dashes "-"
184
185 attribute quotes \x201e\x0084\x201c\x0093\x201d\x0094\x00ab\x00bb
186 noback correct %quotes "\""
187
188 attribute apostrophes `\x201a\x0082\x2039\x008b\x2018\x0091\x2019\x0092\x203a\x009b\x00b4
189 noback correct %apostrophes "'"
190
191 # Convert most single caps to lowercase
192
193 #Special abbreviations with imbedded small letters.
194 # Must be handled by case in this version of liblouis
195 noback correct "KAbB" "KABB"
196 noback correct "CUDiM" "CUDIM"
197
198 swapcc UpperLower ABCDEFGHIJKLMNOPQRSTUVWXYZ\x00c0\x00c1\x00c2\x00c3\x00c4\x00c5\x00c6\x00c7\x00c8\x00c9\x00ca\x00cb\x00cc\x00cd\x00ce\x00cf\x00d0\x00d1\x00d2\x00d3\x00d4\x00d5\x00d6\x00d8\x00d9\x00da\x00db\x00dc\x00dd\x00de\x008a\x008c abcdefghijklmnopqrstuvwxyz\x00e0\x00e1\x00e2\x00e3\x00e4\x00e5\x00e6\x00e7\x00e8\x00e9\x00ea\x00eb\x00ec\x00ed\x00ee\x00ef\x00f0\x00f1\x00f2\x00f3\x00f4\x00f5\x00f6\x00f8\x00f9\x00fa\x00fb\x00fc\x00fd\x00fe\x009a\x009c
199 swapcc UpperLowerExt \x0100\x0102\x0104\x0106\x0108\x010a\x010c\x010e\x0110\x0112\x0114\x0116\x0118\x011a\x011c\x011e\x0120\x0122\x0124\x0126\x0128\x012a\x012c\x012e\x0130\x0132\x0134\x0136\x0139\x013b\x013d\x013f\x0141\x0143\x0145\x0147\x014a\x014c\x014e\x0150\x0152\x0154\x0156\x0158\x015a\x015c\x015e\x0160\x0162\x0164\x0166\x0168\x016a\x016c\x016e\x0170\x0172\x0174\x0176\x0178\x0179\x017b\x017d\x0386\x0388\x0389\x038a\x038c\x038e\x038f\x0391\x0392\x0393\x0394\x0395\x0396\x0397\x0398\x0399\x039a\x039b\x039c\x039d\x039e\x039f\x03a0\x03a1\x03a3\x03a4\x03a5\x03a6\x03a7\x03a8\x03a9 \x0101\x0103\x0105\x0107\x0109\x010b\x010d\x010f\x0111\x0113\x0115\x0117\x0119\x011b\x011d\x011f\x0121\x0123\x0125\x0127\x0129\x012b\x012d\x012f\x0131\x0133\x0135\x0137\x013a\x013c\x013e\x0140\x0142\x0144\x0146\x0148\x014b\x014d\x014f\x0151\x0153\x0155\x0157\x0159\x015b\x015d\x015f\x0161\x0163\x0165\x0167\x0169\x016b\x016d\x016f\x0171\x0173\x0175\x0177\x00ff\x017a\x017c\x017e\x03ac\x03ad\x03ae\x03af\x03cc\x03cd\x03ce\x03b1\x03b2\x03b3\x03b4\x03b5\x03b6\x03b7\x03b8\x03b9\x03ba\x03bb\x03bc\x03bd\x03be\x03bf\x03c0\x03c1\x03c3\x03c4\x03c5\x03c6\x03c7\x03c8\x03c9
200
201 # I is a special case
202 noback correct _$sp["I"]$sp "i"
203 noback correct `["I"]$sp "i"
204 noback correct _$sp["I"]~ "i"
205
206 noback correct $sSpu[%UpperLower]$u %UpperLower
207 noback correct `[%UpperLower]$u %UpperLower
208
209 noback correct $sSpu[%UpperLowerExt]$u %UpperLowerExt
210 noback correct `[%UpperLowerExt]$u %UpperLowerExt
211
212 # Punctuations, math and numbers
213 midnum , 2
214 midnum . 3
215 # the following rule is doubtful, but probably does not apply.
216 #midnum - 36
217 endnum - 36
218 midnum / 34
219 midnum : 25
220
221 midnum ^ 45-346
222 midnum \x00d7 45-3-3456
223
224 # Remove space between § and numbers.
225 begnum § 346
226 begnum §\s 346
227 begnum §§\s 346-346
228 always §§ 346-346
229
230 # Punctuation
231 prepunc " 2356
232 postpunc " 2356
233 prepunc - 36
234 postpunc - 36
235 always :- 25-36
236 always ;- 23-36
237 always --- 36-36-36
238 always ---- 36-36-36-36
239 always ----- 36-36-36-36-36
240
241 # these characters must be separated from ")" by a letsign.
242 attribute SepToRightpar Jj%'\x2030\x0089\x201a\x0082\x2039\x009b\x2018\x0091\x2019\x0092\x203a\x009b
243 after SepToRightpar always ) 6-356
244
245 prepunc ( 236
246 postpunc ) 356
247
248 always .) 3-356
249 always ... 3-3-3
250
251 always !! 235-235
252 always !!! 235-235-235
253 always !!!! 235-235-235-235
254 always !!!!! 235-235-235-235-235
255
256 ### Context rules
257
258 # Substitutions for joinnum rules with common math signs
259 noback context $dy$s["-"$s]$dy @36
260 noback context $dy$s["+"$s]$dy @235
261 noback context $dy$s["\x00d7"$s]$dy @3
262 noback context $dy$s["\x00f7"$s]$dy @256
263 noback context $dy$s["="$s]$dy @2356
264
265 # Space on each side of = when between letters or punctuation.
266 noback context $lp["="]$lp @0-2356-0
267
268 # Ensure two dashes where appropriate.
269 noback context $w["-"]$w @36
270 noback context $sw["-"]$sw @36-36
271 noback context `["-"]$sw @36-36
272 noback context $sw["-"]~ @36-36
273 noback context !$sw["-"]~ @36
274 noback context `["-"]~ @36-36
275
276 #ensure dot 6 between a digit and a letter
277 noback context $dy[]$u @6
278 noback context $dy$Spm.[]$u @6
279
280 # Ensure dot 6 as nocaps
281 #noback context $U2-50[]$u @6
282
283 ### Pass 2
284
285 noback pass2 @6-5 @5 # no letsign before letters with accent
286 noback pass2 @6-46-5 @46-5 # no letsign before cap letters with accent
287 noback pass2 @45-6-46 * # don't touch tilde before capnoback pass2 @6-46 @46-6 # Ensure correct order
288
289 # Ensure there is only one letsign
290 noback pass2 @6-6 @6
291
292 # Ensure there is only one emphasis sign
293 noback pass2 @56-56 @56
294 noback pass2 @56-56-56 @56