On Fri, Jan 07, 2000 at 02:49:56PM +0100, Jean-Marc Lasgouttes wrote:
> 
> What I mean is that, there could be functions to handle a font stack
> and output the right lyx commands. Or to say 'set layout to 'foo'. Or
> to parse the .layout files and put relevant info in a data structure.
> Or to build a table.
> 
> I'm sure a lot of code in reLyX could be used somewhere else. Of
> course, it may be a lot of work to factor out this code.

I agree that a lot of it could be used. RelyxFigure, RelyxTable, and the
layout stuff could mostly be taken whole. Unfortunately, 

(1) as I mentioned in a previous email, a lot of the code is in a huge
switch statement where for each command, that command's format is changed to
LyX format, which means you'd have to hunt through BasicLyX.pm line by line
looking for print statements.

(2) LyX often writes things very similar to LaTeX. So when you're
translating from LaTeX, your job is easier. I.e. you don't have to build up
any OO to store stuff, you just copy text verbatim from the LaTeX. (This is
most obvious in math, but happens elsewhere, too, e.g. for arguments to
commands.)

Happy Friday.

-Amir

Reply via email to