eLyXer
elixir, n: a substance believed to cure all ills.
eLyXer (pronounced elixir) is a LyX to HTML converter. While there are a ton of such projects all over the web, eLyXer has a clear focus on flexibility and elegant output.
LyX is a wonderful text editor which produces beautiful PDF files. Internally it exports documents to LaTeX, and from there to PDF. Sadly there is not an equivalent “export to HTML” option… Until now! With eLyXer you can convert your master’s thesis, learned article, fascinating novel or love letter to a web page that you can then share, publish on the web or import into other text editors.
eLyXer (including this page and all accompanying materials) is licensed under the
GPL version 3 or, at your option, any later version. See the
LICENSE file for details.
Requirements
eLyXer is a standalone tool: it does not require that LyX is installed to run. It can convert documents generated with versions of LyX from 1.5.5 through 1.6.2 (and probably earlier versions). It requires Python 2.3.4, and should work with versions up to 2.6.1. It has been tested to run on Linux, Mac OS X and Windows.
Resource usage is minimum. Converting UserGuide.lyx (154 pages, about 40000 words) takes about 50 seconds on my 1st-generation Asus Eee, which sports a 530MHz Celeron processor. On a modern machine it should be ligthning fast. Memory usage is also quite frugal, remaining always below 10 MB.
Usage
eLyXer is a command line tool written in Python. Basic usage is as simple as writing at the command line prompt:
$ elyxer document.lyx page.html
or, on Windows:
> Python.exe elyxer document.lyx page.html
where document.lyx is your LyX document, and page.html is the resulting HTML page. Write
$ elyxer ‐‐help
or see the user guide for details.
Downloads
Contact
You can contact the author at
elyxer@gmail.com. Please send any documents that are giving you trouble and I will do my best. Any document sample you send will be treated as confidential.
The author lingers on official LyX mailing lists and monitors for mentions of eLyXer. You can also join the
mailing list, although there is not much activity in it yet.
Changelog
Latest version is 0.10, created on 20090321.
-
Better handling of footnotes and margin notes: not overlapping and with a reference in the text.
-
Better parsing of first word in a Description.
-
Short titles are ignored.
-
Added a few font families for equations. Not that they display too well…
-
Better formula parsing (including line breaks). Supports a few math fonts.
-
Supports menu separator, text with bar, nomenclature and many more quote types.
-
Single configuration file general.py.
-
Layout of type Space is not shown.
-
Supports branches. Inactive branches are not shown.
-
New symbols: greek letters, shapes: bullet, right triangle.
-
Added support for new style (1.6.x) index entries.
-
From LyX documentation: UserGuide.lyx is now working (except for some math functions).
-
Can be run from other directories than the one with the document.
-
Tables have light grey separations. Table spacing is now better adjusted.
-
Descriptions appear with the first word in bold), but only within the first text style. Changing style in the middle of a word may distract the algorithm.
-
Added support for Lyx notes (not rendered in the HTML), margin notes, pretty quotes ‘’, weird spaces.
-
Added support for new style (1.6.x) hyperlinks, labels and references, TOC, index.
-
Uses PDF title if present.
-
From LyX documentation: Intro.lyx is now working.
-
Images referenced by absolute path are converted to relative PNGs.
-
Range of supported quotes is greater. Unknown quotes are now marked as errors but do not make the tool fail.
-
Default CSS is always on nongnu.org, it can be changed via command line option ‐‐css.
-
Reinstated layout classes for unknown types.
-
Updated documentation to include how to run on Windows.
-
Added meta generator tag to all pages.
-
Added option ‐‐title to change the default page title.
-
Phonetic symbols appear in dark cyan: [sample].
-
Lots of small fixes and improvements to correctly parse the official LyX guides (UserGuide.lyx, EmbeddedObjects.lyx and Math.lyx).
-
Added Flex URLs, Flex code.
-
Works with Python 2.3.5, but not yet Mac OS X terminal.
-
Alignment now works right (and center and left).
-
Modified license files to comply with Savannah policies.
-
Added index page and logo.
-
Inset parameters are all parsed correctly (including spaces in image paths).
-
Formulae and tables should work again (including complex formatting).
-
Modified to (mostly) run under Python 2.3.5 (Mac OS X Tiger).
-
Processes layouts ending in ‘*’ (like ‘Section*’).
-
Runtime options for help and to disable the copyright notice, debug, quietness.
-
Accepts scaling for images.
-
When images do not exist warns but does not fail.
-
Author and title containing tags are properly processed.
-
Slanted text translated to italics.
-
Title no longer necessary to have a working document.
-
ERT is ignored. Status line (open/collapsed) is ignored.
-
Supports footnotes, newlines, bibitem entries and citations.
-
Dev guide includes a Container tutorial.
-
0.3 (20090311): Now works with generic Insets.
-
0.2 (20090311): ImageMagick is not required anymore.
-
0.1 (20090310): first public version.
Acknowledgments
This little project is my little contribution back to the wonderful LyX community, for all these years of fruitful use.
Thanks to Stevan White for encouraging me to publish the tool; to Christian Ridderström for helping me out right at the start; to Abdelrazak Younes, Pavel Sanda, Günther Milde, Olivier Ripoll, José Matos, Iain Mac Donald, Uwe Stöhr, Ignacio García for their interesting suggestions; to Nikos Alexandris, Joachim Kreimer-de Fries (Osnabryg), Richard Talley, Wolfgang Keller, Murray Eisenberg, Robert Orr, a Linux guy in Singapore for their early testing. A silent “thank you” goes to all those who downloaded the tool and silently tested it to their satisfaction (or were not bugged enough to write about it). And finally thanks to all those who have helped and yet I am now forgetting about them, for not hating me for it.