mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Increase tex2lyx output format to 276 (LyX 1.5.x).
Add support for arabic (arabi package), and two languages that are already avaiilable in previous formats, but have been forgotten: latvian and lithuanian. Again, the previous format was not handled correctly: arabic (arabi) was parsed as arabic (arabtex). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36845 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1812984b42
commit
5aedfc6b9f
@ -50,14 +50,19 @@ bool one_language = true;
|
||||
|
||||
namespace {
|
||||
|
||||
//add this to known_languages when updating to lyxformat 266:
|
||||
// "armenian"
|
||||
//add these to known_languages when updating to lyxformat 268:
|
||||
//"chinese-simplified", "chinese-traditional", "japanese", "korean"
|
||||
// Both changes require first that support for non-babel languages (CJK,
|
||||
// armtex) is added.
|
||||
const char * const known_languages[] = { "afrikaans", "american", "arabic",
|
||||
"austrian", "bahasa", "basque", "belarusian", "brazil", "brazilian", "breton",
|
||||
"british", "bulgarian", "canadian", "canadien", "catalan", "croatian", "czech",
|
||||
"danish", "dutch", "english", "esperanto", "estonian", "finnish", "francais",
|
||||
"french", "frenchb", "frenchle", "frenchpro", "galician", "german", "germanb",
|
||||
"greek", "hebrew", "icelandic", "irish", "italian", "kazakh", "lsorbian", "magyar",
|
||||
"arabtex", "austrian", "bahasa", "basque", "belarusian", "brazil", "brazilian",
|
||||
"breton", "british", "bulgarian", "canadian", "canadien", "catalan",
|
||||
"croatian", "czech", "danish", "dutch", "english", "esperanto", "estonian",
|
||||
"finnish", "francais", "french", "frenchb", "frenchle", "frenchpro",
|
||||
"galician", "german", "germanb", "greek", "hebrew", "icelandic", "irish",
|
||||
"italian", "kazakh", "latvian", "lithuanian", "lsorbian", "magyar",
|
||||
"naustrian", "ngerman", "ngermanb", "norsk", "nynorsk", "polish", "portuges",
|
||||
"portuguese", "romanian", "russian", "russianb", "scottish", "serbian", "slovak",
|
||||
"slovene", "spanish", "swedish", "thai", "turkish", "ukraineb", "ukrainian",
|
||||
@ -77,6 +82,7 @@ const char * const known_ukrainian_languages[] = {"ukrainian", "ukraineb", 0};
|
||||
|
||||
//add these to known_english_quotes_languages when updating to lyxformat 268:
|
||||
//"chinese-simplified", "korean"
|
||||
// This requires first that support for non-babel languages (CJK) is added.
|
||||
const char * const known_english_quotes_languages[] = {"american", "canadian",
|
||||
"english", "esperanto", "hebrew", "irish", "scottish", "thai", 0};
|
||||
|
||||
@ -158,6 +164,18 @@ string h_tracking_changes = "false";
|
||||
string h_output_changes = "false";
|
||||
string h_margins = "";
|
||||
|
||||
|
||||
/// translates a babel language name to a LyX language name
|
||||
string babel2lyx(string language)
|
||||
{
|
||||
if (language == "arabtex")
|
||||
return "arabic_arabtex";
|
||||
if (language == "arabic")
|
||||
return "arabic_arabi";
|
||||
return language;
|
||||
}
|
||||
|
||||
|
||||
// returns true if at least one of the options in what has been found
|
||||
bool handle_opt(vector<string> & opts, char const * const * what, string & target)
|
||||
{
|
||||
@ -490,6 +508,8 @@ void end_preamble(ostream & os, TextClass const & /*textclass*/)
|
||||
|| is_known(h_language, known_portuguese_languages))
|
||||
h_quotes_language = "english";
|
||||
|
||||
h_language = babel2lyx(h_language);
|
||||
|
||||
// output the LyX file settings
|
||||
os << "#LyX file created by tex2lyx " << PACKAGE_VERSION << "\n"
|
||||
<< "\\lyxformat " << LYX_FORMAT << '\n'
|
||||
|
@ -114,7 +114,7 @@ extern CommandMap known_math_environments;
|
||||
///
|
||||
extern bool noweb_mode;
|
||||
/// LyX format that is created by tex2lyx
|
||||
int const LYX_FORMAT = 275;
|
||||
int const LYX_FORMAT = 276;
|
||||
|
||||
/// path of the master .tex file
|
||||
extern std::string getMasterFilePath();
|
||||
|
Loading…
Reference in New Issue
Block a user