diff options
Diffstat (limited to 'Master')
55 files changed, 897 insertions, 167 deletions
diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/CHANGELOG.md b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/CHANGELOG.md index 76a7ffaecf0..b8bbe05c300 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/CHANGELOG.md +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/CHANGELOG.md @@ -5,6 +5,19 @@ 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. +## [2024-04-09] + +### Fixed + - structure destinations for boxed destinations + +### Changed + - use \pdf_object_ref:n instead of backend command as preparation of l3kernel changes + regarding object storing. + - support for structure destination if indexed objects are used + +### Added + - force EmbeddedFiles name tree with standard A-4F + ## [2024-03-26] Version: 2024-03-26, 0.96g diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/README.md b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/README.md index 1378840ee97..136f8e6c7cc 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.96g, 2024-03-26 +Version: 0.96h, 2024-04-09 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 ee538f4cbb0..8861d8b53fd 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 18dce0d15c9..c4e96784b03 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 880cb937f63..a64cceab211 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 1ef7e5af82b..d47028ee51f 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 d03a6c3d997..81bb3eab724 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 17af7992240..e680f959358 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 c824d99d19a..3456e45f32d 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 b1010941ff5..e84df48b53a 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 7b834e6cc8c..51804d8c3eb 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 ec5bf44062f..5c9d33c98af 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 b039c21c83b..906a58d2b0c 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 4f45287aaa1..375d8bba156 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 22b1113a506..8c02b7fbc49 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 f722fe08d4b..31abe3cc77e 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 2e472fead28..4dca8de6ec9 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 cd9a1227c07..5871db8203d 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 8b86d10d73c..9778c2647f8 100644 --- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/ltdocinit.pdf +++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/ltdocinit.pdf diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-firstaid.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-firstaid.pdf Binary files differindex 2e67c2b2db8..7d4b656e9ab 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 19233b91f6f..d8204141ca8 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 91dbb1d88a9..d6595449fed 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.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -964,7 +964,7 @@ %<@@=hyp> % \end{macrocode} % \begin{macrocode} -\ProvidesFile{hgeneric-testphase.def}[2024-03-26 v0.96g % +\ProvidesFile{hgeneric-testphase.def}[2024-04-09 v0.96h % 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 d7c0d8d9300..75e944cf828 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.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % @@ -56,27 +56,27 @@ % \begin{macrocode} %<drivers>\ProvidesExplFile %<*dvipdfmx> - {l3backend-testphase-dvipdfmx.def}{2024-03-26}{} + {l3backend-testphase-dvipdfmx.def}{2024-04-09}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvipdfmx} %</dvipdfmx> %<*dvips> - {l3backend-testphase-dvips.def}{2024-03-26}{} + {l3backend-testphase-dvips.def}{2024-04-09}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvips} %</dvips> %<*dvisvgm> - {l3backend-testphase-dvisvgm.def}{2024-03-26}{} + {l3backend-testphase-dvisvgm.def}{2024-04-09}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvisvgm} %</dvisvgm> %<*luatex> - {l3backend-testphase-luatex.def}{2024-03-26}{} + {l3backend-testphase-luatex.def}{2024-04-09}{} {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (LuaTeX)} %</luatex> %<*pdftex> - {l3backend-testphase-pdftex.def}{2024-03-26}{} + {l3backend-testphase-pdftex.def}{2024-04-09}{} {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (pdfTeX)} %</pdftex> %<*xdvipdfmx> - {l3backend-testphase-xetex.def}{2024-03-26}{} + {l3backend-testphase-xetex.def}{2024-04-09}{} {LaTeX~PDF~management~testphase~bundle~backend~support: XeTeX} %</xdvipdfmx> % \end{macrocode} @@ -205,7 +205,7 @@ %</drivers> % \end{macrocode} % \end{variable} -% + % \begin{variable} % {\g_@@_backend_resourceid_int, \g_@@_backend_name_int, \g_@@_backend_page_int} % a counter to create labels for the resources, a counter @@ -218,6 +218,7 @@ %</drivers> % \end{macrocode} % \end{variable} +% % \subsection{luacode} % Load the lua code. % \begin{macrocode} @@ -348,7 +349,6 @@ % \begin{NOTE}{UF} % path: Page % !!!!!!!!!!!!!!!!!!!!!! -% This part of the code depends on l3ref-tmp as it sets labels. % It also depends on code in l3pdfmanagement as the code uses the Core-dictionaries % !!!!!!!!!!!!!!!!!!!!!! % @@ -671,7 +671,7 @@ { ltx.@@.object["@@/Page/Resources/#1"] = - "\@@_backend_object_ref:n{@@/Page/Resources/#1}" + "\pdf_object_ref:n{@@/Page/Resources/#1}" } } } @@ -751,7 +751,7 @@ %objects are not filled with \pdf_object_write as this is not additive! \@@_backend:e { - put~\@@_backend_object_ref:n {@@/Page/Resources/#1}<</#2~#3>> + put~\pdf_object_ref:n {@@/Page/Resources/#1}<</#2~#3>> } } @@ -783,6 +783,7 @@ % \end{macrocode} % \end{macro} % \end{macro} +% % \subsubsection{Page resources /Properties + BDC operators} % \begin{macro} % { @@ -830,7 +831,7 @@ \cs_set_protected:Npn \@@_backend_bdcobject:nn #1 #2 % #1 eg. Span, #2: object name { - \@@_backend_pdfmark:e{/#1~\@@_backend_object_ref:n{#2}~/BDC} + \@@_backend_pdfmark:e{/#1~\pdf_object_ref:n{#2}~/BDC} } \cs_set_protected:Npn \@@_backend_bdcobject:n #1 % #1 eg. Span, { @@ -890,7 +891,7 @@ /Properties~ << /l3pdf\int_use:N\g_@@_backend_name_int\c_space_tl - \@@_backend_object_ref:n { #2 } + \pdf_object_ref:n { #2 } >> >> } @@ -962,7 +963,7 @@ \__kernel_backend_literal:e { pdf:put~@resources~ - <</##1~\@@_backend_object_ref:n {@@/Page/Resources/##1}>> + <</##1~\pdf_object_ref:n {@@/Page/Resources/##1}>> } } } @@ -980,7 +981,7 @@ \pdfdict_gput:nee { g_@@_Core/Xform/Resources/Properties } { l3pdf\int_use:N\g_@@_backend_name_int } - { \@@_backend_object_ref:n { #2 } } + { \pdf_object_ref:n { #2 } } } { \exp_args:Ne \tex_latelua:D @@ -989,7 +990,7 @@ ( tex.count["g_shipout_readonly_int"], "l3pdf\int_use:N\g_@@_backend_name_int", - "\@@_backend_object_ref:n { #2 }" + "\pdf_object_ref:n { #2 }" ) } } @@ -1071,7 +1072,7 @@ \pdfdict_gput:nee %no handler needed { g_@@_Core/Xform/Resources/Properties } { l3pdf\int_use:N\g_@@_backend_resourceid_int } - { \@@_backend_object_ref:n { #2 } } + { \pdf_object_ref:n { #2 } } } { \@@_backend_record_abspage:e {l3pdf\int_use:N\g_@@_backend_resourceid_int} @@ -1086,7 +1087,7 @@ \pdfdict_gput:nee { g_@@_Core/backend_Page\l_@@_tmpa_tl/Resources/Properties } { l3pdf\int_use:N\g_@@_backend_resourceid_int } - { \@@_backend_object_ref:n{#2} } + { \pdf_object_ref:n{#2} } } } \cs_set_protected:Npn \@@_backend_bdcobject:n #1% #1 eg. Span @@ -1188,6 +1189,7 @@ %</pdftex> % \end{macrocode} % \end{macro} +% % \subsection{\enquote{Catalog} \& subdirectories (pdfcatalog) } % The backend command is already in the driver: % \cs{@@_backend_catalog_gput:nn} @@ -1235,6 +1237,7 @@ % EmbeddedFiles is a bit special. % For once we need backend commands for dvips. % But we want also an option to create the name on the fly. +% % \begin{macro}{\@@_backend_NamesEmbeddedFiles_add:nn} % dvips need special backend code to create the name tree. % With the other engines it does nothing. @@ -1261,6 +1264,7 @@ %</dvisvgm> % \end{macrocode} % \end{macro} +% % \subsubsection{Additional annotation commands} % Starting with texlive 2021 pdftex and luatex offer commands to interrupt % a link. That can for example be used to exclude the header and footer from @@ -1734,6 +1738,7 @@ % \end{macrocode} % \end{macro} % \end{macro} +% % \subsection{Structure Destinations} % Standard destinations consist of a reference to a page in the pdf and instructions % how to display it---typically they will put a specific location in the left top corner @@ -1757,14 +1762,22 @@ % that if structure destinations are used, they should be used always. So we define % alternative commands which can be activated by mapping them to the standard backend commands. % +% The needed code differ depending on if structure objects use standard or indexed object names. +% At the end we will probably always use indexed objects, but for now we offer +% both options. +% % \begin{macro}{\l_pdf_current_structure_destination_tl} % -% This commands holds the name of the structure object to use in the next command +% This command holds the name of the structure object to use in the following commands % which creates a destination. The code which activates structure destinations % must also ensure that it has a sensible, expandable content. \pkg{tagpdf} for example % will define it as % \begin{verbatim} % \tl_set:Nn \l_pdf_current_structure_destination_tl { __tag/struct/\g__tag_struct_stack_current_tl } +% \end{verbatim} +% or if indexed structure object names are used +% \begin{verbatim} +% \tl_set:Nn \l_pdf_current_structure_destination_tl { {__tag/struct}{\g__tag_struct_stack_current_tl} } % \end{verbatim} % \begin{macrocode} %<*drivers> @@ -1778,19 +1791,28 @@ % \__pdf_backend_destination:nn -> \__pdf_backend_structure_destination:nn % \__pdf_backend_destination:nnnn -> \__pdf_backend_structure_destination:nnnn % \__pdf_backend_link_begin_goto:nnw -> \__pdf_backend_link_begin_structure_goto:nnw +% \__pdf_backend_destination:nn -> \__pdf_backend_indexed_structure_destination:nn +% \__pdf_backend_destination:nnnn -> \__pdf_backend_indexed_structure_destination:nnnn +% \__pdf_backend_link_begin_goto:nnw -> \__pdf_backend_indexed_link_begin_structure_goto:nnw % \end{verbatim} % % Activating means mapping them onto the original commands. Be aware that not % all engines and compilation routes support structure destinations, for them % the command will be a no-op. % -% \begin{macro}{\pdf_activate_structure_destination:} +% \begin{macro}{\pdf_activate_structure_destination:,\pdf_activate_indexed_structure_destination:} % \begin{macrocode} %<*drivers> \cs_new_protected:Npn \pdf_activate_structure_destination: { - \cs_gset_eq:NN \@@_backend_destination:nn \@@_backend_structure_destination:nn - \cs_gset_eq:NN \@@_backend_destination:nnnn \@@_backend_structure_destination:nnnn + \cs_gset_eq:NN \@@_backend_destination:nn \@@_backend_structure_destination:nn + \cs_gset_eq:NN \@@_backend_destination:nnnn \@@_backend_structure_destination:nnnn + \cs_gset_eq:NN \@@_backend_link_begin_goto:nnw \@@_backend_link_begin_structure_goto:nnw + } +\cs_new_protected:Npn \pdf_activate_indexed_structure_destination: + { + \cs_gset_eq:NN \@@_backend_destination:nn \@@_backend_indexed_structure_destination:nn + \cs_gset_eq:NN \@@_backend_destination:nnnn \@@_backend_indexed_structure_destination:nnnn \cs_gset_eq:NN \@@_backend_link_begin_goto:nnw \@@_backend_link_begin_structure_goto:nnw } %</drivers> @@ -1804,13 +1826,17 @@ % \begin{macrocode} %<*drivers> \cs_set_eq:NN \@@_backend_structure_destination:nn \@@_backend_destination:nn -\cs_set_eq:NN \@@_backend_structure_destination:nnnn \@@_backend_destination:nnnn +\cs_set_eq:NN \@@_backend_structure_destination:nnnn \@@_backend_destination:nnnn \cs_set_eq:NN \@@_backend_link_begin_structure_goto:nnw \@@_backend_link_begin_goto:nnw +\cs_set_eq:NN \@@_backend_indexed_structure_destination:nn \@@_backend_destination:nn +\cs_set_eq:NN \@@_backend_indexed_structure_destination:nnnn \@@_backend_destination:nnnn %</drivers> % \end{macrocode} -% \begin{macro}{\@@_backend_structure_destination:nn} -% This command is the backend command to create a destination. -% It should in parallel create also a structure destination. +% \begin{macro}{\@@_backend_structure_destination:nn, +% \@@_backend_structure_destination:nnnn, +% \@@_backend_link_begin_structure_goto:nnw} +% These commands are the backend commands to create a destination. +% which create also a structure destination. % At first xetex/dvipdfmx. % The structure destination is an array, so we use obj for it % so that we can reference it: @@ -1935,7 +1961,6 @@ } %</xdvipdfmx|dvipdfmx> % \end{macrocode} -% \end{macro} % Now pdftex. We only redefine for version 1.40 revision 24 or later. % \begin{macrocode} %<*pdftex> @@ -1982,7 +2007,7 @@ \scan_stop: } } - \cs_set_protected:Npn \@@_backend_destination:nnnn #1#2#3#4 + \cs_set_protected:Npn \@@_backend_structure_destination:nnnn #1#2#3#4 { \tex_pdfdest:D name {#1} @@ -2054,7 +2079,7 @@ \scan_stop: } } - \cs_set_protected:Npn \@@_backend_destination:nnnn #1#2#3#4 + \cs_set_protected:Npn \@@_backend_structure_destination:nnnn #1#2#3#4 { \tex_pdfextension:D dest name {#1} @@ -2082,6 +2107,252 @@ } %</luatex> % \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_backend_indexed_structure_destination:nn, +% \@@_backend_indexed_structure_destination:nnnn} +% This are the indexed variants of the commands to create a destination +% and a structure destination. +% At first xetex/dvipdfmx. +% The structure destination is an array, so we use obj for it +% so that we can reference it: +% \begin{macrocode} +%<*xdvipdfmx|dvipdfmx> +\cs_set_protected:Npn \@@_backend_indexed_structure_destination:nn #1#2 + { + \@@_backend:e + { + dest ~ ( \exp_not:n {#1} ) + [ + @thispage + \str_case:nnF {#2} + { + { xyz } { /XYZ ~ @xpos ~ @ypos ~ null } + { fit } { /Fit } + { fitb } { /FitB } + { fitbh } { /FitBH } + { fitbv } { /FitBV ~ @xpos } + { fith } { /FitH ~ @ypos } + { fitv } { /FitV ~ @xpos } + { fitr } { /Fit } + } + { /XYZ ~ @xpos ~ @ypos ~ \fp_eval:n { (#2) / 100 } } + ] + } +% \end{macrocode} +% We do not test anymore if the structure object exist. The object of the structure destination +% gets the name \texttt{@pdf.Sdest.\meta{destname}}, where \meta{destname} is the +% name of the standard destination so that we can reference it in the GoTo links. +% \begin{macrocode} + \@@_backend:e + { + obj ~ @pdf.SDest.\exp_not:n{#1} + [ + \exp_after:wN \pdf_object_ref_indexed:nn \l_pdf_current_structure_destination_tl + \str_case:nnF {#2} + { + { xyz } { /XYZ ~ @xpos ~ @ypos ~ null } + { fit } { /Fit } + { fitb } { /FitB } + { fitbh } { /FitBH } + { fitbv } { /FitBV ~ @xpos } + { fith } { /FitH ~ @ypos } + { fitv } { /FitV ~ @xpos } + { fitr } { /Fit } + } + { /XYZ ~ @xpos ~ @ypos ~ \fp_eval:n { (#2) / 100 } } + ] + } + } +% \end{macrocode} +% +% The second destination command is for the boxed destination. Here we need to define +% an new auxiliary command: +% \begin{macrocode} +\cs_new_protected:Npn \@@_backend_indexed_structure_destination_aux:nnnn #1#2#3#4 + { + \vbox_to_zero:n + { + \__kernel_kern:n {#4} + \hbox:n + { + \@@_backend:n { obj ~ @pdf_ #2 _llx ~ @xpos } + \@@_backend:n { obj ~ @pdf_ #2 _lly ~ @ypos } + } + \tex_vss:D + } + \__kernel_kern:n {#1} + \vbox_to_zero:n + { + \__kernel_kern:n { -#3 } + \hbox:n + { + \@@_backend:n + { + dest ~ (#2) + [ + @thispage + /FitR ~ + @pdf_ #2 _llx ~ @pdf_ #2 _lly ~ + @xpos ~ @ypos + ] + } +% \end{macrocode} +% Here we add the structure destination to the same box +% \begin{macrocode} + \@@_backend:e + { + obj ~ @pdf.SDest.\exp_not:n{#2} + [ + \exp_after:wN \pdf_object_ref_indexed:nn \l_pdf_current_structure_destination_tl + /FitR ~ + @pdf_ #2 _llx ~ @pdf_ #2 _lly ~ + @xpos ~ @ypos + ] + } + } + \tex_vss:D + } + \__kernel_kern:n { -#1 } + } +% \end{macrocode} +% And now we redefine the destination command: +% \begin{macrocode} +\cs_set_protected:Npn \@@_backend_indexed_structure_destination:nnnn #1#2#3#4 + { + \exp_args:Ne \@@_backend_indexed_structure_destination_aux:nnnn + { \dim_eval:n {#2} } {#1} {#3} {#4} + } +%</xdvipdfmx|dvipdfmx> +% \end{macrocode} +% +% Now pdftex. We only redefine for version 1.40 revision 24 or later. +% \begin{macrocode} +%<*pdftex> +\bool_lazy_and:nnT + { \int_compare_p:nNn {\tex_pdftexversion:D } > {139} } + { \int_compare_p:nNn {\tex_pdftexrevision:D } > {23} } + { + \cs_set_protected:Npn \@@_backend_indexed_structure_destination:nn #1#2 + { + \tex_pdfdest:D + name {#1} + \str_case:nnF {#2} + { + { xyz } { xyz } + { fit } { fit } + { fitb } { fitb } + { fitbh } { fitbh } + { fitbv } { fitbv } + { fith } { fith } + { fitv } { fitv } + { fitr } { fitr } + } + { xyz ~ zoom \fp_eval:n { #2 * 10 } } + \scan_stop: + \tex_pdfdest:D + struct~ + \exp_after:wN \__kernel_pdf_object_id_indexed:nn \l_pdf_current_structure_destination_tl ~ + name {#1} + \str_case:nnF {#2} + { + { xyz } { xyz } + { fit } { fit } + { fitb } { fitb } + { fitbh } { fitbh } + { fitbv } { fitbv } + { fith } { fith } + { fitv } { fitv } + { fitr } { fitr } + } + { xyz ~ zoom \fp_eval:n { #2 * 10 } } + \scan_stop: + } + \cs_set_protected:Npn \@@_backend_indexed_structure_destination:nnnn #1#2#3#4 + { + \tex_pdfdest:D + name {#1} + fitr ~ + width \dim_eval:n {#2} ~ + height \dim_eval:n {#3} ~ + depth \dim_eval:n {#4} \scan_stop: + \tex_pdfdest:D + struct~ + \exp_after:wN \__kernel_pdf_object_id_indexed:nn \l_pdf_current_structure_destination_tl ~ + name {#1} + fitr ~ + width \dim_eval:n {#2} ~ + height \dim_eval:n {#3} ~ + depth \dim_eval:n {#4} \scan_stop: + } + } +%</pdftex> +% \end{macrocode} +% luatex is quite similar to pdftex. Mostly the test for the version is different +% \begin{macrocode} +%<*luatex> + \int_compare:nNnT {\directlua{tex.print(status.list()["development_id"])} } > {7468} + { + \cs_set_protected:Npn \@@_backend_indexed_structure_destination:nn #1#2 + { + \tex_pdfextension:D dest + name {#1} + \str_case:nnF {#2} + { + { xyz } { xyz } + { fit } { fit } + { fitb } { fitb } + { fitbh } { fitbh } + { fitbv } { fitbv } + { fith } { fith } + { fitv } { fitv } + { fitr } { fitr } + } + { xyz ~ zoom \fp_eval:n { #2 * 10 } } + \scan_stop: + \tex_pdfextension:D dest + struct~ + \exp_after:wN \__kernel_pdf_object_id_indexed:nn \l_pdf_current_structure_destination_tl ~ + name {#1} + \str_case:nnF {#2} + { + { xyz } { xyz } + { fit } { fit } + { fitb } { fitb } + { fitbh } { fitbh } + { fitbv } { fitbv } + { fith } { fith } + { fitv } { fitv } + { fitr } { fitr } + } + { xyz ~ zoom \fp_eval:n { #2 * 10 } } + \scan_stop: + } + \cs_set_protected:Npn \@@_backend_indexed_structure_destination:nnnn #1#2#3#4 + { + \tex_pdfextension:D dest + name {#1} + fitr ~ + width \dim_eval:n {#2} ~ + height \dim_eval:n {#3} ~ + depth \dim_eval:n {#4} \scan_stop: + \tex_pdfextension:D dest + struct~ + \exp_after:wN \__kernel_pdf_object_id_indexed:nn \l_pdf_current_structure_destination_tl~ + name {#1} + fitr ~ + width \dim_eval:n {#2} ~ + height \dim_eval:n {#3} ~ + depth \dim_eval:n {#4} \scan_stop: + } + \cs_set_protected:Npn \@@_backend_link_begin_structure_goto:nnw #1#2 + { + \@@_backend_link_begin:nnnw {#1} { goto~struct~name~{#2}~name } {#2} + } + } +%</luatex> +% \end{macrocode} +% \end{macro} % \subsection{Settings for regression tests} % When doing pdf based regression tests some meta data in the pdf should have % fixed values to get identical pdf's. We define here the backend dependant @@ -2383,5 +2654,5 @@ end %</lua> % \end{macrocode} % \end{implementation} -% +% % \PrintIndex diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfannot.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfannot.dtx index 9b6985afad8..4b04b4308bc 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.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -432,7 +432,7 @@ % \begin{macrocode} %<@@=pdfannot> %<*header> -\ProvidesExplPackage{l3pdfannot}{2024-03-26}{0.96g} +\ProvidesExplPackage{l3pdfannot}{2024-04-09}{0.96h} {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 badac0a01bf..82d0979a025 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.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -208,7 +208,7 @@ % \begin{macrocode} %<@@=pdfdict> %<*header> -\ProvidesExplPackage{l3pdfdict}{2024-03-26}{0.96g} +\ProvidesExplPackage{l3pdfdict}{2024-04-09}{0.96h} {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 cd573afb4ae..6093a6d4427 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.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \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 251c7582b29..534959fcaf5 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.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \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 848ee80f0e4..2a114768be2 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.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \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 c8681262d5b..47c3e95df1f 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.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \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 58b5234a6cb..899042413a6 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.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \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 48af1942de4..bb61dd44e7c 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.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \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 9447227b4ee..8b11e57558e 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.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -972,7 +972,7 @@ %<*package> %<@@=pdffield> \NeedsTeXFormat{LaTeX2e} -\ProvidesExplPackage{l3pdffield-testphase}{2024-03-26}{0.96g}% +\ProvidesExplPackage{l3pdffield-testphase}{2024-04-09}{0.96h}% {form fields} % \end{macrocode} % \subsection{hyperref specific command} @@ -1089,9 +1089,9 @@ Multiline = 13,%Tx Password = 14, NoToggleToOff = 15,%Btn, radio button - Radio = 16,%Btn: Radio: 15=1, 16=0 - Pushbutton = 17,%Btn: Checkbox: 15=0, 16=0 - %Btn: Pushbutton: 16=1 + Radio = 16,%Btn: Radio: 16=1, 17=0 + Pushbutton = 17,%Btn: Checkbox: 16=0, 17=0 + %Btn: Pushbutton: 17=1 Combo = 18,%Ch: Combo=1 List=0 Edit = 19,%Ch, Combo=1 -> + edit field Sort = 20,%Ch, not relevant for view... diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffile.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffile.dtx index 66777934952..65ac4c35fbd 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.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -398,7 +398,7 @@ % % \begin{macrocode} %<*header> -\ProvidesExplPackage{l3pdffile}{2024-03-26}{0.96g} +\ProvidesExplPackage{l3pdffile}{2024-04-09}{0.96h} {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 c605ea7e52b..138b7760fc8 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.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -632,7 +632,7 @@ %<@@=pdfmanagement> %<*header> % -\ProvidesExplPackage{l3pdfmanagement}{2024-03-26}{0.96g} +\ProvidesExplPackage{l3pdfmanagement}{2024-04-09}{0.96h} {Management of core PDF dictionaries (LaTeX PDF management testphase bundle)} %</header> % \end{macrocode} @@ -1286,7 +1286,7 @@ \__pdf_backend_catalog_gput:nn {AA} { - \__pdf_backend_object_ref:n { @@/Catalog/AA } + \pdf_object_ref:n { @@/Catalog/AA } } } } @@ -1316,7 +1316,7 @@ \prop_gput:cnn %we have to use \prop here to avoid the handler ... { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm } } { Fields } - { \__pdf_backend_object_ref:n { @@/Catalog/AcroForm/Fields } } + { \pdf_object_ref:n { @@/Catalog/AcroForm/Fields } } } \seq_if_empty:cF { g_@@_/Catalog/AcroForm/CO_seq } { @@ -1328,7 +1328,7 @@ \prop_gput:cnn %we have to use \prop here to avoid the handler ... { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm } } { CO } - { \__pdf_backend_object_ref:n { @@/Catalog/AcroForm/CO } } + { \pdf_object_ref:n { @@/Catalog/AcroForm/CO } } } \prop_if_empty:cF { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm/DR/Font}} { @@ -1340,7 +1340,7 @@ \prop_gput:cnn %we have to use \prop here to avoid the handler ... { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm/DR } } { Font } - { \__pdf_backend_object_ref:n { @@/Catalog/AcroForm/DR/Font } } + { \pdf_object_ref:n { @@/Catalog/AcroForm/DR/Font } } } \prop_if_empty:cF { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm/DR}} { @@ -1352,7 +1352,7 @@ \prop_gput:cnn %we have to use \prop here to avoid the handler ... { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm } } { DR } - { \__pdf_backend_object_ref:n { @@/Catalog/AcroForm/DR } } + { \pdf_object_ref:n { @@/Catalog/AcroForm/DR } } } \prop_if_empty:cF { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm} } { @@ -1364,7 +1364,7 @@ \@@_handler_gput:nnn { Catalog } { AcroForm } - { \__pdf_backend_object_ref:n { @@/Catalog/AcroForm } } + { \pdf_object_ref:n { @@/Catalog/AcroForm } } } } @@ -1388,7 +1388,7 @@ \__pdf_backend_catalog_gput:nn {AF} { - \__pdf_backend_object_ref:n {@@/Catalog/AF} + \pdf_object_ref:n {@@/Catalog/AF} } } } @@ -1411,7 +1411,7 @@ \__pdf_backend_catalog_gput:nn {MarkInfo} { - \__pdf_backend_object_ref:n {@@/Catalog/MarkInfo} + \pdf_object_ref:n {@@/Catalog/MarkInfo} } } } @@ -1458,7 +1458,7 @@ \exp_args:Nne \__pdf_backend_catalog_gput:nn { OCProperties } - { \__pdf_backend_object_ref:n {@@/Catalog/OCProperties} } + { \pdf_object_ref:n {@@/Catalog/OCProperties} } } } % \end{macrocode} @@ -1481,7 +1481,7 @@ \__pdf_backend_catalog_gput:nn {OutputIntents} { - \__pdf_backend_object_ref:n {@@/Catalog/OutputIntents} + \pdf_object_ref:n {@@/Catalog/OutputIntents} } } } @@ -1505,7 +1505,7 @@ \__pdf_backend_catalog_gput:nn {Requirements} { - \__pdf_backend_object_ref:n { @@/Catalog/Requirements } + \pdf_object_ref:n { @@/Catalog/Requirements } } } } @@ -1529,7 +1529,7 @@ \__pdf_backend_catalog_gput:nn {ViewerPreferences} { - \__pdf_backend_object_ref:n {@@/Catalog/ViewerPreferences} + \pdf_object_ref:n {@@/Catalog/ViewerPreferences} } } } diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmeta.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmeta.dtx index 459265b2cf9..bcdda4fbde3 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.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -190,6 +190,8 @@ % a test for at least the PDF-format will be added in future. % \item[|Catalog_no_OCProperties|] don't add |/OCProperties| to the catalog % {\em l3pdfmeta removes this entry at the end of the document} +% \item[|Catalog_EmbeddedFiles|] ensure that an |EmbeddedFiles| name tree is +% in the catalog. This is required for PDF/A-4f. % \item[|annot_widget_no_AA|] (rule 6.6.2-1) % no AA dictionary in widget annotation, % this will e.g. be checked by the new hyperref driver. @@ -625,7 +627,7 @@ % \begin{macrocode} %<@@=pdfmeta> %<*header> -\ProvidesExplPackage{l3pdfmeta}{2024-03-26}{0.96g} +\ProvidesExplPackage{l3pdfmeta}{2024-04-09}{0.96h} {PDF-Standards---LaTeX PDF management testphase bundle} %</header> % \end{macrocode} @@ -1013,9 +1015,48 @@ { g_@@_standard_pdf/A-4_prop }{conformance} \prop_gremove:cn { g_@@_standard_pdf/A-4_prop }{max_pdf_version} + +%A-4f ============== +\prop_new:c { g_@@_standard_pdf/A-4F_prop } +\prop_gset_eq:cc + { g_@@_standard_pdf/A-4F_prop } + { g_@@_standard_pdf/A-4_prop } +\prop_gput:cnn + { g_@@_standard_pdf/A-4F_prop }{conformance}{F} +% containsEmbeddedFiles == true ISO 19005-4:2020, Clause: 6.9, Test number: 5 +\prop_gput:cnn + { g_@@_standard_pdf/A-4F_prop }{Catalog_EmbeddedFiles}{} % \end{macrocode} % \end{variable} % +% \subsubsection{Embedded Files} +% Standard 4-AF is needed if we add AF files for +% tagging but it also requires an EmbeddedFiles name tree, +% so we test at the end if the name tree is empty and add a small readme if +% yes +% \begin{macrocode} +\AddToHook{begindocument/end} +{ + \pdfmeta_standard_verify:nF{Catalog_EmbeddedFiles} + { + \tl_gput_right:Nn\g__kernel_pdfmanagement_end_run_code_tl + { + \bool_if:NT \g__pdfmanagement_active_bool + { + \pdfdict_if_empty:nT { g__pdf_Core/Catalog/Names/EmbeddedFiles } + { + \group_begin: + \pdfdict_put:nne {l_pdffile/Filespec} {Desc}{(note~about~PDF/A-4F)} + \pdfdict_put:nnn { l_pdffile/Filespec }{AFRelationship} { /Unspecified } + \pdffile_embed_stream:nnN {PDF~standard~A-4F~requires~a~file}{readme.txt}\l_@@_tmpa_tl + \exp_args:Nne \__pdf_backend_Names_gpush:nn{EmbeddedFiles}{(readme)~\l_@@_tmpa_tl} + \group_end: + } + } + } + } +} +% \end{macrocode} % \subsubsection{Colorprofiles and Outputintents} % The following provides a minimum of interface to add a color profile % and an outputintent need for PDF/A for now. There will be need to extend it later, @@ -1187,13 +1228,19 @@ { \pdfmeta_standard_verify:nTF {outputintent_A} { - \prop_map_inline:Nn \g_@@_outputintents_prop + \prop_map_inline:Nn \g_@@_outputintents_prop { - \@@_embed_colorprofile:n - {#2} - \@@_write_outputintent:nn - {#2} - {#1} + \prop_if_exist:cTF {c_@@_colorprofile_#2} + { + \@@_embed_colorprofile:n + {#2} + \@@_write_outputintent:nn + {#2} + {#1} + } + { + \msg_warning:nnn{pdfmeta}{colorprofile-undefined}{#2} + } } } % \end{macrocode} @@ -1218,14 +1265,20 @@ \g_@@_outputintents_prop { \pdfmeta_standard_item:n { outputintent_A } } \l_@@_tmpb_tl - \exp_args:NV \@@_embed_colorprofile:n \l_@@_tmpb_tl - \prop_map_inline:Nn \g_@@_outputintents_prop - { - \exp_args:NV - \@@_write_outputintent:nn - \l_@@_tmpb_tl - { #1 } - } + \prop_if_exist:cTF {c_@@_colorprofile_\l_@@_tmpb_tl} + { + \exp_args:NV \@@_embed_colorprofile:n \l_@@_tmpb_tl + \prop_map_inline:Nn \g_@@_outputintents_prop + { + \exp_args:NV + \@@_write_outputintent:nn + \l_@@_tmpb_tl + { #1 } + } + } + { + \msg_warning:nne{pdfmeta}{colorprofile-undefined}{\l_@@_tmpb_tl} + } } } % \end{macrocode} @@ -1352,6 +1405,7 @@ % \subsection{Messages} % \begin{macrocode} \msg_new:nnn{pdfmeta}{namespace-defined}{The~xmlns~namespace~`#1`~is~already~declared} +\msg_new:nnn{pdfmeta}{colorprofile-undefined}{The~colorprofile~`#1`~is~unknown} % \end{macrocode} % \subsection{Some helper commands} % \subsubsection{Generate a BOM} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdftools.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdftools.dtx index d13742b3720..d440373372d 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.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -231,7 +231,7 @@ % % \begin{macrocode} %<*header> -\ProvidesExplPackage{l3pdftools}{2024-03-26}{0.96g} +\ProvidesExplPackage{l3pdftools}{2024-04-09}{0.96h} {candidate commands for l3pdf---LaTeX PDF management testphase bundle} %</header> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfxform.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfxform.dtx index 8d280dfc8c8..c135d90f884 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.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -132,7 +132,7 @@ % \begin{macrocode} %<@@=pdf> %<*header> -\ProvidesExplPackage{l3pdfxform}{2024-03-26}{0.96g} +\ProvidesExplPackage{l3pdfxform}{2024-04-09}{0.96h} {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 806ea3124b9..e51d8ea2057 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.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -220,7 +220,7 @@ % \begin{macrocode} %<@@=pdfmanagement> %<*header> -\ProvidesExplPackage{ltdocinit}{2024-03-26}{0.96g} +\ProvidesExplPackage{ltdocinit}{2024-04-09}{0.96h} {Initialize document metadata} %</header> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx index 6c186f33bf0..61853b0d5b4 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.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -63,7 +63,7 @@ % |debug={firstaidoff={name1,name2,...},...}|. % \begin{macrocode} %<*package> -\ProvidesExplPackage{pdfmanagement-firstaid}{2024-03-26}{0.96g} +\ProvidesExplPackage{pdfmanagement-firstaid}{2024-04-09}{0.96h} {LaTeX PDF management testphase bundle / firstaid-patches} %<@@=pdfmanagement> 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 205bfd8eb19..eec73f11058 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.dtx @@ -47,7 +47,7 @@ % }^^A % } % -% \date{Version 0.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -394,7 +394,7 @@ % \begin{macrocode} %<@@=pdf> %<*package> -\ProvidesExplPackage{pdfmanagement-testphase}{2024-03-26}{0.96g} +\ProvidesExplPackage{pdfmanagement-testphase}{2024-04-09}{0.96h} {LaTeX PDF management testphase bundle} \providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} \IfFormatAtLeastTF{2020-10-01}{}{ @@ -422,7 +422,7 @@ % to allow to set it in the document. % \begin{macrocode} %<*header> -\ProvidesExplFile{pdfmanagement-testphase.ltx}{2024-03-26}{0.96g} +\ProvidesExplFile{pdfmanagement-testphase.ltx}{2024-04-09}{0.96h} {PDF~management~code~(testphase)} % \end{macrocode} % We define a boolean for the new delayed shipout. This is temporary. At some 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 912e4c644fd..b11df8acf71 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}[2024-03-26 v0.96g +\ProvidesPackage{color-ltx}[2024-04-09 v0.96h 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 a9719de19e3..19d5375f7ef 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}{2024-03-26}{0.96g} +\ProvidesExplPackage{colorspace-patches-tmp-ltx}{2024-04-09}{0.96h} {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 f6720625cd4..cc5d51b9501 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: hyperref-generic.dtx -\ProvidesFile{hgeneric-testphase.def}[2024-03-26 v0.96g % +\ProvidesFile{hgeneric-testphase.def}[2024-04-09 v0.96h % generic Hyperref driver for the LaTeX PDF management testphase bundle] \RequirePackage{etoolbox} %why? 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 d167a6eb1e4..225bb48d0aa 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvipdfmx.def +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvipdfmx.def @@ -20,7 +20,7 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-dvipdfmx.def}{2024-03-26}{} + {l3backend-testphase-dvipdfmx.def}{2024-04-09}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvipdfmx} \cs_generate_variant:Nn \__kernel_backend_literal:n { e } \cs_generate_variant:Nn \__pdf_backend:n { e } @@ -48,6 +48,7 @@ \tl_new:N \l__pdf_tmpa_tl \box_new:N \l__pdf_backend_tmpa_box \box_new:N \l__pdf_backend_tmpb_box + \int_new:N \g__pdf_backend_resourceid_int \int_new:N \g__pdf_backend_name_int \int_new:N \g__pdf_backend_page_int @@ -145,7 +146,7 @@ %objects are not filled with \pdf_object_write as this is not additive! \__pdf_backend:e { - put~\__pdf_backend_object_ref:n {__pdf/Page/Resources/#1}<</#2~#3>> + put~\pdf_object_ref:n {__pdf/Page/Resources/#1}<</#2~#3>> } } @@ -166,7 +167,7 @@ /Properties~ << /l3pdf\int_use:N\g__pdf_backend_name_int\c_space_tl - \__pdf_backend_object_ref:n { #2 } + \pdf_object_ref:n { #2 } >> >> } @@ -237,7 +238,7 @@ \__kernel_backend_literal:e { pdf:put~@resources~ - <</##1~\__pdf_backend_object_ref:n {__pdf/Page/Resources/##1}>> + <</##1~\pdf_object_ref:n {__pdf/Page/Resources/##1}>> } } } @@ -371,13 +372,21 @@ \tl_new:N \l_pdf_current_structure_destination_tl \cs_new_protected:Npn \pdf_activate_structure_destination: { - \cs_gset_eq:NN \__pdf_backend_destination:nn \__pdf_backend_structure_destination:nn - \cs_gset_eq:NN \__pdf_backend_destination:nnnn \__pdf_backend_structure_destination:nnnn + \cs_gset_eq:NN \__pdf_backend_destination:nn \__pdf_backend_structure_destination:nn + \cs_gset_eq:NN \__pdf_backend_destination:nnnn \__pdf_backend_structure_destination:nnnn + \cs_gset_eq:NN \__pdf_backend_link_begin_goto:nnw \__pdf_backend_link_begin_structure_goto:nnw + } +\cs_new_protected:Npn \pdf_activate_indexed_structure_destination: + { + \cs_gset_eq:NN \__pdf_backend_destination:nn \__pdf_backend_indexed_structure_destination:nn + \cs_gset_eq:NN \__pdf_backend_destination:nnnn \__pdf_backend_indexed_structure_destination:nnnn \cs_gset_eq:NN \__pdf_backend_link_begin_goto:nnw \__pdf_backend_link_begin_structure_goto:nnw } \cs_set_eq:NN \__pdf_backend_structure_destination:nn \__pdf_backend_destination:nn -\cs_set_eq:NN \__pdf_backend_structure_destination:nnnn \__pdf_backend_destination:nnnn +\cs_set_eq:NN \__pdf_backend_structure_destination:nnnn \__pdf_backend_destination:nnnn \cs_set_eq:NN \__pdf_backend_link_begin_structure_goto:nnw \__pdf_backend_link_begin_goto:nnw +\cs_set_eq:NN \__pdf_backend_indexed_structure_destination:nn \__pdf_backend_destination:nn +\cs_set_eq:NN \__pdf_backend_indexed_structure_destination:nnnn \__pdf_backend_destination:nnnn \cs_set_protected:Npn \__pdf_backend_structure_destination:nn #1#2 { \__pdf_backend:e @@ -477,6 +486,95 @@ { \__pdf_backend_link_begin:n { #1 /Subtype /Link /A << /S /GoTo /D ( #2 ) /SD~@pdf.SDest.#2 >> } } +\cs_set_protected:Npn \__pdf_backend_indexed_structure_destination:nn #1#2 + { + \__pdf_backend:e + { + dest ~ ( \exp_not:n {#1} ) + [ + @thispage + \str_case:nnF {#2} + { + { xyz } { /XYZ ~ @xpos ~ @ypos ~ null } + { fit } { /Fit } + { fitb } { /FitB } + { fitbh } { /FitBH } + { fitbv } { /FitBV ~ @xpos } + { fith } { /FitH ~ @ypos } + { fitv } { /FitV ~ @xpos } + { fitr } { /Fit } + } + { /XYZ ~ @xpos ~ @ypos ~ \fp_eval:n { (#2) / 100 } } + ] + } + \__pdf_backend:e + { + obj ~ @pdf.SDest.\exp_not:n{#1} + [ + \exp_after:wN \pdf_object_ref_indexed:nn \l_pdf_current_structure_destination_tl + \str_case:nnF {#2} + { + { xyz } { /XYZ ~ @xpos ~ @ypos ~ null } + { fit } { /Fit } + { fitb } { /FitB } + { fitbh } { /FitBH } + { fitbv } { /FitBV ~ @xpos } + { fith } { /FitH ~ @ypos } + { fitv } { /FitV ~ @xpos } + { fitr } { /Fit } + } + { /XYZ ~ @xpos ~ @ypos ~ \fp_eval:n { (#2) / 100 } } + ] + } + } +\cs_new_protected:Npn \__pdf_backend_indexed_structure_destination_aux:nnnn #1#2#3#4 + { + \vbox_to_zero:n + { + \__kernel_kern:n {#4} + \hbox:n + { + \__pdf_backend:n { obj ~ @pdf_ #2 _llx ~ @xpos } + \__pdf_backend:n { obj ~ @pdf_ #2 _lly ~ @ypos } + } + \tex_vss:D + } + \__kernel_kern:n {#1} + \vbox_to_zero:n + { + \__kernel_kern:n { -#3 } + \hbox:n + { + \__pdf_backend:n + { + dest ~ (#2) + [ + @thispage + /FitR ~ + @pdf_ #2 _llx ~ @pdf_ #2 _lly ~ + @xpos ~ @ypos + ] + } + \__pdf_backend:e + { + obj ~ @pdf.SDest.\exp_not:n{#2} + [ + \exp_after:wN \pdf_object_ref_indexed:nn \l_pdf_current_structure_destination_tl + /FitR ~ + @pdf_ #2 _llx ~ @pdf_ #2 _lly ~ + @xpos ~ @ypos + ] + } + } + \tex_vss:D + } + \__kernel_kern:n { -#1 } + } +\cs_set_protected:Npn \__pdf_backend_indexed_structure_destination:nnnn #1#2#3#4 + { + \exp_args:Ne \__pdf_backend_indexed_structure_destination_aux:nnnn + { \dim_eval:n {#2} } {#1} {#3} {#4} + } \cs_new_protected:Npn \__pdf_backend_set_regression_data: { \sys_gset_rand_seed:n{1000} 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 5d5c5afd565..ef3e8a4af2e 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvips.def +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvips.def @@ -20,7 +20,7 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-dvips.def}{2024-03-26}{} + {l3backend-testphase-dvips.def}{2024-04-09}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvips} \cs_generate_variant:Nn \__kernel_backend_postscript:n { e } \cs_generate_variant:Nn \__pdf_backend_pdfmark:n { e } @@ -47,6 +47,7 @@ \tl_new:N \l__pdf_tmpa_tl \box_new:N \l__pdf_backend_tmpa_box \box_new:N \l__pdf_backend_tmpb_box + \int_new:N \g__pdf_backend_resourceid_int \int_new:N \g__pdf_backend_name_int \int_new:N \g__pdf_backend_page_int @@ -145,7 +146,7 @@ \cs_set_protected:Npn \__pdf_backend_bdcobject:nn #1 #2 % #1 eg. Span, #2: object name { - \__pdf_backend_pdfmark:e{/#1~\__pdf_backend_object_ref:n{#2}~/BDC} + \__pdf_backend_pdfmark:e{/#1~\pdf_object_ref:n{#2}~/BDC} } \cs_set_protected:Npn \__pdf_backend_bdcobject:n #1 % #1 eg. Span, { @@ -304,13 +305,21 @@ \tl_new:N \l_pdf_current_structure_destination_tl \cs_new_protected:Npn \pdf_activate_structure_destination: { - \cs_gset_eq:NN \__pdf_backend_destination:nn \__pdf_backend_structure_destination:nn - \cs_gset_eq:NN \__pdf_backend_destination:nnnn \__pdf_backend_structure_destination:nnnn + \cs_gset_eq:NN \__pdf_backend_destination:nn \__pdf_backend_structure_destination:nn + \cs_gset_eq:NN \__pdf_backend_destination:nnnn \__pdf_backend_structure_destination:nnnn + \cs_gset_eq:NN \__pdf_backend_link_begin_goto:nnw \__pdf_backend_link_begin_structure_goto:nnw + } +\cs_new_protected:Npn \pdf_activate_indexed_structure_destination: + { + \cs_gset_eq:NN \__pdf_backend_destination:nn \__pdf_backend_indexed_structure_destination:nn + \cs_gset_eq:NN \__pdf_backend_destination:nnnn \__pdf_backend_indexed_structure_destination:nnnn \cs_gset_eq:NN \__pdf_backend_link_begin_goto:nnw \__pdf_backend_link_begin_structure_goto:nnw } \cs_set_eq:NN \__pdf_backend_structure_destination:nn \__pdf_backend_destination:nn -\cs_set_eq:NN \__pdf_backend_structure_destination:nnnn \__pdf_backend_destination:nnnn +\cs_set_eq:NN \__pdf_backend_structure_destination:nnnn \__pdf_backend_destination:nnnn \cs_set_eq:NN \__pdf_backend_link_begin_structure_goto:nnw \__pdf_backend_link_begin_goto:nnw +\cs_set_eq:NN \__pdf_backend_indexed_structure_destination:nn \__pdf_backend_destination:nn +\cs_set_eq:NN \__pdf_backend_indexed_structure_destination:nnnn \__pdf_backend_destination:nnnn \cs_new_protected:Npn \__pdf_backend_set_regression_data: { \sys_gset_rand_seed:n{1000} 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 707b7fbfd77..9e4bbea44ac 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvisvgm.def +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvisvgm.def @@ -20,7 +20,7 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-dvisvgm.def}{2024-03-26}{} + {l3backend-testphase-dvisvgm.def}{2024-04-09}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvisvgm} \bool_if:NT \l__pdfmanagement_delayed_shipout_bool { @@ -45,6 +45,7 @@ \tl_new:N \l__pdf_tmpa_tl \box_new:N \l__pdf_backend_tmpa_box \box_new:N \l__pdf_backend_tmpb_box + \int_new:N \g__pdf_backend_resourceid_int \int_new:N \g__pdf_backend_name_int \int_new:N \g__pdf_backend_page_int @@ -143,13 +144,21 @@ \tl_new:N \l_pdf_current_structure_destination_tl \cs_new_protected:Npn \pdf_activate_structure_destination: { - \cs_gset_eq:NN \__pdf_backend_destination:nn \__pdf_backend_structure_destination:nn - \cs_gset_eq:NN \__pdf_backend_destination:nnnn \__pdf_backend_structure_destination:nnnn + \cs_gset_eq:NN \__pdf_backend_destination:nn \__pdf_backend_structure_destination:nn + \cs_gset_eq:NN \__pdf_backend_destination:nnnn \__pdf_backend_structure_destination:nnnn + \cs_gset_eq:NN \__pdf_backend_link_begin_goto:nnw \__pdf_backend_link_begin_structure_goto:nnw + } +\cs_new_protected:Npn \pdf_activate_indexed_structure_destination: + { + \cs_gset_eq:NN \__pdf_backend_destination:nn \__pdf_backend_indexed_structure_destination:nn + \cs_gset_eq:NN \__pdf_backend_destination:nnnn \__pdf_backend_indexed_structure_destination:nnnn \cs_gset_eq:NN \__pdf_backend_link_begin_goto:nnw \__pdf_backend_link_begin_structure_goto:nnw } \cs_set_eq:NN \__pdf_backend_structure_destination:nn \__pdf_backend_destination:nn -\cs_set_eq:NN \__pdf_backend_structure_destination:nnnn \__pdf_backend_destination:nnnn +\cs_set_eq:NN \__pdf_backend_structure_destination:nnnn \__pdf_backend_destination:nnnn \cs_set_eq:NN \__pdf_backend_link_begin_structure_goto:nnw \__pdf_backend_link_begin_goto:nnw +\cs_set_eq:NN \__pdf_backend_indexed_structure_destination:nn \__pdf_backend_destination:nn +\cs_set_eq:NN \__pdf_backend_indexed_structure_destination:nnnn \__pdf_backend_destination:nnnn \cs_new_protected:Npn \__pdf_backend_set_regression_data: { \sys_gset_rand_seed:n{1000} 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 bb2d381ce92..2c7919cdaf0 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-luatex.def +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-luatex.def @@ -20,7 +20,7 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-luatex.def}{2024-03-26}{} + {l3backend-testphase-luatex.def}{2024-04-09}{} {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (LuaTeX)} \cs_generate_variant:Nn \__kernel_backend_literal_page:n { e } \bool_if:NT \l__pdfmanagement_delayed_shipout_bool @@ -56,6 +56,7 @@ \tl_new:N \l__pdf_tmpa_tl \box_new:N \l__pdf_backend_tmpa_box \box_new:N \l__pdf_backend_tmpb_box + \int_new:N \g__pdf_backend_resourceid_int \int_new:N \g__pdf_backend_name_int \int_new:N \g__pdf_backend_page_int @@ -176,7 +177,7 @@ { ltx.__pdf.object["__pdf/Page/Resources/#1"] = - "\__pdf_backend_object_ref:n{__pdf/Page/Resources/#1}" + "\pdf_object_ref:n{__pdf/Page/Resources/#1}" } } } @@ -214,7 +215,7 @@ \pdfdict_gput:nee { g__pdf_Core/Xform/Resources/Properties } { l3pdf\int_use:N\g__pdf_backend_name_int } - { \__pdf_backend_object_ref:n { #2 } } + { \pdf_object_ref:n { #2 } } } { \exp_args:Ne \tex_latelua:D @@ -223,7 +224,7 @@ ( tex.count["g_shipout_readonly_int"], "l3pdf\int_use:N\g__pdf_backend_name_int", - "\__pdf_backend_object_ref:n { #2 }" + "\pdf_object_ref:n { #2 }" ) } } @@ -394,13 +395,21 @@ \tl_new:N \l_pdf_current_structure_destination_tl \cs_new_protected:Npn \pdf_activate_structure_destination: { - \cs_gset_eq:NN \__pdf_backend_destination:nn \__pdf_backend_structure_destination:nn - \cs_gset_eq:NN \__pdf_backend_destination:nnnn \__pdf_backend_structure_destination:nnnn + \cs_gset_eq:NN \__pdf_backend_destination:nn \__pdf_backend_structure_destination:nn + \cs_gset_eq:NN \__pdf_backend_destination:nnnn \__pdf_backend_structure_destination:nnnn + \cs_gset_eq:NN \__pdf_backend_link_begin_goto:nnw \__pdf_backend_link_begin_structure_goto:nnw + } +\cs_new_protected:Npn \pdf_activate_indexed_structure_destination: + { + \cs_gset_eq:NN \__pdf_backend_destination:nn \__pdf_backend_indexed_structure_destination:nn + \cs_gset_eq:NN \__pdf_backend_destination:nnnn \__pdf_backend_indexed_structure_destination:nnnn \cs_gset_eq:NN \__pdf_backend_link_begin_goto:nnw \__pdf_backend_link_begin_structure_goto:nnw } \cs_set_eq:NN \__pdf_backend_structure_destination:nn \__pdf_backend_destination:nn -\cs_set_eq:NN \__pdf_backend_structure_destination:nnnn \__pdf_backend_destination:nnnn +\cs_set_eq:NN \__pdf_backend_structure_destination:nnnn \__pdf_backend_destination:nnnn \cs_set_eq:NN \__pdf_backend_link_begin_structure_goto:nnw \__pdf_backend_link_begin_goto:nnw +\cs_set_eq:NN \__pdf_backend_indexed_structure_destination:nn \__pdf_backend_destination:nn +\cs_set_eq:NN \__pdf_backend_indexed_structure_destination:nnnn \__pdf_backend_destination:nnnn \int_compare:nNnT {\directlua{tex.print(status.list()["development_id"])} } > {7468} { \cs_set_protected:Npn \__pdf_backend_structure_destination:nn #1#2 @@ -442,7 +451,7 @@ \scan_stop: } } - \cs_set_protected:Npn \__pdf_backend_destination:nnnn #1#2#3#4 + \cs_set_protected:Npn \__pdf_backend_structure_destination:nnnn #1#2#3#4 { \tex_pdfextension:D dest name {#1} @@ -468,6 +477,65 @@ \__pdf_backend_link_begin:nnnw {#1} { goto~struct~name~{#2}~name } {#2} } } + \int_compare:nNnT {\directlua{tex.print(status.list()["development_id"])} } > {7468} + { + \cs_set_protected:Npn \__pdf_backend_indexed_structure_destination:nn #1#2 + { + \tex_pdfextension:D dest + name {#1} + \str_case:nnF {#2} + { + { xyz } { xyz } + { fit } { fit } + { fitb } { fitb } + { fitbh } { fitbh } + { fitbv } { fitbv } + { fith } { fith } + { fitv } { fitv } + { fitr } { fitr } + } + { xyz ~ zoom \fp_eval:n { #2 * 10 } } + \scan_stop: + \tex_pdfextension:D dest + struct~ + \exp_after:wN \__kernel_pdf_object_id_indexed:nn \l_pdf_current_structure_destination_tl ~ + name {#1} + \str_case:nnF {#2} + { + { xyz } { xyz } + { fit } { fit } + { fitb } { fitb } + { fitbh } { fitbh } + { fitbv } { fitbv } + { fith } { fith } + { fitv } { fitv } + { fitr } { fitr } + } + { xyz ~ zoom \fp_eval:n { #2 * 10 } } + \scan_stop: + } + \cs_set_protected:Npn \__pdf_backend_indexed_structure_destination:nnnn #1#2#3#4 + { + \tex_pdfextension:D dest + name {#1} + fitr ~ + width \dim_eval:n {#2} ~ + height \dim_eval:n {#3} ~ + depth \dim_eval:n {#4} \scan_stop: + \tex_pdfextension:D dest + struct~ + \exp_after:wN \__kernel_pdf_object_id_indexed:nn \l_pdf_current_structure_destination_tl~ + name {#1} + fitr ~ + width \dim_eval:n {#2} ~ + height \dim_eval:n {#3} ~ + depth \dim_eval:n {#4} \scan_stop: + } + \cs_set_protected:Npn \__pdf_backend_link_begin_structure_goto:nnw #1#2 + { + \__pdf_backend_link_begin:nnnw {#1} { goto~struct~name~{#2}~name } {#2} + } + } \cs_new_protected:Npn \__pdf_backend_set_regression_data: { \sys_gset_rand_seed:n{1000} 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 478180838c2..792689524c0 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-pdftex.def +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-pdftex.def @@ -20,7 +20,7 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-pdftex.def}{2024-03-26}{} + {l3backend-testphase-pdftex.def}{2024-04-09}{} {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (pdfTeX)} \cs_generate_variant:Nn \__kernel_backend_literal_page:n { e } \bool_if:NT \l__pdfmanagement_delayed_shipout_bool @@ -56,6 +56,7 @@ \tl_new:N \l__pdf_tmpa_tl \box_new:N \l__pdf_backend_tmpa_box \box_new:N \l__pdf_backend_tmpb_box + \int_new:N \g__pdf_backend_resourceid_int \int_new:N \g__pdf_backend_name_int \int_new:N \g__pdf_backend_page_int @@ -147,7 +148,7 @@ { ltx.__pdf.object["__pdf/Page/Resources/#1"] = - "\__pdf_backend_object_ref:n{__pdf/Page/Resources/#1}" + "\pdf_object_ref:n{__pdf/Page/Resources/#1}" } } } @@ -182,7 +183,7 @@ \pdfdict_gput:nee %no handler needed { g__pdf_Core/Xform/Resources/Properties } { l3pdf\int_use:N\g__pdf_backend_resourceid_int } - { \__pdf_backend_object_ref:n { #2 } } + { \pdf_object_ref:n { #2 } } } { \__pdf_backend_record_abspage:e {l3pdf\int_use:N\g__pdf_backend_resourceid_int} @@ -197,7 +198,7 @@ \pdfdict_gput:nee { g__pdf_Core/backend_Page\l__pdf_tmpa_tl/Resources/Properties } { l3pdf\int_use:N\g__pdf_backend_resourceid_int } - { \__pdf_backend_object_ref:n{#2} } + { \pdf_object_ref:n{#2} } } } \cs_set_protected:Npn \__pdf_backend_bdcobject:n #1% #1 eg. Span @@ -402,13 +403,21 @@ \tl_new:N \l_pdf_current_structure_destination_tl \cs_new_protected:Npn \pdf_activate_structure_destination: { - \cs_gset_eq:NN \__pdf_backend_destination:nn \__pdf_backend_structure_destination:nn - \cs_gset_eq:NN \__pdf_backend_destination:nnnn \__pdf_backend_structure_destination:nnnn + \cs_gset_eq:NN \__pdf_backend_destination:nn \__pdf_backend_structure_destination:nn + \cs_gset_eq:NN \__pdf_backend_destination:nnnn \__pdf_backend_structure_destination:nnnn + \cs_gset_eq:NN \__pdf_backend_link_begin_goto:nnw \__pdf_backend_link_begin_structure_goto:nnw + } +\cs_new_protected:Npn \pdf_activate_indexed_structure_destination: + { + \cs_gset_eq:NN \__pdf_backend_destination:nn \__pdf_backend_indexed_structure_destination:nn + \cs_gset_eq:NN \__pdf_backend_destination:nnnn \__pdf_backend_indexed_structure_destination:nnnn \cs_gset_eq:NN \__pdf_backend_link_begin_goto:nnw \__pdf_backend_link_begin_structure_goto:nnw } \cs_set_eq:NN \__pdf_backend_structure_destination:nn \__pdf_backend_destination:nn -\cs_set_eq:NN \__pdf_backend_structure_destination:nnnn \__pdf_backend_destination:nnnn +\cs_set_eq:NN \__pdf_backend_structure_destination:nnnn \__pdf_backend_destination:nnnn \cs_set_eq:NN \__pdf_backend_link_begin_structure_goto:nnw \__pdf_backend_link_begin_goto:nnw +\cs_set_eq:NN \__pdf_backend_indexed_structure_destination:nn \__pdf_backend_destination:nn +\cs_set_eq:NN \__pdf_backend_indexed_structure_destination:nnnn \__pdf_backend_destination:nnnn \bool_lazy_and:nnT { \int_compare_p:nNn {\tex_pdftexversion:D } > {139} } { \int_compare_p:nNn {\tex_pdftexrevision:D } > {23} } @@ -452,7 +461,7 @@ \scan_stop: } } - \cs_set_protected:Npn \__pdf_backend_destination:nnnn #1#2#3#4 + \cs_set_protected:Npn \__pdf_backend_structure_destination:nnnn #1#2#3#4 { \tex_pdfdest:D name {#1} @@ -478,6 +487,63 @@ \__pdf_backend_link_begin:nnnw {#1} { goto~struct~name~{#2}~name } {#2} } } +\bool_lazy_and:nnT + { \int_compare_p:nNn {\tex_pdftexversion:D } > {139} } + { \int_compare_p:nNn {\tex_pdftexrevision:D } > {23} } + { + \cs_set_protected:Npn \__pdf_backend_indexed_structure_destination:nn #1#2 + { + \tex_pdfdest:D + name {#1} + \str_case:nnF {#2} + { + { xyz } { xyz } + { fit } { fit } + { fitb } { fitb } + { fitbh } { fitbh } + { fitbv } { fitbv } + { fith } { fith } + { fitv } { fitv } + { fitr } { fitr } + } + { xyz ~ zoom \fp_eval:n { #2 * 10 } } + \scan_stop: + \tex_pdfdest:D + struct~ + \exp_after:wN \__kernel_pdf_object_id_indexed:nn \l_pdf_current_structure_destination_tl ~ + name {#1} + \str_case:nnF {#2} + { + { xyz } { xyz } + { fit } { fit } + { fitb } { fitb } + { fitbh } { fitbh } + { fitbv } { fitbv } + { fith } { fith } + { fitv } { fitv } + { fitr } { fitr } + } + { xyz ~ zoom \fp_eval:n { #2 * 10 } } + \scan_stop: + } + \cs_set_protected:Npn \__pdf_backend_indexed_structure_destination:nnnn #1#2#3#4 + { + \tex_pdfdest:D + name {#1} + fitr ~ + width \dim_eval:n {#2} ~ + height \dim_eval:n {#3} ~ + depth \dim_eval:n {#4} \scan_stop: + \tex_pdfdest:D + struct~ + \exp_after:wN \__kernel_pdf_object_id_indexed:nn \l_pdf_current_structure_destination_tl ~ + name {#1} + fitr ~ + width \dim_eval:n {#2} ~ + height \dim_eval:n {#3} ~ + depth \dim_eval:n {#4} \scan_stop: + } + } \cs_new_protected:Npn \__pdf_backend_set_regression_data: { \sys_gset_rand_seed:n{1000} 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 14e28490a32..cebb2e6fc9e 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def @@ -20,7 +20,7 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-xetex.def}{2024-03-26}{} + {l3backend-testphase-xetex.def}{2024-04-09}{} {LaTeX~PDF~management~testphase~bundle~backend~support: XeTeX} \cs_generate_variant:Nn \__kernel_backend_literal:n { e } \cs_generate_variant:Nn \__pdf_backend:n { e } @@ -48,6 +48,7 @@ \tl_new:N \l__pdf_tmpa_tl \box_new:N \l__pdf_backend_tmpa_box \box_new:N \l__pdf_backend_tmpb_box + \int_new:N \g__pdf_backend_resourceid_int \int_new:N \g__pdf_backend_name_int \int_new:N \g__pdf_backend_page_int @@ -145,7 +146,7 @@ %objects are not filled with \pdf_object_write as this is not additive! \__pdf_backend:e { - put~\__pdf_backend_object_ref:n {__pdf/Page/Resources/#1}<</#2~#3>> + put~\pdf_object_ref:n {__pdf/Page/Resources/#1}<</#2~#3>> } } @@ -166,7 +167,7 @@ /Properties~ << /l3pdf\int_use:N\g__pdf_backend_name_int\c_space_tl - \__pdf_backend_object_ref:n { #2 } + \pdf_object_ref:n { #2 } >> >> } @@ -237,7 +238,7 @@ \__kernel_backend_literal:e { pdf:put~@resources~ - <</##1~\__pdf_backend_object_ref:n {__pdf/Page/Resources/##1}>> + <</##1~\pdf_object_ref:n {__pdf/Page/Resources/##1}>> } } } @@ -371,13 +372,21 @@ \tl_new:N \l_pdf_current_structure_destination_tl \cs_new_protected:Npn \pdf_activate_structure_destination: { - \cs_gset_eq:NN \__pdf_backend_destination:nn \__pdf_backend_structure_destination:nn - \cs_gset_eq:NN \__pdf_backend_destination:nnnn \__pdf_backend_structure_destination:nnnn + \cs_gset_eq:NN \__pdf_backend_destination:nn \__pdf_backend_structure_destination:nn + \cs_gset_eq:NN \__pdf_backend_destination:nnnn \__pdf_backend_structure_destination:nnnn + \cs_gset_eq:NN \__pdf_backend_link_begin_goto:nnw \__pdf_backend_link_begin_structure_goto:nnw + } +\cs_new_protected:Npn \pdf_activate_indexed_structure_destination: + { + \cs_gset_eq:NN \__pdf_backend_destination:nn \__pdf_backend_indexed_structure_destination:nn + \cs_gset_eq:NN \__pdf_backend_destination:nnnn \__pdf_backend_indexed_structure_destination:nnnn \cs_gset_eq:NN \__pdf_backend_link_begin_goto:nnw \__pdf_backend_link_begin_structure_goto:nnw } \cs_set_eq:NN \__pdf_backend_structure_destination:nn \__pdf_backend_destination:nn -\cs_set_eq:NN \__pdf_backend_structure_destination:nnnn \__pdf_backend_destination:nnnn +\cs_set_eq:NN \__pdf_backend_structure_destination:nnnn \__pdf_backend_destination:nnnn \cs_set_eq:NN \__pdf_backend_link_begin_structure_goto:nnw \__pdf_backend_link_begin_goto:nnw +\cs_set_eq:NN \__pdf_backend_indexed_structure_destination:nn \__pdf_backend_destination:nn +\cs_set_eq:NN \__pdf_backend_indexed_structure_destination:nnnn \__pdf_backend_destination:nnnn \cs_set_protected:Npn \__pdf_backend_structure_destination:nn #1#2 { \__pdf_backend:e @@ -477,6 +486,95 @@ { \__pdf_backend_link_begin:n { #1 /Subtype /Link /A << /S /GoTo /D ( #2 ) /SD~@pdf.SDest.#2 >> } } +\cs_set_protected:Npn \__pdf_backend_indexed_structure_destination:nn #1#2 + { + \__pdf_backend:e + { + dest ~ ( \exp_not:n {#1} ) + [ + @thispage + \str_case:nnF {#2} + { + { xyz } { /XYZ ~ @xpos ~ @ypos ~ null } + { fit } { /Fit } + { fitb } { /FitB } + { fitbh } { /FitBH } + { fitbv } { /FitBV ~ @xpos } + { fith } { /FitH ~ @ypos } + { fitv } { /FitV ~ @xpos } + { fitr } { /Fit } + } + { /XYZ ~ @xpos ~ @ypos ~ \fp_eval:n { (#2) / 100 } } + ] + } + \__pdf_backend:e + { + obj ~ @pdf.SDest.\exp_not:n{#1} + [ + \exp_after:wN \pdf_object_ref_indexed:nn \l_pdf_current_structure_destination_tl + \str_case:nnF {#2} + { + { xyz } { /XYZ ~ @xpos ~ @ypos ~ null } + { fit } { /Fit } + { fitb } { /FitB } + { fitbh } { /FitBH } + { fitbv } { /FitBV ~ @xpos } + { fith } { /FitH ~ @ypos } + { fitv } { /FitV ~ @xpos } + { fitr } { /Fit } + } + { /XYZ ~ @xpos ~ @ypos ~ \fp_eval:n { (#2) / 100 } } + ] + } + } +\cs_new_protected:Npn \__pdf_backend_indexed_structure_destination_aux:nnnn #1#2#3#4 + { + \vbox_to_zero:n + { + \__kernel_kern:n {#4} + \hbox:n + { + \__pdf_backend:n { obj ~ @pdf_ #2 _llx ~ @xpos } + \__pdf_backend:n { obj ~ @pdf_ #2 _lly ~ @ypos } + } + \tex_vss:D + } + \__kernel_kern:n {#1} + \vbox_to_zero:n + { + \__kernel_kern:n { -#3 } + \hbox:n + { + \__pdf_backend:n + { + dest ~ (#2) + [ + @thispage + /FitR ~ + @pdf_ #2 _llx ~ @pdf_ #2 _lly ~ + @xpos ~ @ypos + ] + } + \__pdf_backend:e + { + obj ~ @pdf.SDest.\exp_not:n{#2} + [ + \exp_after:wN \pdf_object_ref_indexed:nn \l_pdf_current_structure_destination_tl + /FitR ~ + @pdf_ #2 _llx ~ @pdf_ #2 _lly ~ + @xpos ~ @ypos + ] + } + } + \tex_vss:D + } + \__kernel_kern:n { -#1 } + } +\cs_set_protected:Npn \__pdf_backend_indexed_structure_destination:nnnn #1#2#3#4 + { + \exp_args:Ne \__pdf_backend_indexed_structure_destination_aux:nnnn + { \dim_eval:n {#2} } {#1} {#3} {#4} + } \cs_new_protected:Npn \__pdf_backend_set_regression_data: { \sys_gset_rand_seed:n{1000} 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 02de44427b9..988585867c2 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase.lua +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase.lua @@ -23,6 +23,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 2268dc7c23b..ce06766b301 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}{2024-03-26}{0.96g}% +\ProvidesExplPackage{l3pdffield-testphase}{2024-04-09}{0.96h}% {form fields} \csname HyField@NeedAppearancesfalse\endcsname % suppress NeedAppearances \str_new:N \l__pdffield_tmpa_str @@ -100,9 +100,9 @@ Multiline = 13,%Tx Password = 14, NoToggleToOff = 15,%Btn, radio button - Radio = 16,%Btn: Radio: 15=1, 16=0 - Pushbutton = 17,%Btn: Checkbox: 15=0, 16=0 - %Btn: Pushbutton: 16=1 + Radio = 16,%Btn: Radio: 16=1, 17=0 + Pushbutton = 17,%Btn: Checkbox: 16=0, 17=0 + %Btn: Pushbutton: 17=1 Combo = 18,%Ch: Combo=1 List=0 Edit = 19,%Ch, Combo=1 -> + edit field Sort = 20,%Ch, not relevant for view... 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 bf5f0ba1dcf..e6315491894 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}{2024-03-26}{0.96g} +\ProvidesExplPackage{pdfmanagement-firstaid}{2024-04-09}{0.96h} {LaTeX PDF management testphase bundle / firstaid-patches} \clist_map_inline:nn 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 6251f99557b..13e33141a22 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.ltx +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.ltx @@ -27,7 +27,7 @@ %% and all files in that bundle must be distributed together. %% %% File: pdfmanagement-testphase.dtx -\ProvidesExplFile{pdfmanagement-testphase.ltx}{2024-03-26}{0.96g} +\ProvidesExplFile{pdfmanagement-testphase.ltx}{2024-04-09}{0.96h} {PDF~management~code~(testphase)} \bool_new:N\l__pdfmanagement_delayed_shipout_bool \msg_new:nnn {pdfmanagement}{delayed-shipout} @@ -767,7 +767,7 @@ \__pdf_backend_catalog_gput:nn {AA} { - \__pdf_backend_object_ref:n { __pdfmanagement/Catalog/AA } + \pdf_object_ref:n { __pdfmanagement/Catalog/AA } } } } @@ -783,7 +783,7 @@ \prop_gput:cnn %we have to use \prop here to avoid the handler ... { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm } } { Fields } - { \__pdf_backend_object_ref:n { __pdfmanagement/Catalog/AcroForm/Fields } } + { \pdf_object_ref:n { __pdfmanagement/Catalog/AcroForm/Fields } } } \seq_if_empty:cF { g__pdfmanagement_/Catalog/AcroForm/CO_seq } { @@ -795,7 +795,7 @@ \prop_gput:cnn %we have to use \prop here to avoid the handler ... { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm } } { CO } - { \__pdf_backend_object_ref:n { __pdfmanagement/Catalog/AcroForm/CO } } + { \pdf_object_ref:n { __pdfmanagement/Catalog/AcroForm/CO } } } \prop_if_empty:cF { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm/DR/Font}} { @@ -807,7 +807,7 @@ \prop_gput:cnn %we have to use \prop here to avoid the handler ... { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm/DR } } { Font } - { \__pdf_backend_object_ref:n { __pdfmanagement/Catalog/AcroForm/DR/Font } } + { \pdf_object_ref:n { __pdfmanagement/Catalog/AcroForm/DR/Font } } } \prop_if_empty:cF { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm/DR}} { @@ -819,7 +819,7 @@ \prop_gput:cnn %we have to use \prop here to avoid the handler ... { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm } } { DR } - { \__pdf_backend_object_ref:n { __pdfmanagement/Catalog/AcroForm/DR } } + { \pdf_object_ref:n { __pdfmanagement/Catalog/AcroForm/DR } } } \prop_if_empty:cF { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm} } { @@ -831,7 +831,7 @@ \__pdfmanagement_handler_gput:nnn { Catalog } { AcroForm } - { \__pdf_backend_object_ref:n { __pdfmanagement/Catalog/AcroForm } } + { \pdf_object_ref:n { __pdfmanagement/Catalog/AcroForm } } } } @@ -848,7 +848,7 @@ \__pdf_backend_catalog_gput:nn {AF} { - \__pdf_backend_object_ref:n {__pdfmanagement/Catalog/AF} + \pdf_object_ref:n {__pdfmanagement/Catalog/AF} } } } @@ -865,7 +865,7 @@ \__pdf_backend_catalog_gput:nn {MarkInfo} { - \__pdf_backend_object_ref:n {__pdfmanagement/Catalog/MarkInfo} + \pdf_object_ref:n {__pdfmanagement/Catalog/MarkInfo} } } } @@ -894,7 +894,7 @@ \exp_args:Nne \__pdf_backend_catalog_gput:nn { OCProperties } - { \__pdf_backend_object_ref:n {__pdfmanagement/Catalog/OCProperties} } + { \pdf_object_ref:n {__pdfmanagement/Catalog/OCProperties} } } } \cs_new_protected:cpn { __pdfmanagement_/Catalog/OutputIntents_gpush: } @@ -910,7 +910,7 @@ \__pdf_backend_catalog_gput:nn {OutputIntents} { - \__pdf_backend_object_ref:n {__pdfmanagement/Catalog/OutputIntents} + \pdf_object_ref:n {__pdfmanagement/Catalog/OutputIntents} } } } @@ -927,7 +927,7 @@ \__pdf_backend_catalog_gput:nn {Requirements} { - \__pdf_backend_object_ref:n { __pdfmanagement/Catalog/Requirements } + \pdf_object_ref:n { __pdfmanagement/Catalog/Requirements } } } } @@ -944,7 +944,7 @@ \__pdf_backend_catalog_gput:nn {ViewerPreferences} { - \__pdf_backend_object_ref:n {__pdfmanagement/Catalog/ViewerPreferences} + \pdf_object_ref:n {__pdfmanagement/Catalog/ViewerPreferences} } } } @@ -1585,6 +1585,36 @@ { g__pdfmeta_standard_pdf/A-4_prop }{conformance} \prop_gremove:cn { g__pdfmeta_standard_pdf/A-4_prop }{max_pdf_version} + +\prop_new:c { g__pdfmeta_standard_pdf/A-4F_prop } +\prop_gset_eq:cc + { g__pdfmeta_standard_pdf/A-4F_prop } + { g__pdfmeta_standard_pdf/A-4_prop } +\prop_gput:cnn + { g__pdfmeta_standard_pdf/A-4F_prop }{conformance}{F} +\prop_gput:cnn + { g__pdfmeta_standard_pdf/A-4F_prop }{Catalog_EmbeddedFiles}{} +\AddToHook{begindocument/end} +{ + \pdfmeta_standard_verify:nF{Catalog_EmbeddedFiles} + { + \tl_gput_right:Nn\g__kernel_pdfmanagement_end_run_code_tl + { + \bool_if:NT \g__pdfmanagement_active_bool + { + \pdfdict_if_empty:nT { g__pdf_Core/Catalog/Names/EmbeddedFiles } + { + \group_begin: + \pdfdict_put:nne {l_pdffile/Filespec} {Desc}{(note~about~PDF/A-4F)} + \pdfdict_put:nnn { l_pdffile/Filespec }{AFRelationship} { /Unspecified } + \pdffile_embed_stream:nnN {PDF~standard~A-4F~requires~a~file}{readme.txt}\l__pdfmeta_tmpa_tl + \exp_args:Nne \__pdf_backend_Names_gpush:nn{EmbeddedFiles}{(readme)~\l__pdfmeta_tmpa_tl} + \group_end: + } + } + } + } +} \prop_new:N \g__pdfmeta_outputintents_prop \keys_define:nn { document / metadata } { @@ -1699,13 +1729,19 @@ { \pdfmeta_standard_verify:nTF {outputintent_A} { - \prop_map_inline:Nn \g__pdfmeta_outputintents_prop + \prop_map_inline:Nn \g__pdfmeta_outputintents_prop { - \__pdfmeta_embed_colorprofile:n - {#2} - \__pdfmeta_write_outputintent:nn - {#2} - {#1} + \prop_if_exist:cTF {c__pdfmeta_colorprofile_#2} + { + \__pdfmeta_embed_colorprofile:n + {#2} + \__pdfmeta_write_outputintent:nn + {#2} + {#1} + } + { + \msg_warning:nnn{pdfmeta}{colorprofile-undefined}{#2} + } } } { @@ -1725,14 +1761,20 @@ \g__pdfmeta_outputintents_prop { \pdfmeta_standard_item:n { outputintent_A } } \l__pdfmeta_tmpb_tl - \exp_args:NV \__pdfmeta_embed_colorprofile:n \l__pdfmeta_tmpb_tl - \prop_map_inline:Nn \g__pdfmeta_outputintents_prop - { - \exp_args:NV - \__pdfmeta_write_outputintent:nn - \l__pdfmeta_tmpb_tl - { #1 } - } + \prop_if_exist:cTF {c__pdfmeta_colorprofile_\l__pdfmeta_tmpb_tl} + { + \exp_args:NV \__pdfmeta_embed_colorprofile:n \l__pdfmeta_tmpb_tl + \prop_map_inline:Nn \g__pdfmeta_outputintents_prop + { + \exp_args:NV + \__pdfmeta_write_outputintent:nn + \l__pdfmeta_tmpb_tl + { #1 } + } + } + { + \msg_warning:nne{pdfmeta}{colorprofile-undefined}{\l__pdfmeta_tmpb_tl} + } } } \cs_new_protected:Npn \pdfmeta_set_regression_data: @@ -1825,6 +1867,7 @@ ,debug / xmp-export .default:n = true } \msg_new:nnn{pdfmeta}{namespace-defined}{The~xmlns~namespace~`#1`~is~already~declared} +\msg_new:nnn{pdfmeta}{colorprofile-undefined}{The~colorprofile~`#1`~is~unknown} \bool_lazy_or:nnTF { \sys_if_engine_luatex_p: } { \sys_if_engine_xetex_p: } 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 bb986b29b77..7b05f004072 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}{2024-03-26}{0.96g} +\ProvidesExplPackage{pdfmanagement-testphase}{2024-04-09}{0.96h} {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 40911ab8d7f..6b553f8519e 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-tmp-ltx.sty' %% -\ProvidesPackage{xcolor-patches-tmp-ltx}[2024-03-26 v0.96g patch xcolor for l3color] +\ProvidesPackage{xcolor-patches-tmp-ltx}[2024-04-09 v0.96h patch xcolor for l3color] \@ifundefined{color_set:nn}{\RequirePackage{l3color}}{} \ExplSyntaxOn |