commit 3c6f0076f0d7e9711ad53ccada63fec71a74f7bf
Author: Juergen Spitzmueller <[email protected]>
Date: Thu May 15 08:16:41 2025 +0200
Amend 05fa236829
If the document class (not only a module) provides arguments
for lists, we handle them.
Since we also account for special delims in the beamer case,
fall though to that in such cases and limit the special handling
to the case where a list gets arguments only by a module (such
as enumitem).
---
src/tex2lyx/text.cpp | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp
index 33d69f7f48..5ee3e7bf59 100644
--- a/src/tex2lyx/text.cpp
+++ b/src/tex2lyx/text.cpp
@@ -2609,9 +2609,16 @@ void parse_environment(Parser & p, ostream & os, bool
outer,
parent_context.layout,
parent_context.font);
if ((context.layout->latextype == LATEX_LIST_ENVIRONMENT
|| context.layout->latextype ==
LATEX_ITEM_ENVIRONMENT)
- && p.hasOpt()) {
- // if a list environment has an optional
argument
- // (e.g., with enumitem), store it to output it
later
+ && p.hasOpt()
+ && context.layout->latexargs().empty()) {
+ // FIXME: findLayout() looks for layouts in the
class
+ // first and only in modules if a layout is not
found.
+ // So if a module adds arguments to existing
layouts
+ // (e.g., enumitem to itemize), they wont't be
recognized (#13185).
+ // Workaround: If a list environment has an
optional argument,
+ // and the document class layout does not
provide for
+ // an optional argument (some, e.g. beamer,
do!),
+ // store it here to output it manually later
// in the first list paragraph.
context.list_options = p.getArg('[', ']');
p.skip_spaces(true);
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs