On 07/20/2012 10:20 AM, Virgil wrote:
Hi, everyone!
I sent this text to the users list with no response...It is about a possible
"bug" or "feature" of the LyX layout for the IEEETran class.
It appears that after a recent LyX update,
The commit that affected this was on 6 August 2010, which fixed a bug in
the update to IEEETran 1.7, which Uwe did on 7 May 2010.
none of the modules for numbering
theorems by type (e.g., theorem 1, theorem 2, lemma 1, proposition 1, theorem 3,
lemma 2, ..., as opposed to theorem 1, theorem 2, lemma 3, proposition 4, ...).
can be chosen if the IEEEtran document class has been selected.
It seems that this restriction is hard-coded and cannot be changed from within
LyX (one can obviously export to LaTeX, and manually change certain lines, and
compile from LaTeX).
Is this a "bug" or a "feature"?
Is there a work-around other than the LaTeX export route?
It's not hard-coded, but in the layout file:
ProvidesModule theorems-std
Input theorems.inc
So we're loading theorems.inc ourselves, which means you can't use the
"bytype" modules because it makes no sense to select them both. If you
were able previously to select theorems-bytype, then that was a bug, and
it's sheer luck that it worked, since a ton of stuff was getting defined
twice.
But if you want to use theorems-bytype, then here's how to do it:
(i) Copy the IEEEtran.layout file to your local LyX layouts directory,
which is a sub-directory of your LyX user directory (and you can find
out where that is by looking at Help>About LyX).
(ii) Rename that file something like IEEEtran-bytype.layout.
(iii) Open the file and change the declaration at the beginning so it
reads something like:
# \DeclareLaTeXClass{article (IEEEtran, by type)}
(iv) Find the lines mentioned above, and change them to:
ProvidesModule theorems-bytype
Input theorems-bytype.inc
(v) Reconfigure LyX, and now this new layout should be available.
Richard