On 9/15/22 09:11, Jean-Marc Lasgouttes wrote:
Le 14/09/2022 à 02:28, Udicoudco a écrit :
Hello Lyx Developers,
Recently I've been trying to understand more thoroughly how theorems
modules are implemented in LyX, and I think I've come across some
bugs, and some redundant modules (but I might have misunderstood a
few things).
Hello Udi,
Thanks for looking at that.
The first thing I've noticed is that all AMS theorems related modules
load the packages amsmath and amsthm even if the use did not use any
layout. I could not understand why, as amsthm does not depend on
amsmath. I've tried to compile a lyx file containing all the layouts
defined in Theorem (AMS), but i erased the line "Require
amsmath,amsthm" from the module, and the file compiled (as amsthm is
loaded by the layouts, there is no really a need to load the package
if the user did not use any layout).
This looks like a bug indeed.
These have gone through so many versions, that I'm not surprised bugs
have accumulated over the years. Cleaning it all up is a great idea.
The second thing I've noticed, there is no difference between the
files theorems.inc and theorems-ams.inc. In the description of the
file theorems-std.module, which uses theorems.inc it is said that the
module "Defines some theorem environments for use with non-AMS
classes", but the module uses amsthm, and he is compilable with AMS
classes.
This is indeed surprising. In the old days, non-ams theorem modules
did not use amsthm. But for some reason it was changed when
modularizing the layouts. I am not sure whether we can revert this
decision 14 years later (see below). If we don't, the two types of
theorems should be merged indeed.
The culprit is:
commit f5a5be4d188a20ee2a5c0213ee11bf64c0908841
Author: Richard Heck <rgh...@comcast.net>
Date: Thu Jan 10 04:58:20 2008 +0000
Modularization of the AMS classes, and the theorem environments
generally.
This is Part I: The changes to the layout files and modules. Part
II, still
to come, will involve lyx2lyx to help people who were using the
older classes.
I'm guessing I failed to notice this similarity. That was a while ago!
Riki
--
----------------------------
Richard Kimberly (Riki) Heck
Professor of Philosophy
Brown University
Pronouns: they/them/their
Website: http://rkheck.frege.org/
Blog: http://rikiheck.blogspot.com/
Amazon: http://amazon.com/author/richardgheckjr
Google Scholar: https://scholar.google.com/citations?user=QUKBG6EAAAAJ
ORCID: http://orcid.org/0000-0002-2961-2663
Research Gate: https://www.researchgate.net/profile/Richard_Heck
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel