Skip to content

Commit

Permalink
switch to etype
Browse files Browse the repository at this point in the history
  • Loading branch information
u-fischer committed Nov 5, 2023
1 parent cad14f9 commit 7a1cc37
Show file tree
Hide file tree
Showing 10 changed files with 137 additions and 137 deletions.
22 changes: 11 additions & 11 deletions tagpdf-checks.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@
{
\prop_if_in:NoF \g_@@_role_tags_NS_prop {#1}
{
\msg_warning:nnx { tag } {role-unknown-tag} {#1}
\msg_warning:nne { tag } {role-unknown-tag} {#1}
}
}
% \end{macrocode}
Expand All @@ -698,7 +698,7 @@
}
}

\cs_generate_variant:Nn \@@_check_info_closing_struct:n {o,x}
\cs_generate_variant:Nn \@@_check_info_closing_struct:n {o,e}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_check_no_open_struct:}
Expand Down Expand Up @@ -785,15 +785,15 @@
{
\@@_mc_if_in:T
{
\msg_warning:nnx { tag } {mc-nested} { \@@_get_mc_abs_cnt: }
\msg_warning:nne { tag } {mc-nested} { \@@_get_mc_abs_cnt: }
}
}

\cs_new_protected:Npn \@@_check_mc_if_open:
{
\@@_mc_if_in:F
{
\msg_warning:nnx { tag } {mc-not-open} { \@@_get_mc_abs_cnt: }
\msg_warning:nne { tag } {mc-not-open} { \@@_get_mc_abs_cnt: }
}
}
% \end{macrocode}
Expand All @@ -807,11 +807,11 @@
{
\int_compare:nNnT
{ \l_@@_loglevel_int } ={ 2 }
{ \msg_info:nnx {tag}{mc-#1}{#2} }
{ \msg_info:nne {tag}{mc-#1}{#2} }
\int_compare:nNnT
{ \l_@@_loglevel_int } > { 2 }
{
\msg_info:nnx {tag}{mc-#1}{#2}
\msg_info:nne {tag}{mc-#1}{#2}
\seq_log:N \g_@@_mc_stack_seq
}
}
Expand All @@ -824,11 +824,11 @@
{
\tl_if_empty:NT #1
{
\msg_error:nnx { tag } {mc-tag-missing} { \@@_get_mc_abs_cnt: }
\msg_error:nne { tag } {mc-tag-missing} { \@@_get_mc_abs_cnt: }
}
\prop_if_in:NoF \g_@@_role_tags_NS_prop {#1}
{
\msg_warning:nnx { tag } {role-unknown-tag} {#1}
\msg_warning:nne { tag } {role-unknown-tag} {#1}
}
}
% \end{macrocode}
Expand Down Expand Up @@ -882,7 +882,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_check_show_MCID_by_page:
{
\tl_set:Nx \l_@@_tmpa_tl
\tl_set:Ne \l_@@_tmpa_tl
{
\@@_property_ref_lastpage:nn
{abspage}
Expand Down Expand Up @@ -913,7 +913,7 @@
##1
}
{
\seq_gput_right:Nx \l_tmpa_seq
\seq_gput_right:Ne \l_tmpa_seq
{
Page##1-####1-
\@@_property_ref:enn
Expand Down Expand Up @@ -1081,7 +1081,7 @@
{#1}
{\exp_last_unbraced:NV\use_i:nn \l_@@_tmpa_tl}
{
\msg_warning:nnxx { tag/debug }{ struct-end-wrong }
\msg_warning:nnee { tag/debug }{ struct-end-wrong }
{#1}
{\exp_last_unbraced:NV\use_i:nn \l_@@_tmpa_tl}
}
Expand Down
50 changes: 25 additions & 25 deletions tagpdf-mc-generic.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,10 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_mc_get_marks:
{
\exp_args:NNx
\exp_args:NNe
\seq_set_from_clist:Nn \l_@@_mc_firstmarks_seq
{ \tex_firstmarks:D \g_@@_mc_marks }
\exp_args:NNx
\exp_args:NNe
\seq_set_from_clist:Nn \l_@@_mc_botmarks_seq
{ \tex_botmarks:D \g_@@_mc_marks }
}
Expand All @@ -235,16 +235,16 @@
%\prop_show:N \g_@@_struct_cont_mc_prop
\prop_get:NnNTF \g_@@_struct_cont_mc_prop {#1} \l_@@_tmpa_tl
{
\prop_gput:Nnx \g_@@_struct_cont_mc_prop {#1}{ \l_@@_tmpa_tl \@@_struct_mcid_dict:n {#2}}
\prop_gput:Nne \g_@@_struct_cont_mc_prop {#1}{ \l_@@_tmpa_tl \@@_struct_mcid_dict:n {#2}}
}
{
\prop_gput:Nnx \g_@@_struct_cont_mc_prop {#1}{ \@@_struct_mcid_dict:n {#2}}
\prop_gput:Nne \g_@@_struct_cont_mc_prop {#1}{ \@@_struct_mcid_dict:n {#2}}
}
\prop_gput:Nxx \g_@@_mc_parenttree_prop
\prop_gput:Nee \g_@@_mc_parenttree_prop
{#2}
{#3}
}
\cs_generate_variant:Nn \@@_mc_store:nnn {xxx}
\cs_generate_variant:Nn \@@_mc_store:nnn {eee}
% \end{macrocode}
% \end{macro}
%
Expand Down Expand Up @@ -272,11 +272,11 @@
%test if artifact
\int_compare:nNnTF { \seq_item:cn { g_@@_mc_#1_marks_seq } {3} } = {-1}
{
\tl_set:Nx \l_@@_tmpa_tl { \seq_item:cn { g_@@_mc_#1_marks_seq } {4} }
\tl_set:Ne \l_@@_tmpa_tl { \seq_item:cn { g_@@_mc_#1_marks_seq } {4} }
\@@_mc_handle_artifact:N \l_@@_tmpa_tl
}
{
\exp_args:Nx
\exp_args:Ne
\@@_mc_bdc_mcid:n
{
\seq_item:cn { g_@@_mc_#1_marks_seq } {4}
Expand All @@ -288,7 +288,7 @@
{}
{
%store
\@@_mc_store:xxx
\@@_mc_store:eee
{
\seq_item:cn { g_@@_mc_#1_marks_seq } {2}
}
Expand Down Expand Up @@ -422,7 +422,7 @@
% bottom split marks set up. We use this to set up
% \cs{l_@@_mc_firstmarks_seq}
% \begin{macrocode}
\exp_args:NNx
\exp_args:NNe
\seq_set_from_clist:Nn \l_@@_mc_firstmarks_seq
{ \tex_splitfirstmarks:D \g_@@_mc_marks }
% \end{macrocode}
Expand Down Expand Up @@ -465,7 +465,7 @@
{
Pick~ up~ new~ bot~ mark!
}
\exp_args:NNx
\exp_args:NNe
\seq_set_from_clist:Nn \l_@@_mc_botmarks_seq
{ \tex_splitbotmarks:D \g_@@_mc_marks }
}
Expand Down Expand Up @@ -569,7 +569,7 @@
\msg_warning:nn { tagpdf} { old-engine }
\@@_prop_new:N \g_@@_MCID_byabspage_prop
\int_new:N \g_@@_MCID_tmp_bypage_int
\cs_generate_variant:Nn \@@_mc_bdc:nn {nx}
\cs_generate_variant:Nn \@@_mc_bdc:nn {ne}
% \end{macrocode}
% revert the attribute:
% \begin{macrocode}
Expand All @@ -578,7 +578,7 @@
\cs_new_protected:Npn \@@_mc_bdc_mcid:nn #1 #2
{
\int_gincr:N \c@g_@@_MCID_abs_int
\tl_set:Nx \l_@@_mc_ref_abspage_tl
\tl_set:Ne \l_@@_mc_ref_abspage_tl
{
\@@_property_ref:enn %3 args
{
Expand All @@ -596,15 +596,15 @@
{
%key already present, use value for MCID and add 1 for the next
\int_gset:Nn \g_@@_MCID_tmp_bypage_int { \l_@@_mc_tmpa_tl }
\@@_prop_gput:Nxx
\@@_prop_gput:Nee
\g_@@_MCID_byabspage_prop
{ \l_@@_mc_ref_abspage_tl }
{ \int_eval:n {\l_@@_mc_tmpa_tl +1} }
}
{
%key not present, set MCID to 0 and insert 1
\int_gzero:N \g_@@_MCID_tmp_bypage_int
\@@_prop_gput:Nxx
\@@_prop_gput:Nee
\g_@@_MCID_byabspage_prop
{ \l_@@_mc_ref_abspage_tl }
{1}
Expand All @@ -614,7 +614,7 @@
mcid-\int_use:N \c@g_@@_MCID_abs_int
}
\c_@@_property_mc_clist
\@@_mc_bdc:nx
\@@_mc_bdc:ne
{#1}
{ /MCID~\int_eval:n { \g_@@_MCID_tmp_bypage_int }~ \exp_not:n { #2 } }
}
Expand All @@ -633,7 +633,7 @@
% \end{macrocode}
% \end{macro}

% \begin{macro}{\@@_mc_handle_stash:n,\@@_mc_handle_stash:x}
% \begin{macro}{\@@_mc_handle_stash:n,\@@_mc_handle_stash:e}
% This is the handler which puts a mc into the
% the current structure. The argument is the number of the mc.
% Beside storing the mc into the structure, it also has to record the
Expand All @@ -648,11 +648,11 @@
\@@_struct_kid_mc_gput_right:nn
{ \g_@@_struct_stack_current_tl }
{#1}
\prop_gput:Nxx \g_@@_mc_parenttree_prop
\prop_gput:Nee \g_@@_mc_parenttree_prop
{#1}
{ \g_@@_struct_stack_current_tl }
}
\cs_generate_variant:Nn \@@_mc_handle_stash:n { x }
\cs_generate_variant:Nn \@@_mc_handle_stash:n { e }
% \end{macrocode}
% \end{macro}

Expand Down Expand Up @@ -761,7 +761,7 @@
{ g_@@_struct_ \g_@@_struct_stack_current_tl _prop}
{S}
\l_@@_tmpa_tl
\msg_warning:nnxxx
\msg_warning:nneee
{ tag }
{role-parent-child}
{ \l_@@_get_parent_tmpa_tl/\l_@@_get_parent_tmpb_tl }
Expand All @@ -770,7 +770,7 @@
(struct~\g_@@_struct_stack_current_tl,~\l_@@_tmpa_tl)
}
}
\@@_mc_handle_stash:x { \int_use:N \c@g_@@_MCID_abs_int }
\@@_mc_handle_stash:e { \int_use:N \c@g_@@_MCID_abs_int }
}
}
\group_end:
Expand Down Expand Up @@ -830,12 +830,12 @@
{
tag .code:n = % the name (H,P,Span) etc
{
\tl_set:Nx \l_@@_mc_key_tag_tl { #1 }
\tl_gset:Nx \g_@@_mc_key_tag_tl { #1 }
\tl_set:Ne \l_@@_mc_key_tag_tl { #1 }
\tl_gset:Ne \g_@@_mc_key_tag_tl { #1 }
},
raw .code:n =
{
\tl_put_right:Nx \l_@@_mc_key_properties_tl { #1 }
\tl_put_right:Ne \l_@@_mc_key_properties_tl { #1 }
},
alt .code:n = % Alt property
{
Expand Down Expand Up @@ -864,7 +864,7 @@
label .tl_set:N = \l_@@_mc_key_label_tl,
artifact .code:n =
{
\exp_args:Nnx
\exp_args:Nne
\keys_set:nn
{ @@ / mc }
{ __artifact-bool, __artifact-type=#1 }
Expand Down
22 changes: 11 additions & 11 deletions tagpdf-mc-luacode.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
\cs_new:Nn \@@_mc_lua_set_mc_type_attr:n % #1 is a tag name
{
%TODO ltx.@@.func.get_num_from("#1") seems not to return a suitable number??
\tl_set:Nx\l_@@_tmpa_tl{\lua_now:e{ltx.@@.func.output_num_from ("#1")} }
\tl_set:Ne\l_@@_tmpa_tl{\lua_now:e{ltx.@@.func.output_num_from ("#1")} }
\lua_now:e
{
tex.setattribute
Expand Down Expand Up @@ -261,7 +261,7 @@
% \end{macrocode}
% \end{macro}
%
%\begin{macro}{\@@_mc_handle_stash:n,\@@_mc_handle_stash:x}
%\begin{macro}{\@@_mc_handle_stash:n,\@@_mc_handle_stash:e}
% This is the lua variant for the command to
% put an mcid absolute number in the current structure.
% \begin{macrocode}
Expand Down Expand Up @@ -290,14 +290,14 @@
\g_@@_struct_stack_current_tl,#1
)
}
\prop_gput:Nxx
\prop_gput:Nee
\g_@@_mc_parenttree_prop
{ #1 }
{ \g_@@_struct_stack_current_tl }
}
%</luamode|debug>
%<*luamode>
\cs_generate_variant:Nn \@@_mc_handle_stash:n { x }
\cs_generate_variant:Nn \@@_mc_handle_stash:n { e }
% \end{macrocode}
% \end{macro}
%
Expand Down Expand Up @@ -355,7 +355,7 @@
{ g_@@_struct_ \g_@@_struct_stack_current_tl _prop}
{S}
\l_@@_tmpa_tl
\msg_warning:nnxxx
\msg_warning:nneee
{ tag }
{role-parent-child}
{ \l_@@_get_parent_tmpa_tl/\l_@@_get_parent_tmpb_tl }
Expand All @@ -365,7 +365,7 @@
(struct~\g_@@_struct_stack_current_tl,~\l_@@_tmpa_tl)
}
}
\@@_mc_handle_stash:x { \@@_get_mc_abs_cnt: }
\@@_mc_handle_stash:e { \@@_get_mc_abs_cnt: }
}
}
\group_end:
Expand Down Expand Up @@ -432,16 +432,16 @@
{
tag .code:n = %
{
\tl_set:Nx \l_@@_mc_key_tag_tl { #1 }
\tl_gset:Nx \g_@@_mc_key_tag_tl { #1 }
\tl_set:Ne \l_@@_mc_key_tag_tl { #1 }
\tl_gset:Ne \g_@@_mc_key_tag_tl { #1 }
\lua_now:e
{
ltx.@@.func.store_mc_data(\@@_get_mc_abs_cnt:,"tag","#1")
}
},
raw .code:n =
{
\tl_put_right:Nx \l_@@_mc_key_properties_tl { #1 }
\tl_put_right:Ne \l_@@_mc_key_properties_tl { #1 }
\lua_now:e
{
ltx.@@.func.store_mc_data(\@@_get_mc_abs_cnt:,"raw","#1")
Expand Down Expand Up @@ -513,11 +513,11 @@
},
artifact .code:n =
{
\exp_args:Nnx
\exp_args:Nne
\keys_set:nn
{ @@ / mc}
{ __artifact-bool, __artifact-type=#1, tag=Artifact }
\exp_args:Nnx
\exp_args:Nne
\keys_set:nn
{ @@ / mc }
{ __artifact-store=\l_@@_mc_artifact_type_tl }
Expand Down
6 changes: 3 additions & 3 deletions tagpdf-mc-shared.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -328,15 +328,15 @@
{
\@@_check_if_active_struct:T
{
\tl_set:Nx \l_@@_tmpa_tl { \@@_property_ref:nnn{tagpdf-#1}{tagmcabs}{} }
\tl_set:Ne \l_@@_tmpa_tl { \@@_property_ref:nnn{tagpdf-#1}{tagmcabs}{} }
\tl_if_empty:NTF\l_@@_tmpa_tl
{
\msg_warning:nnn {tag} {mc-label-unknown} {#1}
}
{
\cs_if_free:cTF { g_@@_mc_label_\tl_to_str:n{#1}_used_tl }
{
\@@_mc_handle_stash:x { \l_@@_tmpa_tl }
\@@_mc_handle_stash:e { \l_@@_tmpa_tl }
\@@_mc_set_label_used:n {#1}
}
{
Expand Down Expand Up @@ -395,7 +395,7 @@
{
\@@_mc_if_in:TF
{
\seq_gpush:Nx \g_@@_mc_stack_seq { \tag_get:n {mc_tag} }
\seq_gpush:Ne \g_@@_mc_stack_seq { \tag_get:n {mc_tag} }
\@@_check_mc_pushed_popped:nn
{ pushed }
{ \tag_get:n {mc_tag} }
Expand Down
Loading

0 comments on commit 7a1cc37

Please sign in to comment.