# [tex4ht] unicode and lualatex

Ulrike Fischer news3 at nililand.de
Sun Jul 24 15:04:25 CEST 2011

Am Sat, 23 Jul 2011 06:15:33 -0700 schrieb Johannes Wilm:

> Ok, that worked, the important line was to add

> \usepackage[utf8]{luainputenc}

> to the tex-file.

Fine. And now replace the line above by
\usepackage[utf8]{inputenc}

and then use latex instead of dvilualatex in the batch file: The
result should be the same. In short: currently you are not gaining
much by using luatex.

> Some symbols are still mangled though, such as the little 2 in the
> abbreviation for "square kilometer". I guess I will use my idea of first
> converting it to some random ascii-string and then to convert that string
> back after the conversion has been finished for that. Additionally ligatures
> such as "ff" are translated into a ff-symbol, rather than two separate
> letters.

tex4ht uses a quite complicated system of virtual fonts to control
the output. E.g. to get "ff" instead of the ligature:

Make a copy of \tex4ht\ht-fonts\unicode\charset\unicode.4hf in the
current directory and add to it.

'&#xFB00;' ''  'ff'  ''

> I didn't quite understand you explanation of the font issue. I didn't choose
> any font in that file,

and so you choose to use the default fonts.

> nor am I allowed to use any font changing packages,

You can use any latex font package but not the packages which can be
used only with xelatex or lualatex (like fontspec, luaotfload,
unicode-math)

--
Ulrike Fischer