commit 32bc3decffe19f8f2204d93145c10a58083918d0
Author: Juergen Spitzmueller <[email protected]>
Date: Thu Jun 12 04:58:10 2025 +0200
Amend 05b922b8ad1868 once more
Add remaining preamble theorem definitions to \AtBeginDocument
(i.e., after the other theorem definitions) in case they rely on
those
---
lib/scripts/layout2layout.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/scripts/layout2layout.py b/lib/scripts/layout2layout.py
index 06ada7c7c8..81bf2789b7 100644
--- a/lib/scripts/layout2layout.py
+++ b/lib/scripts/layout2layout.py
@@ -661,6 +661,11 @@ def convert(lines, end_format):
# Specific definition which we cannot integrate
lines.insert(i+1, b"\tTheoremName \"\"")
lines.insert(i+1, b"\t# Bypass new theorem construction")
+ # since the new theorem definitions come after the
+ # user preamble, and those in preamble may rely
+ # on the former, shift to AtBeginDocument
+ oldlines.insert(0, b"\t\\AtBeginDocument{")
+ oldlines.append(b"\t}")
lines[i:i] = oldlines
continue
have_thm = False
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs