Scott Kostyshak wrote: > On Fri, Oct 16, 2015 at 10:55:25PM +0200, Georg Baum wrote: >> >> I looked into the changes, and I believe we can fix this easily. The two >> nesting fixs did also change the behaviour if babel is used. Was that >> intended? If yes, what was the problem with the old babel code? If the >> old babel code was correct I can provide a patch that keeps the >> polyglossia fix and fixes the babel regression.
Under the assumption that the old babel output was correct the fix is indeed trivial. > Great! Hopefully Jürgen can provide some direction (I think he is > checking in on the list whenever he finds time). I can provide results > from testing. If you want to try, see the attached. Georg
diff --git a/src/output_latex.cpp b/src/output_latex.cpp index feb51a0..135306f 100644 --- a/src/output_latex.cpp +++ b/src/output_latex.cpp @@ -193,7 +193,7 @@ static TeXEnvironmentData prepareEnvironment(Buffer const & buf, } if (style.isEnvironment()) { - if (par_lang != doc_lang) + if (use_polyglossia && par_lang != doc_lang) state->open_polyglossia_lang_ = par_lang; os << "\\begin{" << from_ascii(style.latexname()) << '}'; if (!style.latexargs().empty()) { @@ -969,7 +969,8 @@ void TeXOnePar(Buffer const & buf, } } else if (!par_lang.empty()) { // If we are in an environment, we have to close the "outer" language afterwards - if (!style.isEnvironment() || state->open_polyglossia_lang_ != par_lang) { + if (!use_polyglossia || !style.isEnvironment() || + state->open_polyglossia_lang_ != par_lang) { os << from_ascii(subst( lang_end_command, "$$lang",