l2h: A new converter from LyX to HTML (updated)

The internet is littered with abandonded converters from Latex or LyX to HTML, so why not add one more?

Much of emc's documentation is written in LyX 1.3's "book" style, which gives great .pdf output but startlingly bad html output. In theory, one of the various DocBook styles would produce nice HTML output and maybe decent PDF output, but my experience was that LyX writes intermediate .sgml files that are simply unusable by the DocBook toolchain.

So emc has been limping along for 2+ years with a complicated scheme (export lyx to latex; massage latex; run a specific version of latex2html on a FC4 machine) that still gives poor results (including broken images, no tables of contents, no index, and no cross-document hyperlinks).

Apparently LyX may convert to an xml internal format in some future release, but details are pretty thin.

That brings us to my new converter. It consists of lyxtree.py, a fairly competent converter from .lyx format 211 to an xml document structure, and an .xsl stylesheet to transform this xml document into a html document.

lyxtree.py also takes care of conversion and copying of images using ImageMagick convert.

See how it looks in emc2's documentation.

Right now, the converter lives only in a git repository: git://git.unpy.net/l2h.git which is also viewable online. The software is released under the GNU GPL. Update: l2h is now a part of the emc2 cvs (see the docs/src directory); It's specialized in a few ways for that project, but probably not too hard to disentangle.

Entry first conceived on 7 October 2007, 13:20 UTC, last modified on 15 January 2012, 3:46 UTC
Website Copyright © 2004-2024 Jeff Epler