LyX 2.5.2 regression: starred theorem environments have an empty heading
Rene Adad <[email protected]>
| Newsgroups | gmane.editors.lyx.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I have found a regression in LyX 2.5.2 affecting unnumbered (starred) theorem environments.
Steps to reproduce:
Create a new document using the AMS Article class.
Add the “Theorems (AMS)” module.
Insert a paragraph using the “Theorem*” layout.
Enter some text, for example: “This is a test.”
View or export the document as PDF.
Expected result:
Theorem. This is a test.
With French as the document language:
Théorème. Ceci est un test.
Actual result:
. This is a test.
Only the punctuation following the theorem heading is displayed. The heading itself is missing.
The generated LaTeX contains:
\providecommand\theoremname{}
\theoremstyle{plain}
\newtheorem*{thm*}{\protect\theoremname}
Consequently, amsthm prints only the punctuation associated with the empty theorem name.
This appears to be a regression related to the fix for ticket #13307. In LyX 2.5.1, theorems-starred.inc contained a language preamble such as:
\providecommand{\theoremname}{_(Theorem)}
The LyX 2.5.2 change removed these explicit LangPreamble definitions and now constructs theorem names from the layout information. However, the starred theorem layouts do not appear to define a TheoremCrossRefName. As a result, the generated fallback name is empty.
Numbered theorem environments appear to be unaffected because their layouts do define TheoremCrossRefName.
The same problem is likely to affect the other starred environments, such as Lemma*, Proposition*, Corollary*, and so on.
A document-level workaround is:
\providecommand{\theoremname}{Theorem}
or, for a French document:
\providecommand{\theoremname}{Théorème}
Environment:
LyX 2.5.2
macOS
Official Qt 6 universal build
Reproduced with the “Theorems (AMS)” module and the Theorem* layout
Could you please confirm whether this should be opened as a new regression ticket?
Best regards,

--
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel