]> git.lyx.org Git - lyx.git/commitdiff
\cprotect amendment
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 22 Jun 2024 11:38:47 +0000 (13:38 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sat, 22 Jun 2024 18:03:56 +0000 (20:03 +0200)
\cprotect'ed insets do not need forced local font switch; in fact files
with this break in compilation. E.g. a caption with an URL containing
the char '#' and caption text set to a secondary language.

(cherry picked from commit 8659924abd7026aa97a36bd99efeb11705ff7190)

src/output_latex.cpp
status.24x

index 9b504a72cb8d29ce8e23fe4d12545936d622ea15..7dc3347ed1e8a6ef3235084640937a0aecfd924c 100644 (file)
@@ -1000,7 +1000,10 @@ void TeXOnePar(Buffer const & buf,
                     && (prev_language->rightToLeft() != par_language->rightToLeft()));
        bool const localswitch =
                        (runparams_in.find_effective()
-                       || text.inset().forceLocalFontSwitch()
+                       // \cprotect'ed insets do not need, and actually
+                       // break with, local switches
+                       || (text.inset().forceLocalFontSwitch()
+                           && !text.inset().needsCProtection(maintext, runparams.moving_arg))
                        || (using_begin_end && text.inset().forcePlainLayout())
                        || in_polyglossia_rtl_env)
                        && !text.inset().forceParDirectionSwitch();
index fddec2b074311d2bfed8cf3e0736454d43fba03e..f44e7a6839da89cad9ac4ad5dcbf1551471c2d20 100644 (file)
@@ -67,6 +67,8 @@ What's new
 
 - Fix some cases where beamer breaks with the new cprotect mechanism.
 
+- Fix case where new cprotect mechanism breaks with caption.
+
 - Update acknowledgments handling in aastex63 layout 
   (cf. https://journals.aas.org/aastexguide/#acknowledgments)
 
@@ -76,6 +78,7 @@ What's new
 
 - Remove redundant code from preamble of double column Hebrew documents (bug 12919)
 
+
 * USER INTERFACE
 
 - Fix crash when deleting rows or columns from table.
@@ -102,7 +105,6 @@ What's new
 
 - Put new citation after selected item rather than at end of list (bug 12940).
 
-
 - fix overflow of appendix red frame in document-bottom grey area.
 
 
@@ -121,6 +123,7 @@ What's new
 
 - Fix crash when passing unknown value to textstyle-update
 
+
 * DOCUMENTATION AND LOCALIZATION