summaryrefslogtreecommitdiff
path: root/support/make4ht/formats
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-09-08 03:02:12 +0000
committerNorbert Preining <norbert@preining.info>2020-09-08 03:02:12 +0000
commitbc2d0660f4f460b55009ab4e525f2a0e4cde6187 (patch)
treed35815089faf23c45f4f21690e42cfcc7c65a5fd /support/make4ht/formats
parent57edbaffbe7daad894e3036a4123acd03e0fdb9b (diff)
CTAN sync 202009080302
Diffstat (limited to 'support/make4ht/formats')
-rw-r--r--support/make4ht/formats/make4ht-jats.lua14
-rw-r--r--support/make4ht/formats/make4ht-tei.lua17
2 files changed, 31 insertions, 0 deletions
diff --git a/support/make4ht/formats/make4ht-jats.lua b/support/make4ht/formats/make4ht-jats.lua
new file mode 100644
index 0000000000..13bcd86d41
--- /dev/null
+++ b/support/make4ht/formats/make4ht-jats.lua
@@ -0,0 +1,14 @@
+local M = {}
+local xtpipeslib = require "make4ht-xtpipes"
+
+function M.prepare_parameters(settings, extensions)
+ settings.tex4ht_sty_par = settings.tex4ht_sty_par ..",jats"
+ settings = mkutils.extensions_prepare_parameters(extensions, settings)
+ return settings
+end
+
+function M.prepare_extensions(extensions)
+ return extensions
+end
+
+return M
diff --git a/support/make4ht/formats/make4ht-tei.lua b/support/make4ht/formats/make4ht-tei.lua
index f81953a8b3..660f6d49d8 100644
--- a/support/make4ht/formats/make4ht-tei.lua
+++ b/support/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