[latex3-commits] [latex3/luamml] mathsockets: use structnum instead of label when using stashed structure (ff7ad4f)

github at latex-project.org github at latex-project.org
Fri Nov 29 14:16:46 CET 2024


Repository : https://github.com/latex3/luamml
On branch  : mathsockets
Link       : https://github.com/latex3/luamml/commit/ff7ad4f7b4cd62a5c249f65de0849ac99b504ab6

>---------------------------------------------------------------

commit ff7ad4f7b4cd62a5c249f65de0849ac99b504ab6
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Fri Nov 29 14:16:46 2024 +0100

    use structnum instead of label when using stashed structure


>---------------------------------------------------------------

ff7ad4f7b4cd62a5c249f65de0849ac99b504ab6
 CHANGELOG.md                | 12 ++++++++++++
 luamml-structelemwriter.lua |  6 ++----
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..392524f
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,12 @@
+# Changelog
+All notable changes to the `tagpdf` package since the
+2021-04-22 will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
+this project uses date-based 'snapshot' version identifiers.
+## [Unreleased]
+
+### Changed
+
+- Ulrike Fischer, 2024-11-29
+  luamml-structelemwriter.lua: use structnum instead of label when stashing. 
diff --git a/luamml-structelemwriter.lua b/luamml-structelemwriter.lua
index 7c2e549..36881e1 100644
--- a/luamml-structelemwriter.lua
+++ b/luamml-structelemwriter.lua
@@ -81,10 +81,8 @@ local function write_elem(tree, stash)
   table.sort(attrs)
 
   if stash then
-    stash_cnt = stash_cnt + 1
-    stash = '__luamml_stashed_' .. stash_cnt
-    tree[':struct'] = stash
-    stash = ', stash, label = ' .. stash
+    tree[':structnum'] = get_ltx().tag.get_struct_num_next() 
+    stash = ', stash, '
   end
 
   local attr_flag = i ~= 0 and ', attribute=' .. attributes[table.concat(attrs)]





More information about the latex3-commits mailing list.