]> git.lyx.org Git - features.git/blobdiff - lib/languages
Update language support documentation and comments.
[features.git] / lib / languages
index a39c5c75286e4eb6bceb95ea5dc1d6c604ea83df..583ed89ed6244cc7a074f44a2b6d7920b02d8f0e 100644 (file)
@@ -161,6 +161,14 @@ End
 Language albanian
        GuiName          "Albanian"
        BabelName        albanian
+       # babel-albanian (albanian.ldf) (re-)defines the functions
+       # \sh \ch \th \cth \arsh \arch \arth \arcth \tg \ctg \arctg
+       # as math operators. This clashes with \th == letter thorn
+       # in font encoding T1
+       PostBabelPreamble
+         % fix albanian: restore \th as LATIN LETTER THORN
+         \@ifl@aded{def}{t1enc}{\DeclareTextSymbol{\th}{T1}{254}}{}
+       EndPostBabelPreamble
        PolyglossiaName  albanian
        QuoteStyle       swiss
        Encoding         iso8859-2
@@ -845,11 +853,8 @@ Language italian
        LangCode         it_IT
 End
 
-# japanese must be loaded locally with babel options,
-# not globally via class options
-# http://www.lyx.org/trac/ticket/4597#c4
-# Since japanese does not load fontenc, we set
-# InternalEncoding to true.
+# Since 2016-12-18, babel-japanese works with non-TeX fonts (Xe/LuaTeX), too
+# (use with "Japanese (bxjs)" or standard document classes)
 Language japanese
        GuiName          "Japanese"
        HasGuiSupport    true
@@ -857,8 +862,7 @@ Language japanese
        Encoding         jis-platex
        LangCode         ja_JP
        Requires         japanese
-       InternalEncoding true
-       FontEncoding     None
+       FontEncoding     ASCII
        DateFormats      "yyyy年M月d日|yyyy/MM/dd|yy/MM/dd"
        QuoteStyle       cjk
 End
@@ -887,15 +891,9 @@ End
 Language kazakh
        GuiName          "Kazakh"
        Encoding         ascii
-       FontEncoding     T2A
+       # FontEncoding   T2A # not set (no Babel support)
        DateFormats      "dd MMMM yyyy|dd MMMM yyyy|yyyy-dd-MM"
        LangCode         kk_KZ
-       # FIXME: this sets the global font encoding also
-       # if Kazakh is only used as secondary language.
-       PostBabelPreamble
-       \input{t2aenc.def}
-       \AtBeginDocument{\fontencoding{T2A}\selectfont}
-       EndPostBabelPreamble
 End
 
 # not supported by babel
@@ -907,8 +905,10 @@ Language khmer
        LangCode         km_KH
 End
 
+# Fixme: activate Polyglossia support (file format change)
 Language korean
        GuiName         "Korean"
+       #PolyglossiaName  korean
        Encoding        euc-kr
        QuoteStyle      cjkangle
        DateFormats     "yyyy년 M월 d일|yyyy. M. d.|yy. M. d."
@@ -971,6 +971,13 @@ Language lithuanian
        QuoteStyle       german
        Encoding         iso8859-13
        FontEncoding     L7x
+       # L7x defines \copyright as TextSymbol which leads to an endless loop 
+        # when it is used in other font encodings.
+       PostBabelPreamble
+         % restore \coyright definition corrupted by l7xenc.def
+          \DeclareRobustCommand{\copyright}{%
+            \ifmmode{\nfss@text{\textcopyright}}\else\textcopyright\fi}
+       EndPostBabelPreamble
        DateFormats      "yyyy 'm.' MMMM d 'd.'|yyyy 'm.' MMMM d 'd.'|yyyy-MM-dd"
        LangCode         lt_LT
 End
@@ -1208,18 +1215,22 @@ Language scottish
        LangCode         gd_GB
 End
 
-# Note: script option is uppercase, even if the polyglossia
-#       manual states otherwise.
+# Serbian with Cyrillic script.
+# Up to Version 3.0 (2019-01-12), input encoding and
+# font encoding were set document-wide to "utf8x" and "T2A" respectively
+# by "babel-serbianc", overriding LyX settings and leading to errors
+# in mulit-lingual documents.
 Language serbian
        GuiName          "Serbian"
        HasGuiSupport    true
        BabelName        serbianc
        PolyglossiaName  serbian
        PolyglossiaOpts  "script=Cyrillic"
+       # Note: script option is uppercase, even if the polyglossia
+       #       manual states otherwise.
        QuoteStyle       polish
        Encoding         utf8
-        # Cyrillic font encoding required but not set by "serbianc".
-       # FontEncoding     T2A
+       FontEncoding     T2A
        DateFormats      "d. MMMM yyyy|d. MMM yyyy|dd.MM.yyyy"
        LangCode         sr_RS
 End
@@ -1331,6 +1342,7 @@ Language telugu
        LangCode         te_IN
 End
 
+# alternative support with CJK package and Babel name "thaicjk"
 Language thai
        GuiName          "Thai"
        BabelName        thai
@@ -1340,11 +1352,17 @@ Language thai
        FontEncoding     LTH
        DateFormats      "dd MMMM yyyy|d MMM yyyy|dd/MM/yyyy"
        LangCode         th_TH
+       PostBabelPreamble
+         % restore \coyright definition corrupted by lthenc.def
+          \DeclareRobustCommand{\copyright}{%
+            \ifmmode{\nfss@text{\textcopyright}}\else\textcopyright\fi}
+         \DeclareTextSymbol{\textcopyright}{LTH}{8}
+       EndPostBabelPreamble
        # Fixme: load font package?
        # +1 support for font attributes in thai emphasizing etc.
-       # -1 conflict with custom font settings and other languages' fonts
+       # -1 forces ComputerModern as "non-thai" font
        # PostBabelPreamble
-       # \usepackage{fonts-tlwg}
+       #   \usepackage{fonts-tlwg}
        # EndPostBabelPreamble
 End