From c43a0b49bea6195daa6423809f4339d538b5c8d9 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 22 Jul 2021 03:01:06 +0000 Subject: CTAN sync 202107220301 --- .../contrib/pdfmanagement-testphase/CHANGELOG.md | 16 ++ .../contrib/pdfmanagement-testphase/README.md | 2 +- .../contrib/pdfmanagement-testphase/color-ltx.sty | 2 +- .../pdfmanagement-testphase/hyperref-generic.dtx | 110 ++++++----- .../pdfmanagement-testphase/hyperref-generic.pdf | Bin 947374 -> 949513 bytes .../hyperxmp-patches-tmp-ltx.sty | 2 +- .../l3backend-testphase.dtx | 205 ++++++++++++++++----- .../l3backend-testphase.pdf | Bin 588657 -> 594809 bytes .../contrib/pdfmanagement-testphase/l3pdfannot.dtx | 31 +++- .../contrib/pdfmanagement-testphase/l3pdfannot.pdf | Bin 573839 -> 577451 bytes .../contrib/pdfmanagement-testphase/l3pdfdict.dtx | 4 +- .../contrib/pdfmanagement-testphase/l3pdfdict.pdf | Bin 527212 -> 527225 bytes .../pdfmanagement-testphase/l3pdffield-action.dtx | 2 +- .../pdfmanagement-testphase/l3pdffield-action.pdf | Bin 547968 -> 548003 bytes .../l3pdffield-checkbox.dtx | 2 +- .../l3pdffield-checkbox.pdf | Bin 531008 -> 531031 bytes .../pdfmanagement-testphase/l3pdffield-choice.dtx | 2 +- .../pdfmanagement-testphase/l3pdffield-choice.pdf | Bin 534217 -> 534245 bytes .../l3pdffield-pushbutton.dtx | 16 +- .../l3pdffield-pushbutton.pdf | Bin 526297 -> 526426 bytes .../l3pdffield-radiobutton.dtx | 2 +- .../l3pdffield-radiobutton.pdf | Bin 576394 -> 576432 bytes .../l3pdffield-textfield.dtx | 2 +- .../l3pdffield-textfield.pdf | Bin 505648 -> 505665 bytes .../contrib/pdfmanagement-testphase/l3pdffield.dtx | 4 +- .../contrib/pdfmanagement-testphase/l3pdffield.pdf | Bin 739355 -> 739384 bytes .../contrib/pdfmanagement-testphase/l3pdffile.dtx | 4 +- .../contrib/pdfmanagement-testphase/l3pdffile.pdf | Bin 553295 -> 553454 bytes .../pdfmanagement-testphase/l3pdfmanagement.dtx | 13 +- .../pdfmanagement-testphase/l3pdfmanagement.pdf | Bin 658998 -> 658859 bytes .../contrib/pdfmanagement-testphase/l3pdfmeta.dtx | 4 +- .../contrib/pdfmanagement-testphase/l3pdfmeta.pdf | Bin 663954 -> 664002 bytes .../contrib/pdfmanagement-testphase/l3pdftools.dtx | 4 +- .../contrib/pdfmanagement-testphase/l3pdftools.pdf | Bin 518377 -> 518408 bytes .../contrib/pdfmanagement-testphase/l3pdfxform.dtx | 16 +- .../contrib/pdfmanagement-testphase/l3pdfxform.pdf | Bin 435902 -> 418445 bytes .../contrib/pdfmanagement-testphase/ltdocinit.dtx | 103 ++++++++++- .../contrib/pdfmanagement-testphase/ltdocinit.pdf | Bin 552844 -> 537047 bytes .../pdfmanagement-testphase/pdflscape-ltx.sty | 2 +- .../pdfmanagement-firstaid.dtx | 8 +- .../pdfmanagement-firstaid.pdf | Bin 422433 -> 421608 bytes .../pdfmanagement-testphase.dtx | 6 +- .../pdfmanagement-testphase.pdf | Bin 446514 -> 446478 bytes .../pdfmanagement-testphase/transparent-ltx.sty | 2 +- .../xcolor-patches-tmp-ltx.sty | 20 +- 45 files changed, 432 insertions(+), 152 deletions(-) (limited to 'macros/latex/contrib/pdfmanagement-testphase') diff --git a/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md b/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md index 40fcc015b3..d22bc201ff 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md +++ b/macros/latex/contrib/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/macros/latex/contrib/pdfmanagement-testphase/README.md b/macros/latex/contrib/pdfmanagement-testphase/README.md index f4676aefcd..e521f810db 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/README.md +++ b/macros/latex/contrib/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/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty index 47052c99b1..b7765e97ed 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty +++ b/macros/latex/contrib/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/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx index 906dd58152..e3d84d6ec6 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx +++ b/macros/latex/contrib/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/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf index 7c6e6bbc3b..de4dd81f09 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf and b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty index a1d15ac92d..96e9d086a6 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty +++ b/macros/latex/contrib/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/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx index b877ce86fc..7b4aad8fe6 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx +++ b/macros/latex/contrib/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} %\ProvidesExplFile %<*dvipdfmx> - {l3backend-testphase-dvipdfmx.def}{2021-06-29}{} + {l3backend-testphase-dvipdfmx.def}{2021-07-21}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvipdfmx} % %<*dvips> - {l3backend-testphase-dvips.def}{2021-06-29}{} + {l3backend-testphase-dvips.def}{2021-07-21}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvips} % %<*dvisvgm> - {l3backend-testphase-dvisvgm.def}{2021-06-29}{} + {l3backend-testphase-dvisvgm.def}{2021-07-21}{} {LaTeX~PDF~management~testphase~bundle~backend~support: 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)} % %<*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)} % %<*xdvipdfmx> - {l3backend-testphase-xetex.def}{2021-06-29}{} + {l3backend-testphase-xetex.def}{2021-07-21}{} {LaTeX~PDF~management~testphase~bundle~backend~support: XeTeX} % % \end{macrocode} @@ -106,11 +106,10 @@ \cs_generate_variant:Nn \@@_backend_ref_value:nn {en} % % \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 } % % \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 % % \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 - } } % @@ -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, } % -% 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 @@ } } % +% \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 } } % +% \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 @@ } } % +% \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> %\hook_gset_rule:nnnn{shipout/firstpage}{l3backend-xetex}{after}{pdf} %\hook_gset_rule:nnnn{shipout/firstpage}{l3backend-dvipdfmx}{after}{pdf} % @@ -673,8 +678,11 @@ \cs_new_protected:Npn \@@_backend_PageResources_obj_gpush: {} % +% \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: {} % +% \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~<>} + \@@_backend:x {put~@names~<>} } % @@ -1472,6 +1482,109 @@ \cs_new_protected:Npn \@@_backend_xform_use:n #1 {} \cs_new:Npn \@@_backend_xform_ref:n {} % +% \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} } + } + +% %<*drivers> %% all \prg_new_conditional:Npnn \@@_backend_xform_if_exist:n #1 { p , T , F , TF } diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf index 581ef1f4b4..452b140f99 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx index 1eeeaeb9e7..4f4778699a 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx +++ b/macros/latex/contrib/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} % diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf index f759ec411e..88bc60c05d 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx index 635007c3c0..ef283dd664 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx +++ b/macros/latex/contrib/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)} % % \end{macrocode} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf index 5f5f8a8b8b..8df8e77e73 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx index 6677aeb34b..146214c7f1 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx +++ b/macros/latex/contrib/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/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf index ac54f8e89c..e1074881bc 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx index c8a25060a2..32f2f76ffe 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx +++ b/macros/latex/contrib/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/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf index 232283b07e..722ab053e6 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx index f58e9bff7d..f247ef5142 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx +++ b/macros/latex/contrib/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/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf index efe3b54e9b..bb9bd4816e 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx index 3ae0998304..3d6ee2c6c2 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx +++ b/macros/latex/contrib/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/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf index ae3b69e25c..599400bd4e 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx index cf1570ef3a..3a451bcead 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx +++ b/macros/latex/contrib/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/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf index fd3d40f8fc..4543748a37 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx index 0a8188961c..81330a6520 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx +++ b/macros/latex/contrib/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/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf index 25b086b773..168a072993 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx index cd9c5877ea..36e4415eef 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx +++ b/macros/latex/contrib/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/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf index 33d0035b06..b9d740e9f9 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx index b925844f52..0fadfbe46f 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx +++ b/macros/latex/contrib/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!! % diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf index d6515e96c2..faa18ada04 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx index 15156e9204..0390980da5 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx +++ b/macros/latex/contrib/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)} % % \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/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf index 757a38b292..f017471217 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx index 73163f820a..f590a2b897 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx +++ b/macros/latex/contrib/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} % % \end{macrocode} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf index 1c2d21346c..030b8f17d8 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx index 6dc8a4fc1f..2df7203e0f 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx +++ b/macros/latex/contrib/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} % % \end{macrocode} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf index aaa5a655ce..c322f0e976 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx index 59d72672c6..eef4ae7ee0 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx +++ b/macros/latex/contrib/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} % % \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} % % \end{macrocode} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf index 2155b75584..7e6db80d8a 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx index 8a783b7697..0679203098 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx +++ b/macros/latex/contrib/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} % % \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/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf index 68a7c4ed10..ce3ecd37bb 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf and b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdflscape-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/pdflscape-ltx.sty index 0755d24202..d123a70115 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/pdflscape-ltx.sty +++ b/macros/latex/contrib/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/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx index 1a0284984f..364304de2c 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx +++ b/macros/latex/contrib/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/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf index d59ac10fb1..0aeab401dd 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf and b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx index 7ae7b5ca93..7d0b20ee02 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx +++ b/macros/latex/contrib/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)} % %<*package> diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf index 9e3207d30f..4928dea1fc 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf and b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/transparent-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/transparent-ltx.sty index ece85d4667..5151ea4ff9 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/transparent-ltx.sty +++ b/macros/latex/contrib/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/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty index c9f37856f4..0861462d6b 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty +++ b/macros/latex/contrib/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 -- cgit v1.2.3