Re: [Patch] Moving functionality into layouts
On Tue, Dec 30, 2003 at 11:11:38AM +, Jose' Matos spake thusly: > On Monday 29 December 2003 17:58, Martin Vermeer wrote: > > > > How do you plan to do this? A list of layouts that accept a given > > > CharStyle? > > > > Yes... as a parameter within that CharStyle definition. "AllowedIn" or > > something, with a comma separated arg list. > > IMHO we should follow the way dtd are descrived, there you group several > elements in one entity, then you say if such an entity can go inside another > element or not. > > Take surname and firstname as example, we expect that where one is allowed > the other is as well. > > So I'm proposing some kind of phony entries (using the *make* parlance). Do > you understand what I mean? I think I do. > I don't know if this is easy to implement but surely is the sane way to go. No, I think we'll run into trouble if we do this literally, as the whole layout file syntax is so very different now. However, one basic idea in this that we could consider is: describing the insets a given paragraph style may contain, rather than (my above proposal) describing the paragraph styles that may contain a given inset. Hmmm. Thinking continues. > > > JMarc > > > > - Martin > > -- > José Abílio > > LyX and docbook, a perfect match. :-) The patch is in now "as is". BTW Jean-Marc, I now remember that one problem with \" instead of " was, that you first have to read in the string delimited by "", and only then substitute whatever it is you want to substitute. If the string contains substrings \", the first step wil fail because of the ". Of course there would be ways around it, but requiring extra coding. I thought this was good enough. And obvious to XML/SGML users. - Martin pgp0.pgp Description: PGP signature
Re: [Patch] Moving functionality into layouts
On Monday 29 December 2003 17:58, Martin Vermeer wrote: > > How do you plan to do this? A list of layouts that accept a given > > CharStyle? > > Yes... as a parameter within that CharStyle definition. "AllowedIn" or > something, with a comma separated arg list. IMHO we should follow the way dtd are descrived, there you group several elements in one entity, then you say if such an entity can go inside another element or not. Take surname and firstname as example, we expect that where one is allowed the other is as well. So I'm proposing some kind of phony entries (using the *make* parlance). Do you understand what I mean? I don't know if this is easy to implement but surely is the sane way to go. > > JMarc > > - Martin -- José Abílio LyX and docbook, a perfect match. :-)
Re: [Patch] Moving functionality into layouts
On Mon, Dec 29, 2003 at 12:29:57PM +0100, Jean-Marc Lasgouttes spake thusly: > > > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > Martin> See the attached. The idea is to make it possible to use > Martin> LatexParam more flexibly to add attributes to opening tags. > Martin> Work in progress. > > Martin> OK to commit? > > What does the # in latexparam mean? Here the counter expression is substituted. See output_docbook.C (the lines with subst()). > Do you really need to use "? I'd think that a simple \" would > work. This is self-implemented, see lyxlayout.C:338. I did try if \" worked, and it didn't. Still, I'm open to better suggestions, " is a bit verbose. > Martin> Also one thing I still want to do, is make the CharStyle > Martin> insets (I'm still thinking of them as Element insets :-) > Martin> enabled only if they are inside the right paragraph style, > Martin> like Jean-Marc did with ShortTitle. This will structure the > Martin> situation especially for editing the header. > > How do you plan to do this? A list of layouts that accept a given > CharStyle? Yes... as a parameter within that CharStyle definition. "AllowedIn" or something, with a comma separated arg list. > JMarc - Martin pgp0.pgp Description: PGP signature
Re: [Patch] Moving functionality into layouts
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: Martin> See the attached. The idea is to make it possible to use Martin> LatexParam more flexibly to add attributes to opening tags. Martin> Work in progress. Martin> OK to commit? What does the # in latexparam mean? Do you really need to use "? I'd think that a simple \" would work. Martin> Also one thing I still want to do, is make the CharStyle Martin> insets (I'm still thinking of them as Element insets :-) Martin> enabled only if they are inside the right paragraph style, Martin> like Jean-Marc did with ShortTitle. This will structure the Martin> situation especially for editing the header. How do you plan to do this? A list of layouts that accept a given CharStyle? JMarc