diff options
Diffstat (limited to 'Master/texmf-dist')
-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 | 152568 -> 152668 bytes | |||
-rw-r--r-- | Master/texmf-dist/scripts/make4ht/domfilters/make4ht-mathmlfixes.lua | 25 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/make4ht/formats/make4ht-odt.lua | 10 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/make4ht/make4ht | 2 |
5 files changed, 50 insertions, 6 deletions
diff --git a/Master/texmf-dist/doc/support/make4ht/changelog.tex b/Master/texmf-dist/doc/support/make4ht/changelog.tex index d1b9b22219e..8747cc4bf56 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 + 2021/10/11 + + \begin{itemize} + \tightlist + \item + version \texttt{0.3j} released. + \end{itemize} +\item + 2021/10/09 + + \begin{itemize} + \tightlist + \item + fixed wrong DOM object name in the ODT format. + \item + add addtional \texttt{\textless{}mrow\textgreater{}} elements when + necessary. + \end{itemize} +\item 2021/09/30 \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 0b6b1554440..58ce6288885 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/domfilters/make4ht-mathmlfixes.lua b/Master/texmf-dist/scripts/make4ht/domfilters/make4ht-mathmlfixes.lua index 55c0da379b0..42f1e557752 100644 --- a/Master/texmf-dist/scripts/make4ht/domfilters/make4ht-mathmlfixes.lua +++ b/Master/texmf-dist/scripts/make4ht/domfilters/make4ht-mathmlfixes.lua @@ -37,6 +37,30 @@ local function fix_nested_mstyle(el) end end +-- if element contains +-- wrap everything in <mrow> +local function top_mrow(math) + local children = math:get_children() + local put_mrow = false + -- don't process elements with one or zero children + -- don't process elements that already are mrow + if #children < 2 or math:get_element_name() == "mrow" then return nil end + for _,v in ipairs(children) do + if v:is_element() and is_token_element(v) then + put_mrow = true + break + end + end + if put_mrow then + local mrow = math:create_element("mrow") + for _, el in ipairs(children) do + mrow:add_child_node(el) + end + math._children = {mrow} + end + +end + local function get_fence(el, attr, form) -- convert fence attribute to <mo> element -- attr: open | close @@ -108,6 +132,7 @@ return function(dom) end fix_token_elements(el) fix_nested_mstyle(el) + top_mrow(el) end) return dom end diff --git a/Master/texmf-dist/scripts/make4ht/formats/make4ht-odt.lua b/Master/texmf-dist/scripts/make4ht/formats/make4ht-odt.lua index 257e597bb3a..f3721eba00b 100644 --- a/Master/texmf-dist/scripts/make4ht/formats/make4ht-odt.lua +++ b/Master/texmf-dist/scripts/make4ht/formats/make4ht-odt.lua @@ -127,7 +127,7 @@ local function fix_picture_sizes(tmpdir) end local content = f:read("*all") or "" f:close() - local status, domobject = pcall(function() + local status, dom= pcall(function() return domobject.parse(content) end) if not status then @@ -224,13 +224,13 @@ function M.modify_build(make) -- expanded in tex4ht.env in Miktex or Debian call_xtpipes(make) -- fix the image dimensions wrongly set by xtpipes - local domfilters = domfilter {"t4htlinks", "odtpartable"} + local domfilters = domfilter({"t4htlinks", "odtpartable"}, "odtfilters") make:match("4oo$", domfilters) - -- fixes for mathml - local mathmldomfilters = domfilter {"joincharacters","mathmlfixes"} - make:match("4om$", mathmldomfilters) -- execute it before xtpipes, because we don't want xtpipes to mess with t4htlink elements move_matches(make) + -- fixes for mathml + local mathmldomfilters = domfilter({"joincharacters","mathmlfixes"}, "mathmlfilters") + make:match("4om$", mathmldomfilters) -- convert XML entities for Unicode characters produced by Xtpipes to characters local fixentities = filter {"entities-to-unicode", remove_xtpipes} make:match("4oo", fixentities) diff --git a/Master/texmf-dist/scripts/make4ht/make4ht b/Master/texmf-dist/scripts/make4ht/make4ht index 1e7b0d73df0..74a9c22d2b9 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.3i" +local version = "v0.3j" mkparams.version_number = version local args = mkparams.get_args() |