diff --git a/development/tools/convert_kmap.py b/development/tools/convert_kmap.py new file mode 100644 index 0000000000..2093abbecb --- /dev/null +++ b/development/tools/convert_kmap.py @@ -0,0 +1,213 @@ +#! /usr/bin/env python +# -*- coding: utf-8 -*- + +# file convert_kmap.py +# This file is part of LyX, the document processor. +# Licence details can be found in the file COPYING. + +# author Georg Baum + +# Full author contact details are available in file CREDITS + +# This script converts a kmap file from LaTeX commands to unicode characters +# The kmap file is read and written in utf8 encoding + + +import os, re, string, sys, unicodedata + +def usage(prog_name): + return ("Usage: %s unicodesymbolsfile inputfile outputfile\n" % prog_name + + "or %s unicodesymbolsfile outputfile" % prog_name) + + +def error(message): + sys.stderr.write(message + '\n') + sys.exit(1) + + +def trim_eol(line): + " Remove end of line char(s)." + if line[-2:-1] == '\r': + return line[:-2] + elif line[-1:] == '\r' or line[-1:] == '\n': + return line[:-1] + else: + # file with no EOL in last line + return line + + +def read(input): + " Read input file and strip lineendings." + lines = list() + while 1: + line = input.readline() + if not line: + break + lines.append(trim_eol(line).decode('utf8')) + return lines + + +def escape(word): + " Escape a word for LyXLex." + re_quote = re.compile(r'\s|,') + retval = u'' + i = 0 + for c in word: + if c == '\\' or c == '"' or c == '#': + retval = retval + u'\\' + retval = retval + c + if re_quote.match(retval): + return u'"%s"' % retval + return retval + + +def unescape(word): + " Unescape a LyXLex escaped word." + if len(word) > 1 and word[0] == '"' and word[-1] == '"': + start = 1 + stop = len(word) - 1 + else: + start = 0 + stop = len(word) + retval = u'' + i = start + while i < stop: + if word[i] == '\\' and i < stop - 1: + i = i + 1 + retval = retval + word[i] + i = i + 1 + return retval + + +def readsymbols(input): + " Build the symbol list from the unicodesymbols file and add some hardcoded symbols." + symbols = list() + while 1: + line = input.readline() + if not line: + break + line = trim_eol(line) + tokens = line.split() + if len(tokens) > 0 and tokens[0][0] != '#': + if len(tokens) > 1: + tokens[1] = unescape(tokens[1]) + if tokens[0][0:2] == "0x": + tokens[0] = int(tokens[0][2:], 16) + symbols.append(tokens) + # special cases from .cdef files (e.g. duplicates with different commands) + symbols.append([0x00a1, '\\nobreakspace']) + symbols.append([0x00a7, '\\S']) + symbols.append([0x00a9, '\\copyright']) + symbols.append([0x00b1, '$\\pm$']) + symbols.append([0x00b5, '$\\mu$']) + symbols.append([0x00b7, '$\\cdot$']) + symbols.append([0x00b9, '$\\mathonesuperior$']) + symbols.append([0x00d7, '$\\times$']) + symbols.append([0x00d7, '\\times']) + symbols.append([0x00f7, '\\div']) + symbols.append([0x20ac, '\\euro']) + # special caron, see lib/lyx2lyx/lyx_1_5.py for an explanation + symbols.append([0x030c, '\\q', '', 'combining']) + return symbols + + +def write(output, lines): + " Write output file with native lineendings." + for line in lines: + output.write(line.encode('utf8') + os.linesep) + + +def translate_symbol(unicodesymbols, symbol, try_combining = True): + " Translate a symbol from LaTeX to unicode." + re_combining = re.compile(r'^[^a-zA-Z]') + if len(symbol) == 1: + return symbol + for i in unicodesymbols: + # Play safe and don't try combining symbols (not sure if this is + # needed) + if i[1] == symbol and (len(i) < 4 or i[3].find('combining') < 0): + return unichr(i[0]) + if try_combining: + # no direct match, see whether this is a combining sequence + for i in unicodesymbols: + if len(i) > 3 and i[3].find('combining') >= 0 and symbol.find(i[1]) == 0: + # Test whether this is really a combining sequence, e.g. + # \"o or \d{o}, and not a symbol like \dh that shares the + # beginning with a combining symbol + translated = symbol[len(i[1]):] + if translated != '' and re_combining.match(translated): + # Really a combining sequence + if len(translated) > 1 and translated[0] == '{' and translated[-1] == '}': + # Strip braces from things like \d{o} + translated = translated[1:-1] + else: + # for some strange reason \\'\\i does not get + # correctly combined, so we try \\'\\i which has an + # entry in unicodesymbols + combined = translate_symbol(unicodesymbols, u'%s{%s}' % (i[1], translated)) + if combined != '': + return combined + if len(translated) > 1: + # The base character may be a symbol itself, e.g \"{\i} + translated = translate_symbol(unicodesymbols, translated, False) + # Play safe and only translate combining sequences with + # one base character + if len(translated) == 1 and (i[1] != '\\q' or translated in ['t', 'd', 'l', 'L']): + return unicodedata.normalize("NFKC", translated + unichr(i[0])) + else: + # we founed a combining character, but could not convert the argument to a single character + return '' + return '' + + +def convert(lines, unicodesymbols): + " Translate all symbols in lines from LaTeX to unicode." + # convert both commented and active entries + re_kmap = re.compile(r'^(#?\s*\\kmap\s+\S+\s+)([^\s]+)(.*)$') + re_kxmod = re.compile(r'^(#?\s*\\kxmod\s+\S+\s+\S+\s+)([^\s]+)(.*)$') + for i in range(len(lines)): + match = re_kmap.match(lines[i]) + if not match: + match = re_kxmod.match(lines[i]) + if match: + symbol = unescape(match.group(2)) + if len(symbol) > 2 and symbol[-2:] == '{}': + # The unicodesymbols file does not include the trailing delimiter {} + symbol = symbol[0:-2] + translated = translate_symbol(unicodesymbols, symbol) + if translated == '': + lines[i] = u'%s%s%s' % (match.group(1), match.group(2), match.group(3)) + else: + lines[i] = u'%s%s%s' % (match.group(1), escape(translated), match.group(3)) + continue + + +def main(argv): + + # Open files + if len(argv) == 2: + input = sys.stdin + output = sys.stdout + elif len(argv) == 4: + input = open(argv[2], 'rb') + output = open(argv[3], 'wb') + else: + error(usage(argv[0])) + unicodesymbols = open(argv[1], 'rb') + + # Do the real work + symbols = readsymbols(unicodesymbols) + lines = read(input) + convert(lines, symbols) + write(output, lines) + + # Close files + if len(argv) == 3: + input.close() + output.close() + + return 0 + + +if __name__ == "__main__": + main(sys.argv) diff --git a/lib/kbd/american-2.kmap b/lib/kbd/american-2.kmap index 7fe9a884ab..282b6ccbbd 100644 --- a/lib/kbd/american-2.kmap +++ b/lib/kbd/american-2.kmap @@ -6,14 +6,14 @@ \kmod ' acute aeiouAEIOU \kmod ` grave aeiouAEIOU \kmod \" umlaut aeouAEOU -\kxmod acute i "\\'{\\i}" -\kxmod grave i "\\`{\\i}" -\kxmod acute j "\\'{\\j}" -\kxmod grave j "\\`{\\j}" +\kxmod acute i í +\kxmod grave i ì +\kxmod acute j ȷ́ +\kxmod grave j ȷ̀ # \kxmod acute ' ' # \kxmod grave ` ` # \kxmod umlaut \" \" # # Example of substituting local chars to TeX-Strings # -# \kmap ß "\\ss{}" +# \kmap ß ß diff --git a/lib/kbd/american.kmap b/lib/kbd/american.kmap index 04cf4ba1a2..a6c37ca4f5 100644 --- a/lib/kbd/american.kmap +++ b/lib/kbd/american.kmap @@ -13,28 +13,28 @@ \kmod / hugarian_umlaut native \kmod : umlaut native \kmod ? circle native -# \kxmod acute i "\\'{\\i}" -# \kxmod grave i "\\`{\\i}" -# \kxmod tilde i "\\~{\\i}" -# \kxmod dot i "\\.{\\i}" -# \kxmod macron i "\\={\\i}" -# \kxmod circumflex i "\\^{\\i}" -# \kxmod breve i "\\u{\\i}" -# \kxmod caron i "\\v{\\i}" -# \kxmod hugarian_umlaut i "\\H{\\i}" -# \kxmod umlaut i "\\\"{\\i}" -# \kxmod circle i "\\r{\\i}" -# \kxmod acute j "\\'{\\j}" -# \kxmod grave j "\\`{\\j}" -# \kxmod tilde j "\\~{\\j}" -# \kxmod dot j "\\.{\\j}" -# \kxmod macron j "\\={\\j}" -# \kxmod circumflex j "\\^{\\j}" -# \kxmod breve j "\\u{\\j}" -# \kxmod caron j "\\v{\\j}" -# \kxmod hugarian_umlaut j "\\H{\\j}" -# \kxmod umlaut j "\\\"{\\j}" -# \kxmod circle j "\\r{\\j}" +# \kxmod acute i í +# \kxmod grave i ì +# \kxmod tilde i ĩ +# \kxmod dot i ı̇ +# \kxmod macron i ī +# \kxmod circumflex i î +# \kxmod breve i ĭ +# \kxmod caron i ǐ +# \kxmod hugarian_umlaut i ı̋ +# \kxmod umlaut i ï +# \kxmod circle i ı̊ +# \kxmod acute j ȷ́ +# \kxmod grave j ȷ̀ +# \kxmod tilde j ȷ̃ +# \kxmod dot j ȷ̇ +# \kxmod macron j ȷ̄ +# \kxmod circumflex j ĵ +# \kxmod breve j ȷ̆ +# \kxmod caron j ǰ +# \kxmod hugarian_umlaut j ȷ̋ +# \kxmod umlaut j ȷ̈ +# \kxmod circle j ȷ̊ # \kxmod acute ' ' # \kxmod grave ` ` # \kxmod tilde ~ ~ diff --git a/lib/kbd/bg-bds-1251.kmap b/lib/kbd/bg-bds-1251.kmap index 864000b98a..28974c124a 100644 --- a/lib/kbd/bg-bds-1251.kmap +++ b/lib/kbd/bg-bds-1251.kmap @@ -2,7 +2,7 @@ # by George Tellalov, 2001 \kmap ` ( -\kmap = "." +\kmap = . \kmap q "," \kmap w у \kmap e е @@ -39,10 +39,10 @@ \kmap "/" б -\kmap "~" ")" -\kmap "@" "?" -\kmap "#" "+" -\kmap "$" "\"" +\kmap "~" ) +\kmap "@" ? +\kmap "#" + +\kmap "$" \" \kmap ^ = \kmap & : \kmap * / diff --git a/lib/kbd/brazil.kmap b/lib/kbd/brazil.kmap index 146928d7ca..c06bd4869a 100644 --- a/lib/kbd/brazil.kmap +++ b/lib/kbd/brazil.kmap @@ -19,7 +19,7 @@ \kmod ^ circumflex eaoEAO \kmod \" umlaut aeiouAEIOU -\kxmod acute c "\\c{c}" -\kxmod acute C "\\c{C}" +\kxmod acute c ç +\kxmod acute C Ç -\kxmod acute i "\\'{\\i}" +\kxmod acute i í diff --git a/lib/kbd/brazil2.kmap b/lib/kbd/brazil2.kmap index 98ad8beeae..58b179b371 100644 --- a/lib/kbd/brazil2.kmap +++ b/lib/kbd/brazil2.kmap @@ -17,13 +17,13 @@ \kmod ~ tilde aoAO \kmod ^ circumflex eaoEAO \kmod ' cedilla cC -\kxmod cedilla a "\\'{a}" -\kxmod cedilla A "\\'{A}" -\kxmod cedilla e "\\'{e}" -\kxmod cedilla E "\\'{E}" -\kxmod cedilla i "\\'{i}" -\kxmod cedilla I "\\'{I}" -\kxmod cedilla o "\\'{o}" -\kxmod cedilla O "\\'{O}" -\kxmod cedilla u "\\'{u}" -\kxmod cedilla U "\\'{U}" +\kxmod cedilla a á +\kxmod cedilla A Á +\kxmod cedilla e é +\kxmod cedilla E É +\kxmod cedilla i í +\kxmod cedilla I Í +\kxmod cedilla o ó +\kxmod cedilla O Ó +\kxmod cedilla u ú +\kxmod cedilla U Ú diff --git a/lib/kbd/czech-prg.kmap b/lib/kbd/czech-prg.kmap index 7e2b0de189..1b40d2efc5 100644 --- a/lib/kbd/czech-prg.kmap +++ b/lib/kbd/czech-prg.kmap @@ -9,31 +9,31 @@ \kmap ~ ; \kmap 1 + # map numbers to Czech letters and \kmap ! 1 # Shift-numbers to numbers -\kmap 2 "\\v{e}" +\kmap 2 ě \kmap @ 2 -\kmap 3 "\\v{s}" +\kmap 3 š \kmap \# 3 -\kmap 4 "\\v{c}" +\kmap 4 č \kmap $ 4 -\kmap 5 "\\v{r}" +\kmap 5 ř \kmap % 5 -\kmap 6 "\\v{z}" +\kmap 6 ž \kmap ^ 6 -\kmap 7 "\\'{y}" +\kmap 7 ý \kmap & 7 -\kmap 8 "\\'{a}" +\kmap 8 á \kmap * 8 -\kmap 9 "\\'{\\i}" +\kmap 9 í \kmap ( 9 -\kmap 0 "\\'{e}" +\kmap 0 é \kmap ) 0 \kmap - = # map other keys to reflect Slovak keyboard \kmap _ % -\kmap ; "\\r{u}" +\kmap ; ů \kmap : \" -\kmap ' "\\S{}" +\kmap ' § \kmap \" ! -\kmap [ "\\'{u}" +\kmap [ ú \kmap { / \kmap ] ) \kmap } ( @@ -41,14 +41,14 @@ \kmap > : \kmap ? _ \kmap / - -\kxmod caron o "\\^{o}" # mapping exception - generate ^ instead for o -\kxmod caron O "\\^{O}" -\kxmod caron u "\\r{u}" # generate circle for u - it's a Czech letter -\kxmod caron U "\\r{U}" -\kxmod caron t "\\q{t}" # use proper caron mark for t, l, d and L -\kxmod caron l "\\q{l}" -\kxmod caron L "\\q{L}" -\kxmod caron d "\\q{d}" -\kxmod acute i "\\'{\\i}" # use only root of i for i acute +\kxmod caron o ô # mapping exception - generate ^ instead for o +\kxmod caron O Ô +\kxmod caron u ů # generate circle for u - it's a Czech letter +\kxmod caron U Ů +\kxmod caron t ť # use proper caron mark for t, l, d and L +\kxmod caron l ľ +\kxmod caron L Ľ +\kxmod caron d ď +\kxmod acute i í # use only root of i for i acute diff --git a/lib/kbd/czech.kmap b/lib/kbd/czech.kmap index e70ee6212f..390698cae6 100644 --- a/lib/kbd/czech.kmap +++ b/lib/kbd/czech.kmap @@ -9,31 +9,31 @@ \kmap ~ ; \kmap 1 + # map numbers to Czech letters and \kmap ! 1 # Shift-numbers to numbers -\kmap 2 "\\v{e}" +\kmap 2 ě \kmap @ 2 -\kmap 3 "\\v{s}" +\kmap 3 š \kmap \# 3 -\kmap 4 "\\v{c}" +\kmap 4 č \kmap $ 4 -\kmap 5 "\\v{r}" +\kmap 5 ř \kmap % 5 -\kmap 6 "\\v{z}" +\kmap 6 ž \kmap ^ 6 -\kmap 7 "\\'{y}" +\kmap 7 ý \kmap & 7 -\kmap 8 "\\'{a}" +\kmap 8 á \kmap * 8 -\kmap 9 "\\'{\\i}" +\kmap 9 í \kmap ( 9 -\kmap 0 "\\'{e}" +\kmap 0 é \kmap ) 0 \kmap - = # map other keys to reflect Slovak keyboard \kmap _ % -\kmap ; "\\r{u}" +\kmap ; ů \kmap : \" -\kmap ' "\\S{}" +\kmap ' § \kmap \" ! -\kmap [ "\\'{u}" +\kmap [ ú \kmap { / \kmap ] ) \kmap } ( @@ -41,17 +41,17 @@ \kmap > : \kmap ? _ \kmap / - -\kxmod caron o "\\^{o}" # mapping exception - generate ^ instead for o -\kxmod caron O "\\^{O}" -\kxmod caron u "\\r{u}" # generate circle for u - it's a Czech letter -\kxmod caron U "\\r{U}" -\kxmod caron t "\\q{t}" # use proper caron mark for t, l, d and L -\kxmod caron l "\\q{l}" -\kxmod caron L "\\q{L}" -\kxmod caron d "\\q{d}" -\kxmod acute i "\\'{\\i}" # use only root of i for i acute -\kxmod caron y "\\v{z}" # switch from QWERTY to QWERTZ -\kxmod caron Y "\\v{Z}" +\kxmod caron o ô # mapping exception - generate ^ instead for o +\kxmod caron O Ô +\kxmod caron u ů # generate circle for u - it's a Czech letter +\kxmod caron U Ů +\kxmod caron t ť # use proper caron mark for t, l, d and L +\kxmod caron l ľ +\kxmod caron L Ľ +\kxmod caron d ď +\kxmod acute i í # use only root of i for i acute +\kxmod caron y ž # switch from QWERTY to QWERTZ +\kxmod caron Y Ž \kmap z y \kmap Z Y \kmap y z diff --git a/lib/kbd/espanol.kmap b/lib/kbd/espanol.kmap index 12bd53a2c9..52a4f670a3 100644 --- a/lib/kbd/espanol.kmap +++ b/lib/kbd/espanol.kmap @@ -7,7 +7,7 @@ \kmod ~ tilde nN!? \kmod : umlaut uU # The " doesn't work, even \". -\kxmod acute i "\\'{\\i}" +\kxmod acute i í \kxmod tilde ! "\textexclamdown{}" \kxmod tilde ? "\textquestiondown{}" diff --git a/lib/kbd/european.kmap b/lib/kbd/european.kmap index 14636d697f..bf24a74a86 100644 --- a/lib/kbd/european.kmap +++ b/lib/kbd/european.kmap @@ -20,49 +20,49 @@ # # some exceptions # -\kxmod acute i "\\'{\\i}" -\kxmod grave i "\\`{\\i}" -\kxmod circumflex i "\\^{\\i}" -\kxmod acute j "\\'{\\j}" -\kxmod grave j "\\`{\\j}" -\kxmod circumflex j "\\^{\\j}" +\kxmod acute i í +\kxmod grave i ì +\kxmod circumflex i î +\kxmod acute j ȷ́ +\kxmod grave j ȷ̀ +\kxmod circumflex j ĵ # # polish characters # -\kxmod cedilla a "\\k{a}" -\kxmod cedilla A "\\k{A}" -# \kxmod acute c "\\'{c}" -# \kxmod acute C "\\'{C}" -\kxmod cedilla e "\\k{e}" -\kxmod cedilla E "\\k{E}" -\kxmod acute l "\\l{}" -\kxmod acute L "\\L{}" -# \kxmod acute n "\\'{n}" -# \kxmod acute N "\\'{N}" -# \kxmod acute o "\\'{o}" -# \kxmod acute O "\\'{O}" -# \kxmod acute s "\\'{s}" -# \kxmod acute S "\\'{S}" -# \kxmod dot z "\\.{z}" -# \kxmod dot Z "\\.{Z}" -# \kxmod acute z "\\'{z}" -# \kxmod acute Z "\\'{Z}" +\kxmod cedilla a ą +\kxmod cedilla A Ą +# \kxmod acute c ć +# \kxmod acute C Ć +\kxmod cedilla e ę +\kxmod cedilla E Ę +\kxmod acute l ł +\kxmod acute L Ł +# \kxmod acute n ń +# \kxmod acute N Ń +# \kxmod acute o ó +# \kxmod acute O Ó +# \kxmod acute s ś +# \kxmod acute S Ś +# \kxmod dot z ż +# \kxmod dot Z Ż +# \kxmod acute z ź +# \kxmod acute Z Ź # # german characters # -\kxmod umlaut s "\\ss{}" -\kxmod umlaut S "\\ss{}" +\kxmod umlaut s ß +\kxmod umlaut S ß # # french characters # -\kmap ¬ "\\oe{}" +\kmap ¬ œ # # special characters # -\kxmod umlaut $ "\\pounds{}" # pound -\kxmod umlaut \# "\\S{}" # paragraph +\kxmod umlaut $ £ # pound +\kxmod umlaut \# § # paragraph \kxmod umlaut ~ "\\b{}" # degree -\kmap ¤ "\\euro{}" # euro sign, to use with package eurofont +\kmap ¤ € # euro sign, to use with package eurofont # # \kxmod acute ' ' # \kxmod grave ` ` @@ -74,4 +74,4 @@ # # Example of substituting local chars to TeX-Strings # -# \kmap ß "\\ss{}" +# \kmap ß ß diff --git a/lib/kbd/francais.kmap b/lib/kbd/francais.kmap index 59f0fb21b8..b38ebc4368 100644 --- a/lib/kbd/francais.kmap +++ b/lib/kbd/francais.kmap @@ -2,11 +2,11 @@ # Key definition file for French national keyboard for LyX # -\kmap ¬ "\\oe{}" # {\oe} before u and i +\kmap ¬ œ # {\oe} before u and i \kmod ¨ umlaut aeiouAEIOU # umlaut on ¨ -\kxmod umlaut i "\\\"{\\i}" # some exceptions +\kxmod umlaut i ï # some exceptions \kmod ^ circumflex aeiouAEIOU # circumflex on ^ -\kxmod circumflex i "\\^{\\i}" # some exceptions +\kxmod circumflex i î # some exceptions \kmod ² cedilla cC # cedilla on cC -\kmap ¤ "\\euro{}" # euro sign, to use with package eurofont +\kmap ¤ € # euro sign, to use with package eurofont diff --git a/lib/kbd/french.kmap b/lib/kbd/french.kmap index ae7bcbf4cb..0b8a5511c3 100644 --- a/lib/kbd/french.kmap +++ b/lib/kbd/french.kmap @@ -11,7 +11,7 @@ \kmod [ circumflex aceijnorsuyzACEIJNORSUYZ # circumflex on [ \kmap 1 & # map numbers to some letters and \kmap ! 1 # Shift-numbers to numbers -\kmap 2 "\\'{e}" +\kmap 2 é \kmap @ 2 \kmap 3 \" \kmap \# 3 @@ -21,17 +21,17 @@ \kmap % 5 \kmap 6 - \kmap ^ 6 -\kmap 7 "\\`{e}" +\kmap 7 è \kmap & 7 \kmap 8 _ \kmap * 8 -\kmap 9 "\\c{c}" +\kmap 9 ç \kmap ( 9 -\kmap 0 "\\`{a}" +\kmap 0 à \kmap ) 0 \kmap - ) \kmap _ "\\b{}" # degree sign? -#\kmap ` # to the power of two? +#\kmap ` \# to the power of two? \kmap a q \kmap A Q # switched A<->Q \kmap q a @@ -43,18 +43,18 @@ \kmap m "," \kmap M ? \kmap ] $ -\kmap } "\\pounds{}" # pound sign? +\kmap } £ # pound sign? \kmap ; m \kmap : M -\kmap ' "\\`{u}" +\kmap ' ù \kmap \" % \kmap . : \kmap "," ; \kmap < . \kmap > / -\kmap ? "\\S{}" +\kmap ? § \kmap / ! \kmap \\ * -\kmap | "$\\mu$" -\kxmod circumflex i "\\^{\\i}" # some exceptions -\kxmod umlaut i "\\\"{\\i}" +\kmap | µ +\kxmod circumflex i î # some exceptions +\kxmod umlaut i ï diff --git a/lib/kbd/german-2.kmap b/lib/kbd/german-2.kmap index 5d4c514e39..7748823131 100644 --- a/lib/kbd/german-2.kmap +++ b/lib/kbd/german-2.kmap @@ -13,7 +13,7 @@ \kmap Ü Ü \kmap ~ ° # degree \kmap @ \" # shift-numbers is different on German kbd -\kmap \# "\\S{}" +\kmap \# § \kmap ^ & \kmap & / \kmap * ( @@ -41,10 +41,10 @@ \kmap ? _ \kmap \\ \# \kmap | ' -\kxmod acute i "\\'{\\i}" # correct some misspellings :-) -\kxmod acute j "\\'{\\j}" -\kxmod grave i "\\`{\\i}" -\kxmod grave j "\\`{\\j}" -\kxmod circumflex i "\\^{\\i}" -\kxmod circumflex j "\\^{\\j}" +\kxmod acute i í # correct some misspellings :-) +\kxmod acute j ȷ́ +\kxmod grave i ì +\kxmod grave j ȷ̀ +\kxmod circumflex i î +\kxmod circumflex j ĵ diff --git a/lib/kbd/german-3.kmap b/lib/kbd/german-3.kmap index 12095daf9a..7f922920e3 100644 --- a/lib/kbd/german-3.kmap +++ b/lib/kbd/german-3.kmap @@ -45,10 +45,10 @@ \kmap \\ \# \kmap | ' # needed only for lyx-0.10.7 -#\kxmod acute i "\\'\\i" # correct some misspellings :-) -#\kxmod acute j "\\'\\j" -#\kxmod grave i "\\`\\i" -#\kxmod grave j "\\`\\j" -#\kxmod circumflex i "\\^\\i" -#\kxmod circumflex j "\\^\\j" +#\kxmod acute i í # correct some misspellings :-) +#\kxmod acute j ȷ́ +#\kxmod grave i ì +#\kxmod grave j ȷ̀ +#\kxmod circumflex i î +#\kxmod circumflex j ĵ diff --git a/lib/kbd/german.kmap b/lib/kbd/german.kmap index b1ae30bda8..8d19a26394 100644 --- a/lib/kbd/german.kmap +++ b/lib/kbd/german.kmap @@ -6,13 +6,13 @@ \kmod ` circumflex aceijnorsuyzACEIJNORSUYZ # dead circumflex \kmap ~ ° # degree \kmap @ \" # shift-numbers is different on German kbd -\kmap \# "\\S{}" +\kmap \# § \kmap ^ & \kmap & / \kmap * ( \kmap ( ) \kmap ) = -\kmap - "\\ss{}" # - maps to sharfes s +\kmap - ß # - maps to sharfes s \kmap _ ? # _ maps to question mark \kmod = acute aceijlnorsuyzACEIJLNORSUYZ # = is acute deadkey \kmod + grave aceijlnorsuyzACEIJLNORSUYZ # Shift-= is grave dead key @@ -20,24 +20,24 @@ \kmap Z Y \kmap y z \kmap Y Z -\kmap [ "\\\"{u}" # [{ maps to u umlaut -\kmap { "\\\"{U}" +\kmap [ ü # [{ maps to u umlaut +\kmap { Ü \kmap ] + \kmap } * -\kmap ; "\\\"{o}" # ;: maps to o umlaut -\kmap : "\\\"{O}" -\kmap ' "\\\"{a}" # '" maps to a umlaut -\kmap \" "\\\"{A}" +\kmap ; ö # ;: maps to o umlaut +\kmap : Ö +\kmap ' ä # '" maps to a umlaut +\kmap \" Ä \kmap < ; # yet some modifiers \kmap > : \kmap / - \kmap ? _ \kmap \\ \# \kmap | ' -\kxmod acute i "\\'{\\i}" # correct some misspellings :-) -\kxmod acute j "\\'{\\j}" -\kxmod grave i "\\`{\\i}" -\kxmod grave j "\\`{\\j}" -\kxmod circumflex i "\\^{\\i}" -\kxmod circumflex j "\\^{\\j}" +\kxmod acute i í # correct some misspellings :-) +\kxmod acute j ȷ́ +\kxmod grave i ì +\kxmod grave j ȷ̀ +\kxmod circumflex i î +\kxmod circumflex j ĵ diff --git a/lib/kbd/koi8-r.kmap b/lib/kbd/koi8-r.kmap index d7dda8a7df..c06e29f77f 100644 --- a/lib/kbd/koi8-r.kmap +++ b/lib/kbd/koi8-r.kmap @@ -34,13 +34,13 @@ \kmap m ь \kmap "," б \kmap "." ю -\kmap "/" "." -\kmap "@" "\"" -\kmap "^" ":" -\kmap "&" "?" -\kmap "`" "ё" -\kmap "~" "Ё" -\kmap "$" ";" +\kmap "/" . +\kmap "@" \" +\kmap "^" : +\kmap "&" ? +\kmap "`" ё +\kmap "~" Ё +\kmap "$" ; \kmap Q Й diff --git a/lib/kbd/magyar-2.kmap b/lib/kbd/magyar-2.kmap index 85ffc74382..58e3cbe8c6 100644 --- a/lib/kbd/magyar-2.kmap +++ b/lib/kbd/magyar-2.kmap @@ -6,26 +6,26 @@ # These are the bindings for Hungarian keyboards using ISO-8859.2 (Latin-2) # key mapping for X. # -\kmap ű "\\H{u}" -\kmap Ű "\\H{U}" -\kmap ő "\\H{o}" -\kmap Ő "\\H{O}" -\kmap ú "\\'{u}" -\kmap Ú "\\'{U}" -\kmap é "\\'{e}" -\kmap É "\\'{E}" -\kmap á "\\'{a}" -\kmap Á "\\'{A}" -\kmap í "\\'{\\i}" -\kmap Í "\\'{I}" -\kmap ó "\\'{o}" -\kmap Ó "\\'{O}" -\kmap ü "\\\"{u}" -\kmap Ü "\\\"{U}" -\kmap ö "\\\"{o}" -\kmap Ö "\\\"{O}" +\kmap ű ű +\kmap Ű Ű +\kmap ő ő +\kmap Ő Ő +\kmap ú ú +\kmap Ú Ú +\kmap é é +\kmap É É +\kmap á á +\kmap Á Á +\kmap í í +\kmap Í Í +\kmap ó ó +\kmap Ó Ó +\kmap ü ü +\kmap Ü Ü +\kmap ö ö +\kmap Ö Ö -\kmap § "\\S{}" -\kmap ß "\\ss{}" -\kmap × "\\times{}" -\kmap ÷ "\\div{}" +\kmap § § +\kmap ß ß +\kmap × × +\kmap ÷ ÷ diff --git a/lib/kbd/magyar.kmap b/lib/kbd/magyar.kmap index 13a558937a..cdf5a9dfdc 100644 --- a/lib/kbd/magyar.kmap +++ b/lib/kbd/magyar.kmap @@ -8,24 +8,24 @@ # (c)1996 by Boloni Laszlo, blaci@utcluj.ro # -\kmap [ "\\H{o}" -\kmap { "\\H{O}" -\kmap \\ "\\H{u}" -\kmap | "\\H{U}" -\kmap ] "\\'{u}" -\kmap } "\\'{U}" -\kmap ; "\\'{e}" -\kmap : "\\'{E}" -\kmap ' "\\'{a}" -\kmap \" "\\'{A}" -\kmap ` "\\'{\\i}" -\kmap ~ "\\'{I}" -\kmap = "\\'{o}" -\kmap + "\\'{O}" -\kmap - "\\\"{u}" -\kmap _ "\\\"{U}" -\kmap 0 "\\\"{o}" -\kmap ) "\\\"{O}" +\kmap [ ő +\kmap { Ő +\kmap \\ ű +\kmap | Ű +\kmap ] ú +\kmap } Ú +\kmap ; é +\kmap : É +\kmap ' á +\kmap \" Á +\kmap ` í +\kmap ~ Í +\kmap = ó +\kmap + Ó +\kmap - ü +\kmap _ Ü +\kmap 0 ö +\kmap ) Ö \kmap / - \kmap ? ; \kmap > : diff --git a/lib/kbd/polish.kmap b/lib/kbd/polish.kmap index 42da0165ff..84936a35e5 100644 --- a/lib/kbd/polish.kmap +++ b/lib/kbd/polish.kmap @@ -8,21 +8,21 @@ # Latin letters. # \kmod / acute aAcCeElLnNoOsSzZxX -\kxmod acute a "\\k{a}" -\kxmod acute A "\\k{A}" -\kxmod acute c "\\'{c}" -\kxmod acute C "\\'{C}" -\kxmod acute e "\\k{e}" -\kxmod acute E "\\k{E}" -\kxmod acute l "\\l{}" -\kxmod acute L "\\L{}" -\kxmod acute n "\\'{n}" -\kxmod acute N "\\'{N}" -\kxmod acute o "\\'{o}" -\kxmod acute O "\\'{O}" -\kxmod acute s "\\'{s}" -\kxmod acute S "\\'{S}" -\kxmod acute z "\\.{z}" -\kxmod acute Z "\\.{Z}" -\kxmod acute x "\\'{z}" -\kxmod acute X "\\'{Z}" +\kxmod acute a ą +\kxmod acute A Ą +\kxmod acute c ć +\kxmod acute C Ć +\kxmod acute e ę +\kxmod acute E Ę +\kxmod acute l ł +\kxmod acute L Ł +\kxmod acute n ń +\kxmod acute N Ń +\kxmod acute o ó +\kxmod acute O Ó +\kxmod acute s ś +\kxmod acute S Ś +\kxmod acute z ż +\kxmod acute Z Ż +\kxmod acute x ź +\kxmod acute X Ź diff --git a/lib/kbd/polski.kmap b/lib/kbd/polski.kmap index 2bc41da14f..7ec50d6e26 100644 --- a/lib/kbd/polski.kmap +++ b/lib/kbd/polski.kmap @@ -8,22 +8,22 @@ # Latin letters. # \kmod / acute aAcCeElLnNoOsSzZxXu -\kxmod acute a "ą" -\kxmod acute A "Ą" -\kxmod acute c "ć" -\kxmod acute C "Ć" -\kxmod acute e "ę" -\kxmod acute E "Ę" -\kxmod acute l "ł" -\kxmod acute L "Ł" -\kxmod acute n "ń" -\kxmod acute N "Ń" -\kxmod acute o "ó" -\kxmod acute O "Ó" -\kxmod acute s "ś" -\kxmod acute S "Ś" -\kxmod acute z "ż" -\kxmod acute Z "Ż" -\kxmod acute x "ź" -\kxmod acute X "Ź" -\kxmod acute u "\\euro{}" # wymaga pakietu eurosym +\kxmod acute a ą +\kxmod acute A Ą +\kxmod acute c ć +\kxmod acute C Ć +\kxmod acute e ę +\kxmod acute E Ę +\kxmod acute l ł +\kxmod acute L Ł +\kxmod acute n ń +\kxmod acute N Ń +\kxmod acute o ó +\kxmod acute O Ó +\kxmod acute s ś +\kxmod acute S Ś +\kxmod acute z ż +\kxmod acute Z Ż +\kxmod acute x ź +\kxmod acute X Ź +\kxmod acute u € # wymaga pakietu eurosym diff --git a/lib/kbd/portuges.kmap b/lib/kbd/portuges.kmap index b7a2c790d2..07f83c216a 100644 --- a/lib/kbd/portuges.kmap +++ b/lib/kbd/portuges.kmap @@ -9,7 +9,7 @@ \kmod ~ tilde aoAO \kmod ^ circumflex eaoEAO -\kxmod acute i "\\'{\\i}" +\kxmod acute i í # \kxmod acute ´ ´ # \kxmod grave ` "$\\grave{}$" # is this really needed?! diff --git a/lib/kbd/romanian.kmap b/lib/kbd/romanian.kmap index 6c11559036..4a03ef3950 100644 --- a/lib/kbd/romanian.kmap +++ b/lib/kbd/romanian.kmap @@ -8,16 +8,16 @@ # (c)1996 by Boloni Laszlo, blaci@utcluj.ro # -\kmap ; "\\c{s}" -\kmap : "\\c{S}" -\kmap ' "\\c{t}" -\kmap \" "\\c{T}" -\kmap [ "\\u{a}" -\kmap { "\\u{A}" -\kmap ] "\\^{\\i}" -\kmap } "\\^{I}" -\kmap \\ "\\^{a}" -\kmap | "\\^{A}" +\kmap ; ş +\kmap : Ş +\kmap ' ţ +\kmap \" Ţ +\kmap [ ă +\kmap { Ă +\kmap ] î +\kmap } Î +\kmap \\ â +\kmap |  \kmap = ' \kmap + * \kmap - + diff --git a/lib/kbd/serbocroatian.kmap b/lib/kbd/serbocroatian.kmap index 67a9e5f4a5..02b75cf829 100644 --- a/lib/kbd/serbocroatian.kmap +++ b/lib/kbd/serbocroatian.kmap @@ -19,16 +19,16 @@ \kmap ~ > \kmap y z # y and z are switched \kmap Y Z -\kmap [ "\\v{s}" # s caron (pronunced sh) -\kmap { "\\v{S}" -\kmap ] "\\dj{}" # d stroke (pronunced dj, with j as in German, not as -\kmap } "\\DJ{}" # in English) -\kmap \\ "\\v{z}" # z caron (pronounced zh) -\kmap | "\\v{Z}" -\kmap ; "\\v{c}" # c caron (pronunced tch) -\kmap : "\\v{C}" -\kmap ' "\\'{c}" # c accute (pronunced as very soft ch) -\kmap \" "\\'{C}" +\kmap [ š # s caron (pronunced sh) +\kmap { Š +\kmap ] đ # d stroke (pronunced dj, with j as in German, not as +\kmap } Đ # in English) +\kmap \\ ž # z caron (pronounced zh) +\kmap | Ž +\kmap ; č # c caron (pronunced tch) +\kmap : Č +\kmap ' ć # c accute (pronunced as very soft ch) +\kmap \" Ć \kmap z y \kmap Z Y \kmap < ; diff --git a/lib/kbd/sf.kmap b/lib/kbd/sf.kmap index 3529204d45..babbe3262a 100644 --- a/lib/kbd/sf.kmap +++ b/lib/kbd/sf.kmap @@ -8,8 +8,8 @@ \kmod ] umlaut aeijouyAEIJOUY # umlaut on ] \kmap ! + \kmap @ \" -\kmap \# \* -\kmap $ "\\c{c}" +\kmap \# * +\kmap $ ç \kmap ^ & \kmap & / \kmap * ( @@ -24,18 +24,18 @@ \kmap z y # switched Y<->Z \kmap Y Z \kmap Z Y -\kmap [ "\\`{e}" -\kmap { "\\\"{u}" +\kmap [ è +\kmap { ü \kmap } ! -\kmap ; "\\'{e}" -\kmap : "\\\"{o}" -\kmap ' "\\`{a}" -\kmap \" "\\\"{a}" +\kmap ; é +\kmap : ö +\kmap ' à +\kmap \" ä \kmap < ; \kmap > : \kmap ? _ \kmap / - \kmap \\ $ \kmap | "\\it\\${}" -\kxmod circumflex i "\\^{\\i}" # some exceptions -\kxmod umlaut i "\\\"{\\i}" +\kxmod circumflex i î # some exceptions +\kxmod umlaut i ï diff --git a/lib/kbd/sg.kmap b/lib/kbd/sg.kmap index 6e54ac2508..ca955c5046 100644 --- a/lib/kbd/sg.kmap +++ b/lib/kbd/sg.kmap @@ -8,8 +8,8 @@ \kmod ] umlaut aeijouyAEIJOUY # umlaut on ] \kmap ! + \kmap @ \" -\kmap \# \* -\kmap $ "\\c{c}" +\kmap \# * +\kmap $ ç \kmap ^ & \kmap & / \kmap * ( @@ -24,18 +24,18 @@ \kmap z y # switched Y<->Z \kmap Y Z \kmap Z Y -\kmap { "\\`{e}" -\kmap [ "\\\"{u}" +\kmap { è +\kmap [ ü \kmap } ! -\kmap : "\\'{e}" -\kmap ; "\\\"{o}" -\kmap \" "\\`{a}" -\kmap ' "\\\"{a}" +\kmap : é +\kmap ; ö +\kmap \" à +\kmap ' ä \kmap < ; \kmap > : \kmap ? _ \kmap / - \kmap \\ $ \kmap | "\\it\\${}" -\kxmod circumflex i "\\^{\\i}" # some exceptions -\kxmod umlaut i "\\\"{\\i}" +\kxmod circumflex i î # some exceptions +\kxmod umlaut i ï diff --git a/lib/kbd/slovak.kmap b/lib/kbd/slovak.kmap index 529a0fcaa1..f4ce50a07b 100644 --- a/lib/kbd/slovak.kmap +++ b/lib/kbd/slovak.kmap @@ -9,48 +9,48 @@ \kmod ` umlaut aeijouyAEIJOUY # umlaut is on ` - but it's not widely used... \kmap 1 + # map numbers to Slovak letters and \kmap ! 1 # Shift-numbers to numbers -\kmap 2 "\\q{l}" +\kmap 2 ľ \kmap @ 2 -\kmap 3 "\\v{s}" +\kmap 3 š \kmap \# 3 -\kmap 4 "\\v{c}" +\kmap 4 č \kmap $ 4 -\kmap 5 "\\q{t}" +\kmap 5 ť \kmap % 5 -\kmap 6 "\\v{z}" +\kmap 6 ž \kmap ^ 6 -\kmap 7 "\\'{y}" +\kmap 7 ý \kmap & 7 -\kmap 8 "\\'{a}" +\kmap 8 á \kmap * 8 -\kmap 9 "\\'{\\i}" +\kmap 9 í \kmap ( 9 -\kmap 0 "\\'{e}" +\kmap 0 é \kmap ) 0 \kmap - = # map other keys to reflect Slovak keyboard \kmap _ % -\kmap ; "\\^{o}" +\kmap ; ô \kmap : \" -\kmap ' "\\S{}" +\kmap ' § \kmap \" ! -\kmap [ "\\'{u}" +\kmap [ ú \kmap { / -\kmap ] "\\\"{a}" +\kmap ] ä \kmap } ( \kmap < ? \kmap > : \kmap ? _ \kmap / - -\kmap \\ "\\'{o}" +\kmap \\ ó \kmap | ) -\kxmod caron o "\\^{o}" # mapping exception - generate ^ instead for o -\kxmod caron O "\\^{O}" -\kxmod caron u "\\r{u}" # generate circle for u - it's a Czech letter -\kxmod caron U "\\r{U}" -\kxmod caron t "\\q{t}" # use proper caron mark for t, l, d and L -\kxmod caron l "\\q{l}" -\kxmod caron L "\\q{L}" -\kxmod caron d "\\q{d}" -\kxmod acute i "\\'{\\i}" # use only root of i for i acute -\kxmod umlaut i "\\\"{\\i}" # not really needed -\kxmod umlaut j "\\\"{\\j}" # not really needed +\kxmod caron o ô # mapping exception - generate ^ instead for o +\kxmod caron O Ô +\kxmod caron u ů # generate circle for u - it's a Czech letter +\kxmod caron U Ů +\kxmod caron t ť # use proper caron mark for t, l, d and L +\kxmod caron l ľ +\kxmod caron L Ľ +\kxmod caron d ď +\kxmod acute i í # use only root of i for i acute +\kxmod umlaut i ï # not really needed +\kxmod umlaut j ȷ̈ # not really needed diff --git a/lib/kbd/slovene.kmap b/lib/kbd/slovene.kmap index f30e0f303f..cb7b6987e9 100644 --- a/lib/kbd/slovene.kmap +++ b/lib/kbd/slovene.kmap @@ -21,12 +21,12 @@ \kmap < ; \kmap > : -\kmap [ "\\v{s}" # Chars with carons -\kmap { "\\v{S}" -\kmap ; "\\v{c}" -\kmap : "\\v{C}" -\kmap / "\\v{z}" -\kmap ? "\\v{Z}" +\kmap [ š # Chars with carons +\kmap { Š +\kmap ; č +\kmap : Č +\kmap / ž +\kmap ? Ž -\kmap ' "\\'{c}" # Chars with accute -\kmap \" "\\'{C}" +\kmap ' ć # Chars with accute +\kmap \" Ć diff --git a/lib/kbd/transilvanian.kmap b/lib/kbd/transilvanian.kmap index 8b9625009e..fe22cc9d7a 100644 --- a/lib/kbd/transilvanian.kmap +++ b/lib/kbd/transilvanian.kmap @@ -17,16 +17,16 @@ # \kxmod hug q q # possibility to type q, ' or ; by duplicating # \kxmod acute ' ' # # \kxmod umlaut ; ; -\kxmod acute i "\\'{\\i}" # use only root of i for i acute -\kxmod hugarian_umlaut a "\\u{a}" -\kxmod hugarian_umlaut A "\\u{A}" -\kxmod acute s "\\c{s}" -\kxmod acute S "\\c{S}" -\kxmod acute t "\\c{t}" -\kxmod acute T "\\c{T}" -\kxmod umlaut i "\\^{\\i}" -\kxmod umlaut I "\\^{I}" -\kxmod umlaut a "\\^{a}" -\kxmod umlaut A "\\^{A}" +\kxmod acute i í # use only root of i for i acute +\kxmod hugarian_umlaut a ă +\kxmod hugarian_umlaut A Ă +\kxmod acute s ş +\kxmod acute S Ş +\kxmod acute t ţ +\kxmod acute T Ţ +\kxmod umlaut i î +\kxmod umlaut I Î +\kxmod umlaut a â +\kxmod umlaut A  diff --git a/lib/kbd/turkish-f.kmap b/lib/kbd/turkish-f.kmap index ae6493cfc0..fc1251fb60 100644 --- a/lib/kbd/turkish-f.kmap +++ b/lib/kbd/turkish-f.kmap @@ -70,17 +70,17 @@ \kmap "," b \kmap < B -\kmap e "\\u{g}" # mappings for Turkish letters -\kmap E "\\u{G}" -\kmap r "\\i{}" -\kmap S "\\.{I}" -\kmap g "\\\"{u}" -\kmap G "\\\"{U}" -\kmap ' "\\c{s}" -\kmap \" "\\c{S}" -\kmap x "\\\"{o}" -\kmap X "\\\"{O}" -\kmap b "\\c{c}" -\kmap B "\\c{C}" +\kmap e ğ # mappings for Turkish letters +\kmap E Ğ +\kmap r ı +\kmap S İ +\kmap g ü +\kmap G Ü +\kmap ' ş +\kmap \" Ş +\kmap x ö +\kmap X Ö +\kmap b ç +\kmap B Ç diff --git a/lib/kbd/turkish.kmap b/lib/kbd/turkish.kmap index 905b3fcd4c..e8d5d21d71 100644 --- a/lib/kbd/turkish.kmap +++ b/lib/kbd/turkish.kmap @@ -22,16 +22,16 @@ \kmap \\ "," \kmap | ; -\kmap [ "\\u{g}" # mappings for Turkish letters -\kmap { "\\u{G}" -\kmap ] "\\\"{u}" -\kmap } "\\\"{U}" -\kmap i "\\i{}" -\kmap ; "\\c{s}" -\kmap : "\\c{S}" +\kmap [ ğ # mappings for Turkish letters +\kmap { Ğ +\kmap ] ü +\kmap } Ü +\kmap i ı +\kmap ; ş +\kmap : Ş \kmap ' i -\kmap \" "\\.{I}" -\kmap "," "\\\"{o}" -\kmap < "\\\"{O}" -\kmap . "\\c{c}" -\kmap > "\\c{C}" +\kmap \" İ +\kmap "," ö +\kmap < Ö +\kmap . ç +\kmap > Ç