On Tue, Jul 31, 2007 at 06:56:24PM -0400, Richard Heck wrote:
> 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
I think this is the way to go. A layout item Inset, from which
CharStyle is only one of many applications.
Requires careful thinking through of what configurability we
want to allow in the layout file. I would love the inset to
have a dialog with user-defined menu entries e.g. But this
"mini-language" requires careful design.
- Martin