summaryrefslogtreecommitdiff
path: root/Build/source/texk/texlive
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-07-03 23:24:59 +0000
committerKarl Berry <karl@freefriends.org>2015-07-03 23:24:59 +0000
commitf1073f0dfaaeabd2edda00c472a3d814fad132fa (patch)
treef72e3d8d9e989b6fa399a13600be3d88168eebca /Build/source/texk/texlive
parent0562fc367d1605303c6b2674d0d6b73b37d1d888 (diff)
make4ht (29jul15)
git-svn-id: svn://tug.org/texlive/trunk@37750 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/texlive')
-rw-r--r--Build/source/texk/texlive/linked_scripts/Makefile.am1
-rw-r--r--Build/source/texk/texlive/linked_scripts/Makefile.in1
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/make4ht/make4ht62
-rw-r--r--Build/source/texk/texlive/linked_scripts/scripts.lst1
4 files changed, 65 insertions, 0 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/Makefile.am b/Build/source/texk/texlive/linked_scripts/Makefile.am
index c2f28b67c1a..be0cbe8cbc1 100644
--- a/Build/source/texk/texlive/linked_scripts/Makefile.am
+++ b/Build/source/texk/texlive/linked_scripts/Makefile.am
@@ -133,6 +133,7 @@ texmf_other_scripts = \
ltximg/ltximg.pl \
luaotfload/luaotfload-tool.lua \
m-tx/m-tx.lua \
+ make4ht/make4ht \
match_parens/match_parens \
mathspic/mathspic.pl \
mf2pt1/mf2pt1.pl \
diff --git a/Build/source/texk/texlive/linked_scripts/Makefile.in b/Build/source/texk/texlive/linked_scripts/Makefile.in
index ee7a773b90f..e5b3b051163 100644
--- a/Build/source/texk/texlive/linked_scripts/Makefile.in
+++ b/Build/source/texk/texlive/linked_scripts/Makefile.in
@@ -349,6 +349,7 @@ texmf_other_scripts = \
ltximg/ltximg.pl \
luaotfload/luaotfload-tool.lua \
m-tx/m-tx.lua \
+ make4ht/make4ht \
match_parens/match_parens \
mathspic/mathspic.pl \
mf2pt1/mf2pt1.pl \
diff --git a/Build/source/texk/texlive/linked_scripts/make4ht/make4ht b/Build/source/texk/texlive/linked_scripts/make4ht/make4ht
new file mode 100755
index 00000000000..22b2e7cf2fb
--- /dev/null
+++ b/Build/source/texk/texlive/linked_scripts/make4ht/make4ht
@@ -0,0 +1,62 @@
+#!/usr/bin/env texlua
+kpse.set_program_name("luatex")
+
+
+local make4ht = require("make4ht-lib")
+local lapp = require("lapp-mk4")
+local mkutils = require("mkutils")
+local mkparams = require("mkparams")
+-- args string is here just as sample, we dont pass it it to
+-- mkparams.get_args() so default args string is used
+local args = [[
+make4ht - build system for tex4ht
+Usage:
+make4ht [options] filename ["tex4ht.sty op." "tex4ht op." "t4ht op" "latex op"]
+-c,--config (default xhtml) Custom config file
+-d,--output-dir (default nil) Output directory
+-l,--lua Use lualatex for document compilation
+-s,--shell-escape Enables running external programs from LaTeX
+-u,--utf8 For output documents in utf8 encoding
+-x,--xetex Use xelatex for document compilation
+<filename> (string) Input file name
+]]
+
+local args = mkparams.get_args()
+
+local parameters = mkparams.process_args(args)
+
+local mode = parameters.mode
+local build_file = parameters.build_file
+
+local make = mkutils.load_config(parameters, build_file)["Make"]
+make.params = parameters
+if make:length() < 1 then
+ if mode == "draft" then
+ make:htlatex()
+ else
+ make:htlatex()
+ make:htlatex()
+ make:htlatex()
+ end
+end
+
+
+if not args["no-tex4ht"] then
+ make:tex4ht()
+end
+
+local ext = args.xetex and "xdv" or "dvi"
+if #make.image_patterns > 0 then
+ make.params.t4ht_par = make.params.t4ht_par .. " -p"
+end
+make:t4ht {ext = ext}
+make:match("tmp$", function() return false,"tmp file" end)
+make:match(".*",function(filename,par)
+ local outdir = '' --par["outdir"] and par["outdir"] .."/" or ''
+ if par['outdir'] ~= "" then outdir = par['outdir'] .. '/' end
+ print("outdir: "..outdir)
+ local outfilename = outdir .. filename
+ mkutils.copy(filename,outfilename)
+ return true
+end)
+make:run()
diff --git a/Build/source/texk/texlive/linked_scripts/scripts.lst b/Build/source/texk/texlive/linked_scripts/scripts.lst
index 1e65a7e61be..b8682c41f9a 100644
--- a/Build/source/texk/texlive/linked_scripts/scripts.lst
+++ b/Build/source/texk/texlive/linked_scripts/scripts.lst
@@ -79,6 +79,7 @@ lilyglyphs/lily-rebuild-pdfs.py
ltximg/ltximg.pl
luaotfload/luaotfload-tool.lua
m-tx/m-tx.lua
+make4ht/make4ht
match_parens/match_parens
mathspic/mathspic.pl
mf2pt1/mf2pt1.pl