[LyX/master] \foreignlanguage does not play with \cprotect.

Juergen Spitzmueller spitz at lyx.org
Fri Aug 14 06:43:35 UTC 2020


commit 8bc76ad9bbdef6aada4843aafae0d6a6ed834ed8
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Fri Aug 14 09:00:48 2020 +0200

    \foreignlanguage does not play with \cprotect.
---
 src/Font.cpp |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/src/Font.cpp b/src/Font.cpp
index a8c8275..327bc18 100644
--- a/src/Font.cpp
+++ b/src/Font.cpp
@@ -310,10 +310,6 @@ int Font::latexWriteStartChanges(otexstream & os, BufferParams const & bparams,
 			string const tmp =
 				subst(lyxrc.language_command_local,
 				      "$$lang", language()->babel());
-			if (needs_cprotection && !prefixIs(tmp, "\\begin{")) {
-				os << "\\cprotect";
-				count += 9;
-			}
 			os << from_ascii(tmp);
 			count += tmp.length();
 			if (!lyxrc.language_command_end.empty())


More information about the lyx-cvs mailing list