Debian Codegraph @

texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty

raw
1 %%
2 %% This is file `tagpdf-debug-generic.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% tagpdf-mc-generic.dtx (with options: `debug')
8 %%
9 %% Copyright (C) 2019-2025 Ulrike Fischer
10 %%
11 %% It may be distributed and/or modified under the conditions of
12 %% the LaTeX Project Public License (LPPL), either version 1.3c of
13 %% this license or (at your option) any later version. The latest
14 %% version of this license is in the file:
15 %%
16 %% https://www.latex-project.org/lppl.txt
17 %%
18 %% This file is part of the "tagpdf bundle" (The Work in LPPL)
19 %% and all files in that bundle must be distributed together.
20 %%
21 %% File: tagpdf-mc-generic.dtx
22 \ProvidesExplPackage {tagpdf-debug-generic} {2026-05-17} {1.0c}
23 {part of tagpdf - debugging code related to marking chunks - generic mode}
24 \cs_set_protected:Npn \tag_mc_begin:n #1 %#1 keyval
25 {
26 \__tag_check_if_active_mc:TF
27 {
28 \__tag_debug_mc_begin_insert:n { #1 }
29 \group_begin: %hm
30 \__tag_check_mc_if_nested:
31 \bool_gset_true:N \g__tag_in_mc_bool
32 \tl_set_eq:NN \l__tag_mc_key_tag_tl \g__tag_struct_tag_tl
33 \tl_gset_eq:NN\g__tag_mc_key_tag_tl \g__tag_struct_tag_tl
34 \tl_if_empty:NTF\l__tag_mc_lang_tl
35 {
36 \keys_set:nn { __tag / mc }{ #1 }
37 }
38 {
39 \keys_set:nn { __tag / mc }{ lang=\l__tag_mc_lang_tl, #1 }
40 }
41 \bool_if:NTF \l__tag_mc_artifact_bool
42 { %handle artifact
43 \__tag_mc_handle_artifact:N \l__tag_mc_artifact_type_tl
44 \exp_args:No
45 \__tag_mc_artifact_begin_marks:n { \l__tag_mc_artifact_type_tl }
46 }
47 { %handle mcid type
48 \__tag_check_mc_tag:N \l__tag_mc_key_tag_tl
49 \__tag_mc_handle_mcid:oo
50 { \l__tag_mc_key_tag_tl }
51 { \l__tag_mc_key_properties_tl }
52 \__tag_mc_begin_marks:oo{\l__tag_mc_key_tag_tl}{\l__tag_mc_key_label_tl}
53 \tl_if_empty:NF {\l__tag_mc_key_label_tl}
54 {
55 \__tag_mc_handle_mc_label:e { \l__tag_mc_key_label_tl }
56 }
57 \bool_if:NF \l__tag_mc_key_stash_bool
58 {
59 \socket_use:nn{tag/check/parent-child}
60 {
61 \__tag_mc_check_parent_child:o
62 { \g__tag_struct_stack_current_tl }
63 }
64 \__tag_mc_handle_stash:e { \int_use:N \c@g__tag_MCID_abs_int }
65
66 }
67 }
68 \group_end:
69 }
70 {
71 \__tag_debug_mc_begin_ignore:n { #1 }
72 }
73 }
74 \cs_set_protected:Nn \tag_mc_end:
75 {
76 \__tag_check_if_active_mc:TF
77 {
78 \__tag_debug_mc_end_insert:
79 \__tag_check_mc_if_open:
80 \bool_gset_false:N \g__tag_in_mc_bool
81 \tl_gset:Nn \g__tag_mc_key_tag_tl { }
82 \__tag_mc_emc:
83 \__tag_mc_end_marks:
84 }
85 {
86 \__tag_debug_mc_end_ignore:
87 }
88 }
89
90 %%
91 %%
92 %% End of file `tagpdf-debug-generic.sty'.