Richard Heck <rgheck <at> lyx.org> writes:
> 
> On 07/20/2012 10:20 AM, Virgil wrote:
> > 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'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.
> ....
> 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.

Thanks, Richard, for your detailed reply...I have implemented it and so far it
 seems to be working (LyX 2.03 on Ubuntu 11.10)...However, step (ii) above 
(renaming IEEEtran.layout) seems to cause problems, because, apparently LyX 
assumes there would a matching class called IEEEtran-bytype.cls...I reverted 
the 
name back to IEEEtran.layout and that seems to have fixed it... (I suppose I 
could have also made a copy of the class named IEEEtran-bytype.cls and it might 
have worked).

Anyway, I just choose article(IEEEtran) as before...Even after multiple 
reconfigure/restart cycles, the new layout does not show if I click on "Local 
Layout" on the left sidebar (between Modules and Fonts), but I can find it by 
clicking on the button labelled "Local Layout" to the right of the Document 
Class drop-down choice, and browsing...have no idea of the difference between 
the button and the side-bar menu both labelled "Local Layout", but one of the 2 
works.

The solution does have some obvious disadvantages...notably, one would need 
different "tweaked" layouts to be able to use different Theorem numbering 
conventions in different docs (which may very well be needed/wanted since, as 
discussed in the OP, there is no IEEE-wide convention on this matter, so 
different publication outlets could impose different conventions; likewise,
different collaborators may have different preferences on this matter...
anyway, the workaround suffices for the time being.

It is rather unfortunate that it has not been possible to fix whatever it is
that prevents a Theorem module choice through standard LyX means, without 
modifying the layout...if I understand correctly, the whole point of this 
functionality is precisely to enable such choices on a per-document basis, 
conveniently through the LyX menus...As you indicated, the limitation has been 
known for about 2 years...perhaps some maintainers do believe that the "by 
type" 
convention is not allowed by the IEEE (which, as discussed in the OP, is not
the case) and hence fixing it is not worth the trouble.

I find puzzling that somehow once the layout is tweaked as discussed above, 
everything seems to work both within LyX and at the LaTeX level, yet one cannot 
make the choice within LyX in the "normal" LyX way...it seems that whatever it 
is only affects the ability to choose the module through the LyX UI.

Anyhow, it would be great if it became possible for this problem to be fixed in 
the next minor release.

Thanks again.

Virgil

Reply via email to