texlive[62953] trunk: make4ht (22mar22)

commits+karl at tug.org commits+karl at tug.org
Wed Apr 6 00:20:31 CEST 2022


Revision: 62953
          http://tug.org/svn/texlive?view=revision&revision=62953
Author:   karl
Date:     2022-04-06 00:20:31 +0200 (Wed, 06 Apr 2022)
Log Message:
-----------
make4ht (22mar22)

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/make4ht/make4ht
    trunk/Master/texmf-dist/doc/support/make4ht/changelog.tex
    trunk/Master/texmf-dist/doc/support/make4ht/make4ht-doc.pdf
    trunk/Master/texmf-dist/scripts/make4ht/extensions/make4ht-ext-preprocess_input.lua
    trunk/Master/texmf-dist/scripts/make4ht/formats/make4ht-odt.lua
    trunk/Master/texmf-dist/scripts/make4ht/make4ht
    trunk/Master/texmf-dist/scripts/make4ht/mkparams.lua
    trunk/Master/tlpkg/libexec/ctan2tds

Modified: trunk/Build/source/texk/texlive/linked_scripts/make4ht/make4ht
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/make4ht/make4ht	2022-04-05 22:17:17 UTC (rev 62952)
+++ trunk/Build/source/texk/texlive/linked_scripts/make4ht/make4ht	2022-04-05 22:20:31 UTC (rev 62953)
@@ -29,7 +29,7 @@
 
 -- 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()

Modified: trunk/Master/texmf-dist/doc/support/make4ht/changelog.tex
===================================================================
--- trunk/Master/texmf-dist/doc/support/make4ht/changelog.tex	2022-04-05 22:17:17 UTC (rev 62952)
+++ trunk/Master/texmf-dist/doc/support/make4ht/changelog.tex	2022-04-05 22:20:31 UTC (rev 62953)
@@ -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}

Modified: trunk/Master/texmf-dist/doc/support/make4ht/make4ht-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/scripts/make4ht/extensions/make4ht-ext-preprocess_input.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/make4ht/extensions/make4ht-ext-preprocess_input.lua	2022-04-05 22:17:17 UTC (rev 62952)
+++ trunk/Master/texmf-dist/scripts/make4ht/extensions/make4ht-ext-preprocess_input.lua	2022-04-05 22:20:31 UTC (rev 62953)
@@ -5,12 +5,13 @@
 
 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"}},

Modified: trunk/Master/texmf-dist/scripts/make4ht/formats/make4ht-odt.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/make4ht/formats/make4ht-odt.lua	2022-04-05 22:17:17 UTC (rev 62952)
+++ trunk/Master/texmf-dist/scripts/make4ht/formats/make4ht-odt.lua	2022-04-05 22:20:31 UTC (rev 62953)
@@ -73,10 +73,10 @@
   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)

Modified: trunk/Master/texmf-dist/scripts/make4ht/make4ht
===================================================================
--- trunk/Master/texmf-dist/scripts/make4ht/make4ht	2022-04-05 22:17:17 UTC (rev 62952)
+++ trunk/Master/texmf-dist/scripts/make4ht/make4ht	2022-04-05 22:20:31 UTC (rev 62953)
@@ -29,7 +29,7 @@
 
 -- 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()

Modified: trunk/Master/texmf-dist/scripts/make4ht/mkparams.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/make4ht/mkparams.lua	2022-04-05 22:17:17 UTC (rev 62952)
+++ trunk/Master/texmf-dist/scripts/make4ht/mkparams.lua	2022-04-05 22:20:31 UTC (rev 62953)
@@ -93,6 +93,18 @@
   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 @@
     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

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2022-04-05 22:17:17 UTC (rev 62952)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2022-04-05 22:20:31 UTC (rev 62953)
@@ -2130,6 +2130,7 @@
  '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,



More information about the tex-live-commits mailing list.