[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lyx-devel
Subject:    Re: Bug in lyxconvert_217.py
From:       Dekel Tsur <dekelts () tau ! ac ! il>
Date:       2002-08-30 21:49:23
[Download RAW message or body]

On Fri, Aug 30, 2002 at 03:26:47PM +0100, José Abílio Oliveira Matos wrote:
> On Thursday 29 August 2002 19:21, Dekel Tsur wrote:
> [...]
> > Another solution may be write a function find_end_of() which find the
> > correct end of the tabular. find_end_of() should be a generalization of
> > find_end_of_inset() which have two additional arguments: start token & end
> > token (for find_end_of_inset, start token = \begin_inset, and end token =
> > \end_inset).
> 
>   And be able to find only the top level close. I agree. I dind' need until 
> now to take in account the structure present in lyx files.

You don't need that, at least for case.
An example for a table conversion code would be:
   for each line in file:
       if line begins with <LyXTabular, <features, <row, <column, or <cell:
          do the appropriate conversion.

The only problem with this is speed (doing the check for each line).
A faster solution is as follows:
while 1:
     find <LyXTabular
     find the matching </LyXTabular (*)
     for each line between the two lines above:
         if line begins with <LyXTabular, ...:
	      do the appropriate conversion.

(*) This step is simple

> I also need that for the paragraph inside cells.

Why?
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic