Am Samstag, den 22.08.2020, 10:28 +0200 schrieb Jürgen Spitzmüller: > What we can do is to assure that hebrew is always output after arabic > and farsi. But this of course only works if Arabic or Farsi are not > the main language.
This would be something like the attached. Kornel, Scott, does this solve your problem? Jürgen
diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index 4f3b87886c..b17cb7e8a4 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -992,19 +992,41 @@ string LaTeXFeatures::getBabelLanguages() const { ostringstream langs; - bool first = true; + // hebrew needs to be loaded after arabi (arabic, farsi) + bool has_arabi = false; LanguageList::const_iterator const begin = UsedLanguages_.begin(); + for (LanguageList::const_iterator cit = begin; + cit != UsedLanguages_.end(); + ++cit) { + if ((*cit)->babel() == "farsi" || (*cit)->babel() == "arabic") { + has_arabi = true; + break; + } + } + bool first = true; + bool hebrew = false; for (LanguageList::const_iterator cit = begin; cit != UsedLanguages_.end(); ++cit) { if ((*cit)->babel().empty()) continue; + if ((*cit)->babel() == "hebrew" && has_arabi) { + // this needs to be appended last + hebrew = true; + continue; + } if (!first) langs << ','; else first = false; langs << (*cit)->babel(); } + if (hebrew) { + // append hebrew if needed + if (!first) + langs << ','; + langs << "hebrew"; + } return langs.str(); }
signature.asc
Description: This is a digitally signed message part
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel