From ca161900065995b15e45363252bb7fa3cf44c644 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sat, 23 Jun 2012 15:44:25 +0200 Subject: [PATCH] fix bug #8208: missing \end for polyglossia-only languages at buffer end --- src/output_latex.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/output_latex.cpp b/src/output_latex.cpp index 3178ac599f..c5f8306201 100644 --- a/src/output_latex.cpp +++ b/src/output_latex.cpp @@ -764,7 +764,9 @@ void TeXOnePar(Buffer const & buf, || (runparams.isLastPar && par_language->babel() != outer_language->babel())); if (closing_rtl_ltr_environment - || (runparams.isLastPar && par_language->babel() != outer_language->babel())) { + || (runparams.isLastPar + && ((!use_polyglossia && par_language->babel() != outer_language->babel()) + || (use_polyglossia && par_language->polyglossia() != outer_language->polyglossia())))) { // Since \selectlanguage write the language to the aux file, // we need to reset the language at the end of footnote or // float.