Jean-Marc Lasgouttes wrote:
Richard Heck <[EMAIL PROTECTED]> writes:
But should they also be
differently defined in the layout file? I.e., should it be more like:
 CollapsibleInset Endnote
   LatexName endnote
 ....
rather than using CharStyle here, too?
Actually, I would also define things like footnotes like that, to
remove as much hardcoding as possible. Not all layouts want the same
appearance for these notes anyway.

So it could be

Inset Footnote
  Collapsable 1
  Font
   Size Small
  EndFont
  LabelString "foot"
End

InsetFootnote.cpp would only need to contain a few things (latex
knowledge).
The idea here is that there wouldn't need to BE an InsetFootnote.cpp. That's certainly the idea with Endnote. So you could have this:

Inset Footnote
 LyXType Collapsable
 LatexName footnote #this is implicitly a command, I take it
 Font
  Size Small
 EndFont
 LabelString "foot"
End

Or something along those lines. Then InsetFoot (and the peculiar InsetFootlike) vanishes. I'd have to check what happens here with plain text and docbook output, though, and there's also a possible issue with insetAllowed(). So this particular case might not be amenable to such treatment.

In any event, with endnote.sty, the target is something like this:

Inset Endnote
 LyXType Collapsable
 LatexName endnote
 Font
  Size Small
 EndFont
 LabelString "foot"
 Preamble
   \usepackage{endnote}
 EndPreamble
End

We don't want InsetEndnote, in large part because, as Martin said, this should make it possible to support lots of LaTeX packages without messing with the actual code. And allowing

 LyXType Command

which would generate an InsetCommand-type inset could allow lots of interesting things, too, but that's another topic.

So, anyway, I guess we need to settle on what the *.layout code will look like. Once that's in place, it won't be terribly hard to redo the code to separate this out. I've already made a list of what bits of which files need to be changed. But I'll finish the modular layout stuff first....

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

Reply via email to