summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tagpdf/tagpdf-tree-code.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-01-05 22:41:39 +0000
committerKarl Berry <karl@freefriends.org>2019-01-05 22:41:39 +0000
commit2450bb6d5a67acf34496177de7c84bca5f0fc6aa (patch)
treeb65f39c2d1a44c13b47eb05272fa2cf14844b2fa /Master/texmf-dist/tex/latex/tagpdf/tagpdf-tree-code.sty
parent0cadd95f76694626fd0d7d21045d4a8e7f87d8be (diff)
tagpdf (5jan19)
git-svn-id: svn://tug.org/texlive/trunk@49609 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tagpdf/tagpdf-tree-code.sty')
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-tree-code.sty35
1 files changed, 34 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-tree-code.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-tree-code.sty
index d30b82a004e..b9667b43f75 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-tree-code.sty
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-tree-code.sty
@@ -1,4 +1,4 @@
-\ProvidesExplPackage {tagpdf-tree-code} {2018/08/06} {0.3}
+\ProvidesExplPackage {tagpdf-tree-code} {2019/01/04} {0.50}
{part of tagpdf - code related to writing trees and dictionaries to the pdf}
%this does the actual finishing:
@@ -123,11 +123,44 @@
}
}
+%classmap, should only be written, if values has been used
+
+\cs_new_protected:Nn \__uftag_tree_class_write_map:
+ {
+ \tl_gclear:N \g__uftag_attr_class_content_tl
+ \seq_gremove_duplicates:N \g__uftag_attr_class_used_seq
+ \seq_set_map:NNn \l_tmpa_seq \g__uftag_attr_class_used_seq
+ {
+ /##1\c_space_tl
+ \prop_item:Nn \g__uftag_attr_entries_prop
+ {##1}
+ }
+ \tl_gset:Nx \g__uftag_attr_class_content_tl
+ {
+ \seq_use:Nn \l_tmpa_seq
+ { \iow_newline: }
+ }
+ \tl_if_empty:NF \g__uftag_attr_class_content_tl
+ {
+ \__uftag_pdfreserveobjnum:N \l_tmpa_tl
+ \tl_const:Nx \c__uftag_tree_obj_classmap_tl { \l_tmpa_tl }
+ \__uftag_pdfuseobjnum:Nx \c__uftag_tree_obj_classmap_tl
+ { <<\g__uftag_attr_class_content_tl>> }
+
+ \__uftag_prop_gput:cnx
+ { g__uftag_struct_0_prop }
+ { ClassMap }
+ { \c__uftag_tree_obj_classmap_tl\c_space_tl0\c_space_tl R }
+ }
+ }
+
+
\cs_new:Nn \uftag_finish_structure:
{
\__uftag_pdfcatalog:n {^^J/MarkInfo\c_space_tl<</Marked\c_space_tl true>> }
\__uftag_tree_write_parenttree:
\__uftag_tree_write_rolemap:
+ \__uftag_tree_class_write_map:
\__uftag_tree_write_structelements:
\__uftag_tree_write_structtreeroot:
}