[tex4ht] xetex id update for tex4ht binary

Michal Hoftich michal.h21 at gmail.com
Sun Sep 25 19:23:51 CEST 2016


Hi all,

> About the xetex failure with tex4ht.  I built a tex4ht binary with the
> following trivial change to allow for the new xetex id byte (7, as you
> can see by running dvitype on the .xdv file), as well as older/smaller
> id bytes, and it seemed to work in a trivial test.
> 

I've just  tried to run the attached executable on Fefora 23 and it
ended with ELF format error.I manually edited the tex4ht.c file
(patching didn't work, because in my version it contains lots of 

    #line 2289 "./tex4ht-c.tex"

lines. I changed line 8388 in my tex4ht.c from 5 to 7 and compiled it
using:

    gcc -DHAVE_DIRENT_H -DKPATHSEA -lkpathsea
      -DHTFDIR='"/usr/local/texlive/2016/texmf-dist/tex4ht/ht-fonts/!"'
      tex4ht.c -o tex4ht

I had to install libkpathsea using

    dnf install texlive-kpathsea-lib-devel

first. It seems to work now. 

Then I discovered possibilities of Unicode support for XeTeX in tex4ht.
In LuaTeX, we can use node callbacks, but only way I could find for
XeTeX is to make characters > 128 active and define them as commands,
which outputs tex4ht special with hexadecimal entity encoding that
character. It probably isn't really efficient and it would require huge
amount of memory to define all possible Unicode characters, so I
provided two commands:

    \registerchar{character code}

and 

    \registerblock{start char code}{end char code}

The package together with sample TeX file and modified tex4ht.c are attached. 


Best regards,
Michal



-------------- next part --------------
A non-text attachment was scrubbed...
Name: xetex.zip
Type: application/zip
Size: 58465 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex4ht/attachments/20160925/301680c4/attachment-0001.zip>


More information about the tex4ht mailing list