commit 29265ce702070f9d9486aca35856446f3a690d1b
Author: Günter Milde <[email protected]>
Date: Tue Apr 16 22:05:58 2019 +0200
language support update (tests and workaround for Thai).
---
autotests/export/latex/supported-languages.lyx | 225 +++++----------------
development/autotests/invertedTests | 3 +-
lib/examples/ja/Modules/Braille.lyx | 16 +-
lib/examples/ja/Modules/Multilingual_Captions.lyx | 17 +--
lib/languages | 17 ++-
5 files changed, 77 insertions(+), 201 deletions(-)
diff --git a/autotests/export/latex/supported-languages.lyx
b/autotests/export/latex/supported-languages.lyx
index d3f24c7..d53a136 100644
--- a/autotests/export/latex/supported-languages.lyx
+++ b/autotests/export/latex/supported-languages.lyx
@@ -1,5 +1,5 @@
#LyX 2.4 created this file. For more info see https://www.lyx.org/
-\lyxformat 572
+\lyxformat 573
\begin_document
\begin_header
\save_transient_properties true
@@ -12,7 +12,7 @@
\maintain_unincluded_children false
\language english
\language_package auto
-\inputencoding utf8
+\inputencoding auto-legacy
\fontencoding HE8,T1
\font_roman "libertine" "FreeSerif"
\font_sans "biolinum" "FreeSans"
@@ -74,7 +74,7 @@
\color #faf0e6
\end_branch
\branch babel-only
-\selected 0
+\selected 1
\filename_suffix 0
\color #faf0e6
\end_branch
@@ -145,7 +145,7 @@ Languages supported by LyX.
\begin_layout Standard
\begin_inset Branch debug
inverted 0
-status open
+status collapsed
\begin_layout Standard
The language is
@@ -293,11 +293,6 @@ Babel afrikaans
\begin_layout Labeling
\labelwidthstring 00.00.0000
-Polyglossia n.a.
-\end_layout
-
-\begin_layout Labeling
-\labelwidthstring 00.00.0000
LangCode af_ZA
\end_layout
@@ -529,6 +524,11 @@ Babel belarusian
\begin_layout Labeling
\labelwidthstring 00.00.0000
+FontEncoding T2A (Cyrillic)
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring 00.00.0000
LangCode be_BY
\end_layout
@@ -678,36 +678,22 @@ LangCode bg_BG
\begin_layout Labeling
\labelwidthstring 00.00.0000
-Provides textcyrillic
+FontEncoding T2A (Cyrillic)
\end_layout
\begin_layout Quote
-\emph on
-\begin_inset Branch conflict-bg-mk
-inverted 0
-status open
-
-\begin_layout Standard
-
-\emph on
+\emph off
\lang bulgarian
-Бъ̀лгарският езѝк
-\emph default
- е индоевропейски език от групата на южнославянските езици.
+Бъ̀лгарският езѝк е индоевропейски език от групата на южнославянските езици.
Той е официалният език на Република България и един от 23-те официални
езика на Европейския съюз.
\end_layout
-\end_inset
-
-
-\end_layout
-
\begin_layout Standard
\begin_inset Branch debug
inverted 0
-status collapsed
+status open
\begin_layout Standard
The language is
@@ -954,6 +940,28 @@ LyX (LyX support missing)
Polyglossia churchslavonic
\end_layout
+\begin_layout Labeling
+\labelwidthstring 00.00.0000
+LangCode cu
+\end_layout
+
+\begin_layout Quote
+\begin_inset Branch polyglossia-only
+inverted 0
+status open
+
+\begin_layout Standard
+Црькъвьнословѣ́ньскъ ѩꙁꙑ́къ и црькъвьнословѣньскꙑ славєнскій ѧꙁꙑкъ ·
богоуслоужє
+бьнъ ѩꙁꙑкъ ѥстъ · ижє мъногꙑ православьнꙑ црькъви словѣньскъ странъ польꙃоуѭтъ
+ ⁙ Црькъвьнословѣньскъ ѩꙁꙑкъ словѣньска ѩꙁꙑка нꙑнєшьнъ фѡнитїчьскъ и
грамматїчьс
+къ иꙁводъ ѥстъ · сѫщии жє с І҄В вѣка ѥстъ
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
\begin_layout Subsection*
Coptic
\end_layout
@@ -2928,79 +2936,23 @@ s lietuvių kalbos salos).
\end_layout
\begin_layout Standard
-Bug/TODO: The font encoding must be manually re-set after Lithuanian text
- parts.
-
-\begin_inset ERT
-status open
-
-\begin_layout Plain Layout
-
-
+Bug/TODO: after Lithuanian text parts, the font encoding is not re-set (
\backslash
-fontencoding{T1}
+f@encoding re-set to T1 but the error still says L7x).
+ A
\backslash
-selectfont
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Branch debug
-inverted 0
-status open
-
-\begin_layout Standard
-The language is
+selectfont command is required to (re-)activate the
\begin_inset Quotes eld
\end_inset
-
-\begin_inset ERT
-status open
-
-\begin_layout Plain Layout
-
-
-\backslash
-languagename
-\end_layout
-
-\end_inset
-
-
+outer
\begin_inset Quotes erd
\end_inset
-, the input encoding
-\begin_inset Quotes eld
-\end_inset
-
-
-\begin_inset ERT
-status open
-
-\begin_layout Plain Layout
-
-
-\backslash
-inputencodingname
+ font encoding
\end_layout
-\end_inset
-
-
-\begin_inset Quotes erd
-\end_inset
-
- and the font encoding
-\begin_inset Quotes eld
-\end_inset
-
-
+\begin_layout Standard
\begin_inset ERT
status open
@@ -3008,78 +2960,7 @@ status open
\backslash
-makeatletter
-\backslash
-f@encoding
-\backslash
-makeatother
-\end_layout
-
-\end_inset
-
-
-\begin_inset Quotes erd
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-
-\end_layout
-
-\begin_layout Standard
-A0 ¡ ¢ £ ¤ ¥ ¦ §
-\begin_inset Note Note
-status open
-
-\begin_layout Plain Layout
-¨
-\end_layout
-
-\end_inset
-
- © ª « ¬ ®
-\begin_inset Note Note
-status open
-
-\begin_layout Plain Layout
-¯
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-B0 ° ± ² ³
-\begin_inset Note Note
-status open
-
-\begin_layout Plain Layout
-´
-\end_layout
-
-\end_inset
-
- µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿
-\end_layout
-
-\begin_layout Standard
-C0 À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï
-\end_layout
-
-\begin_layout Standard
-D0 Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß
-\end_layout
-
-\begin_layout Standard
-E0 à á â ã ä å æ ç è é ê ë ì í î ï
-\end_layout
-
-\begin_layout Standard
-F0 ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ
+selectfont
\end_layout
\end_inset
@@ -3167,12 +3048,12 @@ Babel macedonian
\begin_layout Labeling
\labelwidthstring 00.00.0000
-LangCode mk_MK
+FontEncoding T2A (Cyrillic)
\end_layout
\begin_layout Labeling
\labelwidthstring 00.00.0000
-Provides textcyrillic
+LangCode mk_MK
\end_layout
\begin_layout Quote
@@ -3181,11 +3062,6 @@ inverted 0
status open
\begin_layout Standard
-\begin_inset Branch conflict-bg-mk
-inverted 1
-status open
-
-\begin_layout Standard
\emph on
\lang macedonian
@@ -3201,11 +3077,6 @@ status open
\end_layout
-\end_inset
-
-
-\end_layout
-
\begin_layout Subsection*
Malay
\end_layout
@@ -3302,7 +3173,7 @@ LangCode mn_MN
\begin_layout Labeling
\labelwidthstring 00.00.0000
-Provides textcyrillic
+FontEncoding T2A (Cyrillic)
\end_layout
\begin_layout Standard
@@ -3676,7 +3547,7 @@ LangCode ru_RU
\begin_layout Labeling
\labelwidthstring 00.00.0000
-Provides textcyrillic
+FontEncoding T2A (Cyrillic)
\end_layout
\begin_layout Itemize
@@ -4660,7 +4531,7 @@ LangCode uk_UA
\begin_layout Labeling
\labelwidthstring 00.00.0000
-Provides textcyrillic
+FontEncoding T2A (Cyrillic)
\end_layout
\begin_layout Quote
diff --git a/development/autotests/invertedTests
b/development/autotests/invertedTests
index 38b1844..cef373b 100644
--- a/development/autotests/invertedTests
+++ b/development/autotests/invertedTests
@@ -98,7 +98,8 @@
export/export/latex/unicodesymbols/031-thai_th_(euc-|gbk|jis|utf8-cjk).*
# Package clashes when Japanese documents are compiled with non-TeX fonts,
#
-# the auto-loaded jsclasses/okumacro.sty needs format `pLaTeX2e'
+# The textclass-loaded jsclasses/okumacro.sty needs format `pLaTeX2e'
+# (okumacro provides \ruby support).
export/doc/ja/(Additional|Customization|EmbeddedObjects|Intro|LaTeXConfig|Math|Shortcuts|Tutorial|UserGuide).*_systemF
export/doc/ja/Formula-numbering_pdf4_systemF
# Test for command \pdfsave fails:
diff --git a/lib/examples/ja/Modules/Braille.lyx
b/lib/examples/ja/Modules/Braille.lyx
index 55429e5..edc2735 100644
--- a/lib/examples/ja/Modules/Braille.lyx
+++ b/lib/examples/ja/Modules/Braille.lyx
@@ -1,10 +1,10 @@
-#LyX 2.3 created this file. For more info see http://www.lyx.org/
+#LyX 2.4 created this file. For more info see https://www.lyx.org/
\lyxformat 544
\begin_document
\begin_header
\save_transient_properties true
\origin /systemlyxdir/examples/ja/Modules/
-\textclass jsarticle
+\textclass bxjsarticle
\begin_preamble
% color greyed-out notes blue
\renewenvironment{lyxgreyedout}
@@ -182,7 +182,11 @@ This is an example sentence written in Braille.
\end_layout
\begin_layout Braille (default)
-This is an example sentence written in Braille.
+This is an example sentence
+\end_layout
+
+\begin_layout Braille (default)
+written in Braille.
\end_layout
\begin_layout Standard
@@ -568,7 +572,11 @@ braille{#1}}
\end_layout
\begin_layout Braille (default)
-This is Braille.
+This is
+\end_layout
+
+\begin_layout Braille (default)
+Braille.
\end_layout
\begin_layout Standard
diff --git a/lib/examples/ja/Modules/Multilingual_Captions.lyx
b/lib/examples/ja/Modules/Multilingual_Captions.lyx
index 3da7cf6..a282f99 100644
--- a/lib/examples/ja/Modules/Multilingual_Captions.lyx
+++ b/lib/examples/ja/Modules/Multilingual_Captions.lyx
@@ -4,7 +4,7 @@
\begin_header
\save_transient_properties true
\origin /systemlyxdir/examples/ja/Modules/
-\textclass scrartcl
+\textclass bxjsarticle
\begin_preamble
% use this when you only need the document language captions in te list of
figures/tables
%\PassOptionsToPackage{list=off}{bicaption}
@@ -113,20 +113,7 @@ bicaption
\end_layout
\begin_layout Author
-Uwe St
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-"
-\end_layout
-
-\end_inset
-
-ohr
+Uwe Stöhr
\end_layout
\begin_layout Standard
diff --git a/lib/languages b/lib/languages
index 7b91b57..3f87337 100644
--- a/lib/languages
+++ b/lib/languages
@@ -985,6 +985,7 @@ Language lithuanian
% restore \coyright definition corrupted by l7xenc.def
\DeclareRobustCommand{\copyright}{%
\ifmmode{\nfss@text{\textcopyright}}\else\textcopyright\fi}
+ \addto\noextraslithuanian{\latintext}
EndPostBabelPreamble
DateFormats "yyyy 'm.' MMMM d 'd.'|yyyy 'm.' MMMM d
'd.'|yyyy-MM-dd"
LangCode lt_LT
@@ -1355,7 +1356,8 @@ Language telugu
LangCode te_IN
End
-# alternative support with CJK package and Babel name "thaicjk"
+# There is an alternative support with CJK package and Babel name "thaicjk".
+
Language thai
GuiName "Thai"
BabelName thai
@@ -1366,14 +1368,21 @@ Language thai
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}
+ % Restore \coyright definition corrupted by lthenc.def
+ \DeclareRobustCommand{\copyright}{%
+ \ifmmode{\nfss@text{\textcopyright}}\else\textcopyright\fi}
\DeclareTextSymbol{\textcopyright}{LTH}{8}
+ % Restore catcodes changed by thai.ldf (active characters required
for inputenc)
+ \@tempcnta=161%
+ \@whilenum\@tempcnta<252\do{%
+ \catcode\@tempcnta=13
+ \advance\@tempcnta\@ne
+ }%
EndPostBabelPreamble
# Fixme: load font package?
# +1 support for font attributes in thai emphasizing etc.
# -1 forces ComputerModern as "non-thai" font
+ # TODO: set norasi as surrogate font for LTH (substitutefont.sty)
# PostBabelPreamble
# \usepackage{fonts-tlwg}
# EndPostBabelPreamble