diff options
author | Karl Berry <karl@freefriends.org> | 2023-06-14 20:14:39 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-06-14 20:14:39 +0000 |
commit | 7e2af6eaaed92aa41c00d6b9e6d3c12c92a821f4 (patch) | |
tree | 28dbbcfe650ce999f6b6b1bd40f8bfa1b89da3de /Master | |
parent | dee2ee7d27450ffe7825d33a38f47d9945b8fbf9 (diff) |
tagpdf (14jun23)
git-svn-id: svn://tug.org/texlive/trunk@67368 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
33 files changed, 273 insertions, 80 deletions
diff --git a/Master/texmf-dist/doc/latex/tagpdf/README.md b/Master/texmf-dist/doc/latex/tagpdf/README.md index 5b4a1b211fb..bb0353de513 100644 --- a/Master/texmf-dist/doc/latex/tagpdf/README.md +++ b/Master/texmf-dist/doc/latex/tagpdf/README.md @@ -1,6 +1,6 @@ #tagpdf — A package to create tagged pdf -Packageversion: 0.98h -Packagedate: 2023/06/06 +Packageversion: 0.98i +Packagedate: 2023/06/14 Author: Ulrike Fischer ## License diff --git a/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.pdf b/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.pdf Binary files differindex 8fd8bc75419..5784294ea4d 100644 --- a/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.pdf +++ b/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.pdf diff --git a/Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdf b/Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdf Binary files differindex a75c6a78dbd..329b97b8a5e 100644 --- a/Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdf +++ b/Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdf diff --git a/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex b/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex index 27cd1d128d2..1ee0abb1818 100644 --- a/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex +++ b/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex @@ -16,8 +16,8 @@ } \DebugBlocksOff \makeatletter -\def\UlrikeFischer@package@version{0.98h} -\def\UlrikeFischer@package@date{2023-06-06} +\def\UlrikeFischer@package@version{0.98i} +\def\UlrikeFischer@package@date{2023-06-14} \makeatother \documentclass[bibliography=totoc,a4paper]{article} @@ -298,6 +298,9 @@ structures can be inspected and be compared by the l3build checks.% \section{Changes} + +This section lists only important changes. More can be found in the \texttt{CHANGELOG.MD} and by checking the git commits. + \subsection{Changes in 0.3} @@ -509,12 +512,6 @@ added. The ID of a structure can be retrieved with |\tag_get:n| see~\ref{sec:retrieve}. -\subsection{Changes in version 0.98d} -The main change is from now on every structure has an ID and an IDtree is -added. The ID of a structure can be retrieved with |\tag_get:n| -see~\ref{sec:retrieve}. - - \subsection{Changes in version 0.98e} \begin{itemize} @@ -1211,16 +1208,30 @@ In \emph{generic mode}, where marked content command shouldn't be nested, it wor In \emph{lua mode} it tests if the mc-attribute is currently unset. You can't test the nesting level with it! + + +\begin{docCommand}{tag_mc_reset_box:N}{\marg{box}}\end{docCommand} + +In lua mode this command will process the given box and reset all mc related attributes in the box to the current values. +This means that if the box is used all its contents will be a kid of the current structure. +This should (probably) only be used on boxes which don't contain tagging commands. +See below section~\ref{sec:savebox} for more details. + + \subsubsection{Retrieving data} \label{sec:retrieve} With more elaborate tagging the need arise to retrieve and store current data. \begin{docCommand}{tag_get:n}{\marg{key word}}\end{docCommand} -This (expandable) command give back some variables. Currently the working key words are \verb+mc_tag+, \verb+struct_tag+, -\verb+struct_id+ and \verb+struct_num+. The ID is a string and returned including parentheses. -\verb+struct_num+ returns a number and works also if only \pkg{tagpdf-base} has been loaded, but then doesn't give the same output: if \pkg{tagpdf} is loaded and tagging is active, \verb+struct_num+ gives the number of currently -active structure, so it reverts to the parent number if a structure is closed. If only \pkg{tagpdf-base} is loaded -nesting of structure is not tracked and so the command gives back the number of the last structure that has been created. +This (expandable) command give back some variables. Currently the working key words are +\begin{itemize} +\item \verb+mc_tag+: the tag name of the current mc-chunk +\item \verb+struct_tag+: the tag name of the current structure +\item \verb+struct_id+: The ID of the current structure. This is a string and is returned including parentheses. +\item \verb+struct_num+: This returns a number and works also if only \pkg{tagpdf-base} has been loaded, but then doesn't give the same output: if \pkg{tagpdf} is loaded and tagging is active, \verb+struct_num+ gives the number of currently active structure, so it reverts to the parent number if a structure is closed. If only \pkg{tagpdf-base} is loaded nesting of structure is not tracked and so the command gives back the number of the last structure that has been created. +\item \verb+struct_counter+: This returns a number and works also if only \pkg{tagpdf-base} has been loaded. It gives back the state of the absolute structure counter and so number of the last structure that has been created. This can be used to detect if in a piece of code there are structure commands. Be aware that this is a \LaTeX{} counter and so reset in some places. +\item \verb+mc_counter+: This returns a number and works also if only \pkg{tagpdf-base} has been loaded. It gives back the state of the absolute mc-counter and so number of the last mc-chunk that has been created. This can be used to detect if in a piece of code there are mc-commands. +\end{itemize} \subsubsection{Luamode: global or not global -- that is the question}\label{sec:global-local} @@ -2209,7 +2220,7 @@ This is in pdftex a primitive. It inserts the dummy space glyph. \pkg{tagpdf} de necessary to surround destinations with a dummy structure (a Span or an Artifact) to get the right page number. - +\section{Storing and reusing boxes}\label{sec:savebox} \section{Accessibility is not only tagging} diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx index 5b6acbf34ff..a9c4763358b 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx @@ -47,13 +47,13 @@ % }^^A % } % -% \date{Version 0.98h, released 2023-06-06} +% \date{Version 0.98i, released 2023-06-14} % \maketitle % \begin{implementation} % \begin{macrocode} %<@@=tag> %<*luatex> -\ProvidesExplFile {tagpdf-luatex.def} {2023-06-06} {0.98h} +\ProvidesExplFile {tagpdf-luatex.def} {2023-06-14} {0.98i} {tagpdf~driver~for~luatex} % \end{macrocode} % \section{Loading the lua} @@ -158,8 +158,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" } @@ -890,6 +890,25 @@ end % \end{macrocode} % \end{macro} % +% \begin{macro}{ltx.@@.func.update_mc_attributes} +% This updates the mc-attributes of a box. It should only be used on boxes +% which don't contain structure elements. +% The arguments are a box, the mc-num and the type (as a number) +% \begin{macrocode} +local function @@_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 + @@_update_mc_attributes (n.list,mcnum,type) + end + end + return head +end +ltx.@@.func.update_mc_attributes = @@_update_mc_attributes +% \end{macrocode} +% \end{macro} +% % \begin{macro}{ltx.@@.func.mark_page_elements} % This is the main traversing function. See the lua comment for more details. % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx index 39b786ee418..81fd2c8d954 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx @@ -48,7 +48,7 @@ % }^^A % } % -% \date{Version 0.98h, released 2023-06-06} +% \date{Version 0.98i, released 2023-06-14} % \maketitle % \begin{documentation} % \section{Commands} @@ -66,6 +66,18 @@ % are |mc_tag|, |struct_tag|, |struct_id| and |struct_num|. % \end{function} % +% \begin{function}[pTF,EXP]{\tag_if_box_tagged:N} +% \begin{syntax} +% \cs{tag_if_box_tagged:N}\Arg{box} +% \end{syntax} +% This tests if a box contains tagging commands. +% It relies currently on that the code that saved the box correctly set +% the command \verb+\l_tag_box_\int_use:N #1_tl+ to a positive value. +% The LaTeX commands will do that automatically +% at some time but it is in the responsability of the user to +% ensure that when using low-level code. +% If the internal command doesn't exist the box is assumed to be tagged. +% \end{function} % \section{Description of log messages} % \subsection{\cs{ShowTagging} command} % \begin{tabular}{lll} @@ -300,7 +312,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-checks-code} {2023-06-06} {0.98h} +\ProvidesExplPackage {tagpdf-checks-code} {2023-06-14} {0.98i} {part of tagpdf - code related to checks, conditionals, debugging and messages} %</header> % \end{macrocode} @@ -529,7 +541,7 @@ % % \section{User conditionals} % \begin{macro}[pTF]{\tag_if_active:} -% This is a test it tagging is active. This allows packages +% This tests if tagging is active. This allows packages % to add conditional code. % The test is true if all booleans, the global and the two local one are true. % @@ -556,6 +568,34 @@ \prg_return_false: } } +%</package> +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[pTF]{\tag_if_box_tagged:N} +% This tests if a box contains tagging commands. +% It relies on that the code that saved the box correctly set +% \verb+\l_tag_box_<box number>_tl+ to a positive value. +% The LaTeX commands will do that automatically +% at some time but it is in the responsability of the user to +% ensure that when using low-level code. +% If the internal command doesn't exist the box is assumed to be tagged. +% \begin{macrocode} +%<*base> +\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?? + } + } +%</base> % \end{macrocode} % \end{macro} % @@ -566,6 +606,7 @@ % \begin{macro}[TF]{\@@_check_if_active_mc:,\@@_check_if_active_struct:} % This checks if mc are active. % \begin{macrocode} +%<*package> \prg_new_conditional:Npnn \@@_check_if_active_mc: {T,F,TF} { \bool_lazy_and:nnTF { \g_@@_active_mc_bool } { \l_@@_active_mc_bool } diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx index e66712cc7f3..57dc3d356e7 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx @@ -47,7 +47,7 @@ % }^^A % } % -% \date{Version 0.98h, released 2023-06-06} +% \date{Version 0.98i, released 2023-06-14} % \maketitle % \begin{documentation} % This files contains a various data files which are read in @@ -60,7 +60,7 @@ % It lists the new tag, the rolemap and the namespace of the rolemap. % \begin{macrocode} %<*ns-latex> -%% \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, @@ -92,7 +92,7 @@ text, P, pdf2, % It is bound to change % \begin{macrocode} %<*ns-latex-book> -%% \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, @@ -108,7 +108,7 @@ subparagraph, H6,pdf2, % It is bound to change a lot! % \begin{macrocode} %<*ns-latex-inline> -%% \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, @@ -122,7 +122,7 @@ P, Span, pdf2, % \section{The pdf namespace data} % \begin{macrocode} %<*ns-pdf> -%% \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, @@ -190,7 +190,7 @@ Strong,Span,pdf,I, % \section{The pdf 2.0 namespace data} % \begin{macrocode} %<*ns-pdf2> -%% \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, @@ -246,7 +246,7 @@ Strong,Strong,pdf2,I, % \section{The mathml namespace data} % \begin{macrocode} %<*ns-mathml> -%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-06-06} {0.98h} +%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-06-14} {0.98i} % {mathml}{http://www.w3.org/1998/Math/MathML}{} abs,abs,mathml, and,and,mathml, @@ -481,7 +481,7 @@ xor,xor,mathml, % This will perhaps change in future. % \begin{macrocode} %<*parent-child> -%% \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,∅,∅ @@ -536,7 +536,7 @@ MC,both,---,∅,∅,∅,∅,∅,∅,0..n,‡,∅,∅,∅,0..n,0..n,0..n,0..n,0.. % This will perhaps change in future. % \begin{macrocode} %<*parent-child-2> -%% \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/source/latex/tagpdf/tagpdf-mc-generic.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx index a82cb685244..97732c57bf7 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Version 0.98h, released 2023-06-06} +% \date{Version 0.98i, released 2023-06-14} % \maketitle % \begin{documentation} % \end{documentation} @@ -55,11 +55,11 @@ % \begin{macrocode} %<@@=tag> %<*generic> -\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} %</generic> %<*debug> -\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} %</debug> % \end{macrocode} @@ -657,6 +657,7 @@ % \end{macrocode} % \end{macro} % +% % \begin{macro}{\tag_mc_begin:n,\tag_mc_end:} % These are the core public commands to open and close an mc. % They don't need to be in the same group or grouping level, @@ -664,7 +665,7 @@ % the state is passed to the end command through a global var and % a global boolean. % \begin{macrocode} -%<base>\cs_new_protected:Npn \tag_mc_begin:n #1 { \@@_whatsits: } +%<base>\cs_new_protected:Npn \tag_mc_begin:n #1 { \@@_whatsits: \int_gincr:N \c@g_@@_MCID_abs_int } %<base>\cs_new_protected:Nn \tag_mc_end:{ \@@_whatsits: } %<*generic|debug> %<*generic> 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 cf70950a28d..261a3ff73f3 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.98h, released 2023-06-06} +% \date{Version 0.98i, released 2023-06-14} % \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} {2023-06-06} {0.98h} +\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-06-14} {0.98i} {tagpdf - mc code only for the luamode } %</luamode> % \end{macrocode} @@ -375,6 +375,22 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\tag_mc_reset_box:N} +% This allows to reset the mc-attributes in box. On base and generic mode it should do +% nothing. +% \begin{macrocode} +\cs_set_protected:Npn \tag_mc_reset_box:N #1 + { + \lua_now:e + { + local~type=tex.getattribute(luatexbase.attributes.g_@@_mc_type_attr) + local~mc=tex.getattribute(luatexbase.attributes.g_@@_mc_cnt_attr) + ltx.__tag.func.update_mc_attributes(tex.getbox(\int_use:N #1),mc,type) + } + } +% \end{macrocode} +% \end{macro} +% % \begin{macro}{ \@@_get_data_mc_tag: } % The command to retrieve the current mc tag. % TODO: Perhaps this should use the attribute instead. diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx index 2096e11d301..9c9d4ec7353 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Version 0.98h, released 2023-06-06} +% \date{Version 0.98i, released 2023-06-14} % \maketitle % \begin{documentation} % \section{Public Commands} @@ -111,6 +111,13 @@ % Determines if a mc-chunk is open. % \end{function} +% \begin{function}[ EXP,added=2023-06-11]{\tag_mc_reset_box:N} +% \begin{syntax} +% \cs{tag_mc_reset:N} \Arg{box} +% \end{syntax} +% This resets in lua mode the mc attributes to the one currently in use. +% It does nothing in generic mode. +% \end{function} % % \section{Public keys} % The following keys can be used with |\tag_mc_begin:n|, |\tagmcbegin|, @@ -174,7 +181,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-06-06} {0.98h} +\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-06-14} {0.98i} {part of tagpdf - code related to marking chunks - code shared by generic and luamode } %</header> @@ -192,18 +199,34 @@ % % \begin{variable}{g_@@_MCID_abs_int} % \begin{macrocode} -%<*shared> +%<*base> \newcounter { g_@@_MCID_abs_int } % \end{macrocode} % \end{variable} +% \begin{macro}{\@@_get_data_mc_counter:} +% This command allows \cs{tag_get:n} to get the current +% state of the mc counter with the keyword |mc_counter|. +% By comparing the numbers it can be used to check the number of +% structure commands in a piece of code. +% \begin{macrocode} +\cs_new:Npn \@@_get_data_mc_counter: + { + \int_use:N \c@g_@@_MCID_abs_int + } +%</base> +% \end{macrocode} +% \end{macro} % -% \begin{macro}{\_@@_get_mc_abs_cnt:} +% +% \begin{macro}{\@@_get_mc_abs_cnt:} % A (expandable) function to get the current value of the cnt. +% TODO: duplicate of the previous one, this should be cleaned up. % \begin{macrocode} -\cs_new:Npn \_@@_get_mc_abs_cnt: { \int_use:N \c@g_@@_MCID_abs_int } +%<*shared> +\cs_new:Npn \@@_get_mc_abs_cnt: { \int_use:N \c@g_@@_MCID_abs_int } % \end{macrocode} % \end{macro} -% +% % \begin{variable}{\g_@@_MCID_tmp_bypage_int} % The following hold the temporary by page number assigned to a mc. % It must be defined in the shared code to avoid problems with labels. @@ -362,7 +385,13 @@ %</shared> % \end{macrocode} % \end{macro} -% +% \begin{macro}{\tag_mc_reset_box:N} +% This allows to reset the mc-attributes in box. On base and generic mode it should do +% nothing. +% \begin{macrocode} +%<base>\cs_new_protected:Npn \tag_mc_reset_box:N #1 {} +% \end{macrocode} +% \end{macro} % \begin{macro}{\tag_mc_end_push:, \tag_mc_begin_pop:n} % % \begin{macrocode} @@ -410,7 +439,7 @@ } % \end{macrocode} % \end{macro} -% +% % \subsection{Keys} % This are the keys where the code can be shared between the modes. % diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx index 5876c4ba328..fcfd5f75344 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Version 0.98h, released 2023-06-06} +% \date{Version 0.98i, released 2023-06-14} % \maketitle % \begin{documentation} % \begin{function} @@ -98,7 +98,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-roles-code} {2023-06-06} {0.98h} +\ProvidesExplPackage {tagpdf-roles-code} {2023-06-14} {0.98i} {part of tagpdf - code related to roles and structure names} %</header> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx index 6e751618ee1..e6b5e025139 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Version 0.98h, released 2023-06-06} +% \date{Version 0.98i, released 2023-06-14} % \maketitle % \begin{documentation} % \begin{function}{interwordspace (setup-key)} @@ -64,7 +64,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-space-code} {2023-06-06} {0.98h} +\ProvidesExplPackage {tagpdf-space-code} {2023-06-14} {0.98i} {part of tagpdf - code related to real space chars} %</header> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx index 542671bd152..d2bb7a2b08a 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Version 0.98h, released 2023-06-06} +% \date{Version 0.98i, released 2023-06-14} % \maketitle % \begin{documentation} % \section{Public Commands} @@ -247,7 +247,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-struct-code} {2023-06-06} {0.98h} +\ProvidesExplPackage {tagpdf-struct-code} {2023-06-14} {0.98i} {part of tagpdf - code related to storing structure} %</header> % \end{macrocode} @@ -978,6 +978,20 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\@@_get_data_struct_counter:} +% this command allows \cs{tag_get:n} to get the current +% state of the structure counter with the keyword |struct_counter|. +% By comparing the numbers it can be used to check the number of +% structure commands in a piece of code. +% \begin{macrocode} +%<*base> +\cs_new:Npn \@@_get_data_struct_counter: + { + \int_use:N \c@g_@@_struct_abs_int + } +%</base> +% \end{macrocode} +% \end{macro} % \section{Keys} % This are the keys for the user commands. % we store the tag in a variable. But we should be careful, it is only reliable @@ -1726,7 +1740,7 @@ % \section{Attributes and attribute classes} % \begin{macrocode} %<*header> -\ProvidesExplPackage {tagpdf-attr-code} {2023-06-06} {0.98h} +\ProvidesExplPackage {tagpdf-attr-code} {2023-06-14} {0.98i} {part of tagpdf - code related to attributes and attribute classes} %</header> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx index 61f6db544ae..393a7c359fc 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx @@ -47,13 +47,13 @@ % }^^A % } % -% \date{Version 0.98h, released 2023-06-06} +% \date{Version 0.98i, released 2023-06-14} % \maketitle % \begin{implementation} % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-tree-code} {2023-06-06} {0.98h} +\ProvidesExplPackage {tagpdf-tree-code} {2023-06-14} {0.98i} {part of tagpdf - code related to writing trees and dictionaries to the pdf} %</header> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx index 8ebd1813dda..be082172ef5 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Version 0.98h, released 2023-06-06} +% \date{Version 0.98i, released 2023-06-14} % \maketitle % \begin{documentation} % \section{Setup commands} @@ -250,7 +250,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-user} {2023-06-06} {0.98h} +\ProvidesExplPackage {tagpdf-user} {2023-06-14} {0.98i} {tagpdf - user commands} %</header> % \end{macrocode} @@ -517,6 +517,16 @@ % or do a first step to apply tagpdf commands to document commands. % This part should be regularly revisited to check if the code should go to a % better place or can be improved. +% +% \subsection{new ref system} +% Until l3ref is in the kernel, we provide a definition for \cs{newlabeldata} in +% the aux-file to avoid errors if a document switches between tagging and non-tagging. +% \begin{macrocode} +%</package> +%<base>\AddToHook{begindocument} +%<base> {\immediate\write\@mainaux{\string\providecommand\string\newlabeldata[2]{}}} +%<*package> +% \end{macrocode} % \subsection{Document structure} % \begin{macro}{\g_@@_root_default_tl,activate (setup-key)} % \begin{macrocode} @@ -840,9 +850,11 @@ \bool_gset_false:N \g_@@_in_mc_bool } \tag_mc_begin:n {artifact} + \tag_stop:n{headfoot} } \cs_new_protected:Npn \@@_exclude_headfoot_end: { + \tag_start:n{headfoot} \tag_mc_end: \bool_if:NTF \g_@@_mode_lua_bool { @@ -869,10 +881,12 @@ } \tag_struct_begin:n{tag=Artifact,attribute-class=@@/attr/#1} \tag_mc_begin:n {artifact=#1} + \tag_stop:n{headfoot} } \cs_new_protected:Npn \@@_exclude_struct_headfoot_end: { + \tag_start:n{headfoot} \tag_mc_end: \tag_struct_end: \bool_if:NTF \g_@@_mode_lua_bool diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx index b4c9e55090c..b5898d0ed43 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx +++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx @@ -92,7 +92,7 @@ % \begin{macrocode} %<@@=tag> %<*package> -\ProvidesExplPackage {tagpdf} {2023-06-06} {0.98h} +\ProvidesExplPackage {tagpdf} {2023-06-14} {0.98i} { A package to experiment with pdf tagging } \bool_if:nF @@ -118,7 +118,7 @@ % \end{macrocode} %<*debug> % \begin{macrocode} -\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} % \end{macrocode} @@ -141,7 +141,7 @@ % we define a base package with dummy functions % \begin{macrocode} %<*base> -\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 } %</base> % \end{macrocode} 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} |