summaryrefslogtreecommitdiff
path: root/macros/luatex/generic
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-07-21 03:03:08 +0000
committerNorbert Preining <norbert@preining.info>2020-07-21 03:03:08 +0000
commitbd36712a3846fe8b17a13b5edfdcf10dc8787235 (patch)
treea03524b06804f090ad8364af839219776d17dd70 /macros/luatex/generic
parent7a37d65d52056a1500d4602172582154994bea64 (diff)
CTAN sync 202007210303
Diffstat (limited to 'macros/luatex/generic')
-rw-r--r--macros/luatex/generic/luaxml/README2
-rw-r--r--macros/luatex/generic/luaxml/luaxml-domobject.lua7
-rw-r--r--macros/luatex/generic/luaxml/luaxml-namedentities.lua3
-rw-r--r--macros/luatex/generic/luaxml/luaxml.pdfbin98710 -> 99665 bytes
-rw-r--r--macros/luatex/generic/luaxml/luaxml.tex18
5 files changed, 26 insertions, 4 deletions
diff --git a/macros/luatex/generic/luaxml/README b/macros/luatex/generic/luaxml/README
index 897968a391..ab8a407dd0 100644
--- a/macros/luatex/generic/luaxml/README
+++ b/macros/luatex/generic/luaxml/README
@@ -28,7 +28,7 @@ Author
------
Michal Hoftich
Email: michal.h21@gmail.com
-Version: 0.1l, 2019-09-16
+Version: v0.1m, 2020-07-19
Original authors: Paul Chakravarti and Manoel Campos (http://manoelcampos.com)
diff --git a/macros/luatex/generic/luaxml/luaxml-domobject.lua b/macros/luatex/generic/luaxml/luaxml-domobject.lua
index 413947b5d4..6d299d4157 100644
--- a/macros/luatex/generic/luaxml/luaxml-domobject.lua
+++ b/macros/luatex/generic/luaxml/luaxml-domobject.lua
@@ -115,7 +115,12 @@ local function serialize_dom(parser, current,level, output)
attributes["_text"] = nil
elseif xtype == "DECL" and name =="xml" then
-- the xml declaration attributes must be in a correct order
- insert("<?xml version='%s' encoding='%s' ?>", attributes.version, attributes.encoding)
+ local encoding = attributes.encoding or "utf-8"
+ insert("<?xml version='%s' encoding='%s' ?>", attributes.version, encoding)
+ return output
+ elseif xtype == "CDATA" then
+ -- return content unescaped
+ insert(string.format("<![CDATA[%s]]>", text_content))
return output
end
diff --git a/macros/luatex/generic/luaxml/luaxml-namedentities.lua b/macros/luatex/generic/luaxml/luaxml-namedentities.lua
index dbbed79ce0..9a26f448f6 100644
--- a/macros/luatex/generic/luaxml/luaxml-namedentities.lua
+++ b/macros/luatex/generic/luaxml/luaxml-namedentities.lua
@@ -1,3 +1,4 @@
+local utf8 = require "utf8"
return {
["Subset"]="⋐",
["Chi"]="Χ",
@@ -39,7 +40,7 @@ return {
["nsqsube"]="⋢",
["Nacute"]="Ń",
["mcomma"]="⨩",
-["ApplyFunction"]="⁡",
+["ApplyFunction"]=utf8.char(8289),
["rfisht"]="⥽",
["phmmat"]="ℳ",
["rarrw"]="↝",
diff --git a/macros/luatex/generic/luaxml/luaxml.pdf b/macros/luatex/generic/luaxml/luaxml.pdf
index 6b53c44891..86aa928593 100644
--- a/macros/luatex/generic/luaxml/luaxml.pdf
+++ b/macros/luatex/generic/luaxml/luaxml.pdf
Binary files differ
diff --git a/macros/luatex/generic/luaxml/luaxml.tex b/macros/luatex/generic/luaxml/luaxml.tex
index 3b451fdb63..d641b91aad 100644
--- a/macros/luatex/generic/luaxml/luaxml.tex
+++ b/macros/luatex/generic/luaxml/luaxml.tex
@@ -7,7 +7,7 @@
\usepackage{framed}
% Version is defined in the makefile, use default values when compiled directly
\ifdefined\version\else
-\def\version{0.1l}
+\def\version{v0.1m}
\let\gitdate\date
\fi
\newcommand\modulename[1]{\subsection{#1}\label{sec:#1}}
@@ -99,6 +99,22 @@ end
\end{luacode*}
\end{framed}
+\subsection{Void elements}
+
+The \verb|DOM_Object.parse| function tries to support the HTML void elements,
+such as \verb|<img>| or \verb|<hr>|. They cannot have closing tags, a parse
+error occurs when the closing tags are used.
+
+It is possible to define a different set of void elements using the second parameter
+for \verb|DOM_Object.parse|:
+
+\begin{verbatim}
+obj = dom.parse(document, {custom_void = true})
+\end{verbatim}
+
+An empty table will disable all void elements. This setting is recommended for common |xml| documents.
+
+
\subsection{Node selection methods}
There are some other methods for element retrieving.