summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx')
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx47
1 files changed, 32 insertions, 15 deletions
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx
index 736eac4a700..0e65a4be4e3 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.98j, released 2023-07-08}
+% \date{Version 0.98k, released 2023-08-04}
% \maketitle
% \begin{documentation}
% \begin{function}
@@ -98,7 +98,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-roles-code} {2023-07-08} {0.98j}
+\ProvidesExplPackage {tagpdf-roles-code} {2023-08-04} {0.98k}
{part of tagpdf - code related to roles and structure names}
%</header>
% \end{macrocode}
@@ -580,8 +580,8 @@
% This command will process a line in the name space file.
% The first argument is the name of the name space.
% The definition differ for pdf 2.0. as we have proper name spaces there.
-% With pdf<2.0 not special name spaces shouldn't update the default role or add to the rolemap
-% again. We use a boolean here.
+% With pdf<2.0 special name spaces shouldn't update the default role or add to the rolemap
+% again, they only store the values for later uses. We use a boolean here.
% \begin{macrocode}
\bool_new:N\l_@@_role_update_bool
\bool_set_true:N \l_@@_role_update_bool
@@ -651,17 +651,19 @@
}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\@@_role_read_namespace:n}
-% This command reads the namespace file.
+%
+% \begin{macro}{\@@_role_read_namespace:nn}
+% This command reads a namespace file in the format
+% tagpdf-ns-XX.def
% \begin{macrocode}
-\cs_new_protected:Npn \@@_role_read_namespace:n #1 %name of namespace
+\cs_new_protected:Npn \@@_role_read_namespace:nn #1 #2 %name of namespace #2 name of file
{
\prop_if_exist:cF {g_@@_role_NS_#1_prop}
{ \msg_warning:nnn {tag}{namespace-unknown}{#1} }
- \file_if_exist:nTF { tagpdf-ns-#1.def}
+ \file_if_exist:nTF { tagpdf-ns-#2.def }
{
- \ior_open:Nn \g_tmpa_ior {tagpdf-ns-#1.def}
- \msg_info:nnn {tag}{read-namespace}{#1}
+ \ior_open:Nn \g_tmpa_ior {tagpdf-ns-#2.def}
+ \msg_info:nnn {tag}{read-namespace}{#2}
\ior_map_inline:Nn \g_tmpa_ior
{
\@@_role_read_namespace_line:nw {#1} ##1,,,,\q_stop
@@ -669,27 +671,42 @@
\ior_close:N\g_tmpa_ior
}
{
- \msg_warning:nnn{tag}{namespace-missing}{#1}
+ \msg_info:nnn{tag}{namespace-missing}{#2}
}
}
% \end{macrocode}
% \end{macro}
-%
-
+%
+% \begin{macro}{\@@_role_read_namespace:n}
+% This command reads the default namespace file.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_role_read_namespace:n #1 %name of namespace
+ {
+ \@@_role_read_namespace:nn {#1}{#1}
+ }
+% \end{macrocode}
+% \end{macro}
%
% \subsection{Reading the default data}
-% The order is important as we want pdf2 and latex as default.
+% The order is important as we want pdf2 and latex as default: if two
+% namespace define the same tag, the last one defines which one is used
+% if the namespace is not explicitly given.
% \begin{macrocode}
\@@_role_read_namespace:n {pdf}
\@@_role_read_namespace:n {pdf2}
\pdf_version_compare:NnF < {2.0}
{\@@_role_read_namespace:n {mathml}}
+% \end{macrocode}
+% in pdf 1.7 the following namespaces should only store
+% the settings for later use:
+% \begin{macrocode}
\bool_set_false:N\l_@@_role_update_bool
-\@@_role_read_namespace:n {latex-inline}
+\@@_role_read_namespace:n {latex-inline}
\@@_role_read_namespace:n {latex-book}
\bool_set_true:N\l_@@_role_update_bool
\@@_role_read_namespace:n {latex}
+\@@_role_read_namespace:nn {latex} {latex-lab}
\@@_role_read_namespace:n {pdf}
\@@_role_read_namespace:n {pdf2}
% \end{macrocode}