summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/x-pending.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/x-pending.mkiv')
-rw-r--r--Master/texmf-dist/tex/context/base/x-pending.mkiv39
1 files changed, 39 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/x-pending.mkiv b/Master/texmf-dist/tex/context/base/x-pending.mkiv
new file mode 100644
index 00000000000..20fe5fb6ae2
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/x-pending.mkiv
@@ -0,0 +1,39 @@
+%D \module
+%D [ file=x-pending,
+%D version=2008.04.04,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Track \MKII\ \XML\ usage in \MKIV,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D Including this module will result in the production of
+%D a file \type {jobname-pending-xml.log} which has a
+%D \LUA\ table with \XML\ elements that are still catched by
+%D \MKII\ code, when enabled.
+
+\startluacode
+ dofile(resolvers.find_file("lxml-inf.lua"))
+ local list = { }
+ function document.check_pending_xml_element(str)
+ list[str] = (list[str] and (list[str]+1)) or 1
+ end
+ function document.show_pending_xml_elements()
+ io.savedata("\jobname-pending-xml-mkii.log", table.serialize(list))
+ io.savedata("\jobname-pending-xml-mkiv.log", table.serialize(lxml.get_command_status()))
+ end
+\stopluacode
+
+\defineXMLcommand
+ [default]
+ {\ctxlua{document.check_pending_xml_element("\currentXMLelement")}}
+
+\appendtoks
+ \ctxlua{document.show_pending_xml_elements()}%
+\to \everystoptext
+
+\endinput