On Tue, Dec 07, 1999 at 02:22:46PM +0000, Duncan Simpson wrote:
>
> BTW A really good description of .lyx format, particuilarly in the table
> area, would propel a .lyx word2x output stage higher up the word2x TODO
> list.
I don't know what your experience with Perl is, but you might find the
RelyxTable.pm file that's part of reLyX to be useful. Specifically, take a
look at the comment blocks that describe the various fields, which are found
right before the "new" subroutines. And look at the "print" subroutines as
well.
Basically, a lyx table first prints out a few table-wide flags. Then it
prints out information about each row (e.g. whether there's a line at the
top of the row), then about each column (e.g. left/right/center alignment),
then about each cell. Finally, each cell is printed out, separated by the
string "\n\\newline \n".
As far as the overall description, you might find it easiest just to look at
a couple lyx files. The format is really pretty simple. Basically, \ at the
beginning of a line starts most of the non-plain-text commands. Many
commands look like
\begin_inset Figure
followed by various flags.
Again, depending on
how happy you are with Perl, looking at reLyX files may be easier than
reading the lyx source, because the output is (I think) spread out amongst a
number of files. Or maybe I'm just trying to get someone to read the reLyX
source.
The good or bad news is that (I think) the lyx file format will be changing
in the not too distant future.
-Amir