[LyX/master] tex2lyx: properly import \tikzset

Juergen Spitzmueller spitz at lyx.org
Sat Feb 24 07:29:15 UTC 2024


commit 9a3fe514742375e40a9bef88c6c205119d480617
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Sat Feb 24 08:28:40 2024 +0100

    tex2lyx: properly import \tikzset
---
 src/tex2lyx/text.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp
index 5f2a620567..d50222a68b 100644
--- a/src/tex2lyx/text.cpp
+++ b/src/tex2lyx/text.cpp
@@ -5580,6 +5580,16 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
 			continue;
 		}
 
+		if (t.cs() == "tikzset") {
+			context.check_layout(os);
+			// we catch the argument and output it verbatim in an ERT
+			string const arg = p.getArg('{', '}');
+			output_ert_inset(os,
+				"\\tikzset{" + arg + "}",
+				context);
+			continue;
+		}
+
 		else if (t.cs() == "bibliography") {
 			context.check_layout(os);
 			string BibOpts;


More information about the lyx-cvs mailing list