# liblouis: German grade 0 braille
#
#  Copyright (C) 2018 SBS Schweizerische Bibliothek für Blinde, Seh- und Lesebehinderte
#  Copyright (C) 2020 Bue Vester-Andersen
#  Copyright (C) 2022 Bert Frees
#
#  This file is part of liblouis.
#
#  liblouis is free software: you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as
#  published by the Free Software Foundation, either version 2.1 of the
#  License, or (at your option) any later version.
#
#  liblouis is distributed in the hope that it will be useful, but
#  WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
#  Lesser General Public License for more details.
#
#  You should have received a copy of the GNU Lesser General Public
#  License along with liblouis. If not, see
#  <http://www.gnu.org/licenses/>.
#
#-------------------------------------------------------------------------------


# --- Corrects -----------------------------------------------------------------

# --- Korrektur der Bindestrich-Probleme

# Bindestrich nach Leerschlag vor Zahl ist Minuszeichen.
noback correct $s["-"]$d "\x2212"
# Bindestrich nach öffnender Klammer vor Zahl ist Minuszeichen.
noback correct ["(-"]$d "(\x2212"
noback correct ["[-"]$d "[\x2212"
noback correct ["›-"]$d "›\x2212"
noback correct ["»-"]$d "»\x2212"
# begword nach Wortersatzstrich verhindern
noback correct $s["-"] "-\x250A"
# begword nach Satzzeichen und Wortersatzstrich verhindern
noback correct $s["(-"]$l "(\x2013\x250A"
noback correct $s["[-"]$l "[\x2013\x250A"
noback correct $s["»-"]$l "»\x2013\x250A"
noback correct $s["›-"]$l "›\x2013\x250A"
# begword nach Wortersatzstrich nach Schrägstrich verhindern
noback correct ["/-"]$l "/\x2013\x250A"
# endword vor Wortersatzstrich vor Schrägstrich verhindern
noback correct $l["-/"] "\x250A-/"
# endword vor Wortersatzstrich verhindern
noback correct "-\s" "\x250A-\s"
noback correct "‹-\s" "\x250A‹-\s"
noback correct "«-\s" "\x250A«-\s"
# endword vor Wortersatzstrich und Satzzeichen verhindern (vor Satzzeichen KEIN Pt.6)
# corrects für Satzzeichen, die einen Pt. 6 benötigen, befinden sich in sbs-de-g2-core.mod
noback correct "-.\s" "\x250A-.\s"
noback correct "-,\s" "\x250A-,\s"
noback correct "-;\s" "\x250A-;\s"
noback correct "-:\s" "\x250A-:\s"
noback correct "-‹\s" "\x250A-‹\s"
# begword/endword vor/nach Auslassungspunkten verhindern
noback correct $l["..."]$l "\x250A...\x250A"
noback correct $l["..."] "\x250A..."
noback correct ["..."]$l "...\x250A"

# --- Satzzeichen im Wort: Keine Wortgrenze

noback correct $l["("]$l "\x250A(\x250A"
noback correct $l[")"]$l "\x250A)\x250A"
noback correct $l["["]$l "\x250A[\x250A"
noback correct $l["]"]$l "\x250A]\x250A"
noback correct $l["»"]$l "\x250A»\x250A"
noback correct $l["«"]$l "\x250A«\x250A"
noback correct $l["\x2039"]$l "\x250A\x2039\x250A"
noback correct $l["\x203a"]$l "\x250A\x203a\x250A"

# --- Apostroph, Punkt, Komma, Strich vor Zahl

noback correct $d["'"]$d "."
noback correct ["'"]$d "\x2500"
noback correct $dl["."]$d "."
noback correct ["."]$d "\x2501"
noback correct ["--."]$d "\x2510"
noback correct ["\x2013."]$d "\x2510"
noback correct ["\x2014."]$d "\x2510"
noback correct ["--,"]$d "\x2511"
noback correct ["\x2013,"]$d "\x2511"
noback correct ["\x2014,"]$d "\x2511"

# --- Dagger ("gestorben")

noback correct ["\x2020"] "gest."

# --- Satzzeichen nach zahlenähnlichen Zeichen

attribute puncAfterOrdinal ;:?!()[]\x00AB\x00BB
# Prozent
noback correct ["%"]%puncAfterOrdinal "%\x250B"
noback correct ["%,"] "%\x256C,"
# Promille
noback correct ["\x2030"]%puncAfterOrdinal "\x2030\x250B"
noback correct ["\x2030,"] "\x2030\x256C,"
# Grad
noback correct ["\x00B0"]%puncAfterOrdinal "\x00B0\x250B"
noback correct ["\x00B0,"] "\x00B0\x256C,"
# Superscript 2
noback correct ["\x00B2"]%puncAfterOrdinal "\x00B2\x250B"
noback correct ["\x00B2,"] "\x00B2\x256C,"
# Superscript 3
noback correct ["\x00B3"]%puncAfterOrdinal "\x00B3\x250B"
noback correct ["\x00B3,"] "\x00B3\x256C,"
noback correct "\x00BC"[]%puncAfterOrdinal "\x250B"
noback correct "\x00BD"[]%puncAfterOrdinal "\x250B"
noback correct "\x00BE"[]%puncAfterOrdinal "\x250B"
noback correct "\x2153"[]%puncAfterOrdinal "\x250B"
noback correct "\x2154"[]%puncAfterOrdinal "\x250B"
noback correct "\x2155"[]%puncAfterOrdinal "\x250B"
noback correct "\x2156"[]%puncAfterOrdinal "\x250B"
noback correct "\x2157"[]%puncAfterOrdinal "\x250B"
noback correct "\x2158"[]%puncAfterOrdinal "\x250B"
noback correct "\x2159"[]%puncAfterOrdinal "\x250B"
noback correct "\x215a"[]%puncAfterOrdinal "\x250B"
noback correct "\x215b"[]%puncAfterOrdinal "\x250B"
noback correct "\x215c"[]%puncAfterOrdinal "\x250B"
noback correct "\x215d"[]%puncAfterOrdinal "\x250B"
noback correct "\x215e"[]%puncAfterOrdinal "\x250B"

# --- Brüche vor Komma

noback correct "\x00BC"[]"," "\x256C"
noback correct "\x00BD"[]"," "\x256C"
noback correct "\x00BE"[]"," "\x256C"
noback correct "\x2153"[]"," "\x256C"
noback correct "\x2154"[]"," "\x256C"
noback correct "\x2155"[]"," "\x256C"
noback correct "\x2156"[]"," "\x256C"
noback correct "\x2157"[]"," "\x256C"
noback correct "\x2158"[]"," "\x256C"
noback correct "\x2159"[]"," "\x256C"
noback correct "\x215a"[]"," "\x256C"
noback correct "\x215b"[]"," "\x256C"
noback correct "\x215c"[]"," "\x256C"
noback correct "\x215d"[]"," "\x256C"
noback correct "\x215e"[]"," "\x256C"

# --- Markieren von Zahl-Buchstabenverbindung für Kurzschrift

noback correct $d["bis"]!$l "b\x250Ais"
noback correct $d[]$l "\x2504"

# --- Braille indicator opcodes ------------------------------------------------

# Marking caps is necessary for back-translation
capsletter  46
begcapsword 45
endcapsword 6
capsnocont # See section 2.6.2

numsign 3456
numericmodechars .,:
nonumsign 6

# --- Emphasis opcodes ---------------------------------------------------------

emphclass italic
emphclass underline
emphclass bold

begemphphrase italic 456-456
endemphphrase italic after 6-3
lenemphphrase italic 2
begemphword italic 456b
endemphword italic 6-3
emphmodechars italic *()[]{}<>
noemphchars italic \s\t\n\r\x00a0/-\x2013\x2014*()[]{}<>„“‚‘«»‹›.,:;!¡?¿

begemphphrase bold 456-456
endemphphrase bold after 6-3
lenemphphrase bold 2
begemphword bold 456b
endemphword bold 6-3
emphmodechars bold *()[]{}<>
noemphchars bold \s\t\n\r/x00a0/-\x2013\x2014*()[]{}<>„“‚‘«»‹›.,:;!¡?¿

begemphphrase underline 456-456
endemphphrase underline after 6-3
lenemphphrase underline 2
begemphword underline 456b
endemphword underline 6-3
emphmodechars underline *()[]{}<>
noemphchars underline \s\t\n\r\x00a0/-\x2013\x2014*()[]{}<>„“‚‘«»‹›.,:;!¡?¿

# dot 6 required before emphasis indicator when inside word
noback pass2 _$l@456b @6-456
noback pass2 @456b @456

emphclass downgrade
begemphphrase downgrade 36-3
endemphphrase downgrade after 6-3
lenemphphrase downgrade 2
begemphword downgrade 6-3
endemphword downgrade 6-3

begcomp 6-46
# endcomp 6-3         # Omitted here (only to be used when longer than one word)

# --- Special Symbol Opcodes ---------------------------------------------------

hyphen - 36

# --- Translation opcodes ------------------------------------------------------

include litdigits6Dots.uti

# Interpunktions- und Sonderzeichen
midnum  ,          2
endnum  ;          6-23

endnum  ?          6-26
midword ?          6-26
always  \s?        0-6-26
always  (?         2356-6-26

endnum  !          6-235
midword !          6-235
always  \s!        0-6-235
always  !          235

midword :          6-25

midword (          6-2356
midnum  (          6-2356
endnum  (          6-2356
always  (          2356

midword )          6-2356
midnum  )          6-2356
endnum  )          6-2356
always  )          2356

midword [          6-6-2356
midnum  [          6-6-2356	# [ after a number needs dot 6, since [ is 6-2356 we need a double dot 6
endnum  [          6-6-2356
midword ]          6-6-2356
midnum  ]          6-6-2356	# ] after a number needs dot 6, since ] is 6-2356 we need a double dot 6
endnum  ]          6-6-2356

always  {          5-12356
always  }          5-12356

prepunc  "         236
prepunc  «        236
prepunc  »        236
prepunc  \x201f    236

endnum    "       6-356
postpunc  "       356
endnum    »      6-356
postpunc  »      356
endnum    «      6-356
postpunc  «      356
endnum    \x201f  6-356
postpunc  \x201f  356

midword   »      6-236
midword   «      6-356
midword   \x2039  6-6-356
midword   \x203a  6-6-236

midnum  .          3
always  .\s.\s.    3-3-3

always  #          4-3456

always  **         6-35-35
always  ***        6-35-35-35

prepunc    \x2039    6-236
prepunc    \x203a    6-236
prepunc    \x201b    6-236
postpunc   \x2039    6-356
postpunc   \x203a    6-356
postpunc   \x201b    6-356

always  \x2192     25-25-135
always  \x2190     246-25-25
always  \x2194     246-25-25-135

always  &          5-136

always  %          3456-245-356
endnum  \s%        3456-245-356
endnum  \s\x2030   3456-245-356-356
endnum  \s\x2031   3456-245-356-356-356

endnum  \s°       4-356
endnum  \s\x2032   4-35
endnum  \s\x2033   4-35-35

joinnum §         346
joinnum §§       346-346

endnum  .--        3-36a-36a
endnum  .\x2013    3-36a-36a
endnum  ,--        2-36a-36a
endnum  ,\x2013    2-36a-36a

always  \s-\s      6-36a-0
always  \s--       6-36a
always  --         6-36a
always  \s\x2013   6-36a
always  \x2013     6-36a
always  \s\x2014   6-36a
always  \x2014     6-36a

midnum / 5-2
endnum / 5-2
always  /          5-2
always  |          5-36

joinnum £         4-123
joinnum $          4-234
always  $          4-234
joinnum ¢         4-14
joinnum ¥         4-13456
joinnum \x20A0     4-15
joinnum \x20AC     4-15

begnum  +\s        4-235
midnum  \s+\s      0-4-235
midnum  \s+        0-4-235
midnum  +          0-4-235
always  +          4-235

begnum  \s-        0-4-36a-3456
always  \s-        0-6-36a
always  (-         2356-6-36a
always  »-         236-6-36a
always  ›-         6-236-6-36a
always  [-         6-2356-6-36a
begnum  \x2212\s   4-36a
midnum  \s\x2212\s 0-4-36a
midnum  \s\x2212   0-4-36a
midnum  \x2212     0-4-36a
always  \x2212     4-36a

midnum  \s±\s     0-4-235-36a
midnum  \s±       0-4-235-36a
midnum  ±         0-4-235-36a
always  ±         4-235-36a

begnum  =\s        4-2356
midnum  \s=\s      0-4-2356
midnum  \s=        0-4-2356
midnum  =          0-4-2356
always  =          4-2356

midnum  \s\x2260\s 0-4-35-2356
midnum  \s\x2260   0-4-35-2356
midnum  \x2260     0-4-35-2356
always  \x2260     4-35-2356

midnum  \s\x2261\s 0-4-2356-2356
midnum  \s\x2261   0-4-2356-2356
midnum  \x2261     0-4-2356-2356
always  \x2261     4-2356-2356

midnum  \s\x2259\s 0-4-26
midnum  \s\x2259   0-4-26
midnum  \x2259     0-4-26
always  \x2259     4-26

midnum  \s~\s      0-4-26-26
midnum  \s~        0-4-26-26
midnum  ~          0-4-26-26
always  ~          0-4-26-26
midnum  \s\x223C\s 0-4-26-26
midnum  \s\x223C   0-4-26-26
midnum  \x223C     0-4-26-26
always  \x223C     4-26-26
midnum  \s\x2245\s 0-4-26-26
midnum  \s\x2245   0-4-26-26
midnum  \x2245     0-4-26-26
always  \x2245     4-26-26

begnum  \x00D7\s   4-236
midnum  \s\x00D7\s 0-4-236
midnum  \s\x00D7   0-4-236
midnum  \x00D7     0-4-236
always  \x00D7     4-236
noback midnum  \s\x2217\s 3
noback midnum  \s\x2217   3
noback midnum  \x2217     3
noback midnum  \s*\s      3
noback midnum  \s*        3
noback midnum  *          3
always  *          6-35    (Anmerkungsstern)
noback midnum  \s\x22c5\s 3
noback midnum  \s\x22c5   3
noback midnum  \x22c5     3
noback midnum  \s\x22c6\s 3
noback midnum  \s\x22c6   3
noback midnum  \x22c6     3

midnum  \s:\s      4-25
midnum  \s:        4-25
midnum  :          4-25
endnum  :          6-25
begnum  ÷\s        4-25
midnum  \s÷\s     0-4-25
midnum  \s÷       0-4-25
midnum  ÷         0-4-25
always  ÷         4-25
midnum  \s\x2215\s 0-4-25
midnum  \s\x2215   0-4-25
midnum  \x2215     0-4-25
always  \x2215     4-25

midnum  \s<\s      0-4-246-3
midnum  \s<        0-4-246-3
midnum  <          0-4-246-3
always  <          4-246-3

midnum  \s\x2264\s 0-4-246-2356
midnum  \s\x2264   0-4-246-2356
midnum  \x2264     0-4-246-2356
always  \x2264     4-246-2356
midnum  \s\x2266\s 0-4-246-2356
midnum  \s\x2266   0-4-246-2356
midnum  \x2266     0-4-246-2356
always  \x2266     4-246-2356

midnum  \s>\s      0-4-135-2
midnum  \s>        0-4-135-2
midnum  >          0-4-135-2
always  >          4-135-2

midnum  \s\x2265\s 0-4-135-2356
midnum  \s\x2265   0-4-135-2356
midnum  \x2265     0-4-135-2356
always  \x2265     4-135-2356
midnum  \s\x2267\s 0-4-135-2356
midnum  \s\x2267   0-4-135-2356
midnum  \x2267     0-4-135-2356
always  \x2267     4-135-2356

# --- 6-Dot Computer Braille ---------------------------------------------------

include countries.cti
compbrl :// URLs
compbrl www.
compbrl @ Mail-address
compbrl .com
compbrl .edu
compbrl .gov
compbrl .mil
compbrl .net
compbrl .org
compbrl .doc
compbrl .htm
compbrl .html
compbrl .tex
compbrl .txt
compbrl .gif
compbrl .jpg
compbrl .png
compbrl .wav
compbrl .tar
compbrl .zip

#comp6 \x0020         0      &#32;   SPACE
comp6 \x0021         5      &#33;   EXCLAMATION MARK
comp6 \x0022       4-4      &#34;   QUOTATION MARK
comp6 \x0023      3456      &#35;   NUMBER SIGN
comp6 \x0024     46-46      &#36;   DOLLAR SIGN
comp6 \x0025    123456      &#37;   PERCENT SIGN
comp6 \x0026     12346      &#38;   AMPERSAND
comp6 \x0027       6-6      &#39;   APOSTROPHE APOSTROPHE-QUOTE
comp6 \x0028       236      &#40;   LEFT PARENTHESIS
comp6 \x0029       356      &#41;   RIGHT PARENTHESIS
comp6 \x002A        35      &#42;   ASTERISK
comp6 \x002B       235      &#43;   PLUS SIGN
comp6 \x002C         2      &#44;   COMMA
comp6 \x002D        36      &#45;   HYPHEN-MINUS
comp6 \x002E         3      &#46;   FULL STOP PERIOD
comp6 \x002F       256      &#47;   SOLIDUS SLASH
comp6 \x0030       346      &#48;   DIGIT ZERO
comp6 \x0031        16      &#49;   DIGIT ONE
comp6 \x0032       126      &#50;   DIGIT TWO
comp6 \x0033       146      &#51;   DIGIT THREE
comp6 \x0034      1456      &#52;   DIGIT FOUR
comp6 \x0035       156      &#53;   DIGIT FIVE
comp6 \x0036      1246      &#54;   DIGIT SIX
comp6 \x0037     12456      &#55;   DIGIT SEVEN
comp6 \x0038      1256      &#56;   DIGIT EIGHT
comp6 \x0039       246      &#57;   DIGIT NINE
comp6 \x003A        25      &#58;   COLON
comp6 \x003B        23      &#59;   SEMICOLON
comp6 \x003C        56      &#60;   LESS-THAN SIGN
comp6 \x003D      2356      &#61;   EQUALS SIGN
comp6 \x003E        45      &#62;   GREATER-THAN SIGN
comp6 \x003F        26      &#63;   QUESTION MARK
comp6 \x0040     4-345      &#64;   COMMERCIAL AT
comp6 \x0041       4-1      &#65;   LATIN CAPITAL LETTER A
comp6 \x0042      4-12      &#66;   LATIN CAPITAL LETTER B
comp6 \x0043      4-14      &#67;   LATIN CAPITAL LETTER C
comp6 \x0044     4-145      &#68;   LATIN CAPITAL LETTER D
comp6 \x0045      4-15      &#69;   LATIN CAPITAL LETTER E
comp6 \x0046     4-124      &#70;   LATIN CAPITAL LETTER F
comp6 \x0047    4-1245      &#71;   LATIN CAPITAL LETTER G
comp6 \x0048     4-125      &#72;   LATIN CAPITAL LETTER H
comp6 \x0049      4-24      &#73;   LATIN CAPITAL LETTER I
comp6 \x004A     4-245      &#74;   LATIN CAPITAL LETTER J
comp6 \x004B      4-13      &#75;   LATIN CAPITAL LETTER K
comp6 \x004C     4-123      &#76;   LATIN CAPITAL LETTER L
comp6 \x004D     4-134      &#77;   LATIN CAPITAL LETTER M
comp6 \x004E    4-1345      &#78;   LATIN CAPITAL LETTER N
comp6 \x004F     4-135      &#79;   LATIN CAPITAL LETTER O
comp6 \x0050    4-1234      &#80;   LATIN CAPITAL LETTER P
comp6 \x0051   4-12345      &#81;   LATIN CAPITAL LETTER Q
comp6 \x0052    4-1235      &#82;   LATIN CAPITAL LETTER R
comp6 \x0053     4-234      &#83;   LATIN CAPITAL LETTER S
comp6 \x0054    4-2345      &#84;   LATIN CAPITAL LETTER T
comp6 \x0055     4-136      &#85;   LATIN CAPITAL LETTER U
comp6 \x0056    4-1236      &#86;   LATIN CAPITAL LETTER V
comp6 \x0057    4-2456      &#87;   LATIN CAPITAL LETTER W
comp6 \x0058    4-1346      &#88;   LATIN CAPITAL LETTER X
comp6 \x0059   4-13456      &#89;   LATIN CAPITAL LETTER Y
comp6 \x005A    4-1356      &#90;   LATIN CAPITAL LETTER Z
comp6 \x005B   4-12356      &#91;   LEFT SQUARE BRACKET
comp6 \x005C      4-34      &#92;   REVERSE SOLIDUS
comp6 \x005D   4-23456      &#93;   RIGHT SQUARE BRACKET
comp6 \x005E    4-2346      &#94;   CIRCUMFLEX ACCENT
comp6 \x005F     4-456      &#95;   LOW LINE
comp6 \x0060       345      &#96;   GRAVE ACCENT
comp6 \x0061         1      &#97;   LATIN SMALL LETTER A
comp6 \x0062        12      &#97;   LATIN SMALL LETTER B
comp6 \x0063        14      &#97;   LATIN SMALL LETTER C
comp6 \x0064       145      &#97;   LATIN SMALL LETTER D
comp6 \x0065        15      &#97;   LATIN SMALL LETTER E
comp6 \x0066       124      &#97;   LATIN SMALL LETTER F
comp6 \x0067      1245      &#97;   LATIN SMALL LETTER G
comp6 \x0068       125      &#97;   LATIN SMALL LETTER H
comp6 \x0069        24      &#97;   LATIN SMALL LETTER I
comp6 \x006A       245      &#97;   LATIN SMALL LETTER J
comp6 \x006B        13      &#97;   LATIN SMALL LETTER K
comp6 \x006C       123      &#97;   LATIN SMALL LETTER L
comp6 \x006D       134      &#97;   LATIN SMALL LETTER M
comp6 \x006E      1345      &#97;   LATIN SMALL LETTER N
comp6 \x006F       135      &#111;  LATIN SMALL LETTER O
comp6 \x0070      1234      &#112;  LATIN SMALL LETTER P
comp6 \x0071     12345      &#113;  LATIN SMALL LETTER Q
comp6 \x0072      1235      &#114;  LATIN SMALL LETTER R
comp6 \x0073       234      &#115;  LATIN SMALL LETTER S
comp6 \x0074      2345      &#116;  LATIN SMALL LETTER T
comp6 \x0075       136      &#117;  LATIN SMALL LETTER U
comp6 \x0076      1236      &#118;  LATIN SMALL LETTER V
comp6 \x0077      2456      &#119;  LATIN SMALL LETTER W
comp6 \x0078      1346      &#120;  LATIN SMALL LETTER X
comp6 \x0079     13456      &#121;  LATIN SMALL LETTER Y
comp6 \x007A      1356      &#122;  LATIN SMALL LETTER Z
comp6 \x007B     12356      &#123;  LEFT CURLY BRACKET
comp6 \x007C        34      &#124;  VERTICAL LINE
comp6 \x007D     23456      &#125;  RIGHT CURLY BRACKET
comp6 \x007E      2346      &#126;  TILDE
comp6 \x00A1      4-36      &#161;  INVERTED EXCLAMATION MARK
comp6 \x00A2       6-5      &#162;  CENT SIGN
comp6 \x00A3      4-46      &#163;  POUND SIGN
comp6 \x00A4     46-46      &#164;  CURRENCY SIGN
comp6 \x00A5      6-46      &#165;  YEN SIGN
comp6 \x00A6      6-15      &#166;  BROKEN BAR
comp6 \x00A7      4-35      &#167;  SECTION SIGN
comp6 \x00A8       6-4      &#168;  DIAERESIS
comp6 \x00A9   6-12346      &#169;  COPYRIGHT SIGN
comp6 \x00AA     6-125      &#170;  FEMININE ORDINAL INDICATOR
comp6 \x00AB     46-56      &#171;  LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
comp6 \x00AC    46-256      &#172;  NOT SIGN
comp6 \x00AD      6-36      &#173;  SOFT HYPHEN
comp6 \x00AE    6-1235      &#174;  REGISTERED SIGN
comp6 \x00AF      6-45      &#175;  MACRON
comp6 \x00B0     6-456      &#176;  DEGREE SIGN
comp6 \x00B1    46-235      &#177;  PLUS-MINUS SIGN
comp6 \x00B2      6-12      &#178;  SUPERSCRIPT TWO
comp6 \x00B3      6-14      &#179;  SUPERSCRIPT THREE
comp6 \x00B4      6-56      &#180;  ACUTE ACCENT
comp6 \x00B5     6-134      &#181;  MICRO SIGN
comp6 \x00B6     6-145      &#182;  PILCROW SIGN
comp6 \x00B7       4-3      &#183;  MIDDLE DOT
comp6 \x00B8       6-6      &#184;  CEDILLA
comp6 \x00B9       6-1      &#185;  SUPERSCRIPT ONE
comp6 \x00BA     6-245      &#186;  MASCULINE ORDINAL INDICATOR
comp6 \x00BB     46-45      &#187;  RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
comp6 \x00BC     6-136      &#188;  VULGAR FRACTION ONE QUARTER
comp6 \x00BD    6-1236      &#189;  VULGAR FRACTION ONE HALF
comp6 \x00BE    6-1346      &#190;  VULGAR FRACTION THREE QUARTERS
comp6 \x00BF       6-3      &#191;  INVERTED QUESTION MARK
comp6 \x00C0    46-236      &#192;  LATIN CAPITAL LETTER A WITH GRAVE
comp6 \x00C1       6-2      &#193;  LATIN CAPITAL LETTER A WITH ACUTE
comp6 \x00C2      4-16      &#194;  LATIN CAPITAL LETTER A WITH CIRCUMFLEX
comp6 \x00C3     4-346      &#195;  LATIN CAPITAL LETTER A WITH TILDE
comp6 \x00C4      4-56      &#196;  LATIN CAPITAL LETTER A WITH DIAERESIS
comp6 \x00C5    4-3456      &#197;  LATIN CAPITAL LETTER A WITH RING ABOVE
comp6 \x00C6       4-4      &#198;  LATIN CAPITAL LETTER AE
comp6 \x00C7   4-12346      &#199;  LATIN CAPITAL LETTER C WITH CEDILLA
comp6 \x00C8     46-35      &#200;  LATIN CAPITAL LETTER E WITH GRAVE
comp6 \x00C9  4-123456      &#201;  LATIN CAPITAL LETTER E WITH ACUTE
comp6 \x00CA     4-126      &#202;  LATIN CAPITAL LETTER E WITH CIRCUMFLEX
comp6 \x00CB     6-235      &#203;  LATIN CAPITAL LETTER E WITH DIAERESIS
comp6 \x00CC       4-5      &#204;  LATIN CAPITAL LETTER I WITH GRAVE
comp6 \x00CD      6-25      &#205;  LATIN CAPITAL LETTER I WITH ACUTE
comp6 \x00CE     4-146      &#206;  LATIN CAPITAL LETTER I WITH CIRCUMFLEX
comp6 \x00CF    6-2356      &#207;  LATIN CAPITAL LETTER I WITH DIAERESIS
comp6 \x00D0     4-356      &#208;  LATIN CAPITAL LETTER ETH
comp6 \x00D1     4-256      &#209;  LATIN CAPITAL LETTER N WITH TILDE
comp6 \x00D2      46-5      &#210;  LATIN CAPITAL LETTER O WITH GRAVE
comp6 \x00D3     6-256      &#211;  LATIN CAPITAL LETTER O WITH ACUTE
comp6 \x00D4    4-1456      &#212;  LATIN CAPITAL LETTER O WITH CIRCUMFLEX
comp6 \x00D5      4-26      &#213;  LATIN CAPITAL LETTER O WITH TILDE
comp6 \x00D6      6-35      &#214;  LATIN CAPITAL LETTER O WITH DIAERESIS
comp6 \x00D7     6-234      &#215;  MULTIPLICATION SIGN
comp6 \x00D8     4-246      &#216;  LATIN CAPITAL LETTER O WITH STROKE
comp6 \x00D9    46-356      &#217;  LATIN CAPITAL LETTER U WITH GRAVE
comp6 \x00DA      6-26      &#218;  LATIN CAPITAL LETTER U WITH ACUTE
comp6 \x00DB     4-156      &#219;  LATIN CAPITAL LETTER U WITH CIRCUMFLEX
comp6 \x00DC     6-236      &#220;  LATIN CAPITAL LETTER U WITH DIAERESIS
comp6 \x00DD     6-356      &#221;  LATIN CAPITAL LETTER Y WITH ACUTE
comp6 \x00DE     4-235      &#222;  LATIN CAPITAL LETTER THORN
comp6 \x00DF    6-3456      &#223;  LATIN SMALL LETTER SHARP S
comp6 \x00E0   6-12356      &#224;  LATIN SMALL LETTER A WITH GRAVE
comp6 \x00E1      6-16      &#225;  LATIN SMALL LETTER A WITH ACUTE
comp6 \x00E2     46-16      &#226;  LATIN SMALL LETTER A WITH CIRCUMFLEX
comp6 \x00E3    46-346      &#227;  LATIN SMALL LETTER A WITH TILDE
comp6 \x00E4     6-345      &#228;  LATIN SMALL LETTER A WITH DIAERESIS
comp6 \x00E5   46-3456      &#229;  LATIN SMALL LETTER A WITH RING ABOVE
comp6 \x00E6      46-4      &#230;  LATIN SMALL LETTER AE
comp6 \x00E7  46-12346      &#231;  LATIN SMALL LETTER C WITH CEDILLA
comp6 \x00E8    6-2346      &#232;  LATIN SMALL LETTER E WITH GRAVE
comp6 \x00E9  6-123456      &#233;  LATIN SMALL LETTER E WITH ACUTE
comp6 \x00EA    46-126      &#234;  LATIN SMALL LETTER E WITH CIRCUMFLEX
comp6 \x00EB    6-1246      &#235;  LATIN SMALL LETTER E WITH DIAERESIS
comp6 \x00EC      6-34      &#236;  LATIN SMALL LETTER I WITH GRAVE
comp6 \x00ED     6-146      &#237;  LATIN SMALL LETTER I WITH ACUTE
comp6 \x00EE    46-146      &#238;  LATIN SMALL LETTER I WITH CIRCUMFLEX
comp6 \x00EF   6-12456      &#239;  LATIN SMALL LETTER I WITH DIAERESIS
comp6 \x00F0    6-2345      &#240;  LATIN SMALL LETTER ETH
comp6 \x00F1    6-1345      &#241;  LATIN SMALL LETTER N WITH TILDE
comp6 \x00F2     6-346      &#242;  LATIN SMALL LETTER O WITH GRAVE
comp6 \x00F3    6-1456      &#243;  LATIN SMALL LETTER O WITH ACUTE
comp6 \x00F4   46-1456      &#244;  LATIN SMALL LETTER O WITH CIRCUMFLEX
comp6 \x00F5     6-135      &#245;  LATIN SMALL LETTER O WITH TILDE
comp6 \x00F6     6-246      &#246;  LATIN SMALL LETTER O WITH DIAERESIS
comp6 \x00F7   46-1256      &#247;  DIVISION SIGN
comp6 \x00F8    46-246      &#248;  LATIN SMALL LETTER O WITH STROKE
comp6 \x00F9   6-23456      &#249;  LATIN SMALL LETTER U WITH GRAVE
comp6 \x00FA     6-156      &#250;  LATIN SMALL LETTER U WITH ACUTE
comp6 \x00FB    46-156      &#251;  LATIN SMALL LETTER U WITH CIRCUMFLEX
comp6 \x00FC    6-1256      &#252;  LATIN SMALL LETTER U WITH DIAERESIS
comp6 \x00FD    6-2456      &#253;  LATIN SMALL LETTER Y WITH ACUTE
comp6 \x00FE    6-1234      &#254;  LATIN SMALL LETTER THORN
comp6 \x00FF   6-13456      &#255;  LATIN SMALL LETTER Y WITH DIAERESIS

# --- Context rules ---

# 2.6.2 Einzelgroßbuchstaben und Großbuchstabenfolgen

# According to the Systematik single letter capitals are to be
# announced with 45. This is not supported by liblouis so we use a
# context rule to mark those places and fix them later in a pass2 rule
# below
noback context !$U[]$U!$l @ad
noback context !$U[]$U~ @ad
noback context `[]$U!$l @ad
noback context `[]$U~ @ad

# Remove the markers to handle single letter capitals that were added above
noback pass2 @46-ad-46 @45

# FIXME: this seems to be needed for cases of midword capitalization
# such as 'kW', see de-g0-detailed-specs.yaml:216
noback pass2 @ad-46 @45

# --- Handling of virtual dots -------------------------------------------------

# Kürzungsverbot entfernen
noback pass2 @abcdef ?
# Apostroph vor Zahl ('98)
noback pass2 @3456-69 @3456-6
# Punkt vor Zahl (.45)
noback pass2 @3456-39 @3456-3
# Dummy-Zahl entfernen
noback pass2 @3456-b ?

# Aufhebungspunkt vor Komma nach tiefgestellten Zahlen
noback pass2 @ab @6

# Fehlende Lettersigns bei Zahl-Buchstaben-Verbindung in Kurzschrift bei
# Buchstaben a-j ergänzen
noback pass2 @ac-1 @6-1
noback pass2 @ac-12 @6-12
noback pass2 @ac-14 @6-14
noback pass2 @ac-145 @6-145
noback pass2 @ac-15 @6-15
noback pass2 @ac-124 @6-124
noback pass2 @ac-1245 @6-1245
noback pass2 @ac-125 @6-125
noback pass2 @ac-24 @6-24
noback pass2 @ac-245 @6-245
# Lettersigns bei Zahl-Buchstaben-Verbindung in Kurzschrift erhalten
noback pass2 @ac-6-1 @6-1
noback pass2 @ac-6-12 @6-12
noback pass2 @ac-6-14 @6-14
noback pass2 @ac-6-145 @6-145
noback pass2 @ac-6-15 @6-15
noback pass2 @ac-6-124 @6-124
noback pass2 @ac-6-1245 @6-1245
noback pass2 @ac-6-125 @6-125
noback pass2 @ac-6-24 @6-24
noback pass2 @ac-6-245 @6-245
# Restliche Lettersigns bei Zahl-Buchstaben-Verbindung in Kurzschrift entfernen
noback pass2 @ac-6 ?
# Markierung für Zahl-Buchstaben-Verbindung in Vollschrift entfernen
noback pass2 @ac ?

# Korrektur: Kürzung "des" zwischen Bindestrichen auflösen
noback pass3 @36-3-36 @36-145-123456-36
# Korrektur: Kürzung "im" vor Bindestrich oder zwischen Bindestrichen auflösen
noback pass3 @36-36a-36 @36-24-134-36
noback pass3 @36a-36 @24-134-36
# Korrektur: Als Bindestrich geschriebens Minuszeichen vor Zahl
noback pass3 @0-6-36a-6-3456 @0-4-36-3456
# Korrektur: Kürzung "ver" nach Bindestrich auflösen
noback pass3 @36[@36a] @1236-12456
# Bei allen weiteren P36 virtuellen Punkt a entfernen
noback pass3 @36a @36
