diff options
author | Karl Berry <karl@freefriends.org> | 2022-04-05 22:20:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-04-05 22:20:31 +0000 |
commit | 4c6781299b7ccd2769b41e5fcbb75c8f451e1061 (patch) | |
tree | fb5d662a36d30dd8744ec10242e5c9abac77c0d9 | |
parent | 980b7410cdd2e14152f006fdc1baa5041263b0b9 (diff) |
make4ht (22mar22)
git-svn-id: svn://tug.org/texlive/trunk@62953 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-x | Build/source/texk/texlive/linked_scripts/make4ht/make4ht | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/make4ht/changelog.tex | 19 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/make4ht/make4ht-doc.pdf | bin | 153809 -> 154182 bytes | |||
-rw-r--r-- | Master/texmf-dist/scripts/make4ht/extensions/make4ht-ext-preprocess_input.lua | 5 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/make4ht/formats/make4ht-odt.lua | 4 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/make4ht/make4ht | 2 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/make4ht/mkparams.lua | 14 | ||||
-rwxr-xr-x | Master/tlpkg/libexec/ctan2tds | 1 |
8 files changed, 40 insertions, 7 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/make4ht/make4ht b/Build/source/texk/texlive/linked_scripts/make4ht/make4ht index b938fdede1e..7d579fafeaa 100755 --- a/Build/source/texk/texlive/linked_scripts/make4ht/make4ht +++ b/Build/source/texk/texlive/linked_scripts/make4ht/make4ht @@ -29,7 +29,7 @@ make4ht [options] filename ["tex4ht.sty op." "tex4ht op." "t4ht op" "latex op"] -- set version number. the template should be replaced by the -- actual version number by the build script -local version = "v0.3k" +local version = "v0.3l" mkparams.version_number = version local args = mkparams.get_args() diff --git a/Master/texmf-dist/doc/support/make4ht/changelog.tex b/Master/texmf-dist/doc/support/make4ht/changelog.tex index d4a50d29cfe..1d579d45149 100644 --- a/Master/texmf-dist/doc/support/make4ht/changelog.tex +++ b/Master/texmf-dist/doc/support/make4ht/changelog.tex @@ -3,6 +3,25 @@ \begin{itemize} \item + 2022/02/22 + + \begin{itemize} + \tightlist + \item + version \texttt{0.3l} released. + \item + fixed issues with filenames on Windows. + \end{itemize} +\item + 2022/03/01 + + \begin{itemize} + \tightlist + \item + use \texttt{rmarkdown} package to process \texttt{.rmd} files in the + \texttt{preprocess\_input} extension (thanks to James Clawson). + \end{itemize} +\item 2022/02/18 \begin{itemize} diff --git a/Master/texmf-dist/doc/support/make4ht/make4ht-doc.pdf b/Master/texmf-dist/doc/support/make4ht/make4ht-doc.pdf Binary files differindex 665ad1fea47..bf3b9a47952 100644 --- a/Master/texmf-dist/doc/support/make4ht/make4ht-doc.pdf +++ b/Master/texmf-dist/doc/support/make4ht/make4ht-doc.pdf diff --git a/Master/texmf-dist/scripts/make4ht/extensions/make4ht-ext-preprocess_input.lua b/Master/texmf-dist/scripts/make4ht/extensions/make4ht-ext-preprocess_input.lua index 3155a8a7810..306c7bf7728 100644 --- a/Master/texmf-dist/scripts/make4ht/extensions/make4ht-ext-preprocess_input.lua +++ b/Master/texmf-dist/scripts/make4ht/extensions/make4ht-ext-preprocess_input.lua @@ -5,12 +5,13 @@ local mkutils = require "mkutils" local commands = { knitr = { command = 'Rscript -e "library(knitr); knit(\'${tex_file}\', output=\'${tmp_file}\')"'}, - pandoc = { command = 'pandoc -f ${input_format} -s -o \'${tmp_file}\' -t latex \'${tex_file}\''} + pandoc = { command = 'pandoc -f ${input_format} -s -o \'${tmp_file}\' -t latex \'${tex_file}\''}, + render = { command = 'Rscript -e "library(rmarkdown); render(\'${tex_file}\', output_file=\'${tmp_file}\')"'} } local filetypes = { rnw = {sequence = {"knitr"} }, rtex = {sequence = {"knitr"}}, - rmd = {sequence = {"knitr", "pandoc"}, options = {input_format = "markdown"}}, + rmd = {sequence = {"render"}}, rrst = {sequence = {"knitr", "pandoc"}, options = {input_format = "rst"}}, md = {sequence = {"pandoc"}, options = {input_format = "markdown"}}, rst = {sequence = {"pandoc"}, options = {input_format = "rst"}}, diff --git a/Master/texmf-dist/scripts/make4ht/formats/make4ht-odt.lua b/Master/texmf-dist/scripts/make4ht/formats/make4ht-odt.lua index 01a587aff47..3f0ee3aaa89 100644 --- a/Master/texmf-dist/scripts/make4ht/formats/make4ht-odt.lua +++ b/Master/texmf-dist/scripts/make4ht/formats/make4ht-odt.lua @@ -73,10 +73,10 @@ function Odtfile:pack() lfs.chdir(self.archivelocation) -- make temporary mime type file self:make_mimetype() - mkutils.execute(zip_command .. " -q0X '" .. self.name .. "' " .. self.mimetypename) + mkutils.execute(zip_command .. ' -q0X "' .. self.name .. '" ' .. self.mimetypename) -- remove it, so the next command doesn't overwrite it self:remove_mimetype() - mkutils.execute(zip_command .." -r '" .. self.name .. "' *") + mkutils.execute(zip_command ..' -r "' .. self.name .. '" *') lfs.chdir(currentdir) mkutils.cp(self.archivelocation .. "/" .. self.name, self.name) mkutils.delete_dir(self.archivelocation) diff --git a/Master/texmf-dist/scripts/make4ht/make4ht b/Master/texmf-dist/scripts/make4ht/make4ht index b938fdede1e..7d579fafeaa 100755 --- a/Master/texmf-dist/scripts/make4ht/make4ht +++ b/Master/texmf-dist/scripts/make4ht/make4ht @@ -29,7 +29,7 @@ make4ht [options] filename ["tex4ht.sty op." "tex4ht op." "t4ht op" "latex op"] -- set version number. the template should be replaced by the -- actual version number by the build script -local version = "v0.3k" +local version = "v0.3l" mkparams.version_number = version local args = mkparams.get_args() diff --git a/Master/texmf-dist/scripts/make4ht/mkparams.lua b/Master/texmf-dist/scripts/make4ht/mkparams.lua index e330b6a0abd..ed766f97708 100755 --- a/Master/texmf-dist/scripts/make4ht/mkparams.lua +++ b/Master/texmf-dist/scripts/make4ht/mkparams.lua @@ -93,6 +93,18 @@ local function get_format_extensions(format_string) return format, extensions end + +-- try to make safe filename +local function escape_filename(input) + -- quoting don't work on Windows, so we will just + if os.type == "windows" then + return '"' .. input .. '"' + else + -- single quotes are safe in Unix + return "'" .. input .. "'" + end +end + -- detect if user specified -jobname in arguments to the TeX engine -- or used the --jobname option for make4ht local function handle_jobname(input, args) @@ -108,7 +120,7 @@ local function handle_jobname(input, args) input = input:match("([^%/^%\\]+)$") -- input also cannot contain spaces, replace them with underscores input = input:gsub("%s", "_") - table.insert(latex_params,"-jobname='"..input.. "'") + table.insert(latex_params,"-jobname=".. escape_filename(input)) else -- when user specifies -jobname, we must change name of the input file, -- in order to be able to process correct dvi file with tex4ht and t4ht diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index 57a960db9b2..c720d11bafb 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -2130,6 +2130,7 @@ $standardtex 'lutabulartools', '\.lua|' . $standardtex, 'lyluatex', '\.sty', # not *.cls 'magyar', 'NULL', # do not install in runtime, conflicts with babel + 'make4ht', 'NULL', # all in scripts 'makelabels', '\.lco|' . $standardtex, 'manjutex', '\.sty|\.clo|\.ldf|\.cls|\.def|\.fd$|manju.tex', 'marathi', 'namuna-.*\.tex|' . $standardtex, |