Re: Collapsable CharStyles [Beyond 1.5]
Richard Heck <[EMAIL PROTECTED]> writes: > 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: I understand what you mean, but if you actually look at InsetFoot.cpp, you will see some subtleties (in latex() for ex.) that we cannot express right now. Also, you do not cover docbook or plaintext export. This is why I advocate a scheme where the layout setting are automatically inherited by the inset (by its declared name) but hardcoded stuff can still be added. JMarc
Re: Collapsable CharStyles [Beyond 1.5]
Martin Vermeer wrote: 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. Yes indeed. But let me suggest that we take this in stages. There's something easily within reach here that will be very useful and then there's something that will take a lot more thought and a lot more time. We don't want to do anything now that will make the longer-term thing any harder, but I don't want to have to wait on something really useful while we figure out all these details and potentially re-design much of the layout and inset system. I'll make a more concrete sort of suggestion in a while. 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
Re: Collapsable CharStyles [Beyond 1.5]
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
Re: Collapsable CharStyles [Beyond 1.5]
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
Re: Collapsable CharStyles [Beyond 1.5]
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). JMarc
Re: Collapsable CharStyles [Beyond 1.5]
Richard Heck wrote: Jean-Marc Lasgouttes wrote: I do not like the idea of abusing the CharStyle inset to become a do-it-all inset. If we go this way, we should make a more general customizable inset and let CharStyle derive from it. Do you mean in the code or in the layout file or both? OK, I see the wisdom of doing it differently in the code. These user-defined collapsible insets probably should also appear elsewhere in the menu structure, as well, for example. 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? 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
Re: Collapsable CharStyles [Beyond 1.5]
Jean-Marc Lasgouttes wrote: Richard Heck <[EMAIL PROTECTED]> writes: I've uploaded a patch to bugzilla http://bugzilla.lyx.org/show_bug.cgi?id=3309#c3 that adds collapsible character styles, so you can do this: [...] and suddenly have your very own endnote inset. Comments welcome. I do not like the idea of abusing the CharStyle inset to become a do-it-all inset. If we go this way, we should make a more general customizable inset and let CharStyle derive from it. Do you mean in the code or in the layout file or both? 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
Re: Collapsable CharStyles [Beyond 1.5]
On Tue, Jul 31, 2007 at 01:03:24PM +0200, Jean-Marc Lasgouttes wrote: > Richard Heck <[EMAIL PROTECTED]> writes: > > > I've uploaded a patch to bugzilla > >http://bugzilla.lyx.org/show_bug.cgi?id=3309#c3 > > that adds collapsible character styles, so you can do this: > [...] > > and suddenly have your very own endnote inset. Comments welcome. > > I do not like the idea of abusing the CharStyle inset to become a > do-it-all inset. If we go this way, we should make a more general > customizable inset and let CharStyle derive from it. > > JMarc Which would be a good idea. It could be extended in many ways. - Martin
Re: Collapsable CharStyles [Beyond 1.5]
Richard Heck <[EMAIL PROTECTED]> writes: > I've uploaded a patch to bugzilla >http://bugzilla.lyx.org/show_bug.cgi?id=3309#c3 > that adds collapsible character styles, so you can do this: [...] > and suddenly have your very own endnote inset. Comments welcome. I do not like the idea of abusing the CharStyle inset to become a do-it-all inset. If we go this way, we should make a more general customizable inset and let CharStyle derive from it. JMarc
Re: Collapsable CharStyles [Beyond 1.5]
Richard Heck wrote: Jürgen Spitzmüller wrote: Richard Heck wrote: Comments welcome. Could you please wait until 1.5.0 is done? Sorry, didn't mean to distract you. It just seems as if most of us are waiting for 1.5.0 to be done---there are a few things left, not unimportant things, but not much for most of us to do Just do your experiment silently in a branch ;-) Abdel.
Re: Collapsable CharStyles [Beyond 1.5]
Richard Heck wrote: > Sorry, didn't mean to distract you. It just seems as if most of us are > waiting for 1.5.0 to be done---there are a few things left, not > unimportant things, but not much for most of us to do On the contrary, this is attracting me, and I try to be resistant ;-) Jürgen
Re: Collapsable CharStyles [Beyond 1.5]
Jürgen Spitzmüller wrote: Richard Heck wrote: Comments welcome. Could you please wait until 1.5.0 is done? Sorry, didn't mean to distract you. It just seems as if most of us are waiting for 1.5.0 to be done---there are a few things left, not unimportant things, but not much for most of us to do 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
Re: Collapsable CharStyles [Beyond 1.5]
Richard Heck wrote: > Comments welcome. Could you please wait until 1.5.0 is done? Jürgen