mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Refine lang nesting fix
This commit is contained in:
parent
b2e4989212
commit
46aed6d2b9
@ -194,6 +194,8 @@ static TeXEnvironmentData prepareEnvironment(Buffer const & buf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (style.isEnvironment()) {
|
if (style.isEnvironment()) {
|
||||||
|
if (par_lang != doc_lang)
|
||||||
|
state->open_polyglossia_lang_ = par_lang;
|
||||||
os << "\\begin{" << from_ascii(style.latexname()) << '}';
|
os << "\\begin{" << from_ascii(style.latexname()) << '}';
|
||||||
if (!style.latexargs().empty()) {
|
if (!style.latexargs().empty()) {
|
||||||
OutputParams rp = runparams;
|
OutputParams rp = runparams;
|
||||||
@ -969,10 +971,8 @@ void TeXOnePar(Buffer const & buf,
|
|||||||
unskip_newline = !localswitch;
|
unskip_newline = !localswitch;
|
||||||
}
|
}
|
||||||
} else if (!par_lang.empty()) {
|
} else if (!par_lang.empty()) {
|
||||||
// If we are in an environment, we have to close the language afterwards
|
// If we are in an environment, we have to close the "outer" language afterwards
|
||||||
if (style.isEnvironment())
|
if (!style.isEnvironment() || state->open_polyglossia_lang_ != par_lang) {
|
||||||
state->open_polyglossia_lang_ = par_lang;
|
|
||||||
else {
|
|
||||||
os << from_ascii(subst(
|
os << from_ascii(subst(
|
||||||
lang_end_command,
|
lang_end_command,
|
||||||
"$$lang",
|
"$$lang",
|
||||||
|
Loading…
Reference in New Issue
Block a user