                  TeX to LyX converter
                  ====================

          John Collins, Penn State University
                  collins@phys.psu.edu
      (http://www.phys.psu.edu/JCOLLINS/jcollins.html)

                      22 Jan 1996


LyX is an editor/typesetting system for X-windows that has a
WYSIWYG-style interface, and uses LaTeX to do the typesetting.  The
LyX homepage is
      http://www-ti.informatik.uni-tuebingen.de/~ettrich/.
It was conceived by Matthias Ettrich, and is at present under
development by an international group of collaborators.

LyX uses its own (ASCII) file format, but is able to export a
corresponding LaTeX file.  A formula editor is under active
development.

The software in this directory is a start at producing a (La)TeX to
LyX converter.  This will be an essential part of the project if LyX
is to be of widespread use in the TeX community, since, among other
things, (La)TeX files are a de facto standard for exchange of
scientific papers in many areas of physics and mathematics.

As with the rest of the LyX software, this software is copyrighted,
but can be distributed freely under the terms of the GNU General
Public License: "LyX is free software you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version."



The version of textolyx in this directory is preliminary.  It produces
a valid LyX file, but does not yet attempt to do anything beyond the
minimum translation to give a usable file.  However, it does do a
complete parsing of the input TeX file, so that all the hooks are
there to do a fancy job.  I have tried to achieve two important aims:
    (1) textolyx should be robust.  It should be resistant to incorrect
        TeX files, and to files whose structure is hard to understand.
    (2) It should give good error messages.


I would appreciate comments, to collins@phys.psu.edu.  Assistance on
the development both of textolyx, and of LyX itself is welcome.  For
the LyX project, there is a mailing list.  See the LyX home page, name
above, for details.


                   FILES
                   =====

The files are:

Makefile          UNIX make file for the system
Readme            This file
aims.txt          Some thoughts on the desirable properties of a
                  LaTeX-to-LyX converter

buffer.cc         Operations for reading file into a list of lines and
                  manipulating the lines.
errors.cc         Some error-handling stuff.
sos.cc            Emulation of C++ streams classes, without all the
                  overhead (which is over 300K in the executable).
                  Use of the streams style of programming will be
                  handy when the output or input is no longer via
                  files.  (E.g., when we wish to write the output
                  direct to memory in as a LyX buffer in memory.)
texpars2.cc       Routines for second pass of parsing, and for LyX output.
texparse.cc       Routines for parsing a TeX file into lists of
                  objects.
                  These last two files contain a rather general set of
                  (what I hope are) robust routines that could be used
                  for all kinds of processing and conversion of TeX
                  files.
textolyx.cc       Main routines for converting a TeX file to a LyX file.
textotex.cc       A simple test program for the basic routines
utils.cc          A few general utilities.

buffer.h
errors.h
sos.h
texparse.h
utils.h


textolyx_SUN      Executable file for SUN (4.1.3).  (Binary file of course.)





              INSTALLATION AND USE
              ===================

1  Copy the files to a suitable directory.  Watch out if there are
   files of the same name already in that directory.

2a If there is not an executable for your system, you will need a C++
   compiler.  The GNU compiler works.  You should run make, 
   after modifying the Makefile to be suitable for your system.
2b If that doesn't work look at Makefile to determine what files need
   to be compiled and linked together.  Then use a C++ compiler.

3  [Optional] Copy the executable(s) to a suitable directory in your
   path.

4  Run textolyx:
           textolyx
   to find instructions for using it.


