mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
fileformat change:
- support for Turkmen git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34000 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0ad3abd534
commit
879ed8e2ed
@ -7,6 +7,9 @@ The good example would be 2010-01-10 entry.
|
||||
|
||||
-----------------------
|
||||
|
||||
2010-03-31 Uwe Stöhr <uwestoehr@web.de>
|
||||
* Format incremented to 383: support for Turkmen
|
||||
|
||||
2010-03-31 Uwe Stöhr <uwestoehr@web.de>
|
||||
* Format incremented to 382: support to change the font color
|
||||
for greyed-out notes: new parameter \notefontcolor
|
||||
|
@ -82,6 +82,7 @@ spanish-mexico spanish "Spanish (Mexico)" false iso8859-15 es_MX "\addto\s
|
||||
swedish swedish "Swedish" false iso8859-15 sv_SE ""
|
||||
thai thai "Thai" false tis620-0 th_TH "\usepackage{thswitch}"
|
||||
turkish turkish "Turkish" false iso8859-9 tr_TR ""
|
||||
turkmen turkmen "Turkmen" false utf8 tk_TM ""
|
||||
ukrainian ukrainian "Ukrainian" false koi8-u uk_UA ""
|
||||
uppersorbian uppersorbian "Upper Sorbian" false iso8859-2 hsb_DE ""
|
||||
vietnamese vietnam "Vietnamese" false utf8 vi_VN ""
|
||||
|
@ -1376,6 +1376,23 @@ def revert_notefontcolor(document):
|
||||
+ ' {\\textcolor{note_fontcolor}\\bgroup}{\\egroup}\n')
|
||||
|
||||
|
||||
def revert_turkmen(document):
|
||||
"Set language Turkmen to English"
|
||||
i = 0
|
||||
if document.language == "turkmen":
|
||||
document.language = "english"
|
||||
i = find_token(document.header, "\\language", 0)
|
||||
if i != -1:
|
||||
document.header[i] = "\\language english"
|
||||
j = 0
|
||||
while True:
|
||||
j = find_token(document.body, "\\lang turkmen", j)
|
||||
if j == -1:
|
||||
return
|
||||
document.body[j] = document.body[j].replace("\\lang turkmen", "\\lang english")
|
||||
j = j + 1
|
||||
|
||||
|
||||
##
|
||||
# Conversion hub
|
||||
#
|
||||
@ -1417,10 +1434,12 @@ convert = [[346, []],
|
||||
[379, [convert_math_output]],
|
||||
[380, []],
|
||||
[381, []],
|
||||
[382, []]
|
||||
[382, []],
|
||||
[383, []]
|
||||
]
|
||||
|
||||
revert = [[381, [revert_notefontcolor]],
|
||||
revert = [[382, [revert_turkmen]],
|
||||
[381, [revert_notefontcolor]],
|
||||
[380, [revert_equalspacing_xymatrix]],
|
||||
[379, [revert_inset_preview]],
|
||||
[378, [revert_math_output]],
|
||||
|
@ -126,7 +126,7 @@ namespace {
|
||||
|
||||
// Do not remove the comment below, so we get merge conflict in
|
||||
// independent branches. Instead add your own.
|
||||
int const LYX_FORMAT = 382; // uwestoehr: support to change font color for greyed-out notes
|
||||
int const LYX_FORMAT = 383; // uwestoehr: support for Turkmen
|
||||
|
||||
typedef map<string, bool> DepClean;
|
||||
typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;
|
||||
|
@ -1210,10 +1210,12 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
|
||||
// viet = string::npos when not found
|
||||
// the same is for all other languages that are not directly supported by
|
||||
// babel, but where LaTeX-packages add babel support.
|
||||
// this is currently the case for Latvian, Lithuanian, and Mongolian
|
||||
// this is currently the case for Latvian, Lithuanian, Mongolian
|
||||
// and Turkmen
|
||||
size_t latvian = language_options.str().find("latvian");
|
||||
size_t lithu = language_options.str().find("lithuanian");
|
||||
size_t mongo = language_options.str().find("mongolian");
|
||||
size_t turkmen = language_options.str().find("turkmen");
|
||||
// if Japanese is used, babel must directly be loaded
|
||||
// with language options, not in the class options, see
|
||||
// http://www.lyx.org/trac/ticket/4597#c4
|
||||
@ -1221,7 +1223,7 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
|
||||
if (lyxrc.language_global_options && !language_options.str().empty()
|
||||
&& viet == string::npos && japan == string::npos
|
||||
&& latvian == string::npos && lithu == string::npos
|
||||
&& mongo == string::npos)
|
||||
&& mongo == string::npos && turkmen == string::npos)
|
||||
clsoptions << language_options.str() << ',';
|
||||
}
|
||||
|
||||
@ -2103,17 +2105,20 @@ string BufferParams::babelCall(string const & lang_opts) const
|
||||
// viet = string::npos when not found
|
||||
// the same is for all other languages that are not directly supported by
|
||||
// babel, but where LaTeX-packages add babel support.
|
||||
// this is currently the case for Latvian, Lithuanian, and Mongolian
|
||||
// this is currently the case for Latvian, Lithuanian, Mongolian
|
||||
// and Turkmen
|
||||
size_t latvian = lang_opts.find("latvian");
|
||||
size_t lithu = lang_opts.find("lithuanian");
|
||||
size_t mongo = lang_opts.find("mongolian");
|
||||
size_t turkmen = lang_opts.find("turkmen");
|
||||
// If Japanese is used, babel must directly be loaded with the
|
||||
// language options, see
|
||||
// http://www.lyx.org/trac/ticket/4597#c4
|
||||
size_t japan = lang_opts.find("japanese");
|
||||
if (!lyxrc.language_global_options || viet != string::npos
|
||||
|| japan != string::npos || latvian != string::npos
|
||||
|| lithu != string::npos || mongo != string::npos)
|
||||
|| lithu != string::npos || mongo != string::npos
|
||||
|| turkmen != string::npos)
|
||||
return "\\usepackage[" + lang_opts + "]{babel}";
|
||||
return lang_pack;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user