[luatex] XML export from Latex

stefano franchi stefano.franchi at gmail.com
Mon Mar 10 20:18:34 CET 2014

On Fri, Mar 7, 2014 at 3:26 AM, Michal Hoftich <michal.h21 at gmail.com> wrote:
> Hi Stefano,
> tex4ht works with LuaLaTeX, but no htlualatex script is provided by
> default.  There are some conflicts between tex4ht and babel, but these
> errors don't affect output, only compilation is stoped.
> To workaround problems with babel, making local copy of html4.4ht file
> and converting it to utf8 encoding should help. Note that polyglossia
> doesn't work, because it loads fontspec and opentype fonts (or, more
> precisely, fonts without tfm table) don't work with tex4ht dvi to xml
> converter.
> Regarding direct conversion conversion from LuaLaTeX to xml without
> need to use dvi processing, it is possible. I created simple demo, or
> proof of concept [1]. Not all things supported by tex4ht works, but as
> you can see, fontspec works without the need of patching.
> PS.
> Note that make4ht [2] is not the same thing as mk4ht, it is simple
> build tool which enables configuration of commands used for conversion
> of images, post-processig generated files etc.

Hi Michal,

thanks for your suggestions. Both the approaches you suggested sound
very promising.
I haven't tried either yet, but I will definitely look into them
closely in the near future.
The direct Luatex-->XML approach you provided a proof of concept for
would definitely be my choice,
but I admit it seems quite a challenging task to bring over all the
Latex features I would like to see in the final XML output.

There is something I am not quite sure about: where is the conversion
from latex commands to html code configured?
In tex4ht that happens in the .4ht files corresponding to the single
packages, if I'm not mistaken.
Are you relying on the same .4ht files?


Stefano Franchi
Associate Research Professor
Department of Hispanic Studies         Ph:   +1 (979) 845-2125
Texas A&M University                          Fax:  +1 (979) 845-6421
College Station, Texas, USA

stefano at tamu.edu

More information about the luatex mailing list