From: dmjones@theory.lcs.mit.edu (David M. Jones)
Newsgroups: comp.text.tex
Subject: Re: ChiWriter->(La)TeX converter?
Keywords: ChiWriter LaTeX TeX converter
Date: 14 Aug 92 15:53:33 GMT
Reply-To: dmjones@theory.lcs.mit.edu (David M. Jones)
Organization: Laboratory for Computer Science, MIT

In article <Bsyssz.A42@bunyip.cc.uq.oz.au>, coates@newton (Tony Coates) writes:

>I remember that at one stage ChiWriter was going to provide (La)Tex
>output, but I'm not aware that that was ever more than vapour-ware.  If
>there is such a thing as a ChiWriter to (La)TeX converter, it would save
>me a lot of retyping, thanks, so please let me know.

The program does indeed exist and can be purchased for $74.95 (plus
about $5.00 shipping) from

Horstmann Software Design Corp.
4 North Second St., suite #500
P.O. Box 1807
San Jose, CA 95109-1807
tel: (408) 298-0828
fax: (408) 298-6157

There was an article in last years TUG Conference proceedings about
the converter: Cay S. Horstmann. Automatic conversion from a
scientific word processor to TeX.  TUGboat 12(4):471--478. December
1991.

That's the end of the objective data.  What follows is my subjective
opinion.  I'm too lazy to go back and reread the TUGboat article, but
I don't think I'm misrepresenting Horstmann Software below.  Stop
reading now if you're not interested in an off-the-cuff review of the
converter.

I bought a copy of the converter in January 1992 to convert a book
that I'm typesetting from ChiWriter to TeX.  I assume that you are
interested, as I was, in a one-shot conversion of a document to TeX.
The converter is certainly usable for this and will save you from
retyping massive amounts of text, but in fairness to Horstmann
Software, I should point out that this really isn't the intended usage
of the program.  The documentation (and especially the TUGboat
article) spends some time talking about how you can modify your
ChiWriter document to help the converter produce the proper TeX code.
They're marketing chi2tex as a tool for using ChiWriter as a front end
to TeX, the (tacit?) assumption being that the user won't try to edit
the TeX code, but will always go back to the ChiWriter file to fix
bugs.

I had no interest in learning (or even installing) ChiWriter and
working through it, so I just ran the converter and then cleaned up
the TeX code by hand.  As is to be expected from machine-generated
code, the TeX file was quite an eyesore.  I've appended a sample
below.  (This comes from the documentation file for chi2tex.chi.  As
such, this is a somewhat artificial example, since they have
presumably tweaked this to work properly.  If you're interested in
discussing more real-world examples, drop me a line.)  However, I
found that many of the things it did wrong could be corrected fairly
automatically, using various nice features of GNU emacs.  Also, the
converter is configurable to some extent.  For example, you can define
new fonts and new math operators (things like \log, \sin, etc.) and
you even have some control over how structures like arrays are
handled, for example, parenthesized matrices are output as

        \pmatrix{ a & b \cr c & d \cr}

by default, but you can change this to

        \begin{pmatrix}
        a & b \\
        c & d
        \end{pmatrix}

if you're using AMS-LaTeX.

On the other hand, there are some things I don't think you can change.
For example, there doesn't seem to be any way to keep it from spewing
out all of those \par's, \medskip's and \noindent's.  Of course, those
are easy to delete by hand.  Also, even though the converter takes an
option to tell it whether you want a LaTeX or an AMS-TeX file instead
of a plain TeX file, the converter doesn't automatically take care of
syntax changes like those above.  You have to edit the config.tex file
yourself.

Ok, I think that's more than enough.  In summary, I was satisfied with
the program even though the TeX code it generated was far from
optimal.  It was still better than rekeying the book from scratch,
especially after I played around with the configuration files for a
while.  If you're interested in hearing more about my experiece with
it, drop me a line and I'll see what I can do.

David M. Jones                              "Trifles! Trifles light as air!"
dmjones@theory.lcs.mit.edu                              -- the Hystricide
---------------------------------------------------------------------------
\input begplain
\centerline{ChiWriter $\rightarrow $ TeX converter
}
\medskip
\centerline{July 1990
}
\centerline{Copyright \copyright  1990
}
\centerline{Horstmann Software Design Corp.
}
\centerline{All Rights Reserved
}
\medskip
\noindent {\bf 1. How to install the converter.}
\par
\medskip
\noindent The distribution disk contains the intallation  batch  file.   The
syntax of running the installation program is as follows:
\par
\medskip
INSTALL  [DRIVE:]  [CHIWRITER SYSTEM DIRECTORY]  3
\par
\medskip
\noindent To install, simply put the distribution disk on  drive  A,  change
drive to A: and type
\par
\medskip
INSTALL $C:~~\backslash $CHIWRITE~~3
\par
\medskip
\noindent in  the  command  line.   The   installation   will   create   the
subdirectory $C:\backslash $CHIWRITE$\backslash $CHI2TEX where  it  places  the  following
files:
\par
\medskip
CHI2TEX.EXE
\par
SHADOW.SFT
\par
SHADOW.EFT
\par
BEGPLAIN.TEX
\par
ENDPLAIN.TEX
\par
BEGLA.TEX
\par
ENDLA.TEX
\par
BEGAMS.TEX
\par
ENDAMS.TEX
\par
CONFIG.TEX
\par
CONFIG.BOX
\par
\medskip
\noindent Next, install the SHADOW font into ChiWriter. Start ChiWriter with
Newsgroups: comp.text.tex