summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty
blob: 5d96af0615c145aa3b95a2147c37c7fc81606433 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
%%
%% This is file `tagpdf-debug-generic.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% tagpdf-mc-generic.dtx  (with options: `debug')
%% 
%% Copyright (C) 2019-2022 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-generic.dtx
\ProvidesExplPackage {tagpdf-debug-generic} {2022-05-11} {0.94}
 {part of tagpdf - debugging code related to marking chunks - generic mode}
\cs_set_protected:Npn \tag_mc_begin:n #1 %#1 keyval
  {
    \__tag_check_if_active_mc:TF
      {
        \__tag_debug_mc_begin_insert:n { #1 }
        \group_begin: %hm
        \__tag_check_mc_if_nested:
        \bool_gset_true:N \g__tag_in_mc_bool
        \keys_set:nn { __tag / mc } {#1}
        \bool_if:NTF \l__tag_mc_artifact_bool
          { %handle artifact
            \__tag_mc_handle_artifact:N \l__tag_mc_artifact_type_tl
            \exp_args:NV
            \__tag_mc_artifact_begin_marks:n \l__tag_mc_artifact_type_tl
          }
          { %handle mcid type
            \__tag_check_mc_tag:N  \l__tag_mc_key_tag_tl
            \__tag_mc_handle_mcid:VV
               \l__tag_mc_key_tag_tl
               \l__tag_mc_key_properties_tl
            \__tag_mc_begin_marks:oo{\l__tag_mc_key_tag_tl}{\l__tag_mc_key_label_tl}
            \tl_if_empty:NF {\l__tag_mc_key_label_tl}
              {
                \exp_args:NV
                \__tag_mc_handle_mc_label:n \l__tag_mc_key_label_tl
              }
            \bool_if:NF \l__tag_mc_key_stash_bool
              {
                \__tag_mc_handle_stash:x { \int_use:N \c@g__tag_MCID_abs_int }
              }
          }
        \group_end:
      }
      {
        \__tag_debug_mc_begin_ignore:n { #1 }
      }
  }
\cs_set_protected:Nn \tag_mc_end:
  {
    \__tag_check_if_active_mc:TF
      {
        \__tag_debug_mc_end_insert:
        \__tag_check_mc_if_open:
        \bool_gset_false:N \g__tag_in_mc_bool
        \tl_gset:Nn  \g__tag_mc_key_tag_tl { }
        \__tag_mc_emc:
        \__tag_mc_end_marks:
      }
      {
        \__tag_debug_mc_end_ignore:
      }
  }

%% 
%%
%% End of file `tagpdf-debug-generic.sty'.