José Matos wrote:
Hi Richard,
I have some small (and probably pedantic) questions regarding you work on
modules:
Why are the new files called modules and how they differ from the
current .inc files internally? Are the modules supposed to superseed the
previous .inc files?
The .inc files are supposed to be Include'd in .layout files. They're
used mostly to collect common definitions, etc. Good examples would be
stdcounters.inc, which defines the counters section, subsection, etc,
and stdsections.inc, which defines the paragraph layouts Section,
Subsection, and so forth. These then get included in article.layout,
book.layout, etc, and could just as well have been cut-and-pasted, with
all the downsides to doing that. So .inc files are integral parts of
.layout files that provide basic functionality, without which the layout
wouldn't really work at all.
Modules are different and are the LyX correlate to LaTeX packages
(though they don't necessarily go with packages). A module provides
customized functionality. Good examples here would be:
* endnote.module: defines a custom Endnote inset, which gives you access
to \endnote, just as the Footnote inset gives you access to \footnote.
So you could have both footnotes and endnotes in a document (as some
critical editions do---speaking of which, there'll be a similar module
for bigfoot.sty at some point).
* url.module: defines a URL charstyle, which gets formatted
\url{}---which will eventually make it possible to use the current URL
for \href, per umpteen requests
* theorems.module (to come): defines several theorem styles for use with
non-AMS classes
* mycharstyles.module: an imaginary, user-created file defining
character styles s'he often uses
* objection-reply.module: a module I'd like to be using that defines
"Objection" and "Reply" environments for formatting discussion in some
of my papers
Modules are like .inc files in that they can be used with different
document classes. The difference is that what modules are used is a
document-level property---specifically, it's in BufferParams. To take
the mycharstyles case, you could modify article.layout to include
mycharstyles.inc, and then modify book.layout also to include it, etc.
And then if you decided you also wanted, in some cases, to use endnotes,
you could modify it yet again to include endnote.inc, etc. And then you
end up with several versions of article sitting on your hard drive, and
if you decide to change to scrartcl, you have to modify that layout,
too. But with modules, you don't have to do any of that. You just hit
Document>Settings and select the modules you want to use (or use
layout-module-add, if you wish), and if you change the document class at
some point, the modules are still there.
Why do you call the new files .module instead of .mod?
I started out with .mod and changed to . module, mostly because .layout
has six letters. And because abbreviations like .mod seems like relics
of 8.3.
Richard
--
==================================================================
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==================================================================
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto