diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex')
17 files changed, 68 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty index 87f4f944558..89c3af407d5 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty @@ -25,7 +25,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf.dtx -\ProvidesExplPackage {tagpdf-base} {2023-06-06} {0.98h} +\ProvidesExplPackage {tagpdf-base} {2023-06-14} {0.98i} {part of tagpdf - provide base, no-op versions of the user commands } \AddToHook{begindocument} { @@ -45,14 +45,20 @@ \cs_new_protected:Npn \tag_start:n #1 {} %% File: tagpdf-mc-generic.dtx -\cs_new_protected:Npn \tag_mc_begin:n #1 { \__tag_whatsits: } +\cs_new_protected:Npn \tag_mc_begin:n #1 { \__tag_whatsits: \int_gincr:N \c@g__tag_MCID_abs_int } \cs_new_protected:Nn \tag_mc_end:{ \__tag_whatsits: } %% File: tagpdf-mc-shared.dtx +\newcounter { g__tag_MCID_abs_int } +\cs_new:Npn \__tag_get_data_mc_counter: + { + \int_use:N \c@g__tag_MCID_abs_int + } \cs_new_protected:Npn \tag_mc_use:n #1 { \__tag_whatsits: } \cs_new_protected:Npn \tag_mc_artifact_group_begin:n #1 {} \cs_new_protected:Npn \tag_mc_artifact_group_end:{} +\cs_new_protected:Npn \tag_mc_reset_box:N #1 {} \cs_new_protected:Npn \tag_mc_end_push: {} \cs_new_protected:Npn \tag_mc_begin_pop:n #1 {} %% File: tagpdf-struct.dtx @@ -65,6 +71,10 @@ { \g__tag_struct_stack_current_tl } +\cs_new:Npn \__tag_get_data_struct_counter: + { + \int_use:N \c@g__tag_struct_abs_int + } \cs_new_protected:Npn \tag_struct_begin:n #1 {\int_gincr:N \c@g__tag_struct_abs_int} \cs_new_protected:Npn \tag_struct_end:{} \cs_new_protected:Npn \tag_struct_end:n{} @@ -75,6 +85,19 @@ \cs_new:Npn \tag_get:n #1 { \use:c {__tag_get_data_#1: } } \prg_new_conditional:Npnn \tag_if_active: { p , T , TF, F } { \prg_return_false: } +\prg_new_conditional:Npnn \tag_if_box_tagged:N #1 {p,T,F,TF} + { + \tl_if_exist:cTF {l_tag_box_\int_use:N #1_tl} + { + \int_compare:nNnTF {\tl_use:c{l_tag_box_\int_use:N #1_tl}}>{0} + { \prg_return_true: } + { \prg_return_false: } + } + { + \prg_return_true: + % warning?? + } + } %% File: tagpdf-user.dtx @@ -111,6 +134,8 @@ { \tag_struct_use:n {#1} } +\AddToHook{begindocument} + {\immediate\write\@mainaux{\string\providecommand\string\newlabeldata[2]{}}} \bool_new:N \l__tag_para_flattened_bool \newcommand\tagpdfparaOn {} \newcommand\tagpdfparaOff{} diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty index 595eb4b9e30..e24680dc6c9 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-mc-generic.dtx -\ProvidesExplPackage {tagpdf-debug-generic} {2023-06-06} {0.98h} +\ProvidesExplPackage {tagpdf-debug-generic} {2023-06-14} {0.98i} {part of tagpdf - debugging code related to marking chunks - generic mode} \cs_set_protected:Npn \tag_mc_begin:n #1 %#1 keyval { diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty index 14dea2228ba..95c06b1623d 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty @@ -26,7 +26,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf.dtx -\ProvidesExplPackage {tagpdf-debug} {2023-06-06} {0.98h} +\ProvidesExplPackage {tagpdf-debug} {2023-06-14} {0.98i} { debug code for tagpdf } \@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput} \prop_gput:Nnn \g_msg_module_type_prop { tag / debug} {} diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def index f4a61bc782d..08638c91cd3 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-backend.dtx -\ProvidesExplFile {tagpdf-luatex.def} {2023-06-06} {0.98h} +\ProvidesExplFile {tagpdf-luatex.def} {2023-06-14} {0.98i} {tagpdf~driver~for~luatex} { \fontencoding{TU}\fontfamily{lmr}\fontseries{m}\fontshape{n}\fontsize{10pt}{10pt}\selectfont diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty index 50027a99642..5ecc714ff15 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-mc-generic.dtx -\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-06-06} {0.98h} +\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-06-14} {0.98i} {part of tagpdf - code related to marking chunks - generic mode} \__tag_prop_new:N \g__tag_MCID_byabspage_prop diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty index 7bf0e2c868b..9049aa2c304 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-mc-luacode.dtx -\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-06-06} {0.98h} +\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-06-14} {0.98i} {tagpdf - mc code only for the luamode } \hook_gput_code:nnn{begindocument}{tagpdf/mc} { @@ -242,6 +242,15 @@ \tl_gset:Nn \g__tag_mc_key_tag_tl { } } } +\cs_set_protected:Npn \tag_mc_reset_box:N #1 + { + \lua_now:e + { + local~type=tex.getattribute(luatexbase.attributes.g__tag_mc_type_attr) + local~mc=tex.getattribute(luatexbase.attributes.g__tag_mc_cnt_attr) + ltx.__tag.func.update_mc_attributes(tex.getbox(\int_use:N #1),mc,type) + } + } \cs_new:Npn \__tag_get_data_mc_tag: { \g__tag_mc_key_tag_tl } \keys_define:nn { __tag / mc } diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def index 0aade224192..0375b272762 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-data.dtx -%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-06-06} {0.98h} +%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-06-14} {0.98i} %% {latex-book} {https://www.latex-project.org/ns/book/2022}{} chapter, H1,pdf2, section, H2,pdf2, diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def index a964fb0d1cd..ef2454bb338 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-data.dtx -%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-06-06} {0.98h} +%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-06-14} {0.98i} %% {latex-inline} {https://www.latex-project.org/ns/inline/2022}{} chapter, Span, pdf2, section, Span, pdf2, diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def index f64fc809c09..130da04265a 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-data.dtx -%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-06-06} {0.98h} +%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-06-14} {0.98i} %% {latex} {https://www.latex-project.org/ns/dflt/2022}{} title, Title, pdf2, part, Title, pdf2, diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def index 351201f14f1..0059f11e2a8 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-data.dtx -%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-06-06} {0.98h} +%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-06-14} {0.98i} abs,abs,mathml, and,and,mathml, annotation,annotation,mathml, diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def index 51be8321615..8df64748c71 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-data.dtx -%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-06-06} {0.98h} +%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-06-14} {0.98i} %% {pdf} {http://iso.org/pdf/ssn}{} StructTreeRoot,StructTreeRoot,pdf,D, Document,Document,pdf,D, diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def index 75706689f62..9760119e202 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-data.dtx -%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-06-06} {0.98h} +%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-06-14} {0.98i} %% {pdf2} {http://iso.org/pdf2/ssn}{} Document,Document,pdf2,D, Part,Part,pdf2,G, diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv index 8474bfa8eb2..09739777e52 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-data.dtx -%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-06-06} {0.98h} +%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-06-14} {0.98i} ,,,StructTreeRoot,Document,DocumentFragment,Art,Part,Div,Sect,Aside,BlockQuote,NonStruct,TOC,TOCI,Index,Private,Title,Sub,Quote,Note,Reference,BibEntry,P,Hn,H,Lbl,Code,Em,Strong,Span,Link,Annot,Form,Ruby,RB,RT,RP,Warichu,WT,WP,FENote,L,LI,LBody,Table,TR,TH,TD,THead,TBody,TFoot,Caption,Figure,Formula,math,mathml,Artifact,MC Document,both,document level,1,0..n,0..n,∅,‡,‡,∅,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅ DocumentFragment,2.0,document level,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅*,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅,0..n,∅ diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv index 4c639c94b9b..02cb9b64bab 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf-data.dtx -%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-06-06} {0.98h} +%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-06-14} {0.98i} ,,,StructTreeRoot,Document,Art,Part,Div,Sect,BlockQuote,NonStruct,TOC,TOCI,Index,Private,Quote,Note,Reference,BibEntry,P,Hn,H,Lbl,Code,Span,Link,Annot,Form,Ruby,RB,RT,RP,Warichu,WT,WP,L,LI,LBody,Table,TR,TH,TD,THead,TBody,TFoot,Caption,Figure,Formula,MC Document,both,document level,1,0..n,∅,‡,‡,∅,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅ Art,1.7,grouping,∅,0..n,∅,‡,‡,0..n,0..n,‡,∅,∅,∅,0..n,∅,0..n,∅,∅,∅,0..1,0..1,∅,∅,∅,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,∅,∅ diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua b/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua index 6ac971a73c8..b94e1ad8916 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua @@ -24,8 +24,8 @@ local ProvidesLuaModule = { name = "tagpdf", - version = "0.98h", --TAGVERSION - date = "2023-06-06", --TAGDATE + version = "0.98i", --TAGVERSION + date = "2023-06-14", --TAGDATE description = "tagpdf lua code", license = "The LATEX Project Public License 1.3c" } @@ -491,6 +491,17 @@ function ltx.__tag.func.store_mc_in_page (mcnum,mcpagecnt,page) ltx.__tag.trace.log("INFO TAG-MC-INTO-PAGE: page " .. page .. ": inserting MCID " .. mcpagecnt .. " => " .. mcnum,3) end +local function __tag_update_mc_attributes (head,mcnum,type) + for n in node.traverse(head) do + node.set_attribute(n,mccntattributeid,mcnum) + node.set_attribute(n,mctypeattributeid,type) + if n.id == HLIST or n.id == VLIST then + __tag_update_mc_attributes (n.list,mcnum,type) + end + end + return head +end +ltx.__tag.func.update_mc_attributes = __tag_update_mc_attributes --[[ Now follows the core function It wades through the shipout box and checks the attributes diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty index 4b43fd5fd5b..1826684f1b3 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty @@ -28,7 +28,7 @@ %% and all files in that bundle must be distributed together. %% %% File: tagpdf.dtx -\ProvidesExplPackage {tagpdf} {2023-06-06} {0.98h} +\ProvidesExplPackage {tagpdf} {2023-06-14} {0.98i} { A package to experiment with pdf tagging } \bool_if:nF @@ -575,7 +575,6 @@ } %% File: tagpdf-mc-shared.dtx -\newcounter { g__tag_MCID_abs_int } \cs_new:Npn \__tag_get_mc_abs_cnt: { \int_use:N \c@g__tag_MCID_abs_int } \int_new:N \g__tag_MCID_tmp_bypage_int \bool_new:N \g__tag_in_mc_bool @@ -3292,9 +3291,11 @@ \bool_gset_false:N \g__tag_in_mc_bool } \tag_mc_begin:n {artifact} + \tag_stop:n{headfoot} } \cs_new_protected:Npn \__tag_exclude_headfoot_end: { + \tag_start:n{headfoot} \tag_mc_end: \bool_if:NTF \g__tag_mode_lua_bool { @@ -3318,10 +3319,12 @@ } \tag_struct_begin:n{tag=Artifact,attribute-class=__tag/attr/#1} \tag_mc_begin:n {artifact=#1} + \tag_stop:n{headfoot} } \cs_new_protected:Npn \__tag_exclude_struct_headfoot_end: { + \tag_start:n{headfoot} \tag_mc_end: \tag_struct_end: \bool_if:NTF \g__tag_mode_lua_bool diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty index 4f14e73b1a7..0628a466602 100644 --- a/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty @@ -1,5 +1,5 @@ %\RequirePackage[enable-debug]{expl3}[2018/06/14] -\ProvidesExplPackage {tagpdfdocu-patches} {2023-06-06} {0.98h} +\ProvidesExplPackage {tagpdfdocu-patches} {2023-06-14} {0.98i} {patches/commands for the tagpdf documentation} \RequirePackage{etoolbox,xpatch} |