I've recently been trying to use LaTeX2HTML with LyX (working, obviously,
on exported LaTeX files), and have found the following problems:

1. LaTeX2HTML doesn't seem to like \( and \).

2. If you have a math environment at the end of a line, LaTeX2HTML runs it
in to the next line, losing the space that LaTeX would leave between the
end of one line and the beginning of the next.

3. If you use [ and ] in item labels, LaTeX2HTML gets confused.

Fortunately, these are all soluble: 3 is soluble manually, by putting
braces {} around any square brackets used in labels (of course, these must
be TeX text (red) braces); and for 1 and 2 I append the small Perl script
below (actually, it's just a sed script written in Perl).

I'd be interested to know of any other problems and solutions that others
have found (by the way, I'm using LaTeX2HTML v98.1, which is the latest I
can find).

#!/usr/bin/perl
# Convert LyX-generated LaTeX for LaTeX2HTML processing
# R.R.T.   22-25/4/99

while (<>) {
        s/\\\(/\$/g;
        s/\\\)/\$/g;
        s/$/ /;
        print;
}

-- 
http://www.cl.cam.ac.uk/users/rrt1001/ | maxim, n.  wisdom for fools

Reply via email to