diff options
author | Karl Berry <karl@freefriends.org> | 2018-07-05 21:45:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-07-05 21:45:46 +0000 |
commit | eef245751e7d3cec3ce8db3dda9f93818e1a7118 (patch) | |
tree | 995036273168036838cec88e6ff67d05b7942319 /Master/texmf-dist/tex/latex/tagpdf/tagpdf-user.sty | |
parent | f8fda7824b2b8cdebc2f57a8dc1aefdec29b14e9 (diff) |
tagpdf (5jul18)
git-svn-id: svn://tug.org/texlive/trunk@48146 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tagpdf/tagpdf-user.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/tagpdf/tagpdf-user.sty | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-user.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-user.sty new file mode 100644 index 00000000000..084c0f36030 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-user.sty @@ -0,0 +1,88 @@ +\ProvidesExplFile {tagpdf-user.sty} {2018/07/04} {0.1} + {tagpdf - user commands} + +\NewDocumentCommand \tagpdfsetup { m } + { + \keys_set:nn { tagpdf-setup } { #1 } + } + +\cs_set_eq:NN\tagpdfifluatexTF \sys_if_engine_luatex:TF +\cs_set_eq:NN\tagpdfifluatexT \sys_if_engine_luatex:T +\cs_set_eq:NN\tagpdfifpdftexT \sys_if_engine_pdftex:T + +%%%% mc related user commands +\NewDocumentCommand \tagmcifinTF { m m } + { + \_uftag_mc_if_in:TF { #1 } { #2 } + } + +\NewDocumentCommand \tagmcbegin { m } + { + \uftag_mc_begin:n {#1}\ignorespaces + } + + +\NewDocumentCommand \tagmcend { } + { + \unskip\uftag_mc_end: + } + +\NewDocumentCommand \tagmcuse { m } + { + \uftag_mc_use:n {#1} + } + + +%%%% structure related commands + +\NewDocumentCommand \tagstructbegin { m } + { + \uftag_struct_begin:n {#1} + } + +\NewDocumentCommand \tagstructend { } + { + \uftag_struct_end: + } + +\NewDocumentCommand \tagstructuse { m } + { + \uftag_struct_use:n {#1} + } + + + +%%%% debug/show commands +\NewDocumentCommand\showtagpdfmcdata { O {\__uftag_get_mc_abs_cnt:} } +{ + \bool_if:NT \g__uftag_mode_lua_bool + { + \sys_if_engine_luatex:T + { + \directlua{uftag.trace.show_all_mc_data(#1)} + } + } +} + +\NewDocumentCommand\showtagpdfattributes { } +{ + \bool_if:NT \g__uftag_mode_lua_bool + { + \sys_if_engine_luatex:T + { + \directlua + { + uftag.trace.log( + "showtagpdfattributes: MC=>abscnt=\__uftag_get_mc_abs_cnt:=>attr=\the\g__uftag_mc_cnt_attr=>tag=" .. + tostring(uftag.func.get_tag_from (\the\g__uftag_mc_type_attr)) .. + "=\the\g__uftag_mc_type_attr",0 + ) + } + \ignorespaces + } + } +} + + + +\endinput |