[tex4ht-commits] [SCM] tex4ht updated: r215 - trunk/lit
michal_h21 at gnu.org.ua
michal_h21 at gnu.org.ua
Sat Dec 10 22:07:47 CET 2016
Author: michal_h21
Date: 2016-12-10 23:07:47 +0200 (Sat, 10 Dec 2016)
New Revision: 215
Modified:
trunk/lit/ChangeLog
trunk/lit/tex4ht-4ht.tex
Log:
Some fixes for fontspec support
Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog 2016-12-10 00:36:19 UTC (rev 214)
+++ trunk/lit/ChangeLog 2016-12-10 21:07:47 UTC (rev 215)
@@ -1,3 +1,10 @@
+2016-12-10 Michal Hoftich <michal.h21 at gmail.com>
+
+ * tex4ht-4ht.tex (usepackage.4ht): There was catcode issue with
+ `:` character, it was 11 instead of 12.
+ * tex4ht-4ht.tex (fontspec-4ht.lua): There could be Lua error caused
+ by some fonts.
+
2016-12-09 Karl Berry <karl at freefriends.org>
* tex4ht-env.tex: copyright 2016.
Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex 2016-12-10 00:36:19 UTC (rev 214)
+++ trunk/lit/tex4ht-4ht.tex 2016-12-10 21:07:47 UTC (rev 215)
@@ -3496,9 +3496,23 @@
\global\expandafter\let\csname opt at fontenc.sty\endcsname\relax
}
\ExplSyntaxOff
+|<Restore TivhTcats|>
\fi
>>>
+I am not really sure what is the problem here, but I've found that use of
+Expl3 package in fontspec patch causes catcode problems in packages which
+are loaded latter, for example with calc.sty. The catcodes are stored in
+\`|\TivhTcats| macro, we need to set catcode of : to 12 manually, saved catcode
+of @ is OK, so we don't need to reset it.
+
+\<Restore TivhTcats\><<<
+\edef\TivhTcats{%
+ \catcode`:=12%
+ \catcode`@=\the\catcode`@%
+}
+>>>
+
We need to add support for utf-8 input. Different methods are used for LuaTeX
and XeTeX. In LuaTeX, node callbacks are used, in XeTeX, all used characters
must be declared first. This is done in the fontspec-xetex.4ht file.
@@ -3538,7 +3552,7 @@
end
-- this should be table with patterns for allowed fonts
-local allowed_names = {"^cmr", "^cmb","^cmt", "^cmb", "^cmcs", "^rm%-l"}
+local allowed_names = {"^cmr", "^cmb","^cmt", "^cmb", "^cmcs", "^rm%-l", "^cmi", "none"}
local testfont = function(name)
-- test font name for all allowed names, when it is found, return true
@@ -3554,7 +3568,7 @@
local fonttypes = {}
local get_font_type = function(id)
if fonttypes[id]~=nil then return fonttypes[id] end
- local f = font.getfont(id)
+ local f = font.getfont(id) or {name = "none"} -- font object can be nil sometimes
local name = f.name
local type = testfont(string.lower(name))
if not type then
More information about the tex4ht-commits
mailing list