Jose Capco wrote:

> Dear Mailing List,
> 
> Are the .lyx files actually texts with commands
> similar to LaTeX and is it practical/possible to write
> in LyX using an ordinary text editor? I am already
> very much used to writing in LaTeX and personally I
> prefer LaTeX than LyX... but I need to write some
> (mathematical) articles together with someone and he
> can only use LyX and I have heard importing/exporting
> LaTeX for LyX is not very clean. I am trying to find
> the best possible means to collaborate with the other
> author who can only write in LyX. If I have to use
> LyX, I prefer doing it in a text editor (if possible)
> and compiling it later.. since I am using windows and
> the LyX available for windows (I tried both the QT and
> the Xserver version) don't display or display badly
> many math fonts (like sum and etc.) and I couldnt find
> any solution to this in the net. If thats the case,
> then it defeats the WYSIWYM and I prefer anyway to
> write things on a text editor since I know how to
> write them that way and it makes less difference for
> me.
> 
> Sincerely,
> Jose Capco

The LyX file format is written as ascii text, so it's certainly 
understandable. However, hacking it by hand is going to be fraught with 
problems.

LyX on Windows: have you tried Ruurd Reitsma's port of LyX to Windows 
using the native Windows API?

If you're set on using LaTeX, then I recommend that you use tex2lyx to 
convert your LaTeX file back into LyX file format. texlyx is the 
next-generation LaTeX to LyX converter and is much, much more powerful 
than reLyX. Unfortunately for you, it's available only as part of the 
development version of LyX. If I have time this evening, I'll try and 
build it for you.

Usage would be:
    edit your latex file
    tex2lyx your_file.tex > your_file_14x.lyx

    Command line switches (case sensitive):
        -help            summarize tex2lyx usage
        -f          Force creation of .lyx files even if they exist already
        -userdir dir       try to set user directory to dir
        -sysdir dir        try to set system directory to dir
        -c textclass       declare the textclass
        -s syntaxfile      read additional syntax file

This will create a LyX file in the latest LyX file format which your 
friend's LyX won't understand. You'll then need to use the latest version 
of the lyx2lyx python script to convert the just-generated lyx file to the 
LyX 1.3.x file format:

    python <path to>/lyx2lyx --list

    [210, 215, 216, 217, 218, 220, 221, 223, 224, 225, 226,
     227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
     238, 239, 240]

LyX 1.3.x generates file format 221.

    python <path to>/lyx2lyx --to 221 \
        --output your_file_13x.lyx your_file_14x.lyx

    Usage: lyx2lyx [options] [file]
    Convert old lyx file <file> to newer format,
    files can be compressed with gzip.
    If there no file is specified then the standard input
    is assumed, in this case gziped files are not handled.
    Options:
        -h, --help            this information
        -v, --version         output version information and exit
        -l, --list            list all available formats
        -d, --debug level     level=0..2 (O_ no debug information,
                                          2_ verbose)
                              default: level=1
        -e, --err error_file  name of the error file or 
                              else goes to stderr
        -t, --to version      final version (optional)
        -o, --output name     name of the output file or 
                              else goes to stdout
        -q, --quiet           same as --debug=0

-- 
Angus

Reply via email to