commit 8077d5045124dfbe0cd5a9aad77204c1e60b4957
Author: Juergen Spitzmueller <[email protected]>
Date: Thu May 15 10:14:31 2025 +0200
Import known environments with unknown arguments as ERT
rather than putting the arguments blindly in the main text.
---
src/tex2lyx/text.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp
index 4bfba4182c..e5bb6279f1 100644
--- a/src/tex2lyx/text.cpp
+++ b/src/tex2lyx/text.cpp
@@ -2607,6 +2607,12 @@ void parse_environment(Parser & p, ostream & os, bool
outer,
eat_whitespace(p, os, parent_context, false);
Context context(true, parent_context.textclass,
newlayout,
parent_context.layout,
parent_context.font);
+ // If we have options we don't know of in the layout,
+ // output ERT
+ if (p.hasOpt() && context.layout->optArgs() == 0) {
+ parse_unknown_environment(p, name, os,
FLAG_END, outer, parent_context);
+ break;
+ }
if (parent_context.deeper_paragraph) {
// We are beginning a nested environment after a
// deeper paragraph inside the outer list
environment.
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs