On Wed, Jan 07, 2004 at 01:53:29PM +0100, Alfredo Braunstein wrote:
> Andre Poenitz wrote:
> 
> > On Wed, Jan 07, 2004 at 01:30:02PM +0100, Alfredo Braunstein wrote:
> > Would be a good starting point. Searching for real formulas would be
> > better, of course, but that would involve something similar to a
> > InsetText as 'search' field in the S&R dialog. I am not sure whether
> > this is possible at all in the current scheme.
> 
> I don't think that the current scheme restrict things, as you can use
> recursion (as in the old scheme) if needed.

I don't mean the find scheme, but the 'dialog' scheme. To search for a
'real' formula one must be able to enter it in the search dialog. Which,
in turn, means that the search dialog needs to accept almost arbitrary
data instead of a simple string. Sort of 'embedded InsetText'...

> What I think is a nice feature of the current scheme (it's not implemented
> yet, but it's easy to do) is to treat text like a flow, allowing to find
> things spanning at different levels.

That's what I'd do in math: Translate search string and formual to plain
text (i.e. LaTeX) and match these. This can cover several levels.

> > Not just text. Full math.
> 
> One way would be in the lines of a proposal of mine of some days ago: make
> some "adaptor" iterator on top of PosIterator that add some "virtual" text
> "decorations" to the text stream.
>
> My first idea was to add inset begin, end
> and type delimiters following some easy grammar (like say {Foot: hello})
> (in the case of math, it could add the full math inset in latex form or
> something).
> 
> What do you think?

We already have these decorations in the read & write methods. No need
to invent a second 'language' to do basically the same thing.

Of course, nobody would type '\layout Subsection\nFoo' in the search
input field right now. But with an embedded InsetText there asking the
user to type in 'Foo' and format as 'Subsection' is feasible...

Andre'

-- 
Those who desire to give up Freedom in order to gain Security, will not have,
nor do they deserve, either one.     (T. Jefferson or B. Franklin or both...)

Reply via email to