diff options
author | Karl Berry <karl@freefriends.org> | 2021-07-22 20:40:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-07-22 20:40:06 +0000 |
commit | 1533ab903c9333f75c242d2a5927036e4ce14739 (patch) | |
tree | 4ccd9360dd898abcefcc5faa1effdb18e3cb9c96 /Master/texmf-dist | |
parent | 5d6aa3bb897112068aa9d0576df5330ef881f8e3 (diff) |
pdfmanagement-testphase (22jul21)
git-svn-id: svn://tug.org/texlive/trunk@60016 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
56 files changed, 627 insertions, 227 deletions
diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/CHANGELOG.md b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/CHANGELOG.md index 40fcc015b32..d22bc201ff8 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/CHANGELOG.md +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/CHANGELOG.md @@ -4,6 +4,22 @@ first release 0.95a, 2021-02-23 will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), this project uses date-based 'snapshot' version identifiers. +## [2021-07-21] +### Added + - key `testphase` to \DeclareDocumentMetadata to load testphase packages like + tagpdf, ptagging and headings + - key `activate` to \DeclareDocumentMetadata to activate e.g. tagging. + - key `debug` with para=show, log=XX or uncompress as values. + - l3pdfxform: support for dvips + +### Changed + - a LaTeX format/L3 layer that loads l3color is now required + +### Fixed + - argument order in \hrefrun was wrong. filename should be the first argument. + - xcolor firstaid: svgnames could no longer be loaded due to changes in l3color. + + ## [2021-06-29] ### Fixed diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/README.md b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/README.md index f4676aefcd9..e521f810db0 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/README.md +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/README.md @@ -1,6 +1,6 @@ # LaTeX PDF management testphase bundle -Version: 0.95f, 2021-06-29 +Version: 0.95g, 2021-07-21 This package is used during a test phase to load the new PDF management code of LaTeX. diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/hyperref-generic.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/hyperref-generic.pdf Binary files differindex 7c6e6bbc3b5..de4dd81f098 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/hyperref-generic.pdf +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/hyperref-generic.pdf diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3backend-testphase.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3backend-testphase.pdf Binary files differindex 581ef1f4b42..452b140f99e 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3backend-testphase.pdf +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3backend-testphase.pdf diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfannot.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfannot.pdf Binary files differindex f759ec411e0..88bc60c05d8 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfannot.pdf +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfannot.pdf diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfdict.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfdict.pdf Binary files differindex 5f5f8a8b8bd..8df8e77e732 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfdict.pdf +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfdict.pdf diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-action.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-action.pdf Binary files differindex ac54f8e89c7..e1074881bc8 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-action.pdf +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-action.pdf diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-checkbox.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-checkbox.pdf Binary files differindex 232283b07ec..722ab053e62 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-checkbox.pdf +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-checkbox.pdf diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-choice.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-choice.pdf Binary files differindex efe3b54e9b8..bb9bd4816ef 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-choice.pdf +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-choice.pdf diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-pushbutton.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-pushbutton.pdf Binary files differindex ae3b69e25cd..599400bd4eb 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-pushbutton.pdf +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-pushbutton.pdf diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-radiobutton.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-radiobutton.pdf Binary files differindex fd3d40f8fc4..4543748a379 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-radiobutton.pdf +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-radiobutton.pdf diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-textfield.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-textfield.pdf Binary files differindex 25b086b773e..168a0729934 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-textfield.pdf +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-textfield.pdf diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield.pdf Binary files differindex 33d0035b06c..b9d740e9f97 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield.pdf +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield.pdf diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffile.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffile.pdf Binary files differindex d6515e96c22..faa18ada04a 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffile.pdf +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffile.pdf diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfmanagement.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfmanagement.pdf Binary files differindex 757a38b2923..f0174712175 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfmanagement.pdf +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfmanagement.pdf diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfmeta.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfmeta.pdf Binary files differindex 1c2d21346c5..030b8f17d85 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfmeta.pdf +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfmeta.pdf diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdftools.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdftools.pdf Binary files differindex aaa5a655ce4..c322f0e976d 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdftools.pdf +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdftools.pdf diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfxform.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfxform.pdf Binary files differindex 2155b75584f..7e6db80d8ab 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfxform.pdf +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfxform.pdf diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/ltdocinit.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/ltdocinit.pdf Binary files differindex 68a7c4ed101..ce3ecd37bb0 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/ltdocinit.pdf +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/ltdocinit.pdf diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-firstaid.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-firstaid.pdf Binary files differindex d59ac10fb14..0aeab401dd0 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-firstaid.pdf +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-firstaid.pdf diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-testphase.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-testphase.pdf Binary files differindex 9e3207d30fb..4928dea1fc9 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-testphase.pdf +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-testphase.pdf diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/hyperref-generic.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/hyperref-generic.dtx index 906dd58152f..e3d84d6ec63 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/hyperref-generic.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/hyperref-generic.dtx @@ -86,7 +86,7 @@ % }^^A % } % -% \date{Version 0.95f, released 2021-06-29} +% \date{Version 0.95g, released 2021-07-21} % % \maketitle % \begin{documentation} @@ -133,14 +133,13 @@ % it is recommended for most options ---with the exception of a few mentioned below in % section~\ref{sec:pkg-options}---to set them in \cs{hypersetup}, % not as package option. -% \item This driver uses \pkg{l3color} for the colors. All colors +% \item This driver uses the \pkg{l3color} module for the colors. All colors % defined with \cs{color_set:nn} or \cs{color_set:nnn} will work. % Colors defined with \pkg{xcolor} will work if they don't use one of % the special color models not supported by \pkg{l3color} as % \pkg{pdfmanagement-firstaid} contains a patch for xcolor. % If the package \pkg{color} is used it is currently recommended to define -% colors after \pkg{hyperref}. This driver uses \pkg{l3color} for the colors, -% some special color models of \pkg{xcolor} won't work. +% colors after \pkg{hyperref}. % \item Load a color package or graphicx to get the right page sizes. % \item Report problems! Only known problem can be resolved. % \end{itemize} @@ -859,11 +858,11 @@ %^^A %% drivers are loaded in line 4745 in hyperref.sty in a \Hy@AtEndOfPackage command. %^^A %%%%%%%%%%%%%%%%%%%%%%%%%%%% %^^A %% list of new internal commands -%^^A %% __hyp_link_goto_begin:nw : start command for links to internal destination +%^^A %% @@_link_goto_begin:nw : start command for links to internal destination %^^A %% replaces \find@pdflink -%^^A %% __hyp_link_goto_end: -%^^A %% __hyp_destination:n : sets an anchor, replaces \new@pdflink -%^^A %% \__hyp_PageLabels_gpush: : puts pagelabels in the catalog, used on every storing +%^^A %% @@_link_goto_end: +%^^A %% @@_destination:n : sets an anchor, replaces \new@pdflink +%^^A %% \@@_PageLabels_gpush: : puts pagelabels in the catalog, used on every storing %^^A %% PDF String (text) %^^A %% *\@@_text_pdfstring:nnN : replaces Hy@pstringdef, converts #1 to pdfstring in encoding #2 %^^A %% and stores in N @@ -882,10 +881,10 @@ %^^A %% % helps to display key list messages %^^A %% \@@_clist_display:n %^^A %% -%^^A %% \__hyp_info_generate_addons: what did this do?? +%^^A %% \@@_info_generate_addons: what did this do?? %^^A %% -%^^A %% \g__hyp_AcroForm_CoFields_prop -%^^A %% \g__hyp_AcroForm_Fields_prop +%^^A %% \g_@@_AcroForm_CoFields_prop +%^^A %% \g_@@_AcroForm_Fields_prop %^^A %% %^^A %% \g_@@_dest_pdfstartpage_tl , %^^A %% \g_@@_dest_pdfstartview_tl , @@ -922,7 +921,7 @@ %<@@=hyp> % \end{macrocode} % \begin{macrocode} -\ProvidesFile{hgeneric-testphase.def}[2021-06-29 v0.95f % +\ProvidesFile{hgeneric-testphase.def}[2021-07-21 v0.95g % generic Hyperref driver for the LaTeX PDF management testphase bundle] \RequirePackage{etoolbox} %why? @@ -1244,10 +1243,10 @@ \let\protect\@unexpandable@protect \bool_if:NTF \l_@@_href_url_encode_bool { - \tl_set:Nn \l__hyp_text_enc_uri_print_tl {utf8/URI} + \tl_set:Nn \l_@@_text_enc_uri_print_tl {utf8/URI} } { - \tl_set:Nn \l__hyp_text_enc_uri_print_tl {utf8/string} + \tl_set:Nn \l_@@_text_enc_uri_print_tl {utf8/string} } \@ifnextchar\bgroup\Hy@href{\hyper@normalise\href@}% } @@ -1274,10 +1273,10 @@ \let\protect\@unexpandable@protect \bool_if:NTF \l_@@_href_url_encode_bool { - \tl_set:Nn \l__hyp_text_enc_uri_print_tl {utf8/URI} + \tl_set:Nn \l_@@_text_enc_uri_print_tl {utf8/URI} } { - \tl_set:Nn \l__hyp_text_enc_uri_print_tl {utf8/string} + \tl_set:Nn \l_@@_text_enc_uri_print_tl {utf8/string} } \hyper@normalise\@@_href_url_aux:nn} @@ -1319,7 +1318,7 @@ \cs_new_protected:Npn \@@_href_run_aux:nn #1 #2 { - \exp_args:Nnno\hyper@linklaunch{#2}{#1}{\l_@@_href_run_parameter_tl} + \exp_args:Nnno\hyper@linklaunch{#1}{#2}{\l_@@_href_run_parameter_tl} \group_end: \hook_use:n{cmd/hrefrun/after} } @@ -1336,10 +1335,10 @@ \let\protect \@unexpandable@protect \bool_if:NTF \l_@@_href_url_encode_bool { - \tl_set:Nn \l__hyp_text_enc_uri_print_tl {utf8/URI} + \tl_set:Nn \l_@@_text_enc_uri_print_tl {utf8/URI} } { - \tl_set:Nn \l__hyp_text_enc_uri_print_tl {utf8/string} + \tl_set:Nn \l_@@_text_enc_uri_print_tl {utf8/string} } \hyper@normalise\@@_href_url_aux:n } @@ -1959,17 +1958,27 @@ % xetex version. It is not quite clear if really all three % are needed for the backends supported by this driver, but changing the hyperref % code would be difficult. +% We add a hook. This allows e.g. the tagging code +% to create also a structured destination. +% We don't use the cmd hook, as we want the same hook for both start commands. +% We make the current dest name available so that the hook code can use it. % \begin{macro} % { % \hyper@anchor, % \hyper@anchorstart, -% \hyper@anchorend +% \hyper@anchorend, +% hyp/anchor, +% \l_hyp_current_dest_name_tl % } % \begin{macrocode} +\tl_new:N\l_hyp_current_dest_name_tl +\hook_new:n{hyp/anchor} \cs_new_protected:Npn \hyper@anchor #1 { \exp_args:NnV \@@_destination:nn {#1} \l_@@_dest_pdfview_tl + \tl_set:Nn \l_hyp_current_dest_name_tl {#1} + \hook_use:n{hyp/anchor} } \cs_new_protected:Npn \hyper@anchorstart #1 @@ -1977,6 +1986,8 @@ \Hy@activeanchortrue \exp_args:NnV \@@_destination:nn {#1} \l_@@_dest_pdfview_tl + \tl_set:Nn \l_hyp_current_dest_name_tl {#1} + \hook_use:n{hyp/anchor} } \cs_new_protected:Npn \hyper@anchorend @@ -2059,7 +2070,9 @@ % \end{function} % \pkg{hyperref} adds a group with \cs{Hy@colorlink}, we move this outside the link -% so that it groups the context hook too. +% so that it groups the context hook too. We store again the destination name in the +% public tl |\l_hyp_current_dest_name_tl| so that the hook code can make use of +% it % \begin{macrocode} \cs_new_protected:Npn \hyper@link #1 #2 #3 %#1 context, #2=destination name, #3 content @@ -2068,9 +2081,10 @@ { \Hy@VerboseLinkStart{#1}{#2} \group_begin: + \tl_set:Nn \l_hyp_current_dest_name_tl {#2} \hook_use:n {hyp/link/#1} \@@_link_goto_begin:nw {#2}#3\Hy@xspace@end - \__hyp_link_goto_end: + \@@_link_goto_end: \group_end: \Hy@VerboseLinkStop } @@ -2083,6 +2097,7 @@ { \Hy@VerboseLinkStart{#1}{#2}% only for debug \group_begin: + \tl_set:Nn \l_hyp_current_dest_name_tl {#2} \hook_use:n {hyp/link/#1} \@@_link_goto_begin:nw {#2} } @@ -2186,6 +2201,11 @@ \pdfdict_put:nno {l_hyp/annot/A/GoToR}{D}{\l_@@_dest_name_tmpa_tl} } \mode_leave_vertical: +% \end{macrocode} +% We use an extra object here, as ghostscript doesn't like the +% object reference in the dict +% \url{https://chat.stackexchange.com/transcript/message/57361080#57361080} +% \begin{macrocode} \pdf_object_unnamed_write:nx{dict}{\pdfdict_use:n {l_hyp/annot/A/GoToR}} \pdfannot_dict_put:nnx {link/GoToR}{A}{\pdf_object_ref_last:} \pdfannot_link:nxn %expansion?? @@ -4131,14 +4151,14 @@ % clearly faster than removing them from a sequence \def\HyField@AuxAddToFields#1 { - \prop_gput:Nnn \g__hyp_AcroForm_Fields_prop {#1}{F} + \prop_gput:Nnn \g_@@_AcroForm_Fields_prop {#1}{F} }% %fields with empty key get a value too -- lets hope that %this give the expected behaviour \def\HyField@AuxAddToCoFields #1 #2 { - \prop_gput:Nnn \g__hyp_AcroForm_CoFields_prop {a#1}{#2} + \prop_gput:Nnn \g_@@_AcroForm_CoFields_prop {a#1}{#2} } \Hy@AtBeginDocument @@ -4196,9 +4216,9 @@ \ExplSyntaxOff \ExplSyntaxOn \tl_new:N \l_@@_CheckmarkYes_tl -\tl_set:Nn \l_@@_CheckmarkYes_tl { __hyp_xform_CheckMarkYes } +\tl_set:Nn \l_@@_CheckmarkYes_tl { @@_xform_CheckMarkYes } \tl_new:N \l_@@_CheckmarkOff_tl -\tl_set:Nn \l_@@_CheckmarkOff_tl { __hyp_xform_CheckMarkOff } +\tl_set:Nn \l_@@_CheckmarkOff_tl { @@_xform_CheckMarkOff } \def\@Form[#1] { @@ -4207,14 +4227,14 @@ \pdf@ifdraftmode{} { \Hy@FormObjects - \prop_map_inline:Nn \g__hyp_AcroForm_Fields_prop + \prop_map_inline:Nn \g_@@_AcroForm_Fields_prop { \pdfmanagement_add:nnx { Catalog / AcroForm } { Fields }{##1} %\pdfmanagement_show:n { Catalog / AcroForm } } - \prop_if_empty:NF \g__hyp_AcroForm_CoFields_prop + \prop_if_empty:NF \g_@@_AcroForm_CoFields_prop { - \prop_map_inline:Nn \g__hyp_AcroForm_CoFields_prop + \prop_map_inline:Nn \g_@@_AcroForm_CoFields_prop { \seq_put_right:Nn \l_@@_tmpa_seq {##1} } @@ -4230,7 +4250,7 @@ \pdfmanagement_add:nnx { Catalog / AcroForm } { CO } { - \prop_item:Nn \g__hyp_AcroForm_CoFields_prop {##1} + \prop_item:Nn \g_@@_AcroForm_CoFields_prop {##1} } } } @@ -4262,7 +4282,7 @@ \char123 \group_end: } - {__hyp_xform_Ding} + {@@_xform_Ding} \MakeFieldObject { \group_begin: @@ -4274,7 +4294,7 @@ \phantom{\char123} \group_end: } - {__hyp_xform_DingOff} + {@@_xform_DingOff} \MakeFieldObject { \group_begin: @@ -4286,7 +4306,7 @@ \char51 \group_end: } - {__hyp_xform_CheckMarkYes} + {@@_xform_CheckMarkYes} \MakeFieldObject { \group_begin: @@ -4298,17 +4318,17 @@ \phantom{\char51} %perhaps xetex needs some small glyph .. \group_end: } - {__hyp_xform_CheckMarkOff} + {@@_xform_CheckMarkOff} \MakeFieldObject { \fbox{\textcolor{yellow}{\textsf{Submit}}} %color? } - {__hyp_xform_Submit} + {@@_xform_Submit} \MakeFieldObject { \fbox{\textcolor{yellow}{\textsf{SubmitP}}} %color? } - {__hyp_xform_SubmitP} + {@@_xform_SubmitP} } \ExplSyntaxOff \let\@endForm\ltx@empty @@ -4324,16 +4344,16 @@ %\zref@labelbyprops{HyAnn@\the\HyAnn@Count}{abspage}% %\zref@labelbylist {HyAnn@\the\HyAnn@Count} {l3pdf} %\zref@refused{HyAnn@\the\HyAnn@Count}% - \__hyp_ref_label:en {HyAnn@\the\HyAnn@Count}{abspage} - \__hyp_ref_check:en {HyAnn@\the\HyAnn@Count}{abspage} + \@@_ref_label:en {HyAnn@\the\HyAnn@Count}{abspage} + \@@_ref_check:en {HyAnn@\the\HyAnn@Count}{abspage} }% \def\Fld@pageobjref { - \__hyp_ref_if_exist:enT {HyAnn@\the\HyAnn@Count}{abspage} + \@@_ref_if_exist:enT {HyAnn@\the\HyAnn@Count}{abspage} { /P~\pdf_pageobject_ref:n { - \__hyp_ref_value:en{HyAnn@\the\HyAnn@Count}{abspage} + \@@_ref_value:en{HyAnn@\the\HyAnn@Count}{abspage} } } } @@ -4449,7 +4469,7 @@ \endgroup } \tl_new:N \l_@@_RadioYes_tl -\tl_set:Nn \l_@@_RadioYes_tl { __hyp_xform_Ding } +\tl_set:Nn \l_@@_RadioYes_tl { @@_xform_Ding } \def\@@Radio#1{% \Fld@listcount=0~% %\show\Fld@default @@ -4474,8 +4494,8 @@ << /N << - /\@currValue\c_space_tl \pdfxform_ref:o {__hyp_xform_Ding} - %/Off \c_space_tl \pdfxform_ref:n {__hyp_xform_DingOff} %hm + /\@currValue\c_space_tl \pdfxform_ref:o {@@_xform_Ding} + %/Off \c_space_tl \pdfxform_ref:n {@@_xform_DingOff} %hm >> >> } @@ -4569,8 +4589,8 @@ { \PDFForm@Submit /AP<< - /N~\pdfxform_ref:n {__hyp_xform_Submit}~ - /D~\pdfxform_ref:n {__hyp_xform_SubmitP} + /N~\pdfxform_ref:n {@@_xform_Submit}~ + /D~\pdfxform_ref:n {@@_xform_SubmitP} >> } \HyField@AddToFields diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3backend-testphase.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3backend-testphase.dtx index b877ce86fc1..7b4aad8fe6b 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3backend-testphase.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3backend-testphase.dtx @@ -45,7 +45,7 @@ % }^^A % } % -% \date{Version 0.95f, released 2021-06-29} +% \date{Version 0.95g, released 2021-07-21} % % \maketitle % @@ -56,27 +56,27 @@ % \begin{macrocode} %<drivers>\ProvidesExplFile %<*dvipdfmx> - {l3backend-testphase-dvipdfmx.def}{2021-06-29}{} + {l3backend-testphase-dvipdfmx.def}{2021-07-21}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvipdfmx} %</dvipdfmx> %<*dvips> - {l3backend-testphase-dvips.def}{2021-06-29}{} + {l3backend-testphase-dvips.def}{2021-07-21}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvips} %</dvips> %<*dvisvgm> - {l3backend-testphase-dvisvgm.def}{2021-06-29}{} + {l3backend-testphase-dvisvgm.def}{2021-07-21}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvisvgm} %</dvisvgm> %<*luatex> - {l3backend-testphase-luatex.def}{2021-06-29}{} + {l3backend-testphase-luatex.def}{2021-07-21}{} {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (LuaTeX)} %</luatex> %<*pdftex> - {l3backend-testphase-pdftex.def}{2021-06-29}{} + {l3backend-testphase-pdftex.def}{2021-07-21}{} {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (pdfTeX)} %</pdftex> %<*xdvipdfmx> - {l3backend-testphase-xetex.def}{2021-06-29}{} + {l3backend-testphase-xetex.def}{2021-07-21}{} {LaTeX~PDF~management~testphase~bundle~backend~support: XeTeX} %</xdvipdfmx> % \end{macrocode} @@ -106,11 +106,10 @@ \cs_generate_variant:Nn \@@_backend_ref_value:nn {en} %</drivers> % \end{macrocode} +% avoid that destinations names are optimized with xelatex/dvipdfmx +% see https://tug.org/pipermail/dvipdfmx/2019-May/000002.html % \begin{macrocode} %<*dvipdfmx|xdvipdfmx> -% avoid that destinations names are optimized. -% is this still needed?? -% see https://tug.org/pipermail/dvipdfmx/2019-May/000002.html \__kernel_backend_literal:x { dvipdfmx:config~C~ 0x0010 } %</dvipdfmx|xdvipdfmx> % \end{macrocode} @@ -121,6 +120,7 @@ \prop_new:N \g_@@_tmpa_prop \tl_new:N \l_@@_tmpa_tl \box_new:N \l_@@_backend_tmpa_box +\box_new:N \l_@@_backend_tmpb_box %</drivers> % \end{macrocode} % \end{variable} @@ -201,20 +201,12 @@ { \g__kernel_pdfmanagement_thispage_shipout_code_tl } - \tl_gput_left:Nn\@kernel@after@shipout@lastpage - { - \g__kernel_pdfmanagement_lastpage_shipout_code_tl - } } { \hook_gput_code:nnn{shipout/background}{pdf} { \g__kernel_pdfmanagement_thispage_shipout_code_tl } - \hook_gput_code:nnn {shipout/lastpage} {pdf} - { - \g__kernel_pdfmanagement_lastpage_shipout_code_tl - } } %</drivers> @@ -561,21 +553,10 @@ % \subsection{\enquote{Page/Resources}: ExtGState, ColorSpace, Shading, Pattern} % Path: Page/Resources/ExtGState etc. The actual output of the resources is handled % together with the bdc/Properties. Here is only special code. -% \begin{macro}{\@@_backend_PageResources_gput:nnn} -% stores values for the page resources. -% \begin{arguments} -% \item name of the resource (ExtGState, ColorSpace, Shading, Pattern) -% \item a pdf name without slash -% \item value -% \end{arguments} -% \begin{macro}{\@@_backend_PageResources_obj_gpush:} -% This pushes out the objects. It is a no-op with xdvipdfmx and dvips. -% \begin{macrocode} -% backend commands the command to fill the register -% and to push the values. -% +% \begin{macro}{\c_@@_backend_PageResources_clist} % The names are quite often needed % a similar list is now in l3pdfmanagement. Perhaps it should be merged. +% \begin{macrocode} %<*drivers> \clist_const:Nn \c_@@_backend_PageResources_clist { @@ -585,9 +566,25 @@ Shading, } %</drivers> -% pdftex and luatex +% \end{macrocode} +% \end{macro} +% +% Now the backend commands the command to fill the register +% and to push the values. +% +% \begin{macro}{\@@_backend_PageResources_gput:nnn} +% stores values for the page resources. +% \begin{arguments} +% \item name of the resource (ExtGState, ColorSpace, Shading, Pattern) +% \item a pdf name without slash +% \item value +% \end{arguments} +% \begin{macro}{\@@_backend_PageResources_obj_gpush:} +% This pushes out the objects. It should be a no-op with xdvipdfmx and dvips +% as it currently issued in the end-of-run hook! +% create the backend objects: +% \begin{macrocode} %<*pdftex|luatex> - %create the backend objects: \clist_map_inline:Nn \c_@@_backend_PageResources_clist { \@@_backend_object_new:nn {@@/Page/Resources/#1} {dict} @@ -602,12 +599,14 @@ } } %</pdftex|luatex> +% \end{macrocode} +% values are only stored in a prop and will be output at end document. +% luatex must also trigger the lua side +% \begin{macrocode} %<*luatex> -%values are only stored in a prop and will be output at end document. \cs_new_protected:Npn \@@_backend_PageResources_gput:nnn #1 #2 #3 { \pdfdict_gput:nnn {g_@@_Core/Page/Resources/#1} { #2 }{ #3 } - % luatex must also trigger the lua side \tex_latelua:D{ltx.@@.Page.Resources.#1=true} \tex_latelua:D { @@ -621,8 +620,10 @@ \pdfdict_gput:nnn {g_@@_Core/Page/Resources/#1} { #2 }{ #3 } } %</pdftex> +% \end{macrocode} +% code for end of document code +% \begin{macrocode} %<*pdftex|luatex> -%code for end of document code \cs_new_protected:Npn \@@_backend_PageResources_obj_gpush: { \clist_map_inline:Nn \c_@@_backend_PageResources_clist @@ -637,15 +638,19 @@ } } %</pdftex|luatex> +% \end{macrocode} % xdvipdfmx % \special{pdf:pageresources<<#1>>} doesn't work correctly with object names ... % https://tug.org/pipermail/dvipdfmx/2019-August/000021.html, % so we use \special{pdf:put @resources} % this must be issued on every page! -%<*dvipdfmx|xdvipdfmx> -%objects should not only be created but also "initialized" +% objects should not only be created but also "initialized" % initialization should be done before anyone tries to write % so we add rules for the backend. +% The push command should not be used as it is +% in the wrong end document hook. If needed a new command must be added. +% \begin{macrocode} +%<*dvipdfmx|xdvipdfmx> %<xdvipdfmx>\hook_gset_rule:nnnn{shipout/firstpage}{l3backend-xetex}{after}{pdf} %<dvipdfmx>\hook_gset_rule:nnnn{shipout/firstpage}{l3backend-dvipdfmx}{after}{pdf} % @@ -673,8 +678,11 @@ \cs_new_protected:Npn \@@_backend_PageResources_obj_gpush: {} %</dvipdfmx|xdvipdfmx> +% \end{macrocode} +% dvips unneeded, or no-op. The push command should not be used as it is +% in the wrong end document hook. If needed a new command must be added. +% \begin{macrocode} %<*dvips> -% dvips unneeded, or no-op \cs_new_protected:Npn \@@_backend_PageResources:n #1 {} \cs_new_protected:Npn \@@_backend_PageResources_gput:nnn #1 #2 #3 { %only for the show command TEST!! @@ -682,8 +690,10 @@ } \cs_new_protected:Npn \@@_backend_PageResources_obj_gpush: {} %</dvips> +% \end{macrocode} +% dvipsvgm unneeded, or no-op +% \begin{macrocode} %<*dvisvgm> -% dvips unneeded, or no-op \cs_new_protected:Npn \@@_backend_PageResources:n #1 {} \cs_new_protected:Npn \@@_backend_PageResources_gput:nnn #1 #2 #3 { %only for the show command TEST!! @@ -725,23 +735,23 @@ % \cs_set_protected:Npn \@@_backend_bdc:nn #1 #2 % #1 eg. Span, #2: dict_content { - \__pdf_backend_pdfmark:x{/#1~<<#2>>~/BDC} + \@@_backend_pdfmark:x{/#1~<<#2>>~/BDC} } \cs_set_protected:Npn \@@_backend_bdcobject:nn #1 #2 % #1 eg. Span, #2: object name { - \__pdf_backend_pdfmark:x{/#1~\@@_backend_object_ref:n{#2}~/BDC} + \@@_backend_pdfmark:x{/#1~\@@_backend_object_ref:n{#2}~/BDC} } \cs_set_protected:Npn \@@_backend_bdcobject:n #1 % #1 eg. Span, { - \__pdf_backend_pdfmark:x{/#1~\@@_backend_object_last:~/BDC} + \@@_backend_pdfmark:x{/#1~\@@_backend_object_last:~/BDC} } \cs_set_protected:Npn \@@_backend_emc: { - \__pdf_backend_pdfmark:n{/EMC} % + \@@_backend_pdfmark:n{/EMC} % } \cs_set_protected:Npn \@@_backend_bmc:n #1 { - \__pdf_backend_pdfmark:n{/#1~/BMC} % + \@@_backend_pdfmark:n{/#1~/BMC} % } \cs_new_protected:Npn \@@_backend_PageResources_gpush:n #1 {} @@ -1099,7 +1109,7 @@ { \pdf_object_unnamed_write:nn {dict} { /Names [#1] } %n or x? - \__pdf_backend:x {put~@names~<</EmbeddedFiles~\pdf_object_ref_last: >>} + \@@_backend:x {put~@names~<</EmbeddedFiles~\pdf_object_ref_last: >>} } %</dvipdfmx|xdvipdfmx> @@ -1472,6 +1482,109 @@ \cs_new_protected:Npn \@@_backend_xform_use:n #1 {} \cs_new:Npn \@@_backend_xform_ref:n {} %</dvisvgm> +% \end{macrocode} +% The xform code for dvips is based on code from the attachfile2 package +% (in atfi-dvips), along with some ideas from pdfbase and has been corrected +% with the help of Alexander Grahn. +% Details like clipping and landscape will probably be corrected in the future. +% \begin{macrocode} +%<*dvips> +\cs_new_protected:Npn\@@_backend_xform_new:nnnn #1 #2 #3 #4 % #1 name, #2 attribute, #4 content + { + \int_gincr:N \g_@@_backend_object_int + \int_const:cn + { c_@@_backend_xform_ \tl_to_str:n {#1} _int } + { \g_@@_backend_object_int } + + \hbox_set:Nn \l_@@_backend_tmpa_box + { + \bool_set_true:N \l_@@_backend_xform_bool + \prop_gclear:c {\__kernel_pdfdict_name:n { g_@@_Core/Xform/Resources/Properties }} + #4 + } + %store the dimensions + \tl_const:cx + { c_@@_backend_xform_wd_ \tl_to_str:n {#1} _tl } + { \tex_the:D \box_wd:N \l_@@_backend_tmpa_box } + \tl_const:cx + { c_@@_backend_xform_ht_ \tl_to_str:n {#1} _tl } + { \tex_the:D \box_ht:N \l_@@_backend_tmpa_box } + \tl_const:cx + { c_@@_backend_xform_dp_ \tl_to_str:n {#1} _tl } + { \tex_the:D \box_dp:N \l_@@_backend_tmpa_box } + %mirror the box + \box_scale:Nnn \l_@@_backend_tmpa_box {1} {-1} + \hbox_set:Nn\l_@@_backend_tmpb_box + { + \__kernel_backend_postscript:x + { + gsave~currentpoint~translate~ + mark~ + /_objdef~{ pdf.obj \int_use:N\g_@@_backend_object_int }\c_space_tl~ + /BBox[ + currentpoint~\dim_to_decimal:n{\box_dp:N \l_@@_backend_tmpa_box}~72.27~div~VResolution~mul~add~ + currentpoint~ + exch~\dim_to_decimal:n{\box_wd:N \l_@@_backend_tmpa_box}~72.27~div~Resolution~mul~add~ + exch~\dim_to_decimal:n{\box_ht:N \l_@@_backend_tmpa_box}~72.27~div~VResolution~mul~sub~ + ] + \str_if_eq:eeF{#1}{} + { + product~(Distiller)~search~{pop~pop~pop~#2}{pop}ifelse~ + } + /BP~pdfmark~grestore~ + } + \box_use_drop:N\l_@@_backend_tmpa_box + \__kernel_backend_postscript:n + { + mark ~ /EP~pdfmark + } + \str_if_eq:eeF{#1}{} + { + \__kernel_backend_postscript:x + { + product~(Ghostscript)~search~ + { + pop~pop~pop~ + mark~ + { pdf.obj \int_use:c{c_@@_backend_xform_ \tl_to_str:n {#1} _int} } + ~<<#2>>~/PUT~pdfmark + }{pop}ifelse + } + } + } + \box_set_dp:Nn \l_@@_backend_tmpb_box { \c_zero_dim } + \box_set_ht:Nn \l_@@_backend_tmpb_box { \c_zero_dim } + \box_set_wd:Nn \l_@@_backend_tmpb_box { \c_zero_dim } + \hook_gput_code:nnn {begindocument/end}{pdfxform} + { + \mode_leave_vertical: + \box_use:N\l_@@_backend_tmpb_box + } + } + + +\cs_new_protected:Npn \@@_backend_xform_use:n #1 + { + \hbox_set:Nn \l_@@_backend_tmpa_box + { + \__kernel_backend_postscript:x + { + gsave~currentpoint~translate~1~-1~scale~ + mark~{ pdf.obj \int_use:c{c__pdf_backend_xform_ \tl_to_str:n {#1} _int }}~ + /SP~pdfmark ~ grestore + } + } + \box_set_wd:Nn \l_@@_backend_tmpa_box { \pdfxform_wd:n { #1 } } + \box_set_ht:Nn \l_@@_backend_tmpa_box { \pdfxform_ht:n { #1 } } + \box_set_dp:Nn \l_@@_backend_tmpa_box { \pdfxform_dp:n { #1 } } + \box_use_drop:N \l_@@_backend_tmpa_box + } +\cs_new:Npn \@@_backend_xform_ref:n #1 + { + { pdf.obj \int_use:c{c_@@_backend_xform_ \tl_to_str:n {#1} _int} } + } + +%</dvips> %<*drivers> %% all \prg_new_conditional:Npnn \@@_backend_xform_if_exist:n #1 { p , T , F , TF } diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfannot.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfannot.dtx index 1eeeaeb9e74..4f4778699a9 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfannot.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfannot.dtx @@ -52,7 +52,7 @@ % }^^A % } % -% \date{Version 0.95f, released 2021-06-29} +% \date{Version 0.95g, released 2021-07-21} % % \maketitle % \begin{documentation} @@ -67,6 +67,33 @@ % and link annotations. Commands for other annotations like widgets will be added % later. % +% \subsection{dvips specialities} +% With most engines and backend the content of arguments like \Arg{annot spec} +% are dictionaries with keys and values which looks like the PDF. +% With dvips this is different. As it write at first a postscript file which is +% then interpreted along the rule of the pdfmark reference (and the rules of the postscript +% language) the handling is in some parts so different that it is difficult to hide +% this in abstraction like the one of this module. +% And there is the additional complication that the +% two postscript processor ghostscript (ps2pdf) and distiller handles some code differently too. +% +% For now the following differences have been spotted, it is yet not quite clear +% how to resolve them +% \begin{itemize} +% \item distiller doesn't like it if the action is provided by directly +% providing the |/A| key with some values. +% Instead it expects a keyword \texttt{/Action}, which it will +% then translate to |/A|. For |GoTo| links this has been resolved at the backend level, +% but for other link types this problem is open. +% \item ghostscript doesn't like object references as values in some places. +% The work around here (which is e.g. used by hyperref for GoToR link) is to +% write the whole dictionary first as an object and to use its reference, but this +% is something distiller doesn't like, sigh. +% \item How to escaping text and create unicode can be different. +% \end{itemize} +% +% +% % \subsection{General annotation commands} % % \begin{function}[added = 2019-09-05, updated = 2020-04-14] @@ -397,7 +424,7 @@ % \begin{macrocode} %<@@=pdfannot> %<*header> -\ProvidesExplPackage{l3pdfannot}{2021-06-29}{0.95f} +\ProvidesExplPackage{l3pdfannot}{2021-07-21}{0.95g} {PDF-annotations} \RequirePackage{l3pdfdict} %</header> diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfdict.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfdict.dtx index 635007c3c0d..ef283dd6640 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfdict.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfdict.dtx @@ -53,7 +53,7 @@ % }^^A % } % -% \date{Version 0.95f, released 2021-06-29} +% \date{Version 0.95g, released 2021-07-21} % % \maketitle % \begin{documentation} @@ -212,7 +212,7 @@ % \begin{macrocode} %<@@=pdfdict> %<*header> -\ProvidesExplPackage{l3pdfdict}{2021-06-29}{0.95f} +\ProvidesExplPackage{l3pdfdict}{2021-07-21}{0.95g} {Tools for PDF dictionaries (LaTeX PDF management testphase bundle)} %</header> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-action.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-action.dtx index 6677aeb34b9..146214c7f15 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-action.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-action.dtx @@ -53,7 +53,7 @@ % }^^A % } % -% \date{Version 0.95f, released 2021-06-29} +% \date{Version 0.95g, released 2021-07-21} % % \maketitle % \begin{documentation} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-checkbox.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-checkbox.dtx index c8a25060a20..32f2f76ffe3 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-checkbox.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-checkbox.dtx @@ -68,7 +68,7 @@ % }^^A % } % -% \date{Version 0.95f, released 2021-06-29} +% \date{Version 0.95g, released 2021-07-21} % % \maketitle % \begin{documentation} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-choice.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-choice.dtx index f58e9bff7dd..f247ef51425 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-choice.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-choice.dtx @@ -53,7 +53,7 @@ % }^^A % } % -% \date{Version 0.95f, released 2021-06-29} +% \date{Version 0.95g, released 2021-07-21} % % \maketitle % \begin{documentation} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-pushbutton.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-pushbutton.dtx index 3ae09983044..3d6ee2c6c2f 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-pushbutton.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-pushbutton.dtx @@ -59,7 +59,7 @@ % }^^A % } % -% \date{Version 0.95f, released 2021-06-29} +% \date{Version 0.95g, released 2021-07-21} % % \maketitle % \begin{documentation} @@ -77,6 +77,8 @@ % itself % \item Standards like pdf/A disable features of form fields too % (as you typically can't change the PDF). +% \item The compilations involving postscript/pdfmark (dvips with ps2pdf or dvips +% with distiller) can require special setups. % \end{itemize} % \section{Pushbuttons} % Click me: @@ -89,7 +91,17 @@ % \pdffield_pushbutton:n{name=bear,appearance=pdffield/bear,width=23pt,height=30pt,depth=10pt} % \group_end: % \ExplSyntaxOff -% +%^^A ps2pdf doesn't like the I\'m, need to find out the right escape. +%^^A ps2pdf also requires an indirection (but distiller will probably require /Action +%^^A instead of /A) +%^^A \group_begin: +%^^A \tl_set:Nn\l_tmpa_tl{app.alert('Hello!~Im~Bär!',3,0);} +%^^A \regex_replace_once:nnN{ä}{\x5Cu00E4}\l_tmpa_tl{} +%^^A \pdf_object_unnamed_write:nx{stream}{{}{\exp_not:o{\l_tmpa_tl}}} +%^^A \pdf_object_unnamed_write:nx{dict}{/S/JavaScript /JS~\pdf_object_ref_last:} +%^^A \pdfannot_dict_put:nnx{widget}{A}{\pdf_object_ref_last:} +%^^A \pdffield_pushbutton:n{name=bear,appearance=pdffield/bear,width=23pt,height=30pt,depth=10pt} +%^^A \group_end:% % \bigskip % \subsection{Commands} % \begin{function}{\pdffield_push:n} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-radiobutton.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-radiobutton.dtx index cf1570ef3a6..3a451bceadc 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-radiobutton.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-radiobutton.dtx @@ -87,7 +87,7 @@ % }^^A % } % -% \date{Version 0.95f, released 2021-06-29} +% \date{Version 0.95g, released 2021-07-21} % % \maketitle % \begin{documentation} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-textfield.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-textfield.dtx index 0a8188961c6..81330a65201 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-textfield.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-textfield.dtx @@ -53,7 +53,7 @@ % }^^A % } % -% \date{Version 0.95f, released 2021-06-29} +% \date{Version 0.95g, released 2021-07-21} % % \maketitle % \begin{documentation} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield.dtx index cd9c5877eac..36e4415eef0 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield.dtx @@ -73,7 +73,7 @@ % }^^A % } % -% \date{Version 0.95f, released 2021-06-29} +% \date{Version 0.95g, released 2021-07-21} % % \maketitle % \begin{documentation} @@ -970,7 +970,7 @@ %<*package> %<@@=pdffield> \NeedsTeXFormat{LaTeX2e} -\ProvidesExplPackage{l3pdffield-testphase}{2021-06-29}{0.95f}% +\ProvidesExplPackage{l3pdffield-testphase}{2021-07-21}{0.95g}% {form fields} % \end{macrocode} % \subsection{hyperref specific command} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffile.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffile.dtx index b925844f523..0fadfbe46f6 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffile.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffile.dtx @@ -53,7 +53,7 @@ % }^^A % } % -% \date{Version 0.95f, released 2021-06-29} +% \date{Version 0.95g, released 2021-07-21} % % \maketitle % \begin{documentation} @@ -400,7 +400,7 @@ % % \begin{macrocode} %<*header> -\ProvidesExplPackage{l3pdffile}{2021-06-29}{0.95f} +\ProvidesExplPackage{l3pdffile}{2021-07-21}{0.95g} {embedding and referencing files in PDF---LaTeX PDF management testphase bundle} \RequirePackage{l3pdftools} %temporarly!! %</header> diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmanagement.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmanagement.dtx index 15156e92043..0390980da5b 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmanagement.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmanagement.dtx @@ -61,7 +61,7 @@ % }^^A % } % -% \date{Version 0.95f, released 2021-06-29} +% \date{Version 0.95g, released 2021-07-21} % % \maketitle % \begin{documentation} @@ -557,7 +557,7 @@ %<@@=pdfmanagement> %<*header> % -\ProvidesExplPackage{l3pdfmanagement}{2021-06-29}{0.95f} +\ProvidesExplPackage{l3pdfmanagement}{2021-07-21}{0.95g} {Management of core PDF dictionaries (LaTeX PDF management testphase bundle)} %</header> % \end{macrocode} @@ -672,18 +672,11 @@ } } -\tl_gset:Nn \g__kernel_pdfmanagement_lastpage_shipout_code_tl - { - \bool_if:NT \g_@@_active_bool - { - \__pdf_backend_PageResources_obj_gpush: %ExtGState etc - } - } - \tl_gset:Nn \g__kernel_pdfmanagement_end_run_code_tl { \bool_if:NT \g_@@_active_bool { + \__pdf_backend_PageResources_obj_gpush: %ExtGState etc \@@_Pages_gpush: %pagesattr \@@_Info_gpush: %pdfinfo \@@_Catalog_gpush: diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmeta.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmeta.dtx index 73163f820a2..f590a2b8973 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmeta.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmeta.dtx @@ -53,7 +53,7 @@ % }^^A % } % -% \date{Version 0.95f, released 2021-06-29} +% \date{Version 0.95g, released 2021-07-21} % % \maketitle % \begin{documentation} @@ -343,7 +343,7 @@ % \begin{macrocode} %<@@=pdfmeta> %<*header> -\ProvidesExplPackage{l3pdfmeta}{2021-06-29}{0.95f} +\ProvidesExplPackage{l3pdfmeta}{2021-07-21}{0.95g} {PDF-Standards---LaTeX PDF management testphase bundle} %</header> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdftools.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdftools.dtx index 6dc8a4fc1fc..2df7203e0f8 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdftools.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdftools.dtx @@ -53,7 +53,7 @@ % }^^A % } % -% \date{Version 0.95f, released 2021-06-29} +% \date{Version 0.95g, released 2021-07-21} % % \maketitle % \begin{documentation} @@ -215,7 +215,7 @@ % % \begin{macrocode} %<*header> -\ProvidesExplPackage{l3pdftools}{2021-06-29}{0.95f} +\ProvidesExplPackage{l3pdftools}{2021-07-21}{0.95g} {candidate commands for l3pdf---LaTeX PDF management testphase bundle} %</header> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfxform.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfxform.dtx index 59d72672c69..eef4ae7ee00 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfxform.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfxform.dtx @@ -52,7 +52,7 @@ % }^^A % } % -% \date{Version 0.95f, released 2021-06-29} +% \date{Version 0.95g, released 2021-07-21} % % \maketitle % \begin{documentation} @@ -61,8 +61,11 @@ % This module contains a number of commands to create \enquote{form XObjects}, % for which pdf\TeX{} introduced the short name \enquote{xforms}. % -% The status is still beta, so the style itself is currently named -% \pkg{l3pdfxform-beta}. Missing is for example code for the dvips route. +% The status is still beta. +% The dvips route is now better supported but there are open issus +% if landscape pages are involved or if the objects are larger than the page. +% With dvips the creation of a form involves typesetting and so can affect spacing. +% % Probably some of the function will also need to be enhanced by hooks. % % \begin{function}[added = 2019-08-05,updated=2021-02-14] @@ -120,7 +123,7 @@ % } % \begin{syntax} % \cs{pdfxform_if_exist_p:n} \Arg{name} -% \cs{pdfxform_if_exist:NTF} \meta{name} \Arg{true code} \Arg{false code} +% \cs{pdfxform_if_exist:nTF} \meta{name} \Arg{true code} \Arg{false code} % \end{syntax} % These command tests if an xform with name \Arg{name} has been already defined. % \end{function}% @@ -133,7 +136,7 @@ % \begin{macrocode} %<@@=pdf> %<*header> -\ProvidesExplPackage{l3pdfxform}{2021-06-29}{0.95f} +\ProvidesExplPackage{l3pdfxform}{2021-07-21}{0.95g} {command to create xforms (beta)---LaTeX PDF management testphase bundle} %</header> % \end{macrocode} @@ -195,6 +198,9 @@ } % \end{macrocode} % \end{macro} +% \begin{macro}[pTF]{\pdfxform_if_exist:n} +% The command is defined in the backend (to avoid timing problems). +% \end{macro} % \begin{macrocode} %</package> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/ltdocinit.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/ltdocinit.dtx index 8a783b7697a..0679203098f 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/ltdocinit.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/ltdocinit.dtx @@ -51,7 +51,7 @@ % }^^A % } % -% \date{Version 0.95f, released 2021-06-29} +% \date{Version 0.95g, released 2021-07-21} % % \maketitle % \begin{documentation} @@ -115,9 +115,24 @@ % are described in the documentation of \pkg{l3pdfmeta}. % \item[\texttt{pdfmanagement}] Boolean. This activates/deactivates % the core management code. By default the value is true. -% \item[firstaidoff] This accepts a comma lists of keysword and disable the patches +% \item[\texttt{firstaidoff}] This accepts a comma lists of keysword and disable the patches % related to them. More information can be found in the documentation of % \pkg{pdfmanagement-firstaid}. +% \item[\texttt{testphase}] This key is used to load testphase code. The values it accepts +% and their effect will change over time, when testphase packages are added or +% removed when the code is moved into the kernel. Currently the accepted values are +% \texttt{tagpdf}, this load the tagpdf package, \texttt{headings}, this loads +% code which reimplements heading commands, and \texttt{ptagging} this loads code +% to allow paragraph tagging to work with engine other than luatex. +% \item[\texttt{activate}] This key is used to enable some document wide functions. It is +% currently in an experimental state. The values and their behaviour are subject to change. +% Currently the only value is |tagging|, +% which will do |\tagpdfsetup{activate,paratagging,interwordspace}|. It requires that +% \pkg{tagpdf} has been loaded first with the |testphase| key. +% \item[\texttt{debug}] This key activates some debug options. Currently only the +% keys |para| (with the default and only value |show|), +% and |log| (with the values of \pkg{tagpdf}) and |uncompress| (which does the same +% as |uncompress| as main key) are known. % \end{description} % % \subsection{Container for document properties} @@ -167,7 +182,7 @@ % \begin{macrocode} %<@@=pdfmanagement> %<*header> -\ProvidesExplPackage{ltdocinit}{2021-06-29}{0.95f} +\ProvidesExplPackage{ltdocinit}{2021-07-21}{0.95g} {Initialize document metadata} %</header> % \end{macrocode} @@ -235,8 +250,9 @@ } } % \end{macrocode} -% Load more modules and the firstaid code. +% Load more modules, the testphase code and the firstaid code. % \begin{macrocode} + \g_@@_testphase_tl \RequirePackage{pdfmanagement-firstaid} } } @@ -296,6 +312,13 @@ \clist_new:N \g_@@_firstaidoff_clist % \end{macrocode} % \end{variable} +% \begin{variable}{\g_@@_testphase_tl} +% a tl to store the testphase loading code so that we can load them at +% the end of the command. +% \begin{macrocode} +\tl_new:N \g_@@_testphase_tl +% \end{macrocode} +% \end{variable} % \begin{macrocode} \keys_define:nn { document / metadata } { @@ -346,6 +369,78 @@ } ,pdfmanagement .bool_gset:N = \g_@@_active_bool ,firstaidoff .clist_gset:N = \g_@@_firstaidoff_clist + ,testphase .multichoice: + ,testphase / tagpdf .code:n = + { + \tl_gput_right:Nn\g_@@_testphase_tl + { + \RequirePackage{tagpdf} + \AddToDocumentProperties [document]{testphase/tagpdf}{loaded} + } + } + ,testphase / headings .code:n = + { + \tl_gput_right:Nn\g_@@_testphase_tl + { + \RequirePackage{headings-testphase} + \AddToDocumentProperties [document]{testphase/headings}{loaded} + } + } + ,testphase / ptagging .code:n = + { + \tl_gput_right:Nn\g_@@_testphase_tl + { + \AddToHook{class/after} + { + \RequirePackage{ptagging-testphase} + \AddToDocumentProperties [document]{testphase/ptagging}{loaded} + } + } + } + ,testphase / unknown .code:n = + { + \tl_gput_right:Nn\g_@@_testphase_tl + { + \AddToHook{class/after} + { + \RequirePackage{#1-testphase} + \AddToDocumentProperties [document]{testphase/#1}{loaded} + } + } + } + ,activate .multichoice: + ,activate / tagging .code:n = + { + \AddToHook{package/after/tagpdf} + { + \tagpdfsetup{activate,paratagging,interwordspace} + \AddToDocumentProperties [document]{tagging}{active} + \AddToDocumentProperties [document]{tagging/para}{active} + \AddToDocumentProperties [document]{tagging/interwordspace}{active} + } + } + ,debug .code:n = + { + \keys_set:nn { document / metadata / debug } {#1} + } + ,debug / para .code:n = + { + \AddToHook{package/after/tagpdf} + { + \tagpdfsetup{paratagging-show} + } + } + ,debug / log .code:n = + { + \AddToHook{package/after/tagpdf} + { + \tagpdfsetup{log=#1} + } + } + ,debug / uncompress .code:n = + { + \pdf_uncompress: + } } % \end{macrocode} % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx index 1a0284984f3..364304de2ca 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx @@ -51,7 +51,7 @@ % }^^A % } % -% \date{Version 0.95f, released 2021-06-29} +% \date{Version 0.95g, released 2021-07-21} % % \maketitle % \begin{documentation} @@ -67,7 +67,7 @@ % |firstaidoff={name1,name2,...}|. % \begin{macrocode} %<*package> -\ProvidesExplPackage{pdfmanagement-firstaid}{2021-06-29}{0.95f} +\ProvidesExplPackage{pdfmanagement-firstaid}{2021-07-21}{0.95g} {LaTeX PDF management testphase bundle / firstaid-patches} %<@@=pdfmanagement> @@ -108,8 +108,6 @@ % This patch serves also as test to check if this change can be safely % added to \pkg{color} later. % \begin{macrocode} -\@ifundefined{color_set:nn}{ -\RequirePackage{l3color}}{} \bool_if:NT \g_@@_firstaid_color_bool { \declare@file@substitution{color.sty}{color-ltx.sty} @@ -127,8 +125,6 @@ % The |named| model is mapped to \cs{color_set:nn}. % % \begin{macrocode} -\@ifundefined{color_set:nn}{ -\RequirePackage{l3color}}{} \bool_if:NT \g_@@_firstaid_xcolor_bool { \AddToHook{package/after/xcolor} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.dtx index 7ae7b5ca93a..7d0b20ee023 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.dtx @@ -51,7 +51,7 @@ % }^^A % } % -% \date{Version 0.95f, released 2021-06-29} +% \date{Version 0.95g, released 2021-07-21} % % \maketitle % \begin{documentation} @@ -384,7 +384,7 @@ % \begin{macrocode} %<@@=pdf> %<*package> -\ProvidesExplPackage{pdfmanagement-testphase}{2021-06-29}{0.95f} +\ProvidesExplPackage{pdfmanagement-testphase}{2021-07-21}{0.95g} {LaTeX PDF management testphase bundle} \providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} \IfFormatAtLeastTF{2020-10-01}{}{ @@ -411,7 +411,7 @@ % to allow to set it in the document. % \begin{macrocode} %<*header> -\ProvidesExplFile{pdfmanagement-testphase.ltx}{2021-06-29}{0.95f} +\ProvidesExplFile{pdfmanagement-testphase.ltx}{2021-07-21}{0.95g} {PDF~management~code~(testphase)} %</header> %<*package> diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/color-ltx.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/color-ltx.sty index 47052c99b1d..b7765e97ed6 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/color-ltx.sty +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/color-ltx.sty @@ -22,7 +22,7 @@ %% This file has the LPPL maintenance status "maintained". %% \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{color-ltx}[2021-06-29 v0.95f +\ProvidesPackage{color-ltx}[2021-07-21 v0.95g Standard LaTeX Color (patched for l3color, part of pdfmanagement-testphase, original version 2021/03/07 v1.2e) (DPC)] \edef\Gin@codes{% \catcode`\noexpand\^^A\the\catcode`\^^A\relax diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def index 47a6e7ffc0b..4003c62cc7d 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: hyperref-generic.dtx -\ProvidesFile{hgeneric-testphase.def}[2021-06-29 v0.95f % +\ProvidesFile{hgeneric-testphase.def}[2021-07-21 v0.95g % generic Hyperref driver for the LaTeX PDF management testphase bundle] \RequirePackage{etoolbox} %why? @@ -324,7 +324,7 @@ \cs_new_protected:Npn \__hyp_href_run_aux:nn #1 #2 { - \exp_args:Nnno\hyper@linklaunch{#2}{#1}{\l__hyp_href_run_parameter_tl} + \exp_args:Nnno\hyper@linklaunch{#1}{#2}{\l__hyp_href_run_parameter_tl} \group_end: \hook_use:n{cmd/hrefrun/after} } @@ -582,10 +582,14 @@ \Hy@RestoreLastskip %defined in hyperref \mode_if_horizontal:T { \spacefactor\@savsf } } +\tl_new:N\l_hyp_current_dest_name_tl +\hook_new:n{hyp/anchor} \cs_new_protected:Npn \hyper@anchor #1 { \exp_args:NnV \__hyp_destination:nn {#1} \l__hyp_dest_pdfview_tl + \tl_set:Nn \l_hyp_current_dest_name_tl {#1} + \hook_use:n{hyp/anchor} } \cs_new_protected:Npn \hyper@anchorstart #1 @@ -593,6 +597,8 @@ \Hy@activeanchortrue \exp_args:NnV \__hyp_destination:nn {#1} \l__hyp_dest_pdfview_tl + \tl_set:Nn \l_hyp_current_dest_name_tl {#1} + \hook_use:n{hyp/anchor} } \cs_new_protected:Npn \hyper@anchorend @@ -633,6 +639,7 @@ { \Hy@VerboseLinkStart{#1}{#2} \group_begin: + \tl_set:Nn \l_hyp_current_dest_name_tl {#2} \hook_use:n {hyp/link/#1} \__hyp_link_goto_begin:nw {#2}#3\Hy@xspace@end \__hyp_link_goto_end: @@ -648,6 +655,7 @@ { \Hy@VerboseLinkStart{#1}{#2}% only for debug \group_begin: + \tl_set:Nn \l_hyp_current_dest_name_tl {#2} \hook_use:n {hyp/link/#1} \__hyp_link_goto_begin:nw {#2} } diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty index a1d15ac92d2..96e9d086a67 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty @@ -19,7 +19,7 @@ % % for those people who are interested. \NeedsTeXFormat{LaTeX2e}[2020/10/01] -\ProvidesExplPackage{hyperxmp-patches-tmp-ltx}{2021-06-29}{0.95f} +\ProvidesExplPackage{hyperxmp-patches-tmp-ltx}{2021-07-21}{0.95g} {Store hyperref metadata in XMP format / temporay patches to test pdfresource management ... UF} \cs_if_exist:NT \pdfmanagement_add:nnn diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvipdfmx.def b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvipdfmx.def index ac63b3c0488..00c28edb532 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvipdfmx.def +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvipdfmx.def @@ -20,7 +20,7 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-dvipdfmx.def}{2021-06-29}{} + {l3backend-testphase-dvipdfmx.def}{2021-07-21}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvipdfmx} \RequirePackage{l3ref-tmp} \cs_generate_variant:Nn \ref_label:nn {en} @@ -41,6 +41,7 @@ \prop_new:N \g__pdf_tmpa_prop \tl_new:N \l__pdf_tmpa_tl \box_new:N \l__pdf_backend_tmpa_box +\box_new:N \l__pdf_backend_tmpb_box \int_new:N \g__pdf_backend_resourceid_int \int_new:N \g__pdf_backend_name_int \int_new:N \g__pdf_backend_page_int @@ -59,20 +60,12 @@ { \g__kernel_pdfmanagement_thispage_shipout_code_tl } - \tl_gput_left:Nn\@kernel@after@shipout@lastpage - { - \g__kernel_pdfmanagement_lastpage_shipout_code_tl - } } { \hook_gput_code:nnn{shipout/background}{pdf} { \g__kernel_pdfmanagement_thispage_shipout_code_tl } - \hook_gput_code:nnn {shipout/lastpage} {pdf} - { - \g__kernel_pdfmanagement_lastpage_shipout_code_tl - } } \cs_new_protected:Npn \__pdf_backend_Pages_primitive:n #1 diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvips.def b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvips.def index 4db7c8765c3..c0950a361a9 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvips.def +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvips.def @@ -20,7 +20,7 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-dvips.def}{2021-06-29}{} + {l3backend-testphase-dvips.def}{2021-07-21}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvips} \RequirePackage{l3ref-tmp} \cs_generate_variant:Nn \ref_label:nn {en} @@ -40,6 +40,7 @@ \prop_new:N \g__pdf_tmpa_prop \tl_new:N \l__pdf_tmpa_tl \box_new:N \l__pdf_backend_tmpa_box +\box_new:N \l__pdf_backend_tmpb_box \int_new:N \g__pdf_backend_resourceid_int \int_new:N \g__pdf_backend_name_int \int_new:N \g__pdf_backend_page_int @@ -58,20 +59,12 @@ { \g__kernel_pdfmanagement_thispage_shipout_code_tl } - \tl_gput_left:Nn\@kernel@after@shipout@lastpage - { - \g__kernel_pdfmanagement_lastpage_shipout_code_tl - } } { \hook_gput_code:nnn{shipout/background}{pdf} { \g__kernel_pdfmanagement_thispage_shipout_code_tl } - \hook_gput_code:nnn {shipout/lastpage} {pdf} - { - \g__kernel_pdfmanagement_lastpage_shipout_code_tl - } } \cs_new_protected:Npx \__pdf_backend_Pages_primitive:n #1 @@ -184,6 +177,100 @@ /EMBED } } +\cs_new_protected:Npn\__pdf_backend_xform_new:nnnn #1 #2 #3 #4 % #1 name, #2 attribute, #4 content + { + \int_gincr:N \g__pdf_backend_object_int + \int_const:cn + { c__pdf_backend_xform_ \tl_to_str:n {#1} _int } + { \g__pdf_backend_object_int } + + \hbox_set:Nn \l__pdf_backend_tmpa_box + { + \bool_set_true:N \l__pdf_backend_xform_bool + \prop_gclear:c {\__kernel_pdfdict_name:n { g__pdf_Core/Xform/Resources/Properties }} + #4 + } + %store the dimensions + \tl_const:cx + { c__pdf_backend_xform_wd_ \tl_to_str:n {#1} _tl } + { \tex_the:D \box_wd:N \l__pdf_backend_tmpa_box } + \tl_const:cx + { c__pdf_backend_xform_ht_ \tl_to_str:n {#1} _tl } + { \tex_the:D \box_ht:N \l__pdf_backend_tmpa_box } + \tl_const:cx + { c__pdf_backend_xform_dp_ \tl_to_str:n {#1} _tl } + { \tex_the:D \box_dp:N \l__pdf_backend_tmpa_box } + %mirror the box + \box_scale:Nnn \l__pdf_backend_tmpa_box {1} {-1} + \hbox_set:Nn\l__pdf_backend_tmpb_box + { + \__kernel_backend_postscript:x + { + gsave~currentpoint~translate~ + mark~ + /_objdef~{ pdf.obj \int_use:N\g__pdf_backend_object_int }\c_space_tl~ + /BBox[ + currentpoint~\dim_to_decimal:n{\box_dp:N \l__pdf_backend_tmpa_box}~72.27~div~VResolution~mul~add~ + currentpoint~ + exch~\dim_to_decimal:n{\box_wd:N \l__pdf_backend_tmpa_box}~72.27~div~Resolution~mul~add~ + exch~\dim_to_decimal:n{\box_ht:N \l__pdf_backend_tmpa_box}~72.27~div~VResolution~mul~sub~ + ] + \str_if_eq:eeF{#1}{} + { + product~(Distiller)~search~{pop~pop~pop~#2}{pop}ifelse~ + } + /BP~pdfmark~grestore~ + } + \box_use_drop:N\l__pdf_backend_tmpa_box + \__kernel_backend_postscript:n + { + mark ~ /EP~pdfmark + } + \str_if_eq:eeF{#1}{} + { + \__kernel_backend_postscript:x + { + product~(Ghostscript)~search~ + { + pop~pop~pop~ + mark~ + { pdf.obj \int_use:c{c__pdf_backend_xform_ \tl_to_str:n {#1} _int} } + ~<<#2>>~/PUT~pdfmark + }{pop}ifelse + } + } + } + \box_set_dp:Nn \l__pdf_backend_tmpb_box { \c_zero_dim } + \box_set_ht:Nn \l__pdf_backend_tmpb_box { \c_zero_dim } + \box_set_wd:Nn \l__pdf_backend_tmpb_box { \c_zero_dim } + \hook_gput_code:nnn {begindocument/end}{pdfxform} + { + \mode_leave_vertical: + \box_use:N\l__pdf_backend_tmpb_box + } + } + +\cs_new_protected:Npn \__pdf_backend_xform_use:n #1 + { + \hbox_set:Nn \l__pdf_backend_tmpa_box + { + \__kernel_backend_postscript:x + { + gsave~currentpoint~translate~1~-1~scale~ + mark~{ pdf.obj \int_use:c{c__pdf_backend_xform_ \tl_to_str:n {#1} _int }}~ + /SP~pdfmark ~ grestore + } + } + \box_set_wd:Nn \l__pdf_backend_tmpa_box { \pdfxform_wd:n { #1 } } + \box_set_ht:Nn \l__pdf_backend_tmpa_box { \pdfxform_ht:n { #1 } } + \box_set_dp:Nn \l__pdf_backend_tmpa_box { \pdfxform_dp:n { #1 } } + \box_use_drop:N \l__pdf_backend_tmpa_box + } +\cs_new:Npn \__pdf_backend_xform_ref:n #1 + { + { pdf.obj \int_use:c{c__pdf_backend_xform_ \tl_to_str:n {#1} _int} } + } + %% all \prg_new_conditional:Npnn \__pdf_backend_xform_if_exist:n #1 { p , T , F , TF } { diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvisvgm.def b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvisvgm.def index c85c45afae7..34ac07b1393 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvisvgm.def +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvisvgm.def @@ -20,7 +20,7 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-dvisvgm.def}{2021-06-29}{} + {l3backend-testphase-dvisvgm.def}{2021-07-21}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvisvgm} \RequirePackage{l3ref-tmp} \cs_generate_variant:Nn \ref_label:nn {en} @@ -40,6 +40,7 @@ \prop_new:N \g__pdf_tmpa_prop \tl_new:N \l__pdf_tmpa_tl \box_new:N \l__pdf_backend_tmpa_box +\box_new:N \l__pdf_backend_tmpb_box \int_new:N \g__pdf_backend_resourceid_int \int_new:N \g__pdf_backend_name_int \int_new:N \g__pdf_backend_page_int @@ -54,20 +55,12 @@ { \g__kernel_pdfmanagement_thispage_shipout_code_tl } - \tl_gput_left:Nn\@kernel@after@shipout@lastpage - { - \g__kernel_pdfmanagement_lastpage_shipout_code_tl - } } { \hook_gput_code:nnn{shipout/background}{pdf} { \g__kernel_pdfmanagement_thispage_shipout_code_tl } - \hook_gput_code:nnn {shipout/lastpage} {pdf} - { - \g__kernel_pdfmanagement_lastpage_shipout_code_tl - } } \cs_new_protected:Npn \__pdf_backend_Pages_primitive:n #1 diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-luatex.def b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-luatex.def index 0fb05b07d73..fa60269d932 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-luatex.def +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-luatex.def @@ -20,7 +20,7 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-luatex.def}{2021-06-29}{} + {l3backend-testphase-luatex.def}{2021-07-21}{} {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (LuaTeX)} \RequirePackage{l3ref-tmp} \cs_generate_variant:Nn \ref_label:nn {en} @@ -40,6 +40,7 @@ \prop_new:N \g__pdf_tmpa_prop \tl_new:N \l__pdf_tmpa_tl \box_new:N \l__pdf_backend_tmpa_box +\box_new:N \l__pdf_backend_tmpb_box \int_new:N \g__pdf_backend_resourceid_int \int_new:N \g__pdf_backend_name_int \int_new:N \g__pdf_backend_page_int @@ -59,20 +60,12 @@ { \g__kernel_pdfmanagement_thispage_shipout_code_tl } - \tl_gput_left:Nn\@kernel@after@shipout@lastpage - { - \g__kernel_pdfmanagement_lastpage_shipout_code_tl - } } { \hook_gput_code:nnn{shipout/background}{pdf} { \g__kernel_pdfmanagement_thispage_shipout_code_tl } - \hook_gput_code:nnn {shipout/lastpage} {pdf} - { - \g__kernel_pdfmanagement_lastpage_shipout_code_tl - } } \sys_if_engine_luatex:T @@ -158,7 +151,6 @@ Pattern, Shading, } - %create the backend objects: \clist_map_inline:Nn \c__pdf_backend_PageResources_clist { \__pdf_backend_object_new:nn {__pdf/Page/Resources/#1} {dict} @@ -175,7 +167,6 @@ \cs_new_protected:Npn \__pdf_backend_PageResources_gput:nnn #1 #2 #3 { \pdfdict_gput:nnn {g__pdf_Core/Page/Resources/#1} { #2 }{ #3 } - % luatex must also trigger the lua side \tex_latelua:D{ltx.__pdf.Page.Resources.#1=true} \tex_latelua:D { diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-pdftex.def b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-pdftex.def index 2a9a1aa8e0d..d8563623fe5 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-pdftex.def +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-pdftex.def @@ -20,7 +20,7 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-pdftex.def}{2021-06-29}{} + {l3backend-testphase-pdftex.def}{2021-07-21}{} {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (pdfTeX)} \RequirePackage{l3ref-tmp} \cs_generate_variant:Nn \ref_label:nn {en} @@ -40,6 +40,7 @@ \prop_new:N \g__pdf_tmpa_prop \tl_new:N \l__pdf_tmpa_tl \box_new:N \l__pdf_backend_tmpa_box +\box_new:N \l__pdf_backend_tmpb_box \int_new:N \g__pdf_backend_resourceid_int \int_new:N \g__pdf_backend_name_int \int_new:N \g__pdf_backend_page_int @@ -58,20 +59,12 @@ { \g__kernel_pdfmanagement_thispage_shipout_code_tl } - \tl_gput_left:Nn\@kernel@after@shipout@lastpage - { - \g__kernel_pdfmanagement_lastpage_shipout_code_tl - } } { \hook_gput_code:nnn{shipout/background}{pdf} { \g__kernel_pdfmanagement_thispage_shipout_code_tl } - \hook_gput_code:nnn {shipout/lastpage} {pdf} - { - \g__kernel_pdfmanagement_lastpage_shipout_code_tl - } } \cs_new_protected:Npn \__pdf_backend_Pages_primitive:n #1 @@ -132,7 +125,6 @@ Pattern, Shading, } - %create the backend objects: \clist_map_inline:Nn \c__pdf_backend_PageResources_clist { \__pdf_backend_object_new:nn {__pdf/Page/Resources/#1} {dict} diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def index 072cb1487d3..cdbb435a46e 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def @@ -20,7 +20,7 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-xetex.def}{2021-06-29}{} + {l3backend-testphase-xetex.def}{2021-07-21}{} {LaTeX~PDF~management~testphase~bundle~backend~support: XeTeX} \RequirePackage{l3ref-tmp} \cs_generate_variant:Nn \ref_label:nn {en} @@ -41,6 +41,7 @@ \prop_new:N \g__pdf_tmpa_prop \tl_new:N \l__pdf_tmpa_tl \box_new:N \l__pdf_backend_tmpa_box +\box_new:N \l__pdf_backend_tmpb_box \int_new:N \g__pdf_backend_resourceid_int \int_new:N \g__pdf_backend_name_int \int_new:N \g__pdf_backend_page_int @@ -59,20 +60,12 @@ { \g__kernel_pdfmanagement_thispage_shipout_code_tl } - \tl_gput_left:Nn\@kernel@after@shipout@lastpage - { - \g__kernel_pdfmanagement_lastpage_shipout_code_tl - } } { \hook_gput_code:nnn{shipout/background}{pdf} { \g__kernel_pdfmanagement_thispage_shipout_code_tl } - \hook_gput_code:nnn {shipout/lastpage} {pdf} - { - \g__kernel_pdfmanagement_lastpage_shipout_code_tl - } } \cs_new_protected:Npn \__pdf_backend_Pages_primitive:n #1 diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3pdffield-testphase.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3pdffield-testphase.sty index 6aa5728c4fa..6741b15587f 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3pdffield-testphase.sty +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3pdffield-testphase.sty @@ -27,7 +27,7 @@ %% File: l3pdffield.dtx \NeedsTeXFormat{LaTeX2e} -\ProvidesExplPackage{l3pdffield-testphase}{2021-06-29}{0.95f}% +\ProvidesExplPackage{l3pdffield-testphase}{2021-07-21}{0.95g}% {form fields} \csname HyField@NeedAppearancesfalse\endcsname % suppress NeedAppearances \str_new:N \l__pdffield_tmpa_str diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdflscape-ltx.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdflscape-ltx.sty index 0755d242022..d123a701152 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdflscape-ltx.sty +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdflscape-ltx.sty @@ -22,7 +22,7 @@ %% This work consists of the main source file pdflscape-ltx.sty %% \NeedsTeXFormat{LaTeX2e} -\ProvidesExplPackage{pdflscape-ltx}{2021-06-29}{0.95f} +\ProvidesExplPackage{pdflscape-ltx}{2021-07-21}{0.95g} {Display of landscape pages in PDF - adaption of pdflscape to the PDFmanagement bundle (testphase)} \DeclareOption*{\PassOptionsToPackage\CurrentOption{graphics}} diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-firstaid.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-firstaid.sty index f258ef56078..b413c730ba1 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-firstaid.sty +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-firstaid.sty @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: pdfmanagement-firstaid.dtx -\ProvidesExplPackage{pdfmanagement-firstaid}{2021-06-29}{0.95f} +\ProvidesExplPackage{pdfmanagement-firstaid}{2021-07-21}{0.95g} {LaTeX PDF management testphase bundle / firstaid-patches} \clist_map_inline:nn {pgf,transparent,hyperxmp,pdflscape,xcolor,color,beamer} @@ -40,14 +40,10 @@ { \color_set:nnn{.5~.5~.5}{rgb}{0.5,0.5,0.5} } -\@ifundefined{color_set:nn}{ -\RequirePackage{l3color}}{} \bool_if:NT \g__pdfmanagement_firstaid_color_bool { \declare@file@substitution{color.sty}{color-ltx.sty} } -\@ifundefined{color_set:nn}{ -\RequirePackage{l3color}}{} \bool_if:NT \g__pdfmanagement_firstaid_xcolor_bool { \AddToHook{package/after/xcolor} diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.ltx b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.ltx index e2b276757cc..094041b27d7 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.ltx +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.ltx @@ -27,7 +27,7 @@ %% and all files in that bundle must be distributed together. %% %% File: pdfmanagement-testphase.dtx -\ProvidesExplFile{pdfmanagement-testphase.ltx}{2021-06-29}{0.95f} +\ProvidesExplFile{pdfmanagement-testphase.ltx}{2021-07-21}{0.95g} {PDF~management~code~(testphase)} %% File: l3pdfdict.dtx \cs_new:Npn \__pdfdict_get_type:n #1 @@ -345,18 +345,11 @@ } } -\tl_gset:Nn \g__kernel_pdfmanagement_lastpage_shipout_code_tl - { - \bool_if:NT \g__pdfmanagement_active_bool - { - \__pdf_backend_PageResources_obj_gpush: %ExtGState etc - } - } - \tl_gset:Nn \g__kernel_pdfmanagement_end_run_code_tl { \bool_if:NT \g__pdfmanagement_active_bool { + \__pdf_backend_PageResources_obj_gpush: %ExtGState etc \__pdfmanagement_Pages_gpush: %pagesattr \__pdfmanagement_Info_gpush: %pdfinfo \__pdfmanagement_Catalog_gpush: @@ -958,6 +951,7 @@ \str_remove_all:cn {opt@hyperref.sty}{customdriver=hgeneric-testphase} } } + \g__pdfmanagement_testphase_tl \RequirePackage{pdfmanagement-firstaid} } } @@ -988,6 +982,7 @@ } } \clist_new:N \g__pdfmanagement_firstaidoff_clist +\tl_new:N \g__pdfmanagement_testphase_tl \keys_define:nn { document / metadata } { backend .code:n = @@ -1037,6 +1032,78 @@ } ,pdfmanagement .bool_gset:N = \g__pdfmanagement_active_bool ,firstaidoff .clist_gset:N = \g__pdfmanagement_firstaidoff_clist + ,testphase .multichoice: + ,testphase / tagpdf .code:n = + { + \tl_gput_right:Nn\g__pdfmanagement_testphase_tl + { + \RequirePackage{tagpdf} + \AddToDocumentProperties [document]{testphase/tagpdf}{loaded} + } + } + ,testphase / headings .code:n = + { + \tl_gput_right:Nn\g__pdfmanagement_testphase_tl + { + \RequirePackage{headings-testphase} + \AddToDocumentProperties [document]{testphase/headings}{loaded} + } + } + ,testphase / ptagging .code:n = + { + \tl_gput_right:Nn\g__pdfmanagement_testphase_tl + { + \AddToHook{class/after} + { + \RequirePackage{ptagging-testphase} + \AddToDocumentProperties [document]{testphase/ptagging}{loaded} + } + } + } + ,testphase / unknown .code:n = + { + \tl_gput_right:Nn\g__pdfmanagement_testphase_tl + { + \AddToHook{class/after} + { + \RequirePackage{#1-testphase} + \AddToDocumentProperties [document]{testphase/#1}{loaded} + } + } + } + ,activate .multichoice: + ,activate / tagging .code:n = + { + \AddToHook{package/after/tagpdf} + { + \tagpdfsetup{activate,paratagging,interwordspace} + \AddToDocumentProperties [document]{tagging}{active} + \AddToDocumentProperties [document]{tagging/para}{active} + \AddToDocumentProperties [document]{tagging/interwordspace}{active} + } + } + ,debug .code:n = + { + \keys_set:nn { document / metadata / debug } {#1} + } + ,debug / para .code:n = + { + \AddToHook{package/after/tagpdf} + { + \tagpdfsetup{paratagging-show} + } + } + ,debug / log .code:n = + { + \AddToHook{package/after/tagpdf} + { + \tagpdfsetup{log=#1} + } + } + ,debug / uncompress .code:n = + { + \pdf_uncompress: + } } %% File: l3pdfannot.dtx \RequirePackage{l3bitset} diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.sty index 313edfa232a..5337c62f0c8 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.sty +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.sty @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: pdfmanagement-testphase.dtx -\ProvidesExplPackage{pdfmanagement-testphase}{2021-06-29}{0.95f} +\ProvidesExplPackage{pdfmanagement-testphase}{2021-07-21}{0.95g} {LaTeX PDF management testphase bundle} \providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} \IfFormatAtLeastTF{2020-10-01}{}{ diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/transparent-ltx.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/transparent-ltx.sty index ece85d46675..5151ea4ff95 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/transparent-ltx.sty +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/transparent-ltx.sty @@ -3,7 +3,7 @@ %% a replacement for transparent sty from Heiko Oberdiek %% \NeedsTeXFormat{LaTeX2e}[2020/10/01] -\ProvidesExplPackage{transparent-ltx}{2021-06-29}{0.95f} +\ProvidesExplPackage{transparent-ltx}{2021-07-21}{0.95g} {Transparency with color stacks (replacement for transparent.sty from Heiko Oberdiek)}% \RequirePackage{l3opacity} diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty index c9f37856f40..0861462d6bb 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty @@ -1,6 +1,6 @@ %% LaTeX2e file `xcolor-patches.sty' %% -\ProvidesPackage{xcolor-patches-tmp-ltx}[2021-06-29 v0.95f patch xcolor for l3color] +\ProvidesPackage{xcolor-patches-tmp-ltx}[2021-07-21 v0.95g patch xcolor for l3color] \@ifundefined{color_set:nn}{\RequirePackage{l3color}}{} \ExplSyntaxOn @@ -8,7 +8,7 @@ % #2: model or models % #3: value: either numbers or a color name % #4 is the type: named or ps -\cs_gset_protected:Npn \@expl@xcolor@set@@nnnn #1 #2 #3 #4 +\cs_gset_protected:Npn \__pdfmanagement_firstaid_xcolor_set:nnnn #1 #2 #3 #4 { \str_case:nnF {#4} { @@ -40,12 +40,14 @@ } } } - \cs_generate_variant:Nn \color_set:nn {ne} - \cs_new_protected:Npn \@expl@xcolor@set@@ne #1 #2 - { - \exp_args:Nx \__color_if_defined:nT {#2} - { \color_set:ne {#1}{#2} } - } +\cs_generate_variant:Nn \__pdfmanagement_firstaid_xcolor_set:nnnn {nonn} +\cs_set_eq:NN \@expl@xcolor@set@@nonn \__pdfmanagement_firstaid_xcolor_set:nonn +\cs_generate_variant:Nn \color_set:nn {ne} +\cs_new_protected:Npn \@expl@xcolor@set@@ne #1 #2 + { + \exp_args:Nx \__color_if_defined:nT {#2} + { \color_set:ne {#1}{#2} } + } \ExplSyntaxOff %\pretocmd{\XC@col@rlet} {\@expl@color@set@@ne{#2}{#4}}{}{\fail} \def\XC@col@rlet[#1]#2[#3]#4% @@ -76,7 +78,7 @@ %\pretocmd{\XC@definec@lor}{\@expl@color@set@@nnn{#2}{#4}{#5}}{}{\fail} \def\XC@definec@lor[#1]#2[#3]#4#5% - {\@expl@xcolor@set@@nnnn{#2}{#4}{#5}{#1}% + {\@expl@xcolor@set@@nonn{#2}{#4}{#5}{#1}% \begingroup \XC@sdef\@@cls{#1}\XC@edef\@@nam{#2}\edef\colornameprefix{#3}% \XC@logdef\@@nam |