summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/make4ht/formats/make4ht-tei.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/scripts/make4ht/formats/make4ht-tei.lua')
-rw-r--r--Master/texmf-dist/scripts/make4ht/formats/make4ht-tei.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/Master/texmf-dist/scripts/make4ht/formats/make4ht-tei.lua b/Master/texmf-dist/scripts/make4ht/formats/make4ht-tei.lua
index f81953a8b31..660f6d49d83 100644
--- a/Master/texmf-dist/scripts/make4ht/formats/make4ht-tei.lua
+++ b/Master/texmf-dist/scripts/make4ht/formats/make4ht-tei.lua
@@ -1,6 +1,8 @@
local M = {}
local xtpipeslib = require "make4ht-xtpipes"
+local domfilter = require "make4ht-domfilter"
+
function M.prepare_parameters(settings, extensions)
settings.tex4ht_sty_par = settings.tex4ht_sty_par ..",tei"
settings = mkutils.extensions_prepare_parameters(extensions, settings)
@@ -11,4 +13,19 @@ function M.prepare_extensions(extensions)
return extensions
end
+function M.modify_build(make)
+ local process = domfilter {
+ "joincharacters"
+ }
+
+ -- we use <hi> elements for characters styled using HTF fonts in TEI
+ -- use the `joincharacters` DOM filter to join them
+ filter_settings "joincharacters" {
+ charclasses = { hi=true, mn = true}
+ }
+
+ make:match("xml$", process)
+ return make
+end
+
return M