# liblouis: Lithuanian 6-dot Braille table
#
# Copyright (C) 2017 Rimas Kudelis <rq@akl.lt>
# Copyright (C) 2017 Tadas Matusevičius <tadas.matus@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/>.

# The Lithuanian 6-dot Braille alphabet is described in a decree
# no. 878 of the Minister of Education, called "Dėl perėjimo prie
# naujos lietuviškos Brailio rašto abėcėlės tvarkos ir programos",
# which is in effect since 2000-07-08. Document number is 55-1620. At
# the time of writing this file, the document was accessible at
# https://www.e-tar.lt/portal/lt/legalAct/TAR.A110E8E6A83F .
# The document is referred to as "the standard" below.
#
# The standard specifies only the mapping of Lithuanian letters to 6-dot
# Braille writing system, no other characters are defined in it.
# Definitions of some punctuation and other characters are informally
# available on the Internet.
#
# This table builds on from these bits of information, but also adds
# a number of other definitions to make it more useful in computing.

###
### WHITESPACE
###

noback space           \x0009 0-0                          [CHARACTER TABULATION]
nofor space            \x0009 6-0                          [CHARACTER TABULATION]
space \x00a0 a
include spaces.uti

###
### LETTERS
###

# Base Latin letters.
include latinLetterDef6Dots.uti

# Letters with diacritics which are part of the Lithuanian alphabet.
lowercase         \x0105 16          ą LATIN SMALL LETTER A WITH OGONEK
lowercase         \x010d 146         č LATIN SMALL LETTER C WITH CARON
lowercase         \x0119 156         ę LATIN SMALL LETTER E WITH OGONEK
lowercase         \x0117 345         ė LATIN SMALL LETTER E WITH DOT ABOVE
lowercase         \x012f 246         į LATIN SMALL LETTER E WITH OGONEK
lowercase         \x0161 2346        š LATIN SMALL LETTER S WITH CARON
lowercase         \x0173 346         ų LATIN SMALL LETTER U WITH OGONEK
lowercase         \x016b 1256        ū LATIN SMALL LETTER U WITH MACRON
lowercase         \x017e 126         ž LATIN SMALL LETTER Z WITH CARON

base uppercase    \x0104 \x0105      Ąą LATIN CAPITAL LETTER A WITH OGONEK,LATIN SMALL LETTER A WITH OGONEK
base uppercase    \x010c \x010d      Čč LATIN CAPITAL LETTER C WITH CARON,LATIN SMALL LETTER C WITH CARON
base uppercase    \x0118 \x0119      Ęę LATIN CAPITAL LETTER E WITH OGONEK,LATIN SMALL LETTER E WITH OGONEK
base uppercase    \x0116 \x0117      Ėė LATIN CAPITAL LETTER E WITH DOT ABOVE,LATIN SMALL LETTER E WITH DOT ABOVE
base uppercase    \x012e \x012f      Įį LATIN CAPITAL LETTER I WITH OGONEK,LATIN SMALL LETTER E WITH OGONEK
base uppercase    \x0160 \x0161      Šš LATIN CAPITAL LETTER S WITH CARON,LATIN SMALL LETTER S WITH CARON
base uppercase    \x0172 \x0173      Ųų LATIN CAPITAL LETTER U WITH OGONEK,LATIN SMALL LETTER U WITH OGONEK
base uppercase    \x016a \x016b      Ūū LATIN CAPITAL LETTER U WITH MACRON,LATIN SMALL LETTER U WITH MACRON
base uppercase    \x017d \x017e      Žž LATIN CAPITAL LETTER Z WITH CARON,LATIN SMALL LETTER Z WITH CARON

###
### DIGITS
###

include digits6Dots.uti
include litdigits6Dots.uti


###
### PUNCTUATION
###

punctuation            \x002c 2                            , COMMA
punctuation            \x002e 256                          . FULL STOP
punctuation            \x003f 26                           ? QUESTION MARK
punctuation            \x0021 235                          ! EXCLAMATION MARK
punctuation            \x003a 25                           : COLON
punctuation            \x003b 23                           ; SEMICOLON
punctuation            \x0022 4                            " QUOTATION MARK
punctuation            \x0027 3                            ' APOSTROPHE
# According to Unicode, this is the preferred character to use for apostrophe.
noback punctuation     \x2019 3                            ’ RIGHT SINGLE QUOTATION MARK

punctuation            \x0028 2356                         ( LEFT PARENTHESIS
noback punctuation     \x0029 2356                         ) RIGHT PARENTHESIS
nofor punctuation      \x0029 6-2356                       ) RIGHT PARENTHESIS
punctuation            \x005b 12356                        [ LEFT SQUARE BRACKET
punctuation            \x005d 23456                        ] RIGHT SQUARE BRACKET
punctuation            \x007b 6-246                        { LEFT CURLY BRACKET
punctuation            \x007d 6-135                        } RIGHT CURLY BRACKET

punctuation            \x002d 36                           - HYPHEN-MINUS
punctuation            \x2013 6-36                         – EN DASH
noback punctuation     \x00ad 36                           [SOFT HYPHEN]
noback punctuation     \x2010 36                           ‐ HYPHEN
noback punctuation     \x2011 36                           ‑ NON-BREAKING HYPHEN
noback punctuation     \x2012 36                           ‒ FIGURE DASH
noback punctuation     \x2014 36                           — EM DASH
noback punctuation     \x2015 36                           ― HORIZONTAL BAR

# These are the typographically correct quotes in Lithuania.
punctuation            \x201e 236                          „ DOUBLE LOW-9 QUOTATION MARK
punctuation            \x201c 356                          “ LEFT DOUBLE QUOTATION MARK
# The following characters should not be used in Lithuanian texts.
noback punctuation     \x201d 6-4                          ” RIGHT DOUBLE QUOTATION MARK
noback punctuation     \x201f 6-4                          ” DOUBLE HIGH-REVERSED-9 QUOTATION MARK
# Angle quotation marks are not commonly used in Lithuanian text.
# It's probably much more common to see them as fancy breadcrumb separators
# than anything else, thus marking them as sign, not punctuation.
noback sign            \x00ab 6-4                          « LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
noback sign            \x00bb 6-4                          » RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
noback sign            \x2039 6-4                          ‹ SINGLE LEFT-POINTING ANGLE QUOTATION MARK
noback sign            \x203a 6-4                          › SINGLE RIGHT-POINTING ANGLE QUOTATION MARK



# Two versions of horizontal ellipsis.
# Both should consume any further repetitions of the same character.
noback punctuation     \x2026 256-256-256                  … HORIZONTAL ELLIPSIS
noback repeated        \x2026 256-256-256                  … HORIZONTAL ELLIPSIS
noback repeated        \x002e\x002e\x002e 256-256-256      ... Three times FULL STOP


###
### MATHEMATICAL SYMBOLS
###

math                   \x002b 5-235                        + PLUS SIGN
math                   \x2212 5-36                         − MINUS SIGN
math                   \x003c 5-246                        < LESS-THAN SIGN
math                   \x003d 5-2356                       = EQUALS SIGN
math                   \x003e 5-135                        > GREATER-THAN SIGN
noback math            \x00b1 5-235-36                     ± PLUS-MINUS SIGN
noback math            \x2213 5-36-235                     ∓ MINUS-OR-PLUS SIGN
math                   \x00d7 5-3                          × MULTIPLICATION SIGN
noback math            \x22C5 5-3                          ⋅ DOT OPERATOR
math                   \x00f7 5-256                        ÷ DIVISION SIGN
noback math            \x2236 5-256                        ∶ RATIO
noback math            \x2044 34                           ⁄ FRACTION SLASH
noback math            \x2215 34                           ∕ DIVISION SLASH


###
### OTHER CHARACTERS
###

sign                   \x0023 6-3456                       # NUMBER SIGN
sign                   \x0024 6-46                         $ DOLLAR SIGN
sign                   \x0025 123456                       % PERCENT SIGN
sign                   \x0026 12346                        & AMPERSAND
sign                   \x002a 35                           * ASTERISK
sign                   \x002f 34                           / SOLIDUS
sign                   \x0040 6-345                        @ COMMERCIAL AT
sign                   \x005c 6-34                         \ REVERSE SOLIDUS
sign                   \x005e 6-256                        ^ CIRCUMFLEX ACCENT
sign                   \x005f 1456                         _ LOW LINE
sign                   \x007c 6-456                        | VERTICAL LINE
# sign                   \x00a6 6-1456                       ¦ BROKEN BAR
sign                   \x00a7 6-346                        § SECTION SIGN
# sign                   \x00ac 6-235                        ¬ NOT SIGN
sign                   \x00b5 6-134                        µ MICRO SIGN
# sign                   \x00b6 6-1234                       ¶ PILCROW SIGN

sign                   \x0060 6-3                          ` GRAVE ACCENT
sign                   \x007e 6-26                         ~ TILDE

# sign                   \x00a2 6-14                         ¢ CENT SIGN
sign                   \x00a3 6-123                        £ POUND SIGN
sign                   \x20ac 6-15                         € EURO SIGN

sign                   \x2022 6-35                         • BULLET

noback sign            \x00a9 2356-46-14-2356              © COPYRIGHT SIGN
noback sign            \x00ae 2356-46-1235-2356            ® REGISTERED SIGN
noback sign            \x2117 2356-46-1234-2356            ℗ SOUND RECORDING COPYRIGHT

noback sign            \x2190 246-25                       ← LEFTWARDS ARROW
noback sign            \x2192 25-135                       → RIGHTWARDS ARROW

# Middle dot is unlikely to appear in text, except perhaps as a multiplication sign (dot operator).
noback sign            \x00b7 5-3                          · MIDDLE DOT

sign                   \x00b0 5-356                        ° DEGREE SIGN
noback sign            \x2032 5-35                         ′ PRIME
noback sign            \x2033 5-35-35                      ″ DOUBLE PRIME

noback sign            \x2103 5-356-46-14                  ℃ DEGREE CELSIUS
noback sign            \x2109 5-356-46-124                 ℉ DEGREE FAHRENHEIT


###
### INDICATOR AND SPECIAL SYMBOL OPCODES
###

hyphen                 \x002d 36                           - HYPHEN-MINUS
# TODO: this is same problem as https://github.com/liblouis/liblouis/issues/439. When that
#       issue is resolved, this decpoint line should be reviewed.
#decpoint               \x002c 2                            , COMMA

sign                   \xfffd 7                            � REPLACEMENT CHARACTER
undefined                     7                            Replacement dots for characters not defined in this table

# Including Braille patterns to avoid undefined dot combinations.
include braille-patterns.cti

capsletter                    46                           Single capital letter indicator
begcapsword                   456                          Capital letter word/block start indicator
endcapsword                   56                           Capital letter block end indicator
numsign                       3456                         Number start indicator in text

nocontractsign                56
nonumsign                     56
numericnocontchars     abcdefghij
midendnumericmodechars .,: