diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-shared.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-shared.sty | 121 |
1 files changed, 80 insertions, 41 deletions
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-shared.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-shared.sty index b9bbe29eb36..49cfbaf69df 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-shared.sty +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-shared.sty @@ -1,47 +1,86 @@ -\ProvidesExplPackage {tagpdf-mc-code-shared} {2019/07/02} {0.61} - {part of tagpdf - code related to marking chunks - code shared by generic and luamode } - -% I use a latex counter for the absolute count, so that it is added to -% \cl@@ckpt and restored e.g. in tabulars and align -% \int_new:N \c@g__uftag_MCID_int and -% \tl_put_right:Nn\cl@@ckpt{\@elt{g_uf_test_int}} -% would work too, but as the name is not expl3 then too, why bother? -% the absolute counter can be used to label and to check if the page -% counter needs a reset. - -\newcounter { g__uftag_MCID_abs_int } -\cs_new:Nn \__uftag_get_mc_abs_cnt: { \int_use:N \c@g__uftag_MCID_abs_int } - -% tagmcabs is the label name of the absolute count which is used to identify the chunk -\zref@newprop {tagmcabs} [0] { \int_use:N \c@g__uftag_MCID_abs_int } -\zref@addprop {uftagzrl} {tagmcabs} -\zref@addprop {LastPage} {tagmcabs} - -%stores labels of mcid. -\cs_new:Nn \__uftag_mc_handle_mc_label:n - { - \zref@labelbylist{tagpdf-#1}{uftagzrl} - } +%% +%% This is file `tagpdf-mc-code-shared.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% tagpdf-mc.dtx (with options: `shared') +%% +%% Copyright (C) 2019 Ulrike Fischer +%% +%% It may be distributed and/or modified under the conditions of +%% the LaTeX Project Public License (LPPL), either version 1.3c of +%% this license or (at your option) any later version. The latest +%% version of this license is in the file: +%% +%% https://www.latex-project.org/lppl.txt +%% +%% This file is part of the "tagpdf bundle" (The Work in LPPL) +%% and all files in that bundle must be distributed together. +%% +%% File: tagpdf-mc.dtx +\ProvidesExplPackage {tagpdf-mc-code-shared} {2021/02/23} {0.80} + {part of tagpdf - code related to marking chunks - + code shared by generic and luamode } + +\newcounter { g__tag_MCID_abs_int } +\cs_new:Nn \__tag_get_mc_abs_cnt: { \int_use:N \c@g__tag_MCID_abs_int } + + +\cs_new:Nn \__tag_mc_handle_mc_label:n + { + \__tag_ref_label:en{tagpdf-#1}{mc} + } -% will hold the structure numbers for the parenttree -% key: absolute number of the mc (tagmcabs) -% value: the structure number the mc is in -\__uftag_prop_new:N \g__uftag_mc_parenttree_prop +\__tag_prop_new:N \g__tag_mc_parenttree_prop -%shared keys -%the rest are in the splitted code -\tl_new:N \l__uftag_mc_artifact_type_tl +\tl_new:N \l__tag_mc_artifact_type_tl -\keys_define:nn { uftag / mc } +\keys_define:nn { __tag / mc } + { + stash .bool_set:N = \l__tag_mc_key_stash_bool, + artifact-bool .bool_set:N = \l__tag_mc_artifact_bool, + artifact-type .choice:, + artifact-type / pagination .code:n = + { + \tl_set:Nn \l__tag_mc_artifact_type_tl { Pagination } + }, + artifact-type / layout .code:n = + { + \tl_set:Nn \l__tag_mc_artifact_type_tl { Layout } + }, + artifact-type / page .code:n = + { + \tl_set:Nn \l__tag_mc_artifact_type_tl { Page } + }, + artifact-type / background .code:n = + { + \tl_set:Nn \l__tag_mc_artifact_type_tl { Background } + }, + artifact-type / notype .code:n = + { + \tl_set:Nn \l__tag_mc_artifact_type_tl {} + }, + artifact-type / .code:n = + { + \tl_set:Nn \l__tag_mc_artifact_type_tl {} + }, + } + +\cs_new_protected:Npn \tag_mc_artifact_group_begin:n #1 { - stash .bool_set:N = \l__uftag_mc_key_stash_bool, - artifact-bool .bool_set:N = \l__uftag_mc_artifact_bool, - artifact-type .choice:, - artifact-type / pagination .code:n = {\tl_set:Nn \l__uftag_mc_artifact_type_tl { Pagination }}, - artifact-type / layout .code:n = {\tl_set:Nn \l__uftag_mc_artifact_type_tl { Layout }}, - artifact-type / page .code:n = {\tl_set:Nn \l__uftag_mc_artifact_type_tl { Page }}, - artifact-type / background .code:n = {\tl_set:Nn \l__uftag_mc_artifact_type_tl { Background }}, - artifact-type / notype .code:n = {\tl_set:Nn \l__uftag_mc_artifact_type_tl {}}, + \tag_mc_begin:n {artifact=#1} + \tag_stop_group_begin: } -\endinput +\cs_new_protected:Npn \tag_mc_artifact_group_end: + { + \tag_stop_group_end: + \tag_mc_end: + } + +\int_new:N \g__tag_MCID_tmp_bypage_int + +%% +%% +%% End of file `tagpdf-mc-code-shared.sty'. |