mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
Protect \inputencoding in i18npreamble
as it might end up in a moving argument (\lstlistlistingname in book
classes).
See https://marc.info/?l=lyx-devel&m=172812937932740
(cherry picked from commit a16e4b206a
)
This commit is contained in:
parent
2df67b02f2
commit
fd6f8c28c3
@ -2032,7 +2032,9 @@ docstring const i18npreamble(docstring const & templ, Language const * lang,
|
||||
else if (ascii_fallback)
|
||||
translated = to_ascii(testenc->latexString(name).first);
|
||||
else
|
||||
translated = "\\inputencoding{" + texenc + "}"
|
||||
// We need to \protect this as it can end up in a moving argument
|
||||
// (\lstlistlistingname in book classes goes to \@mkboth via \contentsname)
|
||||
translated = "\\protect\\inputencoding{" + texenc + "}"
|
||||
+ s1 + langenc + s2 + to_utf8(name)
|
||||
+ s1 + bufenc + s2;
|
||||
preamble = subst(preamble, sub.str(), translated);
|
||||
|
@ -61,6 +61,8 @@ What's new
|
||||
|
||||
- Fix instant preview of lilypond snippets (bug 13103).
|
||||
|
||||
- Fix LaTeX error with listings, book classes and utf8 encoding.
|
||||
|
||||
|
||||
* USER INTERFACE
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user