diff options
author | Karl Berry <karl@freefriends.org> | 2023-08-21 20:20:51 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-08-21 20:20:51 +0000 |
commit | 78f128f37a962971eb0071ac427c974dce850ef9 (patch) | |
tree | 371ea4aa30d5f56ef0fb19dad771d1cc18d42155 | |
parent | 0f78a073b59e97071fc8c44f73d1be15e920ae1c (diff) |
pdfmanagement-testphase (21aug23)
git-svn-id: svn://tug.org/texlive/trunk@68005 c570f23f-e606-0410-a88d-b1316a301751
60 files changed, 525 insertions, 396 deletions
diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/CHANGELOG.md b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/CHANGELOG.md index 56f51f6f0dd..edbe215b55e 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/CHANGELOG.md +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/CHANGELOG.md @@ -5,8 +5,24 @@ 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. +## [2023-08-20] + +### Added + - l3pdftools: \pdf_bdc_shipout:ee which makes use of the new shipout keyword + of \special and \pdfliteral + - key for the (not yet released) standard pdf/UA-2 + +### Fixed + - expansion behaviour of \pdf_bdc:nn + - faulty error command in \pdf_string_from_unicode:nnN + +## Removed + - patches of the output routine. These are now provided by latex-lab + ## [2023-03-09] +Version: 2023-03-09, 0.95x + ### Fixed - regression data producer in xmp diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/README.md b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/README.md index 4cf21551748..0642ac06b92 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.95x, 2023-03-09 +Version: 0.95y, 2023-08-20 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 306f715e8d2..d9133bcfaa1 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 03c2cb4d738..cb9604b4b46 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 6efe0a3e816..2df2bd90434 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 277eda9a518..d3cd1dad08c 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 f3f2709d1c2..c6ece9e4e1a 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 c3a510d8750..a213e7ef348 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 c668f282fe1..976ddb1bda1 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 e33b6a35981..e6f6dffc751 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 400c83654e8..ec6f6f90770 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 98020b9fa2d..da290f2e249 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 35caa5b8db7..4e1abae41e1 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 c51b62daf8b..4f7c9df5bc2 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 fa89390e253..24350d7fc13 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 66e3bf0206d..8b585d669a3 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 633a4ef8717..5dd3e360046 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 4d0fb96e1fa..aa8d8e18b5b 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 963c915cca6..19cf28e4782 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/output-patches-tmp-ltx.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/output-patches-tmp-ltx.pdf Binary files differdeleted file mode 100644 index dc8d376f76b..00000000000 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/output-patches-tmp-ltx.pdf +++ /dev/null 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 05f5aeac650..d9a5a53bf58 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 7e40c5713c6..42536d3849f 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 2e67737df9a..a0eff9a0db1 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/hyperref-generic.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/hyperref-generic.dtx @@ -82,7 +82,7 @@ % }^^A % } % -% \date{Version 0.95x, released 2023-03-09} +% \date{Version 0.95y, released 2023-08-20} % % \maketitle % \begin{documentation} @@ -97,10 +97,9 @@ % combination should work too. % % The driver \emph{requires} the new PDF management code, so documents wanting to use it -% should start like this +% should start like this (this requires \LaTeX-2022-06-01 or newer): % \begin{verbatim} -% \RequirePackage{pdfmanagement-testphase} %loads the code -% \DocumentMetadata % activates it +% \DocumentMetadata %loads the PDF management and activates it % { % %% options % %% e.g. pdf version, backend: @@ -109,18 +108,6 @@ % } % \end{verbatim} % -% Starting with \LaTeX-2022-06-01 (or a suitable latex-dev) loading the testphase -% package is no longer required and this can be simplified to -% \begin{verbatim} -% \DocumentMetadata -% { -% %% options -% %% e.g. pdf version, backend: -% % pdfversion=1.7, -% % backend = dvipdfmx -% } -% \end{verbatim} - % The new driver tries to be compatible with the standard \pkg{hyperref} drivers % but there are nevertheless differences. Some of them due to the still experimental % status of the driver, others are design decisions: one part of the project is @@ -969,7 +956,7 @@ %<@@=hyp> % \end{macrocode} % \begin{macrocode} -\ProvidesFile{hgeneric-testphase.def}[2023-03-09 v0.95x % +\ProvidesFile{hgeneric-testphase.def}[2023-08-20 v0.95y % generic Hyperref driver for the LaTeX PDF management testphase bundle] \RequirePackage{etoolbox} %why? 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 94dddfa8ee6..da0aa971fd3 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.95x, released 2023-03-09} +% \date{Version 0.95y, released 2023-08-20} % % \maketitle % @@ -56,30 +56,99 @@ % \begin{macrocode} %<drivers>\ProvidesExplFile %<*dvipdfmx> - {l3backend-testphase-dvipdfmx.def}{2023-03-09}{} + {l3backend-testphase-dvipdfmx.def}{2023-08-20}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvipdfmx} %</dvipdfmx> %<*dvips> - {l3backend-testphase-dvips.def}{2023-03-09}{} + {l3backend-testphase-dvips.def}{2023-08-20}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvips} %</dvips> %<*dvisvgm> - {l3backend-testphase-dvisvgm.def}{2023-03-09}{} + {l3backend-testphase-dvisvgm.def}{2023-08-20}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvisvgm} %</dvisvgm> %<*luatex> - {l3backend-testphase-luatex.def}{2023-03-09}{} + {l3backend-testphase-luatex.def}{2023-08-20}{} {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (LuaTeX)} %</luatex> %<*pdftex> - {l3backend-testphase-pdftex.def}{2023-03-09}{} + {l3backend-testphase-pdftex.def}{2023-08-20}{} {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (pdfTeX)} %</pdftex> %<*xdvipdfmx> - {l3backend-testphase-xetex.def}{2023-03-09}{} + {l3backend-testphase-xetex.def}{2023-08-20}{} {LaTeX~PDF~management~testphase~bundle~backend~support: XeTeX} %</xdvipdfmx> % \end{macrocode} +% \subsection{Support for delayed literal and special} +% Starting with TeXlive 2023 the engines support a \texttt{shipout} keyword +% for \cs{pdfliteral} and \cs{special}. When used the argument is not expanded +% when the command is used but only when the page is shipped out. This allows for example +% the tagging code to delay the page-wise numbering of MC-chunks until the page is +% actually built. For now we test the engine support. The boolean is setup +% in pdfmanagement-testphase.dtx. +% \begin{macrocode} +%<*drivers> +% \end{macrocode} +% +% The following commands provide the needed kernel backend support. This are basically +% copies of similar commands of l3backend-basics. +% \begin{macro} +% { +% \__kernel_backend_shipout_literal:e +% } +% The one shared function for all backends is access to the basic +% \tn{special} primitive. +% \begin{macrocode} +\bool_if:NT \l__pdfmanagement_delayed_shipout_bool + { + \cs_new_protected:Npn \__kernel_backend_shipout_literal:e #1 + { \tex_special:D~shipout { #1} } +%</drivers> +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +%<*luatex|pdftex> +% \end{macrocode} +% \begin{macro}{\__kernel_backend_shipout_literal_pdf:e} +% This is equivalent to \verb|\special{pdf:}| but the engine can +% track it. Without the \texttt{direct} keyword everything is kept in +% sync: the transformation matrix is set to the current point automatically. +% Note that this is still inside the text (\texttt{BT} \dots \texttt{ET} +% block). +% \begin{macrocode} + \cs_new_protected:Npn \__kernel_backend_shipout_literal_pdf:e #1 + { +%<*luatex> + \tex_pdfextension:D ~ literal ~ shipout ~ +%</luatex> +%<*pdftex> + \tex_pdfliteral:D ~ shipout ~ +%</pdftex> + { #1 } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\__kernel_backend_shipout_literal_page:e} +% Page literals are pretty simple. +% \begin{macrocode} + \cs_new_protected:Npn \__kernel_backend_shipout_literal_page:e #1 + { +%<*luatex> + \tex_pdfextension:D ~ literal ~ shipout ~ +%</luatex> +%<*pdftex> + \tex_pdfliteral:D ~ shipout ~ +%</pdftex> + page { #1 } + } +%</luatex|pdftex> +%<drivers> } +% \end{macrocode} +% \end{macro} + % \subsection{Crossreferences} % This uses the temporary l3ref-tmp.sty. It will % will be replaced by kernel code later. @@ -704,13 +773,15 @@ % \begin{macro} % { % \@@_backend_bdc:nn, +% \@@_backend_shipout_bdc:ee, % \@@_backend_bdcobject:nn, % \@@_backend_bdcobject:n, % \@@_backend_bmc:n, % \@@_backend_emc:, % \@@_backend_PageResources_gpush:n % } -% \cs{@@_backend_bdc:nn}, \cs{@@_backend_bdcobject:nn}, \cs{@@_backend_bdcobject:n}, +% \cs{@@_backend_bdc:nn}, \cs{@@_backend_shipout_bdc:ee}, +% \cs{@@_backend_bdcobject:nn}, \cs{@@_backend_bdcobject:n}, % \cs{@@_backend_bmc:n} and \cs{@@_backend_emc:} % are the backend command that % create the bdc/emc marker and store the properties. @@ -731,8 +802,18 @@ % \cs_set_protected:Npn \@@_backend_bdc:nn #1 #2 % #1 eg. Span, #2: dict_content { - \@@_backend_pdfmark:x{/#1~<<#2>>~/BDC} + \@@_backend_pdfmark:n{/#1~<<#2>>~/BDC} } + +\bool_if:NT\l__pdfmanagement_delayed_shipout_bool + { + \cs_new_protected:Npn \@@_backend_bdc_shipout:ee #1 #2 % #1 eg. Span, #2: dict_content + { + \__kernel_backend_shipout_literal:e + {ps: SDict ~ begin ~ mark /#1~<<#2>>~/BDC ~ pdfmark ~ end } + } + } + \cs_set_protected:Npn \@@_backend_bdcobject:nn #1 #2 % #1 eg. Span, #2: object name { \@@_backend_pdfmark:x{/#1~\@@_backend_object_ref:n{#2}~/BDC} @@ -757,6 +838,11 @@ % \cs_set_protected:Npn \@@_backend_bdc:nn #1 #2 % #1 eg. Span, #2: dict_content {} +\bool_if:NT\l__pdfmanagement_delayed_shipout_bool + { + \cs_set_protected:Npn \@@_backend_shipout_bdc:ee #1 #2 % #1 eg. Span, #2: dict_content + {} + } \cs_set_protected:Npn \@@_backend_bdcobject:nn #1 #2 % #1 eg. Span, #2: object name {} \cs_set_protected:Npn \@@_backend_bdcobject:n #1 % #1 eg. Span, @@ -800,7 +886,7 @@ \int_gincr:N \g_@@_backend_name_int \__kernel_backend_literal:x { - pdf:code~/#1/l3pdf\int_use:N\g_@@_backend_name_int\c_space_tl BDC + pdf:code~/\exp_not:n{#1}/l3pdf\int_use:N\g_@@_backend_name_int\c_space_tl BDC } \__kernel_backend_literal:x { @@ -831,13 +917,22 @@ \__kernel_backend_literal:n {pdf:code~ /#1~<<#2>>~BDC } } -\cs_set_protected:Npn \@@_backend_bdc:nn #1 #2 + \cs_set_protected:Npn \@@_backend_bdc:nn #1 #2 { \bool_if:NTF \g__pdfmanagement_active_bool {\cs_gset_eq:NN \@@_backend_bdc:nn \@@_backend_bdc_contobj:nn} {\cs_gset_eq:NN \@@_backend_bdc:nn \@@_backend_bdc_contstream:nn} \@@_backend_bdc:nn {#1}{#2} } + +\bool_if:NT\l__pdfmanagement_delayed_shipout_bool + { + \cs_set_protected:Npn \@@_backend_bdc_shipout_contstream:ee #1 #2 + { + \__kernel_backend_shipout_literal:e {pdf:code~ /#1~<<#2>>~BDC } + } + \cs_set_eq:NN \@@_backend_bdc_shipout:ee \@@_backend_bdc_shipout_contstream:ee + } \cs_set_protected:Npn \@@_backend_emc: { \__kernel_backend_literal:n {pdf:code~EMC} %pdfbase @@ -889,7 +984,7 @@ { \int_gincr:N \g_@@_backend_name_int \exp_args:Nx\__kernel_backend_literal_page:n - { /#1 ~ /l3pdf\int_use:N\g_@@_backend_name_int\c_space_tl BDC } + { /\exp_not:n{#1} ~ /l3pdf\int_use:N\g_@@_backend_name_int\c_space_tl BDC } \bool_if:NTF \l_@@_backend_xform_bool { \exp_args:Nnx\pdfdict_gput:nnn %no handler needed @@ -922,13 +1017,24 @@ { \__kernel_backend_literal_page:n { /#1~<<#2>>~BDC } } -\cs_set_protected:Npn \@@_backend_bdc:nn #1 #2 + + \cs_set_protected:Npn \@@_backend_bdc:nn #1 #2 { \bool_if:NTF \g__pdfmanagement_active_bool {\cs_gset_eq:NN \@@_backend_bdc:nn \@@_backend_bdc_contobj:nn} {\cs_gset_eq:NN \@@_backend_bdc:nn \@@_backend_bdc_contstream:nn} \@@_backend_bdc:nn {#1}{#2} } + +\bool_if:NT\l__pdfmanagement_delayed_shipout_bool + { + \cs_set_protected:Npn \@@_backend_bdc_shipout_contstream:ee #1 #2 + { + \__kernel_backend_shipout_literal_page:e { /#1~<<#2>>~BDC } + } + \cs_set_eq:NN \@@_backend_bdc_shipout:ee \@@_backend_bdc_shipout_contstream:ee + } + \cs_set_protected:Npn \@@_backend_emc: { \__kernel_backend_literal_page:n { EMC } @@ -973,7 +1079,7 @@ { \int_gincr:N \g_@@_backend_name_int \exp_args:Nx\__kernel_backend_literal_page:n - { /#1 ~ /l3pdf\int_use:N\g_@@_backend_name_int\c_space_tl BDC } + { /\exp_not:n{#1} ~ /l3pdf\int_use:N\g_@@_backend_name_int\c_space_tl BDC } % code to set the property .... \int_gincr:N\g_@@_backend_resourceid_int \bool_if:NTF \l_@@_backend_xform_bool @@ -1013,6 +1119,7 @@ { \__kernel_backend_literal_page:n { /#1~<<#2>>~BDC } } + \cs_set_protected:Npn \@@_backend_bdc:nn #1 #2 { \bool_if:NTF \g__pdfmanagement_active_bool @@ -1020,6 +1127,15 @@ {\cs_gset_eq:NN \@@_backend_bdc:nn \@@_backend_bdc_contstream:nn} \@@_backend_bdc:nn {#1}{#2} } +\bool_if:NT\l__pdfmanagement_delayed_shipout_bool + { + \cs_set_protected:Npn \@@_backend_bdc_shipout_contstream:ee #1 #2 + { + \__kernel_backend_shipout_literal_page:e { /#1~<<#2>>~BDC } + } + \cs_set_eq:NN \@@_backend_bdc_shipout:ee \@@_backend_bdc_shipout_contstream:ee + } + \cs_set_protected:Npn \@@_backend_emc: { \__kernel_backend_literal_page:n { EMC } diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfannot.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfannot.dtx index 761a2fef581..15e5bdc9b4e 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfannot.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfannot.dtx @@ -48,7 +48,7 @@ % }^^A % } % -% \date{Version 0.95x, released 2023-03-09} +% \date{Version 0.95y, released 2023-08-20} % % \maketitle % \begin{documentation} @@ -432,7 +432,7 @@ % \begin{macrocode} %<@@=pdfannot> %<*header> -\ProvidesExplPackage{l3pdfannot}{2023-03-09}{0.95x} +\ProvidesExplPackage{l3pdfannot}{2023-08-20}{0.95y} {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 4a6af666de7..7b8eb4d5d83 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfdict.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfdict.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Version 0.95x, released 2023-03-09} +% \date{Version 0.95y, released 2023-08-20} % % \maketitle % \begin{documentation} @@ -208,7 +208,7 @@ % \begin{macrocode} %<@@=pdfdict> %<*header> -\ProvidesExplPackage{l3pdfdict}{2023-03-09}{0.95x} +\ProvidesExplPackage{l3pdfdict}{2023-08-20}{0.95y} {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 0a3933eaca7..bce57aac581 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-action.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-action.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Version 0.95x, released 2023-03-09} +% \date{Version 0.95y, released 2023-08-20} % % \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 e5f0b33feda..9ece0e36e0d 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-checkbox.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-checkbox.dtx @@ -64,7 +64,7 @@ % }^^A % } % -% \date{Version 0.95x, released 2023-03-09} +% \date{Version 0.95y, released 2023-08-20} % % \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 b2920fcdc42..e73bb073ff8 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-choice.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-choice.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Version 0.95x, released 2023-03-09} +% \date{Version 0.95y, released 2023-08-20} % % \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 5011ea4916b..ac43173242e 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-pushbutton.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-pushbutton.dtx @@ -55,7 +55,7 @@ % }^^A % } % -% \date{Version 0.95x, released 2023-03-09} +% \date{Version 0.95y, released 2023-08-20} % % \maketitle % \begin{documentation} 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 55a230c77e0..19a9f914250 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-radiobutton.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-radiobutton.dtx @@ -83,7 +83,7 @@ % }^^A % } % -% \date{Version 0.95x, released 2023-03-09} +% \date{Version 0.95y, released 2023-08-20} % % \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 72f111d55a3..3b820173007 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-textfield.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-textfield.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Version 0.95x, released 2023-03-09} +% \date{Version 0.95y, released 2023-08-20} % % \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 c9181a6ed89..bc570f29e8d 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield.dtx @@ -69,7 +69,7 @@ % }^^A % } % -% \date{Version 0.95x, released 2023-03-09} +% \date{Version 0.95y, released 2023-08-20} % % \maketitle % \begin{documentation} @@ -134,8 +134,7 @@ % So a typical use together with hyperref could look like this % % \begin{verbatim} -% \RequirePackage{pdfmanagement-testphase} -% \DocumentMetadata{uncompress} +% \DocumentMetadata{} % \documentclass{article} % \usepackage{hyperref} % \usepackage{l3pdffield-testphase} @@ -973,7 +972,7 @@ %<*package> %<@@=pdffield> \NeedsTeXFormat{LaTeX2e} -\ProvidesExplPackage{l3pdffield-testphase}{2023-03-09}{0.95x}% +\ProvidesExplPackage{l3pdffield-testphase}{2023-08-20}{0.95y}% {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 fe3ffbd6ef0..6642eb30244 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffile.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffile.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Version 0.95x, released 2023-03-09} +% \date{Version 0.95y, released 2023-08-20} % % \maketitle % \begin{documentation} @@ -398,7 +398,7 @@ % % \begin{macrocode} %<*header> -\ProvidesExplPackage{l3pdffile}{2023-03-09}{0.95x} +\ProvidesExplPackage{l3pdffile}{2023-08-20}{0.95y} {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 df5724be087..d7e5dcc3463 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmanagement.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmanagement.dtx @@ -57,7 +57,7 @@ % }^^A % } % -% \date{Version 0.95x, released 2023-03-09} +% \date{Version 0.95y, released 2023-08-20} % % \maketitle % \begin{documentation} @@ -632,7 +632,7 @@ %<@@=pdfmanagement> %<*header> % -\ProvidesExplPackage{l3pdfmanagement}{2023-03-09}{0.95x} +\ProvidesExplPackage{l3pdfmanagement}{2023-08-20}{0.95y} {Management of core PDF dictionaries (LaTeX PDF management testphase bundle)} %</header> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmeta.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmeta.dtx index 034cf6fd008..d3e88eeb316 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmeta.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmeta.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Version 0.95x, released 2023-03-09} +% \date{Version 0.95y, released 2023-08-20} % % \maketitle % \begin{documentation} @@ -563,7 +563,7 @@ % \begin{macrocode} %<@@=pdfmeta> %<*header> -\ProvidesExplPackage{l3pdfmeta}{2023-03-09}{0.95x} +\ProvidesExplPackage{l3pdfmeta}{2023-08-20}{0.95y} {PDF-Standards---LaTeX PDF management testphase bundle} %</header> % \end{macrocode} @@ -1213,7 +1213,11 @@ _pdfstandard / X-6p .code:n = {\AddToDocumentProperties [document]{pdfstandard-X}{PDF/X-6p}}, _pdfstandard / UA-1 .code:n = - {\AddToDocumentProperties [document]{pdfstandard-UA}{1}}, + { + \AddToDocumentProperties [document]{pdfstandard-UA}{{1}{2016}} + }, + _pdfstandard / UA-2 .code:n = + {\AddToDocumentProperties [document]{pdfstandard-UA}{{2}{2023}}}, xmp .bool_gset:N = \g_@@_xmp_bool } % \end{macrocode} @@ -1930,7 +1934,8 @@ {Year~of~standard} % \end{macrocode} % \end{macro} -% \item[pdfuaid] here we need to declare the property \enquote{part}. +% \item[pdfuaid] here we need (?) to declare the property +% \enquote{part} and \enquote{rev}. % \begin{macro}{pdfuaid~(schema)} % \begin{macrocode} \@@_xmp_schema_new:nnn @@ -1943,6 +1948,12 @@ {Integer} {internal} {Part~of~ISO~14289~standard} +\@@_xmp_property_new:nnnnn + {pdfuaid} + {rev} + {Integer} + {internal} + {Revision~of~ISO~14289~standard} % \end{macrocode} % \end{macro} % \item[pdfx] According to [1] not an allowed schema, but it seems @@ -2216,8 +2227,13 @@ {\@@_xmp_add_packet_line:nne {pdfaid}{rev} {\pdfmeta_standard_item:n{year}}} \@@_xmp_add_packet_line:nne {pdfxid}{GTS_PDFXVersion}{\GetDocumentProperties{document/pdfstandard-X}} - \@@_xmp_add_packet_line:nne - {pdfuaid}{part}{\GetDocumentProperties{document/pdfstandard-UA}} + \pdfmanagement_get_documentproperties:nNT {document/pdfstandard-UA}\l_@@_tmpa_tl + { + \@@_xmp_add_packet_line:nne + {pdfuaid}{part}{\exp_last_unbraced:No\use_i:nn \l_@@_tmpa_tl} + \@@_xmp_add_packet_line:nne + {pdfuaid}{rev}{\exp_last_unbraced:No\use_ii:nn \l_@@_tmpa_tl} + } } % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdftools.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdftools.dtx index 8996d741318..9f1ddc8e78d 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdftools.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdftools.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Version 0.95x, released 2023-03-09} +% \date{Version 0.95y, released 2023-08-20} % % \maketitle % \begin{documentation} @@ -126,7 +126,7 @@ % if the management is active. % \begin{function}[updated = 2020-07-03] % { -% \pdf_bdc:nn +% \pdf_bdc:nn, \pdf_bdc:ee % } % \begin{syntax} % \cs{pdf_bdc:nn} \Arg{tag} \Arg{dictionary content} @@ -139,8 +139,28 @@ % Without the resource management the content is used directly. It then % depends on the backend how it is handled: with dvips a name is used % while the pdfmode engines and dvipdfmx write the content into the stream. -% % \end{function} +% \begin{function}[added = 2023-08-18] +% { +% \pdf_bdc_shipout:ee +% } +% \begin{syntax} +% \cs{pdf_bdc_shipout:ee} \Arg{tag} \Arg{dictionary content} +% \end{syntax} +% This command adds a BDC marked content operator to the current page stream. +% \meta{tag} is the tag of this operator (without the leading slash), +% \meta{dictionary content} is the content of the second argument. +% +% Differently to \cs{pdf_bdc:ee} the arguments are not expanded when the +% command is \emph{used}, but only at \emph{shipout}. +% This requires new engines which +% allow to use the keyword \texttt{shipout} with the primitive +% \cs{special} and \cs{pdfliteral}. The content of \meta{dictionary content} +% is added in the stream. +% +% The command requires current engines and is not defined if an to old engine is detected! +% \end{function} +% % \begin{function}[added = 2020-07-03] % { % \pdf_bdcobject:nn @@ -211,7 +231,7 @@ % % \begin{macrocode} %<*header> -\ProvidesExplPackage{l3pdftools}{2023-03-09}{0.95x} +\ProvidesExplPackage{l3pdftools}{2023-08-20}{0.95y} {candidate commands for l3pdf---LaTeX PDF management testphase bundle} %</header> % \end{macrocode} @@ -252,11 +272,15 @@ % \end{macrocode} % \begin{macro}{\pdf_string_from_unicode:nnN} % \begin{macrocode} +\msg_new:nnn {pdfmanagement}{ unknown-convert} + { + Unknown~string~conversion~method~'#1'! + } \cs_new:Npn \pdf_string_from_unicode:nnN #1 #2 #3 { \cs_if_exist_use:cF { @@_string_from_unicode_#1:nN } { - \__kernel_msg_error:nnn { pdf } { unknown-convert } {#1} + \msg_error:nnn { pdf } { unknown-convert } {#1} \use_none:nn } { #2 } #3 @@ -405,13 +429,28 @@ % \end{macro} % % \subsubsection{BDC operator commands} -% \begin{macro}{\pdf_bdc:nn} +% \begin{macro}{\pdf_bdc:nn,\pdf_bdc:ee} +% \begin{macro}{\pdf_bdc_shipout:ee} % \begin{macro}{\pdf_bdcobject:nn} % \begin{macro}{\pdf_bdcobject:n} % \begin{macro}{\pdf_bmc:n} % \begin{macro}{\pdf_emc:} % \begin{macrocode} \cs_new_protected:Npn \pdf_bdc:nn #1 #2 { \@@_backend_bdc:nn { #1 }{ #2 } } +\cs_generate_variant:Nn \pdf_bdc:nn {ee} + +\cs_new_protected:Npn \pdf_bdc_shipout:ee #1 #2 + { + \bool_if:NTF\l__pdfmanagement_delayed_shipout_bool + { + \@@_backend_bdc_shipout:ee { #1 }{ #2 } + \cs_gset_eq:NN \pdf_bdc_shipout:ee \@@_backend_bdc_shipout:ee + } + { + \msg_error:nn {pdfmanagement}{delayed-shipout} + \cs_gset_eq:NN \pdf_bdc_shipout:ee \use_none:nn + } + } \cs_new_protected:Npn \pdf_bdcobject:nn #1 #2 { \@@_backend_bdcobject:nn { #1 }{ #2 } } \cs_new_protected:Npn \pdf_bdcobject:n #1 { \@@_backend_bdcobject:n { #1 } } \cs_new_protected:Npn \pdf_bmc:n #1 { \@@_backend_bmc:n { #1 } } @@ -422,6 +461,7 @@ % \end{macro} % \end{macro} % \end{macro} +% \end{macro} % \begin{macrocode} %</package> % \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 4eeb9071ab9..d9271f3523e 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfxform.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfxform.dtx @@ -48,7 +48,7 @@ % }^^A % } % -% \date{Version 0.95x, released 2023-03-09} +% \date{Version 0.95y, released 2023-08-20} % % \maketitle % \begin{documentation} @@ -58,7 +58,7 @@ % for which pdf\TeX{} introduced the short name \enquote{xforms}. % % The status is still beta. -% The dvips route is now better supported but there are open issus +% The dvips route is now better supported but there are open issues % 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. % @@ -132,7 +132,7 @@ % \begin{macrocode} %<@@=pdf> %<*header> -\ProvidesExplPackage{l3pdfxform}{2023-03-09}{0.95x} +\ProvidesExplPackage{l3pdfxform}{2023-08-20}{0.95y} {command to create xforms (beta)---LaTeX PDF management testphase bundle} %</header> % \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 ba3473cb304..63ce91e9906 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/ltdocinit.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/ltdocinit.dtx @@ -47,7 +47,7 @@ % }^^A % } % -% \date{Version 0.95x, released 2023-03-09} +% \date{Version 0.95y, released 2023-08-20} % % \maketitle % \begin{documentation} @@ -89,9 +89,11 @@ % \item[\texttt{pdfstandard}] Choice key to set the pdf standard. % % Starting with version 0.95s it is also possible to use the values -% |X-4|, |X-4p|, |X-5g|, |X-5n|, |X-5pg|, |X-6|, |X-6n|, |X-6p|, |UA-1| for +% |X-4|, |X-4p|, |X-5g|, |X-5n|, |X-5pg|, |X-6|, |X-6n|, |X-6p|, |UA-1|, for % a PDF/X and PDF/UA standard. These keys set \emph{only} the relevant -% XMP-metadata. +% XMP-metadata. In version 0.95z support for |UA-2| has been added but +% note that |UA-2| hasn't been released yet. It should be used only together +% with pdf version 2.0. % % Beside this |A-1b|, |A-2a|, |A-2b|, |A-2u|, |A-3a|, |A-3b|, |A-3u| and |A-4| % are accepted as values for A-standards. The casing is irrelevant, |a-1b| works too. @@ -141,6 +143,9 @@ % \item[\texttt{firstaidoff}] This accepts a comma lists of keywords and disables the patches % related to them. More information can be found in the documentation of % \pkg{pdfmanagement-firstaid}. +% \item[\texttt{xmp-export}] This will export the XMP-metadata to a file \verb+\jobname.xmpi+. +% with \texttt{debug=\{xmp-export=filename\}} the file name can be changed. +% More information can be found in the documentation of \pkg{l3pdfmeta}. % \end{description} % \end{description} % @@ -215,7 +220,7 @@ % \begin{macrocode} %<@@=pdfmanagement> %<*header> -\ProvidesExplPackage{ltdocinit}{2023-03-09}{0.95x} +\ProvidesExplPackage{ltdocinit}{2023-08-20}{0.95y} {Initialize document metadata} %</header> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/output-patches-tmp-ltx.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/output-patches-tmp-ltx.dtx deleted file mode 100644 index 11eae11300e..00000000000 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/output-patches-tmp-ltx.dtx +++ /dev/null @@ -1,171 +0,0 @@ -% \iffalse meta-comment -% -%% File: output-patches.dtx (C) Copyright 2020-2023 Frank Mittelbach -% -% It may be distributed and/or modified under the conditions of the -% LaTeX Project Public License (LPPL), either version 1.3c of this -% license or (at your option) any later version. The latest version -% of this license is in the file -% -% https://www.latex-project.org/lppl.txt -% -%<*driver> -\documentclass{l3doc} - -\EnableCrossrefs -\CodelineIndex -\begin{document} - \DocInput{output-patches-tmp-ltx.dtx} -\end{document} -%</driver> -% -% \fi -% -% \providecommand\hook[1]{\texttt{#1}} -% -% -% -% \title{Temporary output patches for tagging and better link support} -% \author{Frank Mittelbach \and Ulrike Fischer} -% -% \maketitle -% -% \section{Introduction} -% -% This package contains a few patches of internal \LaTeX{} needed -% to support paragraph tagging across -% page boundaries (in \pdfTeX) and improve the behaviour of links across page breaks. -% -% Until this get properly integrated with the kernel code this has -% to be taken as a prototype and code, interfaces as well as -% behavior may change without notice and certainly without any -% backwards compatibility! -% -% -% \StopEventually{\setlength\IndexMin{200pt} \PrintIndex } -% -% -% \section{The Implementation} -% \begin{macrocode} -%<*package> -% \end{macrocode} -% -% \begin{macrocode} -\ProvidesPackage{output-patches-tmp-ltx} - [2022-10-29 v0.96 Temporary output patches for tagging and better link support] -\RequirePackage{etoolbox} -% \end{macrocode} -% -% -% \subsection{Patching the OR} -% This add hooks around header and footer, in \cs{@makecol} and in multicol. -% At first initialize some of the hooks. We use providecommand to avoid problems if -% the kernel changes here and provides them directly. -% \begin{macrocode} -\providecommand\@kernel@before@head{} -\providecommand\@kernel@before@foot{} -\providecommand\@kernel@after@head{} -\providecommand\@kernel@after@foot{} -\providecommand\@mult@ptagging@hook{}% multicol -% \end{macrocode} -% -% \begin{macrocode} - -\patchcmd\@outputpage - {\vfil\color@hbox\normalcolor\hb@xt@\textwidth{\@thehead}\color@endbox} - {\vfil\@kernel@before@head\color@hbox\normalcolor\hb@xt@\textwidth{\@thehead}\color@endbox\@kernel@after@head} - {\typeout{Patching header in \string\@outputpage}}{\PATCHerror } - - -\patchcmd\@outputpage - {\color@hbox\normalcolor\hb@xt@\textwidth{\@thefoot}\color@endbox} - {\@kernel@before@foot\color@hbox\normalcolor\hb@xt@\textwidth{\@thefoot}\color@endbox\@kernel@after@foot} - {\typeout{Patching footer in \string\@outputpage}}{\PATCHerror } -% \end{macrocode} -% -% \begin{macro}{\@makecol} -% We have to patch \cs{@makecol} in two places: -% \begin{itemize} -% \item -% update 255 up front to add missing tmb/tme if necessary -% \item -% update the \cs{footins} stream if that one got split -% \end{itemize} -% -% If the new latex-lab file for the output routine is loaded it will do the right thing. -% In the other case we patch \cs{@makecol} manually. -% \begin{macrocode} -\@ifpackageloaded{latex-lab-testphase-new-or} - {} - { - \providecommand\@kernel@before@footins{} - \providecommand\@kernel@before@cclv{} - - \patchcmd\@makecol - {\vskip\skip\footins} - {\vskip\skip\footins\@kernel@before@footins} - {\typeout{Patching \string\@makecol\space for tagging}}{\PATCHerror } - -% for some reason patching with etoolbox only works in this order ... - - \pretocmd\@makecol{\@kernel@before@cclv} - {\typeout{Patching \string\@makecol\space for tagging}}{\PATCHerror } - } -% \end{macrocode} -% \end{macro} -% -% \subsection{\pkg{multicol} adjustments} -% -% The patches for pkg{multicol} are fairly minimal: -% \begin{itemize} -% \item At the start of the environment anything already on the -% page is picked up and stored in \cs{partial@page}, we may need to add -% a TMB to that (it should have a proper TME). This has to happen -% in the \enquote{main} stream context. -% \item -% \item -% \end{itemize} -% -% \begin{macrocode} -\AddToHook{package/multicol/after} - {% multicol needs later loading -% \end{macrocode} -% -% \begin{macrocode} - \patchcmd\page@sofar - {\setbox\z@\hbox{p}\global\dimen\tw@\dp\z@}% - {% - \setbox\z@\hbox{p}\global\dimen\tw@\dp\z@ - \@mult@ptagging@hook - }% - {\typeout{Patching \string\page@sofar\space for tagging}}{\PATCHerror}% -} -% \end{macrocode} -% -% \subsection{Interrupt hooks} -% This requires the l3pdfannot module! -% We add the code here and not in hyperref, as it should also work with links -% created directly with the l3pdfannot commands. The file is only -% loaded by the pdfmanagement, so no need to test if the commands exist. -% \begin{macrocode} -\ExplSyntaxOn -\def\@kernel@before@head{\pdfannot_link_off:} -\def\@kernel@before@foot{\pdfannot_link_off:} -\def\@kernel@after@head {\pdfannot_link_on:} -\def\@kernel@after@foot {\pdfannot_link_on:} -\ExplSyntaxOff -% \end{macrocode} -% -% \begin{macrocode} -%</package> -% \end{macrocode} - -% \begin{macrocode} -%<*latex-lab> -\ProvidesFile{new-or-1-latex-lab-testphase.ltx} - [2022-10-26 v0.8 Temporary output patches for tagging and better link support] -\RequirePackage{latex-lab-testphase-new-or-1} -%</latex-lab> -% \end{macrocode} -% \Finale -% 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 23ce50f33d7..3a7dee37b04 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx @@ -47,7 +47,7 @@ % }^^A % } % -% \date{Version 0.95x, released 2023-03-09} +% \date{Version 0.95y, released 2023-08-20} % % \maketitle % \begin{documentation} @@ -63,7 +63,7 @@ % |debug={firstaidoff={name1,name2,...},...}|. % \begin{macrocode} %<*package> -\ProvidesExplPackage{pdfmanagement-firstaid}{2023-03-09}{0.95x} +\ProvidesExplPackage{pdfmanagement-firstaid}{2023-08-20}{0.95y} {LaTeX PDF management testphase bundle / firstaid-patches} %<@@=pdfmanagement> @@ -113,31 +113,6 @@ } } % \end{macrocode} -% \subsection{Output routine} -% The patches for the LaTeX output routine commands for the tagging -% of the header/footer, the suppressing of links -% and the patch to multicol for the para tagging -% by default, but must be requested with the key \texttt{testphase=new-or-1}. -% But until latex-lab has been updated we must ensure that they are loaded with -% the various phases. -% \begin{macrocode} -\bool_if:NT \g_@@_firstaid_output_bool - { -% \end{macrocode} -% This catches also phase-II and tagpdf. -% \begin{macrocode} - \file_if_exist:nF {new-or-1-latex-lab-testphase.ltx} - { - \AddToHook{package/latex-lab-testphase-new-or/after} - {\RequirePackage{output-patches-tmp-ltx}} -% \end{macrocode} -% This is for phase-I -% \begin{macrocode} - \AddToHook{package/tagpdf/after} - {\RequirePackage{output-patches-tmp-ltx}} - } - } -% \end{macrocode} % \subsection{\pkg{beamer}} % \pkg{beamer} made use of the now unsupported syntax |linkbordercolor={.5 .5 .5}|. 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 15ee3c7d0c1..8085bbc5df8 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.dtx @@ -47,22 +47,34 @@ % }^^A % } % -% \date{Version 0.95x, released 2023-03-09} +% \date{Version 0.95y, released 2023-08-20} % % \maketitle % \begin{documentation} % \section*{Abstract} -% {\em This is a temporary package created to allow the manual +% {\em This is a temporary bundle created to allow the external % loading of the new \LaTeX{} PDF management code during a test phase. % It will disappear when the code is integrated into the \LaTeX{} format.} % % \medskip -% \noindent During the test phase the package should be used like this: +% \noindent When using \LaTeX-2022-06-01 or newer, the +% PDF management code is loaded if you use \cs{DocumentMetadata} before +% \cs{documentclass}. % % \begin{verbatim} -% \RequirePackage{pdfmanagement-testphase} % load the package +% \DocumentMetadata % load activate the PDF management (with options) +% { +% % options +% } % -% \DocumentMetadata % activate the PDF management (with options) +% \documentclass {...} +% \end{verbatim} +% +% In older \LaTeX{} is has to be loaded explicitly: +% +% \begin{verbatim} +% \RequirePackage{pdfmanagement-testphase} +% \DocumentMetadata % load activate the PDF management (with options) % { % % options % } @@ -72,9 +84,6 @@ % Note that the activation has to happen before the \cs{documentclass} declaration. % Because of this, the package needs loading with \cs{RequirePackage}. % -% Starting with LaTeX 2022-06-01 (or a suitable latex-dev) it is no longer necessary to -% load pdfmanagement-testphase manually, using \cs{DocumentMetadata} is enough. -% % % \section*{Feedback wanted!} % @@ -386,7 +395,7 @@ % \begin{macrocode} %<@@=pdf> %<*package> -\ProvidesExplPackage{pdfmanagement-testphase}{2023-03-09}{0.95x} +\ProvidesExplPackage{pdfmanagement-testphase}{2023-08-20}{0.95y} {LaTeX PDF management testphase bundle} \providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} \IfFormatAtLeastTF{2020-10-01}{}{ @@ -414,8 +423,53 @@ % to allow to set it in the document. % \begin{macrocode} %<*header> -\ProvidesExplFile{pdfmanagement-testphase.ltx}{2023-03-09}{0.95x} +\ProvidesExplFile{pdfmanagement-testphase.ltx}{2023-08-20}{0.95y} {PDF~management~code~(testphase)} +% \end{macrocode} +% We define a boolean for the new delayed shipout. This is temporary. At some +% time we can request the new engines! +% \begin{macrocode} +\bool_new:N\l__pdfmanagement_delayed_shipout_bool +\msg_new:nnn {pdfmanagement}{delayed-shipout} + { + The~engine~is~too~old!\\ + \tl_to_str:n{\pdf_bdc_shipout:ee}~can~not~be~used. + } +\sys_if_engine_luatex:T + { + \int_compare:nNnT {\tex_luatexversion:D} > {116} + { + \bool_set_true:N\l__pdfmanagement_delayed_shipout_bool + } + } +\sys_if_engine_pdftex:T + { + \fp_compare:nNnT{\int_use:N\tex_pdftexversion:D.\tex_pdftexrevision:D}>{140.24} + { + \bool_set_true:N\l__pdfmanagement_delayed_shipout_bool + } + } +\sys_if_engine_ptex:T + { + \int_compare:nNnT{\tex_epTeXversion:D} > {230213} + { + \bool_set_true:N\l__pdfmanagement_delayed_shipout_bool + } + } +\sys_if_engine_uptex:T + { + \int_compare:nNnT{\tex_epTeXversion:D} > {230213} + { + \bool_set_true:N\l__pdfmanagement_delayed_shipout_bool + } + } +\sys_if_engine_xetex:T + { + \fp_compare:nNnT{\int_use:N\tex_XeTeXversion:D\tex_XeTeXrevision:D} > {0.999994} + { + \bool_set_true:N\l__pdfmanagement_delayed_shipout_bool + } + } %</header> %<*package> %\RequirePackage{l3pdfdict} % needed by l3pdfmanagement diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.ins b/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.ins index 5f0656d8980..e00d1f89dc7 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.ins +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.ins @@ -215,13 +215,6 @@ and all files in that bundle must be distributed together. } } -\generate - { - \file {output-patches-tmp-ltx.sty} - { - \from{output-patches-tmp-ltx.dtx}{package} - } - } \def\MetaPrefix{-- } \def\defaultpostamble{% 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 dcfba47cc0b..53218fe6aa9 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/color-ltx.sty +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/color-ltx.sty @@ -24,7 +24,7 @@ %% This file has the LPPL maintenance status "maintained". %% \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{color-ltx}[2023-03-09 v0.95x +\ProvidesPackage{color-ltx}[2023-08-20 v0.95y Standard LaTeX Color (patched for l3color, part of pdfmanagement-testphase, original version 2022/01/06 v1.3d) (DPC)] \edef\Gin@codes{% \catcode`\noexpand\^^A\the\catcode`\^^A\relax diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty index 2b08ae1d808..698922d100d 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty @@ -19,7 +19,7 @@ % % for those people who are interested. \NeedsTeXFormat{LaTeX2e}[2020/10/01] -\ProvidesExplPackage{colorspace-patches-tmp-ltx}{2023-03-09}{0.95x} +\ProvidesExplPackage{colorspace-patches-tmp-ltx}{2023-08-20}{0.95y} {temporay patches to for the colorspace package to test pdfresource management ... UF} % colorspace can define more models, that l3color can't yet handle. 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 940a532e5f9..5f694001c1a 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def @@ -19,8 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: hyperref-generic.dtx - -\ProvidesFile{hgeneric-testphase.def}[2023-03-09 v0.95x % +\ProvidesFile{hgeneric-testphase.def}[2023-08-20 v0.95y % generic Hyperref driver for the LaTeX PDF management testphase bundle] \RequirePackage{etoolbox} %why? diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperref-colorschemes.def b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperref-colorschemes.def index 29a3982e647..58afa2345a1 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperref-colorschemes.def +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperref-colorschemes.def @@ -20,7 +20,6 @@ %% %% File: hyperref-generic.dtx - \prop_const_from_keyval:cn { c__hyp_colorscheme_primary-colors_prop } { linkcolor = [rgb]{1,0,0}, %red 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 545aac814be..329a00e3465 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,8 +20,14 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-dvipdfmx.def}{2023-03-09}{} + {l3backend-testphase-dvipdfmx.def}{2023-08-20}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvipdfmx} +\bool_if:NT \l__pdfmanagement_delayed_shipout_bool + { + \cs_new_protected:Npn \__kernel_backend_shipout_literal:e #1 + { \tex_special:D~shipout { #1} } + } + \RequirePackage{l3ref-tmp} \cs_generate_variant:Nn \ref_label:nn {en} \cs_generate_variant:Nn \ref_value:nn {en} @@ -170,7 +176,7 @@ \int_gincr:N \g__pdf_backend_name_int \__kernel_backend_literal:x { - pdf:code~/#1/l3pdf\int_use:N\g__pdf_backend_name_int\c_space_tl BDC + pdf:code~/\exp_not:n{#1}/l3pdf\int_use:N\g__pdf_backend_name_int\c_space_tl BDC } \__kernel_backend_literal:x { @@ -200,13 +206,22 @@ \__kernel_backend_literal:n {pdf:code~ /#1~<<#2>>~BDC } } -\cs_set_protected:Npn \__pdf_backend_bdc:nn #1 #2 + \cs_set_protected:Npn \__pdf_backend_bdc:nn #1 #2 { \bool_if:NTF \g__pdfmanagement_active_bool {\cs_gset_eq:NN \__pdf_backend_bdc:nn \__pdf_backend_bdc_contobj:nn} {\cs_gset_eq:NN \__pdf_backend_bdc:nn \__pdf_backend_bdc_contstream:nn} \__pdf_backend_bdc:nn {#1}{#2} } + +\bool_if:NT\l__pdfmanagement_delayed_shipout_bool + { + \cs_set_protected:Npn \__pdf_backend_bdc_shipout_contstream:ee #1 #2 + { + \__kernel_backend_shipout_literal:e {pdf:code~ /#1~<<#2>>~BDC } + } + \cs_set_eq:NN \__pdf_backend_bdc_shipout:ee \__pdf_backend_bdc_shipout_contstream:ee + } \cs_set_protected:Npn \__pdf_backend_emc: { \__kernel_backend_literal:n {pdf:code~EMC} %pdfbase 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 daede494128..7fb20c162a7 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,8 +20,14 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-dvips.def}{2023-03-09}{} + {l3backend-testphase-dvips.def}{2023-08-20}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvips} +\bool_if:NT \l__pdfmanagement_delayed_shipout_bool + { + \cs_new_protected:Npn \__kernel_backend_shipout_literal:e #1 + { \tex_special:D~shipout { #1} } + } + \RequirePackage{l3ref-tmp} \cs_generate_variant:Nn \ref_label:nn {en} \cs_generate_variant:Nn \ref_value:nn {en} @@ -124,8 +130,18 @@ \bool_new:N \l__pdf_backend_xform_bool \cs_set_protected:Npn \__pdf_backend_bdc:nn #1 #2 % #1 eg. Span, #2: dict_content { - \__pdf_backend_pdfmark:x{/#1~<<#2>>~/BDC} + \__pdf_backend_pdfmark:n{/#1~<<#2>>~/BDC} } + +\bool_if:NT\l__pdfmanagement_delayed_shipout_bool + { + \cs_new_protected:Npn \__pdf_backend_bdc_shipout:ee #1 #2 % #1 eg. Span, #2: dict_content + { + \__kernel_backend_shipout_literal:e + {ps: SDict ~ begin ~ mark /#1~<<#2>>~/BDC ~ pdfmark ~ end } + } + } + \cs_set_protected:Npn \__pdf_backend_bdcobject:nn #1 #2 % #1 eg. Span, #2: object name { \__pdf_backend_pdfmark:x{/#1~\__pdf_backend_object_ref:n{#2}~/BDC} 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 233fea1d182..1b20208c3a1 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,8 +20,14 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-dvisvgm.def}{2023-03-09}{} + {l3backend-testphase-dvisvgm.def}{2023-08-20}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvisvgm} +\bool_if:NT \l__pdfmanagement_delayed_shipout_bool + { + \cs_new_protected:Npn \__kernel_backend_shipout_literal:e #1 + { \tex_special:D~shipout { #1} } + } + \RequirePackage{l3ref-tmp} \cs_generate_variant:Nn \ref_label:nn {en} \cs_generate_variant:Nn \ref_value:nn {en} @@ -100,6 +106,11 @@ \bool_new:N \l__pdf_backend_xform_bool \cs_set_protected:Npn \__pdf_backend_bdc:nn #1 #2 % #1 eg. Span, #2: dict_content {} +\bool_if:NT\l__pdfmanagement_delayed_shipout_bool + { + \cs_set_protected:Npn \__pdf_backend_shipout_bdc:ee #1 #2 % #1 eg. Span, #2: dict_content + {} + } \cs_set_protected:Npn \__pdf_backend_bdcobject:nn #1 #2 % #1 eg. Span, #2: object name {} \cs_set_protected:Npn \__pdf_backend_bdcobject:n #1 % #1 eg. Span, 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 94fd0d4157b..5686bb26021 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,8 +20,24 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-luatex.def}{2023-03-09}{} + {l3backend-testphase-luatex.def}{2023-08-20}{} {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (LuaTeX)} +\bool_if:NT \l__pdfmanagement_delayed_shipout_bool + { + \cs_new_protected:Npn \__kernel_backend_shipout_literal:e #1 + { \tex_special:D~shipout { #1} } + \cs_new_protected:Npn \__kernel_backend_shipout_literal_pdf:e #1 + { + \tex_pdfextension:D ~ literal ~ shipout ~ + { #1 } + } + \cs_new_protected:Npn \__kernel_backend_shipout_literal_page:e #1 + { + \tex_pdfextension:D ~ literal ~ shipout ~ + page { #1 } + } + } + \RequirePackage{l3ref-tmp} \cs_generate_variant:Nn \ref_label:nn {en} \cs_generate_variant:Nn \ref_value:nn {en} @@ -216,7 +232,7 @@ { \int_gincr:N \g__pdf_backend_name_int \exp_args:Nx\__kernel_backend_literal_page:n - { /#1 ~ /l3pdf\int_use:N\g__pdf_backend_name_int\c_space_tl BDC } + { /\exp_not:n{#1} ~ /l3pdf\int_use:N\g__pdf_backend_name_int\c_space_tl BDC } \bool_if:NTF \l__pdf_backend_xform_bool { \exp_args:Nnx\pdfdict_gput:nnn %no handler needed @@ -249,13 +265,24 @@ { \__kernel_backend_literal_page:n { /#1~<<#2>>~BDC } } -\cs_set_protected:Npn \__pdf_backend_bdc:nn #1 #2 + + \cs_set_protected:Npn \__pdf_backend_bdc:nn #1 #2 { \bool_if:NTF \g__pdfmanagement_active_bool {\cs_gset_eq:NN \__pdf_backend_bdc:nn \__pdf_backend_bdc_contobj:nn} {\cs_gset_eq:NN \__pdf_backend_bdc:nn \__pdf_backend_bdc_contstream:nn} \__pdf_backend_bdc:nn {#1}{#2} } + +\bool_if:NT\l__pdfmanagement_delayed_shipout_bool + { + \cs_set_protected:Npn \__pdf_backend_bdc_shipout_contstream:ee #1 #2 + { + \__kernel_backend_shipout_literal_page:e { /#1~<<#2>>~BDC } + } + \cs_set_eq:NN \__pdf_backend_bdc_shipout:ee \__pdf_backend_bdc_shipout_contstream:ee + } + \cs_set_protected:Npn \__pdf_backend_emc: { \__kernel_backend_literal_page:n { EMC } 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 918e00d0d01..2611028606f 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,8 +20,24 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-pdftex.def}{2023-03-09}{} + {l3backend-testphase-pdftex.def}{2023-08-20}{} {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (pdfTeX)} +\bool_if:NT \l__pdfmanagement_delayed_shipout_bool + { + \cs_new_protected:Npn \__kernel_backend_shipout_literal:e #1 + { \tex_special:D~shipout { #1} } + \cs_new_protected:Npn \__kernel_backend_shipout_literal_pdf:e #1 + { + \tex_pdfliteral:D ~ shipout ~ + { #1 } + } + \cs_new_protected:Npn \__kernel_backend_shipout_literal_page:e #1 + { + \tex_pdfliteral:D ~ shipout ~ + page { #1 } + } + } + \RequirePackage{l3ref-tmp} \cs_generate_variant:Nn \ref_label:nn {en} \cs_generate_variant:Nn \ref_value:nn {en} @@ -188,7 +204,7 @@ { \int_gincr:N \g__pdf_backend_name_int \exp_args:Nx\__kernel_backend_literal_page:n - { /#1 ~ /l3pdf\int_use:N\g__pdf_backend_name_int\c_space_tl BDC } + { /\exp_not:n{#1} ~ /l3pdf\int_use:N\g__pdf_backend_name_int\c_space_tl BDC } % code to set the property .... \int_gincr:N\g__pdf_backend_resourceid_int \bool_if:NTF \l__pdf_backend_xform_bool @@ -228,6 +244,7 @@ { \__kernel_backend_literal_page:n { /#1~<<#2>>~BDC } } + \cs_set_protected:Npn \__pdf_backend_bdc:nn #1 #2 { \bool_if:NTF \g__pdfmanagement_active_bool @@ -235,6 +252,15 @@ {\cs_gset_eq:NN \__pdf_backend_bdc:nn \__pdf_backend_bdc_contstream:nn} \__pdf_backend_bdc:nn {#1}{#2} } +\bool_if:NT\l__pdfmanagement_delayed_shipout_bool + { + \cs_set_protected:Npn \__pdf_backend_bdc_shipout_contstream:ee #1 #2 + { + \__kernel_backend_shipout_literal_page:e { /#1~<<#2>>~BDC } + } + \cs_set_eq:NN \__pdf_backend_bdc_shipout:ee \__pdf_backend_bdc_shipout_contstream:ee + } + \cs_set_protected:Npn \__pdf_backend_emc: { \__kernel_backend_literal_page:n { EMC } 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 950fa287feb..f3eeb03e37f 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,8 +20,14 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-xetex.def}{2023-03-09}{} + {l3backend-testphase-xetex.def}{2023-08-20}{} {LaTeX~PDF~management~testphase~bundle~backend~support: XeTeX} +\bool_if:NT \l__pdfmanagement_delayed_shipout_bool + { + \cs_new_protected:Npn \__kernel_backend_shipout_literal:e #1 + { \tex_special:D~shipout { #1} } + } + \RequirePackage{l3ref-tmp} \cs_generate_variant:Nn \ref_label:nn {en} \cs_generate_variant:Nn \ref_value:nn {en} @@ -170,7 +176,7 @@ \int_gincr:N \g__pdf_backend_name_int \__kernel_backend_literal:x { - pdf:code~/#1/l3pdf\int_use:N\g__pdf_backend_name_int\c_space_tl BDC + pdf:code~/\exp_not:n{#1}/l3pdf\int_use:N\g__pdf_backend_name_int\c_space_tl BDC } \__kernel_backend_literal:x { @@ -200,13 +206,22 @@ \__kernel_backend_literal:n {pdf:code~ /#1~<<#2>>~BDC } } -\cs_set_protected:Npn \__pdf_backend_bdc:nn #1 #2 + \cs_set_protected:Npn \__pdf_backend_bdc:nn #1 #2 { \bool_if:NTF \g__pdfmanagement_active_bool {\cs_gset_eq:NN \__pdf_backend_bdc:nn \__pdf_backend_bdc_contobj:nn} {\cs_gset_eq:NN \__pdf_backend_bdc:nn \__pdf_backend_bdc_contstream:nn} \__pdf_backend_bdc:nn {#1}{#2} } + +\bool_if:NT\l__pdfmanagement_delayed_shipout_bool + { + \cs_set_protected:Npn \__pdf_backend_bdc_shipout_contstream:ee #1 #2 + { + \__kernel_backend_shipout_literal:e {pdf:code~ /#1~<<#2>>~BDC } + } + \cs_set_eq:NN \__pdf_backend_bdc_shipout:ee \__pdf_backend_bdc_shipout_contstream:ee + } \cs_set_protected:Npn \__pdf_backend_emc: { \__kernel_backend_literal:n {pdf:code~EMC} %pdfbase diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase.lua b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase.lua index 8d8f5e3c635..02de44427b9 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase.lua +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase.lua @@ -22,6 +22,7 @@ + ltx= ltx or {} ltx.__pdf = ltx.__pdf or {} ltx.__pdf.Page = ltx.__pdf.Page or {} 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 1e74f4b0769..83c9df66fca 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}{2023-03-09}{0.95x}% +\ProvidesExplPackage{l3pdffield-testphase}{2023-08-20}{0.95y}% {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/output-patches-tmp-ltx.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/output-patches-tmp-ltx.sty deleted file mode 100644 index 65274b4fc50..00000000000 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/output-patches-tmp-ltx.sty +++ /dev/null @@ -1,74 +0,0 @@ -%% -%% This is file `output-patches-tmp-ltx.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% output-patches-tmp-ltx.dtx (with options: `package') -%% -%% Copyright (C) 2019-2021 The LaTeX Project -%% -%% It may be distributed and/or modified under the conditions of -%% the LaTeX Project Public License (LPPL), either version 1.3c of -%% this license or (at your option) any later version. The latest -%% version of this license is in the file: -%% -%% https://www.latex-project.org/lppl.txt -%% -%% This file is part of the "LaTeX PDF management testphase bundle" (The Work in LPPL) -%% and all files in that bundle must be distributed together. -%% -%% File: output-patches.dtx (C) Copyright 2020-2023 Frank Mittelbach -\ProvidesPackage{output-patches-tmp-ltx} - [2022-10-29 v0.96 Temporary output patches for tagging and better link support] -\RequirePackage{etoolbox} -\providecommand\@kernel@before@head{} -\providecommand\@kernel@before@foot{} -\providecommand\@kernel@after@head{} -\providecommand\@kernel@after@foot{} -\providecommand\@mult@ptagging@hook{}% multicol - -\patchcmd\@outputpage - {\vfil\color@hbox\normalcolor\hb@xt@\textwidth{\@thehead}\color@endbox} - {\vfil\@kernel@before@head\color@hbox\normalcolor\hb@xt@\textwidth{\@thehead}\color@endbox\@kernel@after@head} - {\typeout{Patching header in \string\@outputpage}}{\PATCHerror } - -\patchcmd\@outputpage - {\color@hbox\normalcolor\hb@xt@\textwidth{\@thefoot}\color@endbox} - {\@kernel@before@foot\color@hbox\normalcolor\hb@xt@\textwidth{\@thefoot}\color@endbox\@kernel@after@foot} - {\typeout{Patching footer in \string\@outputpage}}{\PATCHerror } -\@ifpackageloaded{latex-lab-testphase-new-or} - {} - { - \providecommand\@kernel@before@footins{} - \providecommand\@kernel@before@cclv{} - - \patchcmd\@makecol - {\vskip\skip\footins} - {\vskip\skip\footins\@kernel@before@footins} - {\typeout{Patching \string\@makecol\space for tagging}}{\PATCHerror } - - - \pretocmd\@makecol{\@kernel@before@cclv} - {\typeout{Patching \string\@makecol\space for tagging}}{\PATCHerror } - } -\AddToHook{package/multicol/after} - {% multicol needs later loading - \patchcmd\page@sofar - {\setbox\z@\hbox{p}\global\dimen\tw@\dp\z@}% - {% - \setbox\z@\hbox{p}\global\dimen\tw@\dp\z@ - \@mult@ptagging@hook - }% - {\typeout{Patching \string\page@sofar\space for tagging}}{\PATCHerror}% -} -\ExplSyntaxOn -\def\@kernel@before@head{\pdfannot_link_off:} -\def\@kernel@before@foot{\pdfannot_link_off:} -\def\@kernel@after@head {\pdfannot_link_on:} -\def\@kernel@after@foot {\pdfannot_link_on:} -\ExplSyntaxOff - -%% -%% -%% End of file `output-patches-tmp-ltx.sty'. 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 bf2e8557eba..9668e7042de 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}{2023-03-09}{0.95x} +\ProvidesExplPackage{pdfmanagement-firstaid}{2023-08-20}{0.95y} {LaTeX PDF management testphase bundle / firstaid-patches} \clist_map_inline:nn @@ -60,16 +60,6 @@ }{} } } -\bool_if:NT \g__pdfmanagement_firstaid_output_bool - { - \file_if_exist:nF {new-or-1-latex-lab-testphase.ltx} - { - \AddToHook{package/latex-lab-testphase-new-or/after} - {\RequirePackage{output-patches-tmp-ltx}} - \AddToHook{package/tagpdf/after} - {\RequirePackage{output-patches-tmp-ltx}} - } - } \bool_if:NT \g__pdfmanagement_firstaid_color_bool { 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 5b43835e3a3..62e38f5e3a5 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.ltx +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.ltx @@ -27,8 +27,49 @@ %% and all files in that bundle must be distributed together. %% %% File: pdfmanagement-testphase.dtx -\ProvidesExplFile{pdfmanagement-testphase.ltx}{2023-03-09}{0.95x} +\ProvidesExplFile{pdfmanagement-testphase.ltx}{2023-08-20}{0.95y} {PDF~management~code~(testphase)} +\bool_new:N\l__pdfmanagement_delayed_shipout_bool +\msg_new:nnn {pdfmanagement}{delayed-shipout} + { + The~engine~is~too~old!\\ + \tl_to_str:n{\pdf_bdc_shipout:ee}~can~not~be~used. + } +\sys_if_engine_luatex:T + { + \int_compare:nNnT {\tex_luatexversion:D} > {116} + { + \bool_set_true:N\l__pdfmanagement_delayed_shipout_bool + } + } +\sys_if_engine_pdftex:T + { + \fp_compare:nNnT{\int_use:N\tex_pdftexversion:D.\tex_pdftexrevision:D}>{140.24} + { + \bool_set_true:N\l__pdfmanagement_delayed_shipout_bool + } + } +\sys_if_engine_ptex:T + { + \int_compare:nNnT{\tex_epTeXversion:D} > {230213} + { + \bool_set_true:N\l__pdfmanagement_delayed_shipout_bool + } + } +\sys_if_engine_uptex:T + { + \int_compare:nNnT{\tex_epTeXversion:D} > {230213} + { + \bool_set_true:N\l__pdfmanagement_delayed_shipout_bool + } + } +\sys_if_engine_xetex:T + { + \fp_compare:nNnT{\int_use:N\tex_XeTeXversion:D\tex_XeTeXrevision:D} > {0.999994} + { + \bool_set_true:N\l__pdfmanagement_delayed_shipout_bool + } + } %% File: l3pdfdict.dtx \cs_new:Npn \__pdfdict_get_type:n #1 { @@ -1733,7 +1774,11 @@ _pdfstandard / X-6p .code:n = {\AddToDocumentProperties [document]{pdfstandard-X}{PDF/X-6p}}, _pdfstandard / UA-1 .code:n = - {\AddToDocumentProperties [document]{pdfstandard-UA}{1}}, + { + \AddToDocumentProperties [document]{pdfstandard-UA}{{1}{2016}} + }, + _pdfstandard / UA-2 .code:n = + {\AddToDocumentProperties [document]{pdfstandard-UA}{{2}{2023}}}, xmp .bool_gset:N = \g__pdfmeta_xmp_bool } \bool_new:N \g__pdfmeta_xmp_export_bool @@ -2168,6 +2213,12 @@ {Integer} {internal} {Part~of~ISO~14289~standard} +\__pdfmeta_xmp_property_new:nnnnn + {pdfuaid} + {rev} + {Integer} + {internal} + {Revision~of~ISO~14289~standard} \__pdfmeta_xmp_schema_new:nnn {PDF/X~ID~Schema} {pdfxid} @@ -2358,8 +2409,13 @@ {\__pdfmeta_xmp_add_packet_line:nne {pdfaid}{rev} {\pdfmeta_standard_item:n{year}}} \__pdfmeta_xmp_add_packet_line:nne {pdfxid}{GTS_PDFXVersion}{\GetDocumentProperties{document/pdfstandard-X}} - \__pdfmeta_xmp_add_packet_line:nne - {pdfuaid}{part}{\GetDocumentProperties{document/pdfstandard-UA}} + \pdfmanagement_get_documentproperties:nNT {document/pdfstandard-UA}\l__pdfmeta_tmpa_tl + { + \__pdfmeta_xmp_add_packet_line:nne + {pdfuaid}{part}{\exp_last_unbraced:No\use_i:nn \l__pdfmeta_tmpa_tl} + \__pdfmeta_xmp_add_packet_line:nne + {pdfuaid}{rev}{\exp_last_unbraced:No\use_ii:nn \l__pdfmeta_tmpa_tl} + } } \cs_new_protected:Npn \__pdfmeta_xmp_build_photoshop: @@ -2599,11 +2655,15 @@ { \prop_gput:Nnn \g__str_alias_prop { default } { utf8 } } +\msg_new:nnn {pdfmanagement}{ unknown-convert} + { + Unknown~string~conversion~method~'#1'! + } \cs_new:Npn \pdf_string_from_unicode:nnN #1 #2 #3 { \cs_if_exist_use:cF { __pdf_string_from_unicode_#1:nN } { - \__kernel_msg_error:nnn { pdf } { unknown-convert } {#1} + \msg_error:nnn { pdf } { unknown-convert } {#1} \use_none:nn } { #2 } #3 @@ -2705,6 +2765,20 @@ } \cs_new_protected:Npn \pdf_bdc:nn #1 #2 { \__pdf_backend_bdc:nn { #1 }{ #2 } } +\cs_generate_variant:Nn \pdf_bdc:nn {ee} + +\cs_new_protected:Npn \pdf_bdc_shipout:ee #1 #2 + { + \bool_if:NTF\l__pdfmanagement_delayed_shipout_bool + { + \__pdf_backend_bdc_shipout:ee { #1 }{ #2 } + \cs_gset_eq:NN \pdf_bdc_shipout:ee \__pdf_backend_bdc_shipout:ee + } + { + \msg_error:nn {pdfmanagement}{delayed-shipout} + \cs_gset_eq:NN \pdf_bdc_shipout:ee \use_none:nn + } + } \cs_new_protected:Npn \pdf_bdcobject:nn #1 #2 { \__pdf_backend_bdcobject:nn { #1 }{ #2 } } \cs_new_protected:Npn \pdf_bdcobject:n #1 { \__pdf_backend_bdcobject:n { #1 } } \cs_new_protected:Npn \pdf_bmc:n #1 { \__pdf_backend_bmc:n { #1 } } 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 a07962f8eb8..bf7973e63d0 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}{2023-03-09}{0.95x} +\ProvidesExplPackage{pdfmanagement-testphase}{2023-08-20}{0.95y} {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/xcolor-patches-tmp-ltx.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty index 192e4b77a1e..2e2fb2edabf 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}[2023-03-09 v0.95x patch xcolor for l3color] +\ProvidesPackage{xcolor-patches-tmp-ltx}[2023-08-20 v0.95y patch xcolor for l3color] \@ifundefined{color_set:nn}{\RequirePackage{l3color}}{} \ExplSyntaxOn |