diff options
author | Karl Berry <karl@freefriends.org> | 2022-12-23 21:05:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-12-23 21:05:03 +0000 |
commit | 1c3a11e6ef6781244703d902f924eb0c8a60135c (patch) | |
tree | 12ad8d9c32b53f1cf63780b31ce6cb109ec00ce8 /Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx | |
parent | 3380912e470b2169b6c54166d32f14d631d63270 (diff) |
tagpdf (23dec22)
git-svn-id: svn://tug.org/texlive/trunk@65341 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx index fd4362227c2..ca8645e76ca 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Version 0.97, released 2022-08-24} +% \date{Version 0.98, released 2022-12-22} % \maketitle % \begin{implementation} % The code is splitted into three parts: code shared by all engines, @@ -86,7 +86,7 @@ % \begin{macrocode} %<@@=tag> %<*luamode> -\ProvidesExplPackage {tagpdf-mc-code-lua} {2022-08-24} {0.97} +\ProvidesExplPackage {tagpdf-mc-code-lua} {2022-12-22} {0.98} {tagpdf - mc code only for the luamode } %</luamode> % \end{macrocode} @@ -182,8 +182,7 @@ % ,\@@_mc_lua_set_mc_type_attr:o % ,\@@_mc_lua_unset_mc_type_attr: % } -% This takes a tag name, and sets the attributes to the related number. -% It is not decided yet if this will be global or local, see the global-mc option. +% This takes a tag name, and sets the attributes globally to the related number. % \begin{macrocode} \cs_new:Nn \@@_mc_lua_set_mc_type_attr:n % #1 is a tag name { @@ -300,6 +299,15 @@ \bool_set_false:N\l_@@_mc_artifact_bool \tl_clear:N \l_@@_mc_key_properties_tl \int_gincr:N \c@g_@@_MCID_abs_int +% \end{macrocode} +% set the default tag to the structure: +% \begin{macrocode} + \tl_set_eq:NN \l_@@_mc_key_tag_tl \g_@@_struct_tag_tl + \tl_gset_eq:NN\g_@@_mc_key_tag_tl \g_@@_struct_tag_tl + \lua_now:e + { + ltx.@@.func.store_mc_data(\@@_get_mc_abs_cnt:,"tag","\g_@@_struct_tag_tl") + } \keys_set:nn { @@ / mc }{ label={}, #1 } %check that a tag or artifact has been used \@@_check_mc_tag:N \l_@@_mc_key_tag_tl @@ -315,6 +323,23 @@ % if not stashed record the absolute number \bool_if:NF \l_@@_mc_key_stash_bool { + \exp_args:NV\@@_struct_get_tag_info:nNN + \g_@@_struct_stack_current_tl + \l_@@_tmpa_tl + \l_@@_tmpb_tl + \@@_check_parent_child:VVnnN + \l_@@_tmpa_tl \l_@@_tmpb_tl + {MC}{} + \l_@@_parent_child_check_tl + \int_compare:nNnT {\l_@@_parent_child_check_tl}<{0} + { + \msg_warning:nnxxx + { tag } + {role-parent-child} + { \g_@@_struct_tag_tl/\g_@@_struct_tag_NS_tl } + { MC~(=~real content) } + { 'not~allowed'. } + } \@@_mc_handle_stash:x { \@@_get_mc_abs_cnt: } } } |