lyx_mirror/lib/layouts
Richard Heck 8a947f63da This is one of a series of patches that will merge the layout modules development in personal/branches/rgheck back into the tree.
Design goal: Allow the use of layout "modules", which are to LaTeX packages as layout files are to LaTeX document classes. Thus, one could have a module that defined certain character styles, environments, commands, or what have you, and include it in various documents, each of which uses a different document class, without having to modify the layout files themselves. For example, a theorems.module could be used with article.layout to provide support for theorem-type environments, without having to modify article.layout itself, and the same module could be used with book.layout, etc.

This patch adds the backend. The ModuleList class holds a list of the available modules, which are retrieved from lyxmodules.lst, itself generated by configure.py. There are two LFUNs available: modules-clear and module-add, which do the obvious thing; you can test by typing these into the minibuffer, along with the name of one of the available modules: URL (a CharStyle), Endnote (a Custom Inset), and---with the spaces---End To Foot (View>LaTeX and look at the user preamble), which are themselves in lib/layouts. There are some others, too, that allow theorems to be added to classes like article and book.

The GUI will come next.

Issues: (i) The configure.py script could be improved. It'd be nice, for example, if it tested for the presence of the LaTeX packages a particular module needs. But this would mean re-working the LaTeX script, and I don't know how to do that. Note that at present, the packages are ignored. This will change shortly. (ii) I've used std::string in LyXModule, following what seemed to be a precedent in TextClass. If some of these should be docstrings, please let me know, and I'll change them. (iii) There is at present no distinction between LaTeX and DocBook modules. Should there be? That is: Should there be modules that are available when the document class is a LaTeX class and others that are available only when it is DocBook? Or should there just be one set of modules? Each module can of course indicate for what it is suitable in its description.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19893 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-29 17:59:49 +00:00
..
aa.layout some more inclusions of stdinsets.inc 2007-08-28 14:32:06 +00:00
aapaper.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
aapaper.layout some more inclusions of stdinsets.inc 2007-08-28 14:32:06 +00:00
aastex.layout some more inclusions of stdinsets.inc 2007-08-28 14:32:06 +00:00
agu_stdclass.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
agu_stdcounters.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
agu_stdlists.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
agu_stdsections.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
agu_stdtitle.inc The necessary changes to these XML layouts (charstyle new format) 2007-08-21 19:43:10 +00:00
agu-dtd.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
agums.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
aguplus.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
amsart-plain.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
amsart-seq.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
amsart.layout fixed some classes to include inset defs, updated some version nrs 2007-08-26 08:33:03 +00:00
amsbook.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
amsdefs.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
amsmaths-plain.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
amsmaths-seq.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
amsmaths.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
apa.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
arab-article.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
armenian-article.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
article.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
beamer.layout some more inclusions of stdinsets.inc 2007-08-28 14:32:06 +00:00
book.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
broadway.layout some more inclusions of stdinsets.inc 2007-08-28 14:32:06 +00:00
chess.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
cl2emult.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
db_lyxmacros.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
db_stdcharstyles.inc The necessary changes to these XML layouts (charstyle new format) 2007-08-21 19:43:10 +00:00
db_stdclass.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
db_stdcounters.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
db_stdlayouts.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
db_stdlists.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
db_stdsections.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
db_stdstarsections.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
db_stdstruct.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
db_stdtitle.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
dinbrief.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
docbook-book.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
docbook-chapter.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
docbook-section.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
docbook.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
dtk.layout some more inclusions of stdinsets.inc 2007-08-28 14:32:06 +00:00
egs.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
elsart.layout some more inclusions of stdinsets.inc 2007-08-28 14:32:06 +00:00
endnotes.module This is one of a series of patches that will merge the layout modules development in personal/branches/rgheck back into the tree. 2007-08-29 17:59:49 +00:00
entcs.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
europecv.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
extarticle.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
extbook.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
extletter.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
extreport.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
foils.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
foottoend.module This is one of a series of patches that will merge the layout modules development in personal/branches/rgheck back into the tree. 2007-08-29 17:59:49 +00:00
g-brief2.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
g-brief-de.layout some more inclusions of stdinsets.inc 2007-08-28 14:32:06 +00:00
g-brief-en.layout some more inclusions of stdinsets.inc 2007-08-28 14:32:06 +00:00
heb-article.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
heb-letter.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
hollywood.layout some more inclusions of stdinsets.inc 2007-08-28 14:32:06 +00:00
IEEEtran.layout fixed some classes to include inset defs, updated some version nrs 2007-08-26 08:33:03 +00:00
ijmpc.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
ijmpd.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
iopart.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
isprs.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
jgrga.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
kluwer.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
latex8.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
letter.layout some more inclusions of stdinsets.inc 2007-08-28 14:32:06 +00:00
literate-article.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
literate-book.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
literate-report.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
literate-scrap.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
llncs.layout some more inclusions of stdinsets.inc 2007-08-28 14:32:06 +00:00
ltugboat.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
lyxmacros.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
manpage.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
memoir.layout some more inclusions of stdinsets.inc 2007-08-28 14:32:06 +00:00
moderncv.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
mwart.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
mwbk.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
mwrep.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
numarticle.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
numreport.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
numrevtex.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
paper.layout some more inclusions of stdinsets.inc 2007-08-28 14:32:06 +00:00
powerdot.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
report.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
revtex4.layout some more inclusions of stdinsets.inc 2007-08-28 14:32:06 +00:00
revtex.layout some more inclusions of stdinsets.inc 2007-08-28 14:32:06 +00:00
scrartcl.layout fixed some classes to include inset defs, updated some version nrs 2007-08-26 08:33:03 +00:00
scrbook.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
scrclass.inc fixed some classes to include inset defs, updated some version nrs 2007-08-26 08:33:03 +00:00
scrlettr.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
scrlttr2.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
scrreprt.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
seminar.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
siamltex.layout some more inclusions of stdinsets.inc 2007-08-28 14:32:06 +00:00
simplecv.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
slides.layout some more inclusions of stdinsets.inc 2007-08-28 14:32:06 +00:00
spie.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
stdcharstyles.inc Add some more logical charstyles 2007-08-29 16:04:56 +00:00
stdclass.inc Oops... 2007-08-28 14:33:44 +00:00
stdcounters.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
stdcustom.inc Decoration added 2007-08-25 18:41:58 +00:00
stdfloats.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
stdinsets.inc Move background colour into the layout files -- for all collapsables 2007-08-26 20:32:58 +00:00
stdlayouts.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
stdletter.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
stdlists.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
stdsections.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
stdstarsections.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
stdstruct.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
stdtitle.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
svglobal.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
svjog.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
svjour.inc Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
svprobth.layout Updated versions to 5; added stdinsets.inc where I felt confident 2007-08-26 09:10:52 +00:00
theorems-ams-withinsec.module This is one of a series of patches that will merge the layout modules development in personal/branches/rgheck back into the tree. 2007-08-29 17:59:49 +00:00
theorems-ams.module This is one of a series of patches that will merge the layout modules development in personal/branches/rgheck back into the tree. 2007-08-29 17:59:49 +00:00
theorems-std.module This is one of a series of patches that will merge the layout modules development in personal/branches/rgheck back into the tree. 2007-08-29 17:59:49 +00:00
theorems-withinchap.module This is one of a series of patches that will merge the layout modules development in personal/branches/rgheck back into the tree. 2007-08-29 17:59:49 +00:00
theorems-withinsec.module This is one of a series of patches that will merge the layout modules development in personal/branches/rgheck back into the tree. 2007-08-29 17:59:49 +00:00
url.module This is one of a series of patches that will merge the layout modules development in personal/branches/rgheck back into the tree. 2007-08-29 17:59:49 +00:00