diff options
author | Karl Berry <karl@freefriends.org> | 2021-03-07 22:05:12 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-03-07 22:05:12 +0000 |
commit | f3ff69e3bb08ed2b3e00c5460d3e6090b717d82b (patch) | |
tree | 34b7c7b3c02535428f599cba955d7f7a0f4a16e7 /Master/texmf-dist/tex | |
parent | 8092f7987bf696d1b3983cec1e628ab3e186bf92 (diff) |
pdfmanagement-testphase (7mar21)
git-svn-id: svn://tug.org/texlive/trunk@58199 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
16 files changed, 517 insertions, 58 deletions
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 60a55ad9c33..0fbe8eb6717 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/color-ltx.sty +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/color-ltx.sty @@ -23,7 +23,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesPackage{color-ltx} - [2021/02/22 v1.2d Standard LaTeX Color (patched for l3color) (DPC)] + [2021/03/07 v1.2e Standard LaTeX Color (patched for l3color, part of pdfmanagement-testphase 2021-03-07 v0.95b) (DPC)] \edef\Gin@codes{% \catcode`\noexpand\^^A\the\catcode`\^^A\relax \catcode`\noexpand\"\the\catcode`\"\relax diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def index 06cb3a8c5db..aa58d10853b 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def @@ -20,7 +20,7 @@ %% %% File: hyperref-generic.dtx \ProvidesFile{hgeneric-testphase.def} - [2021/02/22 v0.95a % + [2021/02/22 v0.95b % generic Hyperref driver for the LaTeX PDF management testphase bundle] \RequirePackage{etoolbox} %why? @@ -505,12 +505,10 @@ \cs_set_eq:NN \% \c_percent_str \Hy@safe@activestrue \mode_leave_vertical: + \pdfannot_dict_put:nnx {link/URI}{A}{<<\pdfdict_use:n {l_hyp/annot/A/URI}>>} \pdfannot_link:nxn { URI } { - /A - << - \pdfdict_use:n {l_hyp/annot/A/URI} - >> + % /A } { #1 @@ -557,12 +555,11 @@ \pdfdict_put:nno{l_hyp/annot/A/Next}{Next}{\Hy@href@nextactionraw} } \mode_leave_vertical: + \pdfannot_dict_put:nnx {link/GoToR}{A}{<<\pdfdict_use:n {l_hyp/annot/A/GoToR}>>} \pdfannot_link:nxn %expansion?? { GoToR } { - /A<< - \pdfdict_use:n {l_hyp/annot/A/GoToR} - >> + % /A<< } { #1\Hy@xspace@end @@ -609,13 +606,11 @@ \pdfdict_put:nno{l_hyp/annot/A/Next}{Next}{\Hy@href@nextactionraw} } \mode_leave_vertical: + \pdfannot_dict_put:nnx {link/Launch}{A}{<<\pdfdict_use:n {l_hyp/annot/A/Launch}>>} \pdfannot_link:nxn { Launch } { - /A - << - \pdfdict_use:n {l_hyp/annot/A/Launch} - >> + % /A } { #2\Hy@xspace@end @@ -651,12 +646,9 @@ \str_remove_once:Nn \Hy@href@nextactionraw {/Next} \pdfdict_put:nno{l_hyp/annot/A/Next}{Next}{\Hy@href@nextactionraw} } + \pdfannot_dict_put:nnx {link/Named}{A}{<<\pdfdict_use:n {l_hyp/annot/A/Named}>>} \pdfannot_link:nxn { Named } { - /A - << - \pdfdict_use:n { l_hyp/annot/A/Named } - >> } { #2 diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty index e0cb3a4e1be..ee89218a7d2 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty @@ -20,7 +20,7 @@ % for those people who are interested. \NeedsTeXFormat{LaTeX2e}[2020/10/01] \ProvidesExplPackage{hyperxmp-patches-tmp-ltx} - {2021-02-22} {0.95a} + {2021-03-07} {0.95b} {Store hyperref metadata in XMP format / temporay patches to test pdfresource management ... UF} \cs_if_exist:NT \pdfmanagement_add:nnn diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvipdfmx.def b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvipdfmx.def index 3598d8244fb..96dbc8e7360 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvipdfmx.def +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvipdfmx.def @@ -20,7 +20,7 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-dvipdfmx.def}{2021-02-22}{} + {l3backend-testphase-dvipdfmx.def}{2021-03-07}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvipdfmx} \RequirePackage{l3ref-tmp} \cs_generate_variant:Nn \ref_label:nn {en} 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 13f31d3e3cb..5e25e98b46e 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvips.def +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvips.def @@ -20,7 +20,7 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-dvips.def}{2021-02-22}{} + {l3backend-testphase-dvips.def}{2021-03-07}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvips} \RequirePackage{l3ref-tmp} \cs_generate_variant:Nn \ref_label:nn {en} 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 ba25c996cab..3a5cabd7792 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvisvgm.def +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvisvgm.def @@ -20,7 +20,7 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-dvisvgm.def}{2021-02-22}{} + {l3backend-testphase-dvisvgm.def}{2021-03-07}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvisvgm} \RequirePackage{l3ref-tmp} \cs_generate_variant:Nn \ref_label:nn {en} 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 f3fb34cc91b..585890eea24 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-luatex.def +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-luatex.def @@ -20,7 +20,7 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-luatex.def}{2021-02-22}{} + {l3backend-testphase-luatex.def}{2021-03-07}{} {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (LuaTeX)} \RequirePackage{l3ref-tmp} \cs_generate_variant:Nn \ref_label:nn {en} 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 40ce682e041..7dfb98a71b5 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-pdftex.def +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-pdftex.def @@ -20,7 +20,7 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-pdftex.def}{2021-02-22}{} + {l3backend-testphase-pdftex.def}{2021-03-07}{} {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (pdfTeX)} \RequirePackage{l3ref-tmp} \cs_generate_variant:Nn \ref_label:nn {en} 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 60a336e651b..76ff8572398 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def @@ -20,7 +20,7 @@ %% %% File: l3backend-testphase.dtx \ProvidesExplFile - {l3backend-testphase-xetex.def}{2021-02-22}{} + {l3backend-testphase-xetex.def}{2021-03-07}{} {LaTeX~PDF~management~testphase~bundle~backend~support: XeTeX} \RequirePackage{l3ref-tmp} \cs_generate_variant:Nn \ref_label:nn {en} diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3pdffield-testphase.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3pdffield-testphase.sty new file mode 100644 index 00000000000..ed28f7b00e6 --- /dev/null +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3pdffield-testphase.sty @@ -0,0 +1,455 @@ +%% +%% This is file `l3pdffield-testphase.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% l3pdffield.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: l3pdfpdffield-checkbox.dtx +\NeedsTeXFormat{LaTeX2e} +\ProvidesExplPackage{l3pdffield-checkbox}{0000-00-00}{v0.00a}{form field checkbox}% +\csname HyField@NeedAppearancesfalse\endcsname % suppress NeedAppearances +\str_new:N \l__pdffield_field_name_str +\str_new:N \l__pdffield_tmpa_str +\str_new:N \l__pdffield_name_tmpa_str +\tl_new:N \l__pdffield_keys_tmpa_tl +\msg_new:nnn {pdffield}{no-period} + { + The~field~name~`#1`~contains~a~period. \\ + This~is~not~allowed. ` + } +\msg_new:nnn {pdffield}{empty-name} + { + The~field~name~is~empty. \\ + This~is~not~allowed. ` + } +\msg_new:nnn {pdffield}{appearance-missing} + { + The~appearance~`#1`~is~missing~for~the~#2~appearance. + } +\msg_new:nnn {pdffield}{field-keys-ignored} + { + The~field~`#1`~is~already~initialized\\ + The~field~keys~`#2`~are~ignored. + } + +\bitset_new:Nn \l__pdffield_Ff_bitset + { + ReadOnly = 0, + Required = 1, + NoExport = 2, + Multiline = 12,%Tx + Password = 13, + NoToggleToOff = 14,%Btn, radio button + Radio = 15,%Btn: Radio: 15=1, 16=0 + Pushbutton = 16,%Btn: Checkbox: 15=0, 16=0 + %Btn: Pushbutton: 16=1 + Combo = 17,%Ch: Combo=1 List=0 + Edit = 18,%Ch, Combo=1 -> + edit field + Sort = 19,%Ch, not relevant for view... + FileSelect = 20,%Tx + MultiSelect = 21,%Ch + DoNotSpellCheck = 22,%Tx, Ch (if Combo + Edit set) + DoNotScroll = 23,%Tx + Comb = 24,%Tx, requires MaxLen in dict + RadiosInUnison = 25,%Btn Radio + RichText = 25,%Tx + CommitOnSelChange = 26 + } + +\bitset_new:Nn \l__pdffield_F_bitset + { + Invisible = 1, + Hidden = 2, + Print = 3, + NoZoom = 4, + NoRotate = 5, + NoView = 6, + ReadOnly = 7, + Locked = 8, + ToggleNoView = 9, + LockedContents = 10 + } +\pdfdict_new:n {l__pdffield/checkbox/field} +\pdfdict_put:nnn {l__pdffield/checkbox/field}{FT}{/Btn} +\cs_new_protected:Npn \__pdffield_checkbox_field_new:n #1 + { + \group_begin: + \pdf_object_new:nn {__pdffield_checkbox/field/#1} {dict} + \pdf_object_new:nn {__pdffield_checkbox/field/#1/Kids} {array} + \seq_new:c {g__pdffield_checkbox/field/#1/Kids_seq} + \hook_gput_code:nnn {shipout/lastpage}{pdffield} %xetex needs this ... + { + \pdf_object_write:nx {__pdffield_checkbox/field/#1/Kids} + { + \seq_use:cn{g__pdffield_checkbox/field/#1/Kids_seq}{~} + } + } + \pdfdict_put:nnn {l__pdffield/checkbox/field}{T}{(#1)} + % V,DV are names describing the appearance. With checkboxes + % the values /Yes and /Off are used. + % this values are taken from the outside + \pdfdict_put:nnx {l__pdffield/checkbox/field} + {Kids} + { + \pdf_object_ref:n {__pdffield_checkbox/field/#1/Kids} + } + \bitset_set_false:Nn \l__pdffield_Ff_bitset {Radio} + \bitset_set_false:Nn \l__pdffield_Ff_bitset {Pushbutton} + \pdfdict_put:nnx {l__pdffield/checkbox/field} + {Ff} + {\bitset_to_arabic:N \l__pdffield_Ff_bitset } + \pdfdict_if_empty:nF{l__pdffield/checkbox/field/AA} + { + \pdfmeta_standard_verify:nT + {annot_widget_no_AA} + { + \pdfdict_put:nnx + {l__pdffield/checkbox/field} + {AA} + {<<\pdfdict_use:n {l__pdffield/checkbox/field/AA}>>} + } + } + \pdf_object_write:nx {__pdffield_checkbox/field/#1} { \pdfdict_use:n {l__pdffield/checkbox/field} } + \pdfmanagement_add:nnx + { Catalog / AcroForm } + { Fields } + {\pdf_object_ref:n {__pdffield_checkbox/field/#1} } + \group_end: + } + +\pdfdict_new:n {l__pdffield/checkbox/annot} +\pdfdict_put:nnn {l__pdffield/checkbox/annot}{Subtype}{/Widget} +\cs_new_protected:Npn \__pdffield_checkbox_annot_add:nnnn #1 #2 #3 #4 %name, wd, ht, dp, + { + \group_begin: + \pdfdict_put:nnx {l__pdffield/checkbox/annot}{AP}{<<\pdfdict_use:n{l__pdffield/checkbox/annot/AP}>>} + \pdfmeta_standard_verify:nF + {annot_flags} + { + \bitset_set_true:Nn \l__pdffield_F_bitset {Print} + \bitset_set_false:Nn \l__pdffield_F_bitset {Hidden} + \bitset_set_false:Nn \l__pdffield_F_bitset {Invisible} + \bitset_set_false:Nn \l__pdffield_F_bitset {NoView} + } + \pdfdict_if_empty:nF{l__pdffield/checkbox/annot/AA} + { + \pdfmeta_standard_verify:nT + {annot_widget_no_AA} + { + \pdfdict_put:nnx + {l__pdffield/checkbox/annot} + {AA} + {<<\pdfdict_use:n {l__pdffield/checkbox/annot/AA}>>} + } + } + \pdfdict_put:nnx {l__pdffield/checkbox/annot}{F}{ \bitset_to_arabic:N \l__pdffield_F_bitset } + \pdfdict_set_eq:nn {l__pdfannot/widget}{l__pdffield/checkbox/annot} + \pdfannot_dict_put:nnx {widget}{Parent}{\pdf_object_ref:n{__pdffield_checkbox/field/#1}} + \mode_leave_vertical: + \hbox_to_wd:nn + { #2 } + { + \rule [-#4]{0pt}{\dim_eval:n{#3+#4} } + \pdfannot_widget_box:nnn + { #2 } + { #3 } + { #4 } + \hfill + } + \seq_gput_right:cx {g__pdffield_checkbox/field/#1/Kids_seq}{ \pdfannot_box_ref_last:} + \group_end: + } + +\cs_new_protected:Npn \pdffield_store_appearance:nn #1 #2 + { + \pdfxform_new:nnn {__pdffield_#1}{}{#2} + } + +\cs_new_protected:Nn \__pdffield_store_default_appearances: + { + \pdffield_store_appearance:nn {checkbox/default/Yes} + { + \normalsize + \fboxsep 0pt + \framebox + [ \dim_eval:n { \box_ht:N\strutbox+\box_dp:N\strutbox } ] + { \texttimes \strut } + } + \pdffield_store_appearance:nn {checkbox/default/Off} + { + \normalsize + \fboxsep 0pt + \framebox + [ \dim_eval:n { \box_ht:N\strutbox+\box_dp:N\strutbox } ] + { \phantom{\texttimes} \strut } + } + } + +\__pdffield_store_default_appearances: +\pdfdict_new:n {l__pdffield/checkbox/annot/AP} + +\cs_new_protected:Npn \__pdffield_checkbox_add:n #1 + { + \group_begin: + \keys_set_filter:nnnN {pdffield / checkbox }{field}{#1}\l__pdffield_keys_tmpa_tl + \str_if_empty:NT \l__pdffield_field_name_str + { + \msg_error:nn {pdffield}{empty-name} + } + \exp_args:Nx + \pdf_object_if_exist:nTF {__pdffield_checkbox/field/\l__pdffield_field_name_str} + { + \tl_if_empty:NF \l__pdffield_keys_tmpa_tl + { + \msg_warning:nnxx + {pdffield} + {field-keys-ignored} + {\l__pdffield_field_name_str} + {\l__pdffield_keys_tmpa_tl} + } + } + { + \keys_set:nV { pdffield/checkbox } \l__pdffield_keys_tmpa_tl + \exp_args:No + \__pdffield_checkbox_field_new:n {\l__pdffield_field_name_str} + } + \exp_args:No + \__pdffield_checkbox_annot_add:nnnn + {\l__pdffield_field_name_str} + {\l__pdffield_annot_wd_tl } + {\l__pdffield_annot_ht_tl } + {\l__pdffield_annot_dp_tl } + \group_end: + } +\tl_new:N \l__pdffield_annot_ht_tl +\tl_new:N \l__pdffield_annot_wd_tl +\tl_new:N \l__pdffield_annot_dp_tl + +\keys_define:nn { pdffield / checkbox } + { + ,width .tl_set:N = \l__pdffield_annot_wd_tl + ,height .tl_set:N = \l__pdffield_annot_ht_tl + ,depth .tl_set:N = \l__pdffield_annot_dp_tl + ,width .initial:n = \normalbaselineskip + ,height .initial:n = \normalbaselineskip + ,depth .initial:n = 0pt + } +\keys_define:nn { pdffield / checkbox } + { + ,name .code:n = + { + \pdf_string_from_unicode:nnN {utf8/string-raw}{#1}\l__pdffield_field_name_str + \str_if_in:NnT \l__pdffield_field_name_str {.} + { + \msg_error:nnx {pdffield}{no-period}{\l__pdffield_field_name_str} + } + \str_if_empty:NT\l__pdffield_field_name_str + { + \msg_error:nn {pdffield}{empty-name} + } + } + ,name .value_required:n = true + ,name .initial:n = checkbox + ,altname .code:n = + { + \pdf_string_from_unicode:nnN {utf8/string}{#1}\l__pdffield_name_tmpa_str + \pdfdict_put:nnx { l__pdffield/checkbox/field }{TU}{\l__pdffield_name_tmpa_str} + } + ,altname .groups:n = {field} + ,mappingname .code:n = + { + \pdf_string_from_unicode:nnN {utf8/string}{#1}\l__pdffield_name_tmpa_str + \pdfdict_put:nnx { l__pdffield/checkbox/field }{TM}{\l__pdffield_name_tmpa_str} + } + ,mappingname .groups:n = {field} + } + +\keys_define:nn { pdffield / checkbox } + { + ,checked .choice: + ,checked / false .code:n = + { + \pdfdict_put:nnn {l__pdffield/checkbox/field}{V}{/Off} + \pdfdict_put:nnn {l__pdffield/checkbox/annot}{AS}{/Off} + \pdfdict_put:nnn {l__pdffield/checkbox/field}{DV}{/Off} + } + ,checked / true .code:n = + { + \pdfdict_put:nnn {l__pdffield/checkbox/field}{V}{/Yes} + \pdfdict_put:nnn {l__pdffield/checkbox/annot}{AS}{/Yes} + \pdfdict_put:nnn {l__pdffield/checkbox/field}{DV}{/Yes} + } + ,checked .default:n = {true} + ,checked .initial:n = {false} + } +\keys_define:nn { pdffield / checkbox } + { + ,setfieldflags .code:n = + { + \clist_map_inline:nn {#1} + { + \bitset_set_true:Nn \l__pdffield_Ff_bitset {##1} + } + } + ,setfieldflags .groups:n = {field} + ,unsetfieldflags .code:n = + { + \clist_map_inline:nn {#1} + { + \bitset_set_false:Nn \l__pdffield_Ff_bitset {##1} + } + } + ,unsetfieldflags .groups:n = {field} + ,setannotflags .code:n = + { + \clist_map_inline:nn {#1} + { + \bitset_set_true:Nn \l__pdffield_F_bitset {##1} + } + } + ,unsetannotflags .code:n = + { + \clist_map_inline:nn {#1} + { + \bitset_set_false:Nn \l__pdffield_F_bitset {##1} + } + } + } + +\keys_define:nn { pdffield / checkbox } + { + appearance .code:n = %value is a name of an appearance + { + \pdfxform_if_exist:nTF { __pdffield_#1/Yes } + { + \pdfdict_put:nnn {l__pdffield/checkbox/annot/AP} + {N} + { + << + /Yes ~ \pdfxform_ref:n { __pdffield_#1/Yes} + /Off ~ \pdfxform_ref:n { __pdffield_#1/Off} + >> + } + } + { + \msg_error:nnnn{pdffield}{appearance-missing}{#1}{normal} + } + }, + appearance .initial:n = checkbox/default, + } + +\keys_define:nn { pdffield / checkbox } + { + rollover-appearance .code:n = %value is a name of an appearance + { + \tl_if_empty:nTF {#1} + { + \pdfdict_remove:nn {l__pdffield/checkbox/annot/AP} {R} + } + { + \pdfxform_if_exist:nTF { __pdffield_#1/Yes } + { + \pdfdict_put:nnn {l__pdffield/checkbox/annot/AP} + {R} + { + << + /Yes ~ \pdfxform_ref:n { __pdffield_#1/Yes} + /Off ~ \pdfxform_ref:n { __pdffield_#1/Off} + >> + } + } + { + \msg_warning:nnnn{pdffield}{appearance-missing}{#1}{rollover} + } + + } + }, + } + +\keys_define:nn { pdffield / checkbox } + { + down-appearance .code:n = %value is a name of an appearance + { + \tl_if_empty:nTF {#1} + { + \pdfdict_remove:nn {l__pdffield/checkbox/annot/AP} {D} + } + { + \pdfxform_if_exist:nTF { __pdffield_#1/Yes } + { + \pdfdict_put:nnn {l__pdffield/checkbox/annot/AP} + {D} + { + << + /Yes ~ \pdfxform_ref:n { __pdffield_#1/Yes} + /Off ~ \pdfxform_ref:n { __pdffield_#1/Off} + >> + } + } + { + \msg_warning:nnnn{pdffield}{appearance-missing}{#1}{down} + } + } + }, + } +\pdfdict_new:n {l__pdffield/checkbox/annot/AA} +\pdfdict_new:n {l__pdffield/checkbox/field/AA} + +\cs_new_protected:Npn \__pdffield_define_AAaction_key:nnn #1 #2 #3 %#1 key, #2 pdf, #3 dict + { + \keys_define:nn { pdffield / checkbox } + { + #1 .code:n = + { + \pdf_string_from_unicode:nnN {utf8/string}{##1}\l__pdffield_tmpa_str + \str_if_empty:NTF \l__pdffield_tmpa_str + { + \pdfdict_remove:nn {l__pdffield/checkbox/#3/AA}{#2} + } + { + \pdfdict_put:nnx {l__pdffield/checkbox/#3/AA} + {#2} + {<</S/JavaScript/JS\l__pdffield_tmpa_str>>} + } + }, + #1 .groups:n = {#3} + } + } +\__pdffield_define_AAaction_key:nnn {keystroke}{K}{field} +\__pdffield_define_AAaction_key:nnn {format} {F}{field} +\__pdffield_define_AAaction_key:nnn {validate} {V}{field} +\__pdffield_define_AAaction_key:nnn {calculate}{C}{field} +\__pdffield_define_AAaction_key:nnn {onfocus} {Fo}{annot} +\__pdffield_define_AAaction_key:nnn {onblur} {Bl}{annot} +\__pdffield_define_AAaction_key:nnn {onmousedown}{D}{annot} +\__pdffield_define_AAaction_key:nnn {onmouseup}{U}{annot} +\__pdffield_define_AAaction_key:nnn {onenter} {E}{annot} +\__pdffield_define_AAaction_key:nnn {onexit} {X}{annot} +\cs_set_eq:NN \pdffield_checkbox:n \__pdffield_checkbox_add:n + +\cs_new_protected:Npn \pdffield_setup:nn #1 #2 + { + \keys_set:n {pdffield / #1 } {#2} + } + +\endinput% +%%%% +%% Appearance +%%checkbox +%% +%% +%% End of file `l3pdffield-testphase.sty'. diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdflscape-ltx.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdflscape-ltx.sty index b3ade3f709a..ef27c06cf1e 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdflscape-ltx.sty +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdflscape-ltx.sty @@ -1,7 +1,7 @@ %% %% This is file `pdflscape-ltx.sty', %% -%% Version: 2021/02/22 v0.95a +%% Version: 2021/02/22 v0.95b %% %% Copyright (C) 2021 The LaTeX Project %% @@ -24,7 +24,7 @@ %% This work consists of the main source file pdflscape-ltx.sty %% \NeedsTeXFormat{LaTeX2e} -\ProvidesExplPackage {pdflscape-ltx}{2021/02/22}{v0.95a} +\ProvidesExplPackage {pdflscape-ltx}{2021/02/22}{v0.95b} {Display of landscape pages in PDF - adaption of pdflscape to the PDFmanagement bundle (testphase)} \RequirePackage{lscape} 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 f1f2b6c81ba..382d32ad61e 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-firstaid.sty +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-firstaid.sty @@ -19,10 +19,10 @@ %% and all files in that bundle must be distributed together. %% %% File: pdfmanagement-firstaid.dtx -\ProvidesExplPackage {pdfmanagement-firstaid} {2021-02-22} {0.95a} +\ProvidesExplPackage {pdfmanagement-firstaid} {2021-03-07} {0.95b} {LaTeX PDF management testphase bundle / firstaid-patches} -\clist_map_inline:nn {pgf,transparent,hyperxmp,pdflscape,xcolor,color} +\clist_map_inline:nn {pgf,transparent,hyperxmp,pdflscape,xcolor,color,beamer} { \bool_new:c { g__pdfmanagement_firstaid_#1_bool } \bool_gset_true:c { g__pdfmanagement_firstaid_#1_bool } @@ -36,6 +36,10 @@ } \msg_new:nnn { pdfmanagement } { firstaid } { loading~pdfmanagement~firstaid~code~for~#1 } +\bool_if:NT \g__pdfmanagement_firstaid_beamer_bool + { + \color_set:nnn{.5~.5~.5}{rgb}{0.5,0.5,0.5} + } \@ifundefined{color_set:nn}{ \RequirePackage{l3color}}{} \bool_if:NT \g__pdfmanagement_firstaid_color_bool 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 66293c0401e..eb1dbf97ad1 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.ltx +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.ltx @@ -28,7 +28,7 @@ %% %% File: pdfmanagement-testphase.dtx \ProvidesExplFile - {pdfmanagement-testphase.ltx}{2021-02-22}{0.95a} + {pdfmanagement-testphase.ltx}{2021-03-07}{0.95b} {PDF~management~code~(testphase)} %% File: l3pdfdict.dtx \cs_new:Npn \__pdfdict_get_type:n #1 @@ -932,12 +932,12 @@ { \keys_set_groups:nnn { document / metadata} {init}{ #1 } %should be loaded after the backend is set, and only if not in the kernel + \bool_gset_true:N \g__pdfmanagement_active_bool \cs_if_free:NTF \pdf_uncompress: {\RequirePackage{l3pdf}}{\RequirePackage{expl3}} \ExplSyntaxOn\makeatletter \file_input:n {l3backend-testphase-\c_sys_backend_str.def} \ExplSyntaxOff\makeatother - \bool_gset_true:N \g__pdfmanagement_active_bool \keys_set_filter:nnn { document / metadata } { init } { lang=en-US, #1 } \bool_if:NT \g__pdfmanagement_active_bool { @@ -1034,7 +1034,6 @@ \msg_warning:nnn{pdf}{unknown-standard}{#1} } ,pdfmanagement .bool_gset:N = \g__pdfmanagement_active_bool - ,pdfmanagement .initial:n = {true} ,firstaidoff .clist_gset:N = \g__pdfmanagement_firstaidoff_clist } %% File: l3pdfannot.dtx @@ -1053,37 +1052,40 @@ LockedContents = 10 } \bool_new:N \g__pdfannot_use_lastlink_bool - \cs_new_protected:Npn \pdfannot_box:nnnn #1 #2 #3 #4 { \__pdf_backend_annotation:nnnn {#1}{#2}{#3}{#4} \bool_gset_false:N\g__pdfannot_use_lastlink_bool } - +\cs_generate_variant:Nn \pdfannot_box:nnnn {nnnx} \cs_new:Npn \pdfannot_box_ref_last: { \__pdf_backend_annotation_last: } -\cs_new_protected:Npn \pdfannot_box:nnnnn #1 #2 #3 #4 #5 - { - \exp_args:Nx - \__pdf_backend_annotation:nnnn {#2}{#3}{#4} - { - \pdfdict_if_exist:nT { l__pdfannot/#1 } - { - \pdfdict_use:n { l__pdfannot/#1} - } - #5 + \pdfdict_new:n { l__pdfannot/widget } + \pdfdict_put:nnn { l__pdfannot/widget }{ Subtype }{ /Widget } + \hook_new_pair:nn + {pdfannot/widget/before} + {pdfannot/widget/after} + \hook_new_pair:nn + {pdfannot/widget/begin} + {pdfannot/widget/end} +\cs_new_protected:Npn \pdfannot_widget_box:nnn #1 #2 #3 + { + \hook_use:n { pdfannot/widget/before } + \pdfannot_box:nnnx {#1}{#2}{#3} + { + \pdfdict_use:n { l__pdfannot/widget} } + \hook_use:n { pdfannot/widget/after } \bool_gset_false:N\g__pdfannot_use_lastlink_bool } - \pdfdict_new:n { l__pdfannot/widget } - \pdfdict_put:nnn { l__pdfannot/widget }{ Subtype }{ /Widget } \seq_const_from_clist:Nn \c_pdfannot_link_types_seq { URI , GoToR , Launch , GoTo, Named } \seq_map_inline:Nn \c_pdfannot_link_types_seq { \pdfdict_new:n { l__pdfannot/link/#1 } + \pdfdict_put:nnn { l__pdfannot/link/#1 }{ Subtype }{ /Link } \hook_new_pair:nn {pdfannot/link/#1/before} {pdfannot/link/#1/after} @@ -1105,7 +1107,6 @@ } } { - /Subtype/Link #2 %exp_not? } \bool_gset_true:N \g__pdfannot_use_lastlink_bool @@ -1144,7 +1145,8 @@ \cs_generate_variant:Nn \pdfannot_link_begin:nnw {nxw} \cs_new_protected:Npn \pdfannot_link_goto_begin:nw #1 %#1 destination { - \hook_use:n { pdfannot/link/GoTo/before} + \pdfdict_remove:nn { l__pdfannot/link/GoTo} {Subtype} + \hook_use:n { pdfannot/link/GoTo/before} %the backend add it too \mode_leave_vertical: \exp_args:Nxx %xetex needs expansion \__pdf_backend_link_begin_goto:nnw @@ -1153,6 +1155,7 @@ } { #1 } \bool_gset_true:N \g__pdfannot_use_lastlink_bool + \pdfdict_put:nnn { l__pdfannot/link/GoTo} {Subtype}{GoTo} \hook_use:n { pdfannot/link/GoTo/begin} } @@ -1191,6 +1194,11 @@ { \pdfdict_show:n { l__pdfannot/#1 } } + +\cs_new:Npn \pdfannot_dict_use:n #1 + { + \pdfdict_use:n { l__pdfannot/#1 } + } %% File: l3pdfxform.dtx \cs_new_protected:Npn \pdfxform_new:nnn #1 #2 #3 { @@ -1680,7 +1688,7 @@ \msg_new:nnn { pdffile } { target-name-missing } { - a~target~name~for~the~/FileSpec~dictionary~is~missing. + a~target~name~for~the~/Filespec~dictionary~is~missing. } \msg_new:nnn { pdffile } { object-exists } @@ -1736,10 +1744,10 @@ \int_use:N\c_sys_day_int ) } -\pdfdict_new:n { l_pdffile/FileSpec } -\pdfdict_put:nnn { l_pdffile/FileSpec } - {Type} { /FileSpec } -\pdfdict_put:nnn { l_pdffile/FileSpec } +\pdfdict_new:n { l_pdffile/Filespec } +\pdfdict_put:nnn { l_pdffile/Filespec } + {Type} { /Filespec } +\pdfdict_put:nnn { l_pdffile/Filespec } {AFRelationship} { /Unspecified } \prop_new:N \g_pdffile_embed_prop @@ -1833,11 +1841,11 @@ \pdf_object_new:nn { #1 } {dict} \group_begin: \__pdffile_filename_convert_to_print:nN { #2 } \l__pdffile_tmpa_str - \pdfdict_put:nnx {l_pdffile/FileSpec}{F} { \l__pdffile_tmpa_str } - \pdfdict_put:nnx {l_pdffile/FileSpec}{UF}{ \l__pdffile_tmpa_str } + \pdfdict_put:nnx {l_pdffile/Filespec}{F} { \l__pdffile_tmpa_str } + \pdfdict_put:nnx {l_pdffile/Filespec}{UF}{ \l__pdffile_tmpa_str } \pdf_object_write:nx { #1 } { - \pdfdict_use:n { l_pdffile/FileSpec} + \pdfdict_use:n { l_pdffile/Filespec} \tl_if_empty:nF { #3 } { /EF <</F~#3 /UF~#3>> 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 7873ac752da..93bc00d080d 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.sty +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.sty @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: pdfmanagement-testphase.dtx -\ProvidesExplPackage {pdfmanagement-testphase} {2021-02-22} {0.95a} +\ProvidesExplPackage {pdfmanagement-testphase} {2021-03-07} {0.95b} {LaTeX PDF management testphase bundle} \providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} \IfFormatAtLeastTF{2020-10-01}{}{ diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/transparent-ltx.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/transparent-ltx.sty index be7a2522708..7fd747325db 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/transparent-ltx.sty +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/transparent-ltx.sty @@ -4,7 +4,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2020/10/01] \ProvidesExplPackage{transparent-ltx}% - {2021-02-22}{v0.95a}{Transparency with color stacks (replacement for transparent.sty from Heiko Oberdiek)}% + {2021-03-07}{v0.95b}{Transparency with color stacks (replacement for transparent.sty from Heiko Oberdiek)}% \RequirePackage{l3opacity} diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty index c49a000fa20..5363a830773 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty @@ -1,6 +1,6 @@ %% LaTeX2e file `xcolor-patches.sty' %% -\ProvidesPackage{xcolor-patches-tmp-ltx}[2021/02/22 v0.95a patch xcolor for l3color] +\ProvidesPackage{xcolor-patches-tmp-ltx}[2021/02/22 v0.95b patch xcolor for l3color] \@ifundefined{color_set:nn}{\RequirePackage{l3color}}{} \ExplSyntaxOn |