diff options
author | Norbert Preining <norbert@preining.info> | 2020-02-29 03:02:30 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-02-29 03:02:30 +0000 |
commit | 4736ac744a8c914e0d5ced1d157e017a385bbf43 (patch) | |
tree | cc6b754ea0d704573dfffffdbf327e14057ce864 /support | |
parent | 02193cc5ca03abf234d3bc9d77b4821d85f58c62 (diff) |
CTAN sync 202002290302
Diffstat (limited to 'support')
29 files changed, 159 insertions, 7 deletions
diff --git a/support/bib2gls/CHANGES b/support/bib2gls/CHANGES index 1acb131e0b..c3edc97a9c 100644 --- a/support/bib2gls/CHANGES +++ b/support/bib2gls/CHANGES @@ -1,3 +1,13 @@ +v2.1 (2020-02-28): + + * Only trigger error exit code for bib parser exceptions + (just warn for interpreter and aux parser exceptions). + + * Bug fix (texparserlib.jar): + + - "Fails to parse \@writefile{lot}{\egroup }" issue #2 + https://github.com/nlct/texparser/issues/2 + v2.0 (2020-02-12): * New command line options: diff --git a/support/bib2gls/README.md b/support/bib2gls/README.md index 528c5ac725..ee84f7c8b0 100644 --- a/support/bib2gls/README.md +++ b/support/bib2gls/README.md @@ -3,9 +3,9 @@ Command line application to convert `.bib` files to `glossaries-extra.sty` resource files. -Author: Nicola Talbot (http://www.dickimaw-books.com/) +Author: Nicola Talbot (https://www.dickimaw-books.com/contact) -Application Home Page: http://www.dickimaw-books.com/software/bib2gls +Application Home Page: https://www.dickimaw-books.com/software/bib2gls # Licence diff --git a/support/bib2gls/bib2gls.pdf b/support/bib2gls/bib2gls.pdf Binary files differindex 2ea6535518..0219009e56 100644 --- a/support/bib2gls/bib2gls.pdf +++ b/support/bib2gls/bib2gls.pdf diff --git a/support/bib2gls/examples/sample-authors.pdf b/support/bib2gls/examples/sample-authors.pdf Binary files differindex acf6537b34..2d3f7e7c16 100644 --- a/support/bib2gls/examples/sample-authors.pdf +++ b/support/bib2gls/examples/sample-authors.pdf diff --git a/support/bib2gls/examples/sample-bacteria.pdf b/support/bib2gls/examples/sample-bacteria.pdf Binary files differindex df886866be..6adf7c6e05 100644 --- a/support/bib2gls/examples/sample-bacteria.pdf +++ b/support/bib2gls/examples/sample-bacteria.pdf diff --git a/support/bib2gls/examples/sample-chemical.pdf b/support/bib2gls/examples/sample-chemical.pdf Binary files differindex 1faa304fe1..ea046a5c1e 100644 --- a/support/bib2gls/examples/sample-chemical.pdf +++ b/support/bib2gls/examples/sample-chemical.pdf diff --git a/support/bib2gls/examples/sample-citations.pdf b/support/bib2gls/examples/sample-citations.pdf Binary files differindex dd6512f7d3..a242d62a19 100644 --- a/support/bib2gls/examples/sample-citations.pdf +++ b/support/bib2gls/examples/sample-citations.pdf diff --git a/support/bib2gls/examples/sample-constants.pdf b/support/bib2gls/examples/sample-constants.pdf Binary files differindex 6a0681f54a..d0d0c15cb9 100644 --- a/support/bib2gls/examples/sample-constants.pdf +++ b/support/bib2gls/examples/sample-constants.pdf diff --git a/support/bib2gls/examples/sample-markuplanguages.pdf b/support/bib2gls/examples/sample-markuplanguages.pdf Binary files differindex 88d0ee81dd..d92937c783 100644 --- a/support/bib2gls/examples/sample-markuplanguages.pdf +++ b/support/bib2gls/examples/sample-markuplanguages.pdf diff --git a/support/bib2gls/examples/sample-maths.pdf b/support/bib2gls/examples/sample-maths.pdf Binary files differindex 1028059b89..ec915a3147 100644 --- a/support/bib2gls/examples/sample-maths.pdf +++ b/support/bib2gls/examples/sample-maths.pdf diff --git a/support/bib2gls/examples/sample-media.pdf b/support/bib2gls/examples/sample-media.pdf Binary files differindex d90d857809..3f7d9903e7 100644 --- a/support/bib2gls/examples/sample-media.pdf +++ b/support/bib2gls/examples/sample-media.pdf diff --git a/support/bib2gls/examples/sample-msymbols.pdf b/support/bib2gls/examples/sample-msymbols.pdf Binary files differindex c4ac33f154..0f481148da 100644 --- a/support/bib2gls/examples/sample-msymbols.pdf +++ b/support/bib2gls/examples/sample-msymbols.pdf diff --git a/support/bib2gls/examples/sample-multi1.pdf b/support/bib2gls/examples/sample-multi1.pdf Binary files differindex 4d22ee3560..241607afaf 100644 --- a/support/bib2gls/examples/sample-multi1.pdf +++ b/support/bib2gls/examples/sample-multi1.pdf diff --git a/support/bib2gls/examples/sample-multi2.pdf b/support/bib2gls/examples/sample-multi2.pdf Binary files differindex 47af93e5b7..e34a4b500b 100644 --- a/support/bib2gls/examples/sample-multi2.pdf +++ b/support/bib2gls/examples/sample-multi2.pdf diff --git a/support/bib2gls/examples/sample-people.pdf b/support/bib2gls/examples/sample-people.pdf Binary files differindex f362fa06e0..1f988719c4 100644 --- a/support/bib2gls/examples/sample-people.pdf +++ b/support/bib2gls/examples/sample-people.pdf diff --git a/support/bib2gls/examples/sample-textsymbols.pdf b/support/bib2gls/examples/sample-textsymbols.pdf Binary files differindex 0d514283b3..c17eae1e91 100644 --- a/support/bib2gls/examples/sample-textsymbols.pdf +++ b/support/bib2gls/examples/sample-textsymbols.pdf diff --git a/support/bib2gls/examples/sample-textsymbols2.pdf b/support/bib2gls/examples/sample-textsymbols2.pdf Binary files differindex 3dc3f8f9ac..80372af75b 100644 --- a/support/bib2gls/examples/sample-textsymbols2.pdf +++ b/support/bib2gls/examples/sample-textsymbols2.pdf diff --git a/support/bib2gls/examples/sample-units1.pdf b/support/bib2gls/examples/sample-units1.pdf Binary files differindex ae04bcf249..7e0f6d6b9f 100644 --- a/support/bib2gls/examples/sample-units1.pdf +++ b/support/bib2gls/examples/sample-units1.pdf diff --git a/support/bib2gls/examples/sample-units2.pdf b/support/bib2gls/examples/sample-units2.pdf Binary files differindex bcf1b75288..b2f15ae1aa 100644 --- a/support/bib2gls/examples/sample-units2.pdf +++ b/support/bib2gls/examples/sample-units2.pdf diff --git a/support/bib2gls/examples/sample-units3.pdf b/support/bib2gls/examples/sample-units3.pdf Binary files differindex 86b750011f..50b5bf8c06 100644 --- a/support/bib2gls/examples/sample-units3.pdf +++ b/support/bib2gls/examples/sample-units3.pdf diff --git a/support/bib2gls/examples/sample-usergroups.pdf b/support/bib2gls/examples/sample-usergroups.pdf Binary files differindex fe807b2eab..ced334f64c 100644 --- a/support/bib2gls/examples/sample-usergroups.pdf +++ b/support/bib2gls/examples/sample-usergroups.pdf diff --git a/support/make4ht/changelog.tex b/support/make4ht/changelog.tex index d67418081f..13effe5fd0 100644 --- a/support/make4ht/changelog.tex +++ b/support/make4ht/changelog.tex @@ -3,6 +3,51 @@ \begin{itemize} \item + 2020/02/28 + + \begin{itemize} + \tightlist + \item + version \texttt{0.3e\ released} + \end{itemize} +\item + 2020/02/24 + + \begin{itemize} + \tightlist + \item + \texttt{t4htlinks} DOM filter: cleanup file names from internal + links. + \item + \texttt{make4ht-indexing}: added support for splitindex. + \end{itemize} +\item + 2020/02/19 + + \begin{itemize} + \tightlist + \item + use \texttt{UTF-8} output by default. \texttt{8-bit} output is + broken and non fixable. + \end{itemize} +\item + 2020/02/07 + + \begin{itemize} + \tightlist + \item + use \texttt{lualatex-dev} instead of \texttt{harflatex} + \end{itemize} +\item + 2020/02/06 + + \begin{itemize} + \tightlist + \item + added support for \texttt{harflatex} and \texttt{harftex} in the + \texttt{detect\_engine} extension. + \end{itemize} +\item 2020/01/22 \begin{itemize} diff --git a/support/make4ht/domfilters/make4ht-t4htlinks.lua b/support/make4ht/domfilters/make4ht-t4htlinks.lua index 9a4efb9739..e602f02fd1 100644 --- a/support/make4ht/domfilters/make4ht-t4htlinks.lua +++ b/support/make4ht/domfilters/make4ht-t4htlinks.lua @@ -8,6 +8,7 @@ return function(dom) -- add a link if it contains any subnodes and has href attribute if #children > 0 and href then link._name = "text:a" + href = href:gsub("^.+4oo%#", "#") link._attr = {["xlink:type"]="simple", ["xlink:href"]=href} -- if the link is named, add a bookmark if name then diff --git a/support/make4ht/extensions/make4ht-ext-detect_engine.lua b/support/make4ht/extensions/make4ht-ext-detect_engine.lua index 8bb91d3a69..6c8bc74106 100644 --- a/support/make4ht/extensions/make4ht-ext-detect_engine.lua +++ b/support/make4ht/extensions/make4ht-ext-detect_engine.lua @@ -34,8 +34,14 @@ local change_table = { }, pdflatex = { htlatex = "latex" + }, + harflatex = { + htlatex = "lualatex-dev --output-format=dvi" + }, + harftex= { + htlatex = "harftex --output-format=dvi", + command = htlatex.httex } - } local function find_magic_program(filename) diff --git a/support/make4ht/make4ht b/support/make4ht/make4ht index d90bd5b970..50917bd57e 100755 --- a/support/make4ht/make4ht +++ b/support/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.3d" +local version = "v0.3e" mkparams.version_number = version local args = mkparams.get_args() diff --git a/support/make4ht/make4ht-doc.pdf b/support/make4ht/make4ht-doc.pdf Binary files differindex 287a06722a..371e3e3fb8 100644 --- a/support/make4ht/make4ht-doc.pdf +++ b/support/make4ht/make4ht-doc.pdf diff --git a/support/make4ht/make4ht-indexing.lua b/support/make4ht/make4ht-indexing.lua index 072536556a..a86fd139aa 100644 --- a/support/make4ht/make4ht-indexing.lua +++ b/support/make4ht/make4ht-indexing.lua @@ -142,8 +142,12 @@ local process_index = function(indname, idx) return true end +local get_idxname = function(par) + return par.idxfile or par.input .. ".idx" +end + local prepare_tmp_idx = function(par) - par.idxfile = par.idxfile or par.input .. ".idx" + par.idxfile = get_idxname(par) -- construct the .ind name, based on the .idx name par.indfile = par.indfile or par.idxfile:gsub("idx$", "ind") load_enc() @@ -156,10 +160,56 @@ local prepare_tmp_idx = function(par) return newidxfile, idxdata end -local run_indexing_command = function(command, par) + +local splitindex = function(par) + local files = {} + local idxfiles = {} + local buffer + local idxfile = get_idxname(par) + for line in io.lines(idxfile) do + local file = line:match("indexentry%[(.-)%]") + if file then + -- generate idx name for the current output file + file = par.input .. "-" ..file .. ".idx" + local current = files[file] or {} + -- remove file name from the index entry + local indexentry = line:gsub("indexentry%[.-%]", "indexentry") + -- save the index entry and preseding line to the current buffer + table.insert(current, buffer) + table.insert(current, indexentry) + files[file] = current + end + -- + buffer = line + end + -- save idx files + for filename, contents in pairs(files) do + log:info("Saving split index file: " .. filename) + idxfiles[#idxfiles+1] = filename + local f = io.open(filename, "w") + f:write(table.concat(contents, "\n")) + f:close() + end + return idxfiles +end + +local function run_indexing_command (command, par) -- detect command name from the command. It will be the first word local cmd_name = command:match("^[%a]+") or "indexing" local xindylog = logging.new(cmd_name) + -- support split index + local subindexes = splitindex(par) + if #subindexes > 0 then + -- call the command again on all files produced by splitindex + for _, subindex in ipairs(subindexes) do + -- make copy of the parameters + local t = {} + for k,v in pairs(par) do t[k] = v end + t.idxfile = subindex + run_indexing_command(command, t) + end + return nil + end local newidxfile, idxdata = prepare_tmp_idx(par) if not newidxfile then -- the idxdata will contain error message in the case of error @@ -182,6 +232,7 @@ local run_indexing_command = function(command, par) par.indfile = nil end + M.get_utf8 = get_utf8 M.load_enc = load_enc M.parse_idx = parse_idx diff --git a/support/make4ht/make4ht-odtfilter.lua b/support/make4ht/make4ht-odtfilter.lua new file mode 100644 index 0000000000..97f0b8df67 --- /dev/null +++ b/support/make4ht/make4ht-odtfilter.lua @@ -0,0 +1,33 @@ +local mkutils = require "mkutils" +local zip = require "zip" + + +-- use function to change contents of the ODT file +local function update_odt(odtfilename, file_path, fn) + -- get name of the odt file + local odtname = mkutils.remove_extension(odtfilename) .. ".odt" + -- open and read contents of the requested file inside ODT file + local odtfile = zip.open(odtname) + local local_file = odtfile:open(file_path) + local content = local_file:read("*all") + local_file:close() + odtfile:close() + -- update the content using user function + content = fn(content) + -- write the updated file + local local_file_file = io.open(file_path,"w") + local_file_file:write(content) + local_file_file:close() + os.execute("zip " .. odtname .. " " .. file_path) + os.remove(file_path) +end + +Make:match("tmp$", function(name, par) + update_odt(name, "content.xml", function(content) + return content:gsub("%&%#x([A-Fa-f0-9]+);", function(entity) + -- convert hexadecimal entity to Unicode + print(entity,utfchar(tonumber(entity, 16))) + return utfchar(tonumber(entity, 16)) + end) + end) +end) diff --git a/support/make4ht/mkparams.lua b/support/make4ht/mkparams.lua index 0254de9ac2..5517c0a19f 100644 --- a/support/make4ht/mkparams.lua +++ b/support/make4ht/mkparams.lua @@ -29,7 +29,7 @@ Available options: -m,--mode (default default) Switch which can be used in the makefile -n,--no-tex4ht Disable dvi file processing with the tex4ht command -s,--shell-escape Enables running external programs from LaTeX - -u,--utf8 For output documents in utf8 encoding + -u,--utf8 [obsolete] The document is generated in UTF8 encoding by default -v,--version Display version number -x,--xetex Use xelatex for document compilation ]] @@ -185,6 +185,12 @@ local function process_args(args) outdir = outdir:gsub('/$','') end + -- make4ht now requires UTF-8 output, because of DOM filters + -- numeric entites are expanded to Unicode characters. These + -- characters would be displayed incorrectly in 8 bit encodings. + + args.utf8 = true + if args.backend == "lua4ht" then args.lua = true args.xetex = nil |