# liblouis: Unified English Braille Code (Grade 1)
#
#  Copyright (C) 2004-2008 ViewPlus Technologies, Inc. www.viewplus.com
#  Copyright (C) 2004-2006 JJB Software, Inc. www.jjb-software.com
#  Copyright (C) 2016 American Printing House for the Blind, Inc. www.aph.org
#  Copyright (C) 2016 Joseph Lee <joseph.lee22590@gmail.com>
#
#  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/>.
#
#  Maintained by John J. Boyer john.boyer@jjb-software.com
#                Mike Gray <mgray@aph.org>
#  Modified by Mike Gray <mgray@aph.org>
#              Joseph Lee <joseph.lee22590@gmail.com>

include en-ueb-chardefs.uti UEB specific char defs.
#   some dots are undefined now
include en-ueb-math.ctb UEB math from common linear format

numsign 3456  number sign, just a dots operand
numericmodechars .,
nocontractsign 56
numericnocontchars abcdefghij

#   add numeric space indicator
noback context _$d["\s"]$d @5

#   remove numeric space indicator
noback correct _$d["\""]$d "\s"

#   remove numeric indicator from numeric space indicator
noback pass2 @245-5-3456-245 @245-5-245       0 0
noback pass2 @245-5-3456-1 @245-5-1           0 1
noback pass2 @245-5-3456-12 @245-5-12         0 2
noback pass2 @245-5-3456-14 @245-5-14         0 3
noback pass2 @245-5-3456-145 @245-5-145       0 4
noback pass2 @245-5-3456-15 @245-5-15         0 5
noback pass2 @245-5-3456-145 @245-5-124       0 6
noback pass2 @245-5-3456-1245 @245-5-1245     0 7
noback pass2 @245-5-3456-125 @245-5-125       0 8
noback pass2 @245-5-3456-24 @245-5-24         0 9
noback pass2 @1-5-3456-245 @1-5-245           1 0
noback pass2 @1-5-3456-1 @1-5-1               1 1
noback pass2 @1-5-3456-12 @1-5-12             1 2
noback pass2 @1-5-3456-14 @1-5-14             1 3
noback pass2 @1-5-3456-145 @1-5-145           1 4
noback pass2 @1-5-3456-15 @1-5-15             1 5
noback pass2 @1-5-3456-145 @1-5-124           1 6
noback pass2 @1-5-3456-1245 @1-5-1245         1 7
noback pass2 @1-5-3456-125 @1-5-125           1 8
noback pass2 @1-5-3456-24 @1-5-24             1 9
noback pass2 @12-5-3456-245 @12-5-245         2 0
noback pass2 @12-5-3456-1 @12-5-1             2 1
noback pass2 @12-5-3456-12 @12-5-12           2 2
noback pass2 @12-5-3456-14 @12-5-14           2 3
noback pass2 @12-5-3456-145 @12-5-145         2 4
noback pass2 @12-5-3456-15 @12-5-15           2 5
noback pass2 @12-5-3456-145 @12-5-124         2 6
noback pass2 @12-5-3456-1245 @12-5-1245       2 7
noback pass2 @12-5-3456-125 @12-5-125         2 8
noback pass2 @12-5-3456-24 @12-5-24           2 9
noback pass2 @14-5-3456-245 @14-5-245         3 0
noback pass2 @14-5-3456-1 @14-5-1             3 1
noback pass2 @14-5-3456-12 @14-5-12           3 2
noback pass2 @14-5-3456-14 @14-5-14           3 3
noback pass2 @14-5-3456-145 @14-5-145         3 4
noback pass2 @14-5-3456-15 @14-5-15           3 5
noback pass2 @14-5-3456-145 @14-5-124         3 6
noback pass2 @14-5-3456-1245 @14-5-1245       3 7
noback pass2 @14-5-3456-125 @14-5-125         3 8
noback pass2 @14-5-3456-24 @14-5-24           3 9
noback pass2 @145-5-3456-245 @145-5-245       4 0
noback pass2 @145-5-3456-1 @145-5-1           4 1
noback pass2 @145-5-3456-12 @145-5-12         4 2
noback pass2 @145-5-3456-14 @145-5-14         4 3
noback pass2 @145-5-3456-145 @145-5-145       4 4
noback pass2 @145-5-3456-15 @145-5-15         4 5
noback pass2 @145-5-3456-145 @145-5-124       4 6
noback pass2 @145-5-3456-1245 @145-5-1245     4 7
noback pass2 @145-5-3456-125 @145-5-125       4 8
noback pass2 @145-5-3456-24 @145-5-24         4 9
noback pass2 @15-5-3456-245 @15-5-245         5 0
noback pass2 @15-5-3456-1 @15-5-1             5 1
noback pass2 @15-5-3456-12 @15-5-12           5 2
noback pass2 @15-5-3456-14 @15-5-14           5 3
noback pass2 @15-5-3456-145 @15-5-145         5 4
noback pass2 @15-5-3456-15 @15-5-15           5 5
noback pass2 @15-5-3456-145 @15-5-124         5 6
noback pass2 @15-5-3456-1245 @15-5-1245       5 7
noback pass2 @15-5-3456-125 @15-5-125         5 8
noback pass2 @15-5-3456-24 @15-5-24           5 9
noback pass2 @124-5-3456-245 @124-5-245       6 0
noback pass2 @124-5-3456-1 @124-5-1           6 1
noback pass2 @124-5-3456-12 @124-5-12         6 2
noback pass2 @124-5-3456-14 @124-5-14         6 3
noback pass2 @124-5-3456-145 @124-5-145       6 4
noback pass2 @124-5-3456-15 @124-5-15         6 5
noback pass2 @124-5-3456-145 @124-5-124       6 6
noback pass2 @124-5-3456-1245 @124-5-1245     6 7
noback pass2 @124-5-3456-125 @124-5-125       6 8
noback pass2 @124-5-3456-24 @124-5-24         6 9
noback pass2 @1245-5-3456-245 @1245-5-245     7 0
noback pass2 @1245-5-3456-1 @1245-5-1         7 1
noback pass2 @1245-5-3456-12 @1245-5-12       7 2
noback pass2 @1245-5-3456-14 @1245-5-14       7 3
noback pass2 @1245-5-3456-145 @1245-5-145     7 4
noback pass2 @1245-5-3456-15 @1245-5-15       7 5
noback pass2 @1245-5-3456-145 @1245-5-124     7 6
noback pass2 @1245-5-3456-1245 @1245-5-1245   7 7
noback pass2 @1245-5-3456-125 @1245-5-125     7 8
noback pass2 @1245-5-3456-24 @1245-5-24       7 9
noback pass2 @125-5-3456-245 @125-5-245       8 0
noback pass2 @125-5-3456-1 @125-5-1           8 1
noback pass2 @125-5-3456-12 @125-5-12         8 2
noback pass2 @125-5-3456-14 @125-5-14         8 3
noback pass2 @125-5-3456-145 @125-5-145       8 4
noback pass2 @125-5-3456-15 @125-5-15         8 5
noback pass2 @125-5-3456-145 @125-5-124       8 6
noback pass2 @125-5-3456-1245 @125-5-1245     8 7
noback pass2 @125-5-3456-125 @125-5-125       8 8
noback pass2 @125-5-3456-24 @125-5-24         8 9
noback pass2 @24-5-3456-245 @24-5-245         9 0
noback pass2 @24-5-3456-1 @24-5-1             9 1
noback pass2 @24-5-3456-12 @24-5-12           9 2
noback pass2 @24-5-3456-14 @24-5-14           9 3
noback pass2 @24-5-3456-145 @24-5-145         9 4
noback pass2 @24-5-3456-15 @24-5-15           9 5
noback pass2 @24-5-3456-145 @24-5-124         9 6
noback pass2 @24-5-3456-1245 @24-5-1245       9 7
noback pass2 @24-5-3456-125 @24-5-125         9 8
noback pass2 @24-5-3456-24 @24-5-24           9 9

capsletter 6
begcapsword 6-6
endcapsword 6-3
lencapsphrase 3
begcapsphrase 6-6-6
begcaps 6-6-6
endcaps 6-3

emphclass italic
emphclass underline
emphclass bold
emphclass script
emphclass transnote
emphclass trans1
emphclass trans2
emphclass trans3
emphclass trans4
emphclass trans5

emphletter italic 46-23
begemphword italic 46-2
endemphword italic 46-3
lenemphphrase italic 3
begemphphrase italic 46-2356
endemphphrase italic after 46-3

emphletter bold 45-23
begemphword bold 45-2
endemphword bold 45-3
lenemphphrase bold 3
begemphphrase bold 45-2356
endemphphrase bold after 45-3

emphletter underline 456-23
begemphword underline 456-2
endemphword underline 456-3
lenemphphrase underline 3
begemphphrase underline 456-2356
endemphphrase underline after 456-3

emphletter script 4-23
begemphword script 4-2
endemphword script 4-3
lenemphphrase script 3
begemphphrase script 4-2356
endemphphrase script after 4-3

begemph transnote 4-46-126
endemph transnote 4-46-354


emphletter trans1 4-3456-23
begemphword trans1 4-3456-2
endemphword trans1 4-3456-3
lenemphphrase trans1 3
begemphphrase trans1 4-3456-2356
endemphphrase trans1 after 4-3456-3

emphletter trans2 45-3456-23
begemphword trans2 45-3456-2
endemphword trans2 45-3456-3
lenemphphrase trans2 3
begemphphrase trans2 45-3456-2356
endemphphrase trans2 after 45-3456-3

emphletter trans3 456-3456-23
begemphword trans3 456-3456-2
endemphword trans3 456-3456-3
lenemphphrase trans3 3
begemphphrase trans3 456-3456-2356
endemphphrase trans3 after 456-3456-3

emphletter trans4 5-3456-23
begemphword trans4 5-3456-2
endemphword trans4 5-3456-3
lenemphphrase trans4 3
begemphphrase trans4 5-3456-2356
endemphphrase trans4 after 5-3456-3

emphletter trans5 46-3456-23
begemphword trans5 46-3456-2
endemphword trans5 46-3456-3
lenemphphrase trans5 3
begemphphrase trans5 46-3456-2356
endemphphrase trans5 after 46-3456-3

# display/passthrough for unicode braille
include braille-patterns.cti

# punctuation
#word 'em =
#word 'tis =
#word 'twas =
#endnum st 234-2345
#endnum nd 1345-145
#endnum rd 1235-145
#endnum 's 3-234
#endnum th 2345-125
#endnum 's 3-234
#always \s-\s 36
#always "... 236-256-256-256
#always ..." 256-256-256-356
#always ... 256-256-256
#always ...' 256-256-256-3
#repeated .... 0
repeated _ 46-36
#repeated ---- 36
#always .\s.\s." 256-256-256-356
#always .\s.\s. 256-256-256 . . .

# special character sequences

#context "\e"$a *
#noback always \\_ 56 letter sign before Roman page numbers
#pass2 @56-56 @56
#pass2 @3-56 @3

