mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
add support for Urdu and Syriac
- fileformat change - I could not update the tex2lyx testfiles because of bug #10440 (there is now a probable fix)
This commit is contained in:
parent
143a177ad3
commit
87c00f3383
@ -11,6 +11,11 @@ adjustments are made to tex2lyx and bugs are fixed in lyx2lyx.
|
||||
|
||||
-----------------------
|
||||
|
||||
2016-10-28 Uwe Stöhr <uwestoehr@web.de>
|
||||
* Format incremented to 515: support for Urdu and Syriac:
|
||||
\lang urdu
|
||||
\lang syriac
|
||||
|
||||
2016-10-22 Uwe Stöhr <uwestoehr@web.de>
|
||||
* Format incremented to 514: support for Amharic etc.:
|
||||
\lang amharic
|
||||
|
@ -1064,13 +1064,13 @@ Language swedish
|
||||
End
|
||||
|
||||
# not supported by babel
|
||||
#Language syriac
|
||||
# GuiName "Syriac"
|
||||
# PolyglossiaName syriac
|
||||
# Encoding utf8
|
||||
# RTL true
|
||||
# LangCode syr_SY
|
||||
#End
|
||||
Language syriac
|
||||
GuiName "Syriac"
|
||||
PolyglossiaName syriac
|
||||
Encoding utf8
|
||||
RTL true
|
||||
LangCode syr_SY
|
||||
End
|
||||
|
||||
# not supported by babel
|
||||
Language tamil
|
||||
@ -1155,13 +1155,13 @@ Language uppersorbian
|
||||
End
|
||||
|
||||
# not supported by babel
|
||||
#Language urdu
|
||||
# GuiName "Urdu"
|
||||
# PolyglossiaName urdu
|
||||
# Encoding utf8
|
||||
# RTL true
|
||||
# LangCode ur_PK
|
||||
#End
|
||||
Language urdu
|
||||
GuiName "Urdu"
|
||||
PolyglossiaName urdu
|
||||
Encoding utf8
|
||||
RTL true
|
||||
LangCode ur_PK
|
||||
End
|
||||
|
||||
# vietnam must be loaded locally with babel options,
|
||||
# not globally via class options, see
|
||||
|
@ -441,6 +441,48 @@ def revert_khmer(document):
|
||||
"\\end_layout", ""]
|
||||
|
||||
|
||||
def revert_urdu(document):
|
||||
"Set the document language to English but assure Urdu output"
|
||||
|
||||
if document.language == "urdu":
|
||||
document.language = "english"
|
||||
i = find_token(document.header, "\\language urdu", 0)
|
||||
if i != -1:
|
||||
document.header[i] = "\\language english"
|
||||
j = find_token(document.header, "\\language_package default", 0)
|
||||
if j != -1:
|
||||
document.header[j] = "\\language_package default"
|
||||
add_to_preamble(document, ["\\AtBeginDocument{\setotherlanguage{urdu}}"])
|
||||
document.body[2 : 2] = ["\\begin_layout Standard",
|
||||
"\\begin_inset ERT", "status open", "",
|
||||
"\\begin_layout Plain Layout", "", "",
|
||||
"\\backslash",
|
||||
"resetdefaultlanguage{urdu}",
|
||||
"\\end_layout", "", "\\end_inset", "", "",
|
||||
"\\end_layout", ""]
|
||||
|
||||
|
||||
def revert_syriac(document):
|
||||
"Set the document language to English but assure Syriac output"
|
||||
|
||||
if document.language == "syriac":
|
||||
document.language = "english"
|
||||
i = find_token(document.header, "\\language syriac", 0)
|
||||
if i != -1:
|
||||
document.header[i] = "\\language english"
|
||||
j = find_token(document.header, "\\language_package default", 0)
|
||||
if j != -1:
|
||||
document.header[j] = "\\language_package default"
|
||||
add_to_preamble(document, ["\\AtBeginDocument{\setotherlanguage{syriac}}"])
|
||||
document.body[2 : 2] = ["\\begin_layout Standard",
|
||||
"\\begin_inset ERT", "status open", "",
|
||||
"\\begin_layout Plain Layout", "", "",
|
||||
"\\backslash",
|
||||
"resetdefaultlanguage{syriac}",
|
||||
"\\end_layout", "", "\\end_inset", "", "",
|
||||
"\\end_layout", ""]
|
||||
|
||||
|
||||
##
|
||||
# Conversion hub
|
||||
#
|
||||
@ -452,10 +494,12 @@ convert = [
|
||||
[511, [convert_ibranches]],
|
||||
[512, [convert_beamer_article_styles]],
|
||||
[513, []],
|
||||
[514, []]
|
||||
[514, []],
|
||||
[515, []]
|
||||
]
|
||||
|
||||
revert = [
|
||||
[514, [revert_urdu, revert_syriac]],
|
||||
[513, [revert_amharic, revert_asturian, revert_kannada, revert_khmer]],
|
||||
[512, [revert_bosnian, revert_friulan, revert_macedonian, revert_piedmontese, revert_romansh]],
|
||||
[511, [revert_beamer_article_styles]],
|
||||
|
@ -306,10 +306,10 @@ const char * const Preamble::polyglossia_languages[] = {
|
||||
"lao", "latin", "latvian", "lithuanian", "lsorbian", "magyar", "malayalam", "marathi",
|
||||
"austrian", "newzealand", "german", "norsk", "nynorsk", "occitan",
|
||||
"piedmontese", "polish", "polytonic", "portuges", "romanian", "romansh", "russian",
|
||||
"samin", "sanskrit", "scottish", "serbian", "slovak", "slovenian", "spanish", "swedish",
|
||||
"samin", "sanskrit", "scottish", "serbian", "slovak", "slovenian", "spanish", "swedish", "syriac",
|
||||
"tamil", "telugu", "thai", "tibetan", "turkish", "turkmen",
|
||||
"ukrainian", "usorbian", "vietnamese", "welsh", 0};
|
||||
// not yet supported by LyX: "korean", "nko", "syriac", "urdu"
|
||||
"ukrainian", "urdu", "usorbian", "vietnamese", "welsh", 0};
|
||||
// not yet supported by LyX: "korean", "nko"
|
||||
|
||||
/**
|
||||
* the same as polyglossia_languages with .lyx names
|
||||
@ -325,10 +325,10 @@ const char * const Preamble::coded_polyglossia_languages[] = {
|
||||
"lao", "latin", "latvian", "lithuanian", "lowersorbian", "magyar", "malayalam", "marathi",
|
||||
"naustrian","newzealand", "ngerman", "norsk", "nynorsk", "occitan",
|
||||
"piedmontese", "polish", "polutonikogreek", "portuges", "romanian", "romansh", "russian",
|
||||
"samin", "sanskrit", "scottish", "serbian", "slovak", "slovene", "spanish", "swedish",
|
||||
"samin", "sanskrit", "scottish", "serbian", "slovak", "slovene", "spanish", "swedish", "syriac",
|
||||
"tamil", "telugu", "thai", "tibetan", "turkish", "turkmen",
|
||||
"ukrainian", "uppersorbian", "vietnamese", "welsh", 0};
|
||||
// not yet supported by LyX: "korean-polyglossia", "nko", "syriac", "urdu"
|
||||
"ukrainian", "urdu", "uppersorbian", "vietnamese", "welsh", 0};
|
||||
// not yet supported by LyX: "korean-polyglossia", "nko"
|
||||
|
||||
|
||||
bool Preamble::usePolyglossia() const
|
||||
|
@ -32,8 +32,8 @@ extern char const * const lyx_version_info;
|
||||
|
||||
// Do not remove the comment below, so we get merge conflict in
|
||||
// independent branches. Instead add your own.
|
||||
#define LYX_FORMAT_LYX 514 // uwestoehr: support for Amharic etc.
|
||||
#define LYX_FORMAT_TEX2LYX 514
|
||||
#define LYX_FORMAT_LYX 515 // uwestoehr: support for Urdu and Syriac
|
||||
#define LYX_FORMAT_TEX2LYX 515
|
||||
|
||||
#if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
|
||||
#ifndef _MSC_VER
|
||||
|
Loading…
Reference in New Issue
Block a user