use structnum instead of label when using stashed structure

This commit is contained in:
Ulrike Fischer 2024-11-29 14:16:46 +01:00
parent 06eb95d9c1
commit ff7ad4f7b4
2 changed files with 14 additions and 4 deletions

12
CHANGELOG.md Normal file
View File

@ -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.

View File

@ -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)]