[tex4ht] macro containing a Unicode character

Alexandre Roberts alexandre.roberts at gmail.com
Sat Jul 23 09:45:37 CEST 2016


Dear tex4ht list members,

I would like to produce an ODT document from my XeLaTeX document (using
MacTeX 2016).

The necessary code to include Unicode characters (including in Greek and
Arabic script) was kindly provided by CV Radhakrishnan and Michal Hoftich
back in February 2013. But I am running into a new difficulty: converting a
document that defines LaTeX macros that have Unicode characters in them.
(The reason I want this is to enable me to use macros within a
Right-to-Left script, Arabic. Mixing up RTL and LTR scripts in a text
editor, especially when punctuation -- or braces {} -- is involved, tends
to make the source file unreadable.)

I am attaching a MWE in two files:

1. `main.tex`: standalone file that includes macro definition
2. `utf2ent.pl`: the Perl script devised by CVR to keep Unicode in the new
document

The script I run to compile this is:

     # CVR's script to preserve Unicode characters
     perl utf2ent.pl main.tex > main-ent.tex

     # tex4ht
     mk4ht oolatex main-ent "xhtml, charset=utf-8"  -utf8

If I get rid of the macro, it works perfectly. But with the macro it
produces an ODT file that won't open.

Best wishes,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex4ht/attachments/20160723/3673cdee/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.tex
Type: application/x-tex
Size: 1007 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex4ht/attachments/20160723/3673cdee/attachment-0001.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: utf2ent.pl
Type: text/x-perl-script
Size: 234 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex4ht/attachments/20160723/3673cdee/attachment-0001.bin>


More information about the tex4ht mailing list