[tex4ht] [bug #242] Spurious semicolon produced by \textregistered command

Michal Hoftich michal.h21 at gmail.com
Fri Jan 23 12:43:45 CET 2015


I've made patch for tex4ht-sty.tex and tex4ht-html4.tex for loading
the callback under LuaTeX and modified the callback to be little bit
more universal.

I added line `% !4ht encoding = latin1` as first line of html4.4ht and
check for that line in the callback. Overhead isn't as small as I
expected, compilation time is about 50% longer on sample document, so
maybe the other solution, conditional including of latin1 file, might
be better.

Michal

2015-01-23 9:41 GMT+01:00 Michal Hoftich <michal.h21 at gmail.com>:
>>
>> Yeah, that's probably what's going on.  I'll work on it again
>> when I have a chance.
>>
>
> but this happened to me last summer and then things started to work
> correctly, honestly, I have no idea what did I do what fix it.
>
>>     sometimes people try to install it, I am afraid
>>
>> Really?  It never occurred to me that anyone would be crazy enough to
>> get that obviously-ancient tex4ht from CTAN and try to do anything with
>> it.  Using Eitan's packages was never the easiest thing to do ...
>>
>
> I think I've read some blog posts or forum messages about difficulty
> of tex4ht installation, but can't find anything now.
>
> Michal
>
>
>> Thanks,
>> K
-------------- next part --------------
Index: tex4ht-sty.tex
===================================================================
--- tex4ht-sty.tex	(revision 133)
+++ tex4ht-sty.tex	(working copy)
@@ -1213,7 +1213,21 @@
    \def\:temp{#1}\ifx \:temp\empty \else \expand:after{#2}\fi }
 >>>
 
+Fix for html4.4ht and LuaTeX. html4.4ht contains some characters in latin1 
+encoding. this causes LuaTeX compilation errors. because of backward 
+compatibility we want to keep these configurations, so we use
+LuaTeX's callbacks to fix that on the fly.
 
+\<general utilities\><<<
+\expandafter\ifx\csname luatexversion\endcsname\relax
+\else
+\directlua{%
+require "luatexbase.mcb"
+local patch_latin1 = require "inputcallback"
+luatexbase.add_to_callback("open_read_file", patch_latin1, "Convert html4.4ht to utf8")
+}
+\fi
+>>>
 \Chapter{Configurations}
 
 
Index: tex4ht-html4.tex
===================================================================
--- tex4ht-html4.tex	(revision 133)
+++ tex4ht-html4.tex	(working copy)
@@ -66,6 +66,7 @@
 
 
 \<html4\><<<
+% !4ht encoding = latin1
 % html4.4ht (|version), generated from |jobname.tex
 % Copyright (C) 2009-2010 TeX Users Group
 % Copyright (C) |CopyYear.1997. Eitan M. Gurari
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pokus.tex
Type: application/x-tex
Size: 397 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex4ht/attachments/20150123/85b7e016/attachment.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inputcallback.lua
Type: text/x-lua
Size: 1445 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex4ht/attachments/20150123/85b7e016/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: l4latin1.lua
Type: text/x-lua
Size: 2481 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex4ht/attachments/20150123/85b7e016/attachment-0001.bin>


More information about the tex4ht mailing list