I'm about to add some more functionality to the modules stuff, namely, an ability for a module to "require" another module, or to "exclude" one. For example, the Theorems and Theorems (AMS) modules should not be used together. The question is how to represent this information in the module files.

Note that this is information we want ultimately to turn up in lyxmodules.lst, which is produced by configure.py. So we're not talking about additional layout tags.

At present, we have something like this:

#\DeclareLyXModule[endnotes.sty]{Herein lies the description of the module.}{Endnote}

One possibility would be to add additional optional arguments for required and excluded packages. That would retain the LaTeX-like syntax, which I modeled on layout files themselves, thinking that at some point this might be integrated into chkconfig.ltx, the way layout files are. But if that's not going to happen, and I'm in no position to do that, then we could use some other system, and even bring the description out, perhaps like this:
#\DeclareLyXModule[endnotes.sty]{Endnote}
#BeginDescription
#Adds an endnote command, in addition to footnotes. You will need to add
#\theendnotes in ERT where you want the endnotes to appear.
#EndDescription
#Requires: Some Module; Some Other Module
#Excludes: Bad Module
This could then be parsed by configure.py, easily enough.

By the way: The requires here are meant to be treated disjunctively: You need ONE of the mentioned packages. The excludes will be treated conjunctively: NONE of the mentioned packages can be used. Seem sensible?

Thoughts?

Richard

Reply via email to