From d71e3404fe33179f00c8a28ea6498e414b43b49b Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Tue, 6 Mar 2018 18:17:01 +0100 Subject: [PATCH] Braces need to be escaped as well on LATEXIFY part of #9563 --- src/insets/InsetCommandParams.cpp | 7 ++++--- status.23x | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/insets/InsetCommandParams.cpp b/src/insets/InsetCommandParams.cpp index 39c7715dc5..741f6aa940 100644 --- a/src/insets/InsetCommandParams.cpp +++ b/src/insets/InsetCommandParams.cpp @@ -464,14 +464,15 @@ docstring InsetCommandParams::prepareCommand(OutputParams const & runparams, } // Now escape special commands static docstring const backslash = from_ascii("\\"); - static char_type const chars_escape[6] = { - '&', '_', '$', '%', '#', '^'}; + int const nchars_escape = 8; + static char_type const chars_escape[nchars_escape] = { + '&', '_', '$', '%', '#', '^', '{', '}'}; if (!result.empty()) { int previous; // The characters in chars_name[] need to be changed to a command when // they are LaTeXified. - for (int k = 0; k < 6; k++) + for (int k = 0; k < nchars_escape; k++) for (size_t i = 0, pos; (pos = result.find(chars_escape[k], i)) != string::npos; i = pos + 2) { diff --git a/status.23x b/status.23x index 6c719629c7..c659e78e21 100644 --- a/status.23x +++ b/status.23x @@ -41,6 +41,8 @@ What's new - Fix the implementation of new libertine font package. +- Properly escape braces in non-literate context in insets. + * LYX2LYX -- 2.39.5