From: Juergen Spitzmueller Date: Sun, 29 Apr 2018 11:18:05 +0000 (+0200) Subject: PassThru paragraphs have latex_language; consider this when checking X-Git-Tag: 2.3.1~95 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=63c54434ae29a1264bb5ded0908f6fdf0b20ac4b;p=features.git PassThru paragraphs have latex_language; consider this when checking previous language Fixes: #10793. (cherry picked from commit 15df033bcec5aa65cdb26b7f31b9082f3f7e05da) --- diff --git a/src/output_latex.cpp b/src/output_latex.cpp index fa890f5b3c..eccc898bb3 100644 --- a/src/output_latex.cpp +++ b/src/output_latex.cpp @@ -790,6 +790,9 @@ void TeXOnePar(Buffer const & buf, // environment with nesting depth greater than (or equal to, but with // a different layout) the current one. If there is no previous // paragraph, the previous language is the outer language. + // Note further that we take the outer language also if the prior par + // is PassThru, since in that case it has latex_language, and all secondary + // languages have been closed (#10793). bool const use_prev_env_language = state->prev_env_language_ != 0 && priorpar && priorpar->layout().isEnvironment() @@ -797,12 +800,11 @@ void TeXOnePar(Buffer const & buf, || (priorpar->getDepth() == par.getDepth() && priorpar->layout() != par.layout())); Language const * const prev_language = - (pit != 0) + (priorpar && !priorpar->isPassThru()) ? (use_prev_env_language ? state->prev_env_language_ : priorpar->getParLanguage(bparams)) : outer_language; - bool const use_polyglossia = runparams.use_polyglossia; string const par_lang = use_polyglossia ? getPolyglossiaEnvName(par_language): par_language->babel(); diff --git a/status.23x b/status.23x index f1074f5aa0..4228e96113 100644 --- a/status.23x +++ b/status.23x @@ -136,6 +136,8 @@ What's new - Fix polyglossia language switches for Arabic (bug 11057). +- Fix language allocation after PassThru paragraphs (bug 10793). + - Set correct path to (biblatex) bibliography databases that are entered relative to child documents (bug 11105).