From f9e0f489a862d1e8c47ec4e7ee0ef4cb89f8e0d5 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 15 Apr 2022 21:15:11 +0000 Subject: pdfmanagement-testphase (15apr22) git-svn-id: svn://tug.org/texlive/trunk@63035 c570f23f-e606-0410-a88d-b1316a301751 --- .../latex/pdfmanagement-testphase/color-ltx.sty | 2 +- .../pdfmanagement-testphase/hgeneric-testphase.def | 2 +- .../hyperxmp-patches-tmp-ltx.sty | 2 +- .../l3backend-testphase-dvipdfmx.def | 2 +- .../l3backend-testphase-dvips.def | 2 +- .../l3backend-testphase-dvisvgm.def | 2 +- .../l3backend-testphase-luatex.def | 2 +- .../l3backend-testphase-pdftex.def | 2 +- .../l3backend-testphase-xetex.def | 2 +- .../l3pdffield-testphase.sty | 80 +++++++++++++++++----- .../pdfmanagement-testphase/pdflscape-ltx.sty | 2 +- .../pdfmanagement-firstaid.sty | 2 +- .../pdfmanagement-testphase.ltx | 2 +- .../pdfmanagement-testphase.sty | 2 +- .../pdfmanagement-testphase/transparent-ltx.sty | 2 +- .../xcolor-patches-tmp-ltx.sty | 2 +- 16 files changed, 76 insertions(+), 34 deletions(-) (limited to 'Master/texmf-dist/tex/latex') 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 1be3ac8b030..f4f601f59fd 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}[2022-03-17 v0.95m +\ProvidesPackage{color-ltx}[2022-04-14 v0.95n 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/hgeneric-testphase.def b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def index 41d9585f6c1..b09aa6c98ce 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}[2022-03-17 v0.95m % +\ProvidesFile{hgeneric-testphase.def}[2022-04-14 v0.95n % generic Hyperref driver for the LaTeX PDF management testphase bundle] \RequirePackage{etoolbox} %why? 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 544f609d9e7..0f0c22f831f 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty @@ -19,7 +19,7 @@ % % for those people who are interested. \NeedsTeXFormat{LaTeX2e}[2020/10/01] -\ProvidesExplPackage{hyperxmp-patches-tmp-ltx}{2022-03-17}{0.95m} +\ProvidesExplPackage{hyperxmp-patches-tmp-ltx}{2022-04-14}{0.95n} {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 d8b38b0d75e..91cc92cae49 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}{2022-03-17}{} + {l3backend-testphase-dvipdfmx.def}{2022-04-14}{} {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 04643fa192b..5294692323b 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}{2022-03-17}{} + {l3backend-testphase-dvips.def}{2022-04-14}{} {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 ddefa1bba67..5c65533807c 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}{2022-03-17}{} + {l3backend-testphase-dvisvgm.def}{2022-04-14}{} {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 64ba7b76158..41371a4d723 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}{2022-03-17}{} + {l3backend-testphase-luatex.def}{2022-04-14}{} {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 9f03182bbb1..0843cbad60c 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}{2022-03-17}{} + {l3backend-testphase-pdftex.def}{2022-04-14}{} {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 3b20335fb46..7f00f69c4cc 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}{2022-03-17}{} + {l3backend-testphase-xetex.def}{2022-04-14}{} {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 index 8334225cd43..8f7170a1d30 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}{2022-03-17}{0.95m}% +\ProvidesExplPackage{l3pdffield-testphase}{2022-04-14}{0.95n}% {form fields} \csname HyField@NeedAppearancesfalse\endcsname % suppress NeedAppearances \str_new:N \l__pdffield_tmpa_str @@ -1119,12 +1119,13 @@ \cs_set_eq:NN \pdffield_checkbox:n \__pdffield_checkbox:n %% File: l3pdfpdffield-radiobutton.dtx - \RequirePackage{l3draw} \tl_new:N \l__pdffield_radio_value_tl -\tl_new:N \l__pdffield_radio_default_tl +\bool_new:N \l__pdffield_radio_default_bool \int_new:N \l__pdffield_radio_value_num_int \tl_new:N \l__pdffield_radio_appearance_code_tl +\bool_new:N \l__pdffield_radio_unison_bool % if true use same name (e.g. /1) for same value +\bool_set_true:N \l__pdffield_radio_unison_bool \cs_new_protected:Npn \__pdffield_radio_default_appearances: { \pdffield_appearance:nn {pdffield/radio/default/Yes} @@ -1168,6 +1169,12 @@ } \cs_gset_eq:NN \__pdffield_radio_default_appearances: \prg_do_nothing: } +\ref_attribute_gset:nnnn {pdfradioindex}{0}{now} + { + \int_use:N\l__pdffield_radio_value_num_int + } +\cs_generate_variant:Nn \ref_label:nn {V} +\cs_generate_variant:Nn \ref_value:nn {V} \cs_new_protected:Npn \__pdffield_radio_field:n #1 %name { \pdf_object_if_exist:nF {__pdffield/field/__pdffield/radio/#1} @@ -1181,13 +1188,16 @@ {__pdffield/field/__pdffield/radio-Opt/#1} {\seq_use:cn {g__pdffield_radio_opt_#1_seq}{~}} } - \tl_if_eq:NnF \l__pdffield_radio_default_tl{()} + \pdfdict_put:nnx { l__pdffield/field }{V} { /\ref_value:nn{#1}{pdfradioindex} } + \pdfdict_put:nnx { l__pdffield/field }{DV} { /\ref_value:nn{#1}{pdfradioindex} } + \__pdffield_field:n { __pdffield/radio/#1 } + \bool_if:NF \l__pdffield_radio_unison_bool + { + \cs_new:cpn {g__pdffield_radio_unison_state_#1_tl} { - \seq_gput_left:cV { g__pdffield_radio_opt_#1_seq }\l__pdffield_radio_default_tl + \bool_set_false:N \l__pdffield_radio_unison_bool } - \pdfdict_put:nnx { l__pdffield/field }{V} { /0 } - \pdfdict_put:nnx { l__pdffield/field }{DV} { /0 } - \__pdffield_field:n { __pdffield/radio/#1 } + } } \keys_set:nn {pdffield}{parent=__pdffield/radio/#1} } @@ -1199,12 +1209,14 @@ \cs_set_eq:NN\__pdffield_value_handler:n \__pdffield_radio_value_handler:n \cs_set_eq:NN\__pdffield_default_handler:n \__pdffield_radio_default_handler:n \tl_set:Nn\l__pdffield_radio_appearance_code_tl{} + \bool_set_false:N\l__pdffield_radio_default_bool \keys_set:nn {pdffield} { fieldID= ,name=radio ,width = \normalbaselineskip ,height = \normalbaselineskip + ,inunison ,__pdffield/preset/radiobutton ,#1 ,unsetFf={Pushbutton} @@ -1216,15 +1228,15 @@ \pdfdict_get:nnN {l__pdffield/field}{T}\l__pdffield_fieldID_tl \tl_put_left:Nn \l__pdffield_fieldID_tl {__pdffield/radio/} } + \cs_if_exist_use:c {g__pdffield_radio_unison_state_ \l__pdffield_fieldID_tl _tl} \__pdffield_radio_field:V\l__pdffield_fieldID_tl - \seq_if_in:cVF { g__pdffield_radio_opt_ \l__pdffield_fieldID_tl _seq }\l__pdffield_radio_value_tl + \seq_gput_right:cV { g__pdffield_radio_opt_ \l__pdffield_fieldID_tl _seq }\l__pdffield_radio_value_tl + \bool_if:NTF \l__pdffield_radio_unison_bool + { + \int_zero:N \l__pdffield_radio_value_num_int + \exp_args:Nc + \seq_map_inline:Nn { g__pdffield_radio_opt_ \l__pdffield_fieldID_tl _seq } { - \seq_gput_right:cV { g__pdffield_radio_opt_ \l__pdffield_fieldID_tl _seq }\l__pdffield_radio_value_tl - } - \int_zero:N \l__pdffield_radio_value_num_int - \exp_args:Nc - \seq_map_inline:Nn { g__pdffield_radio_opt_ \l__pdffield_fieldID_tl _seq } - { \str_if_eq:nVTF { ##1 } \l__pdffield_radio_value_tl { \seq_map_break: @@ -1232,9 +1244,23 @@ { \int_incr:N \l__pdffield_radio_value_num_int } + } + } + { + \int_set:Nn \l__pdffield_radio_value_num_int + {\seq_count:c { g__pdffield_radio_opt_ \l__pdffield_fieldID_tl _seq } -1 } } - \int_compare:nNnTF { \l__pdffield_radio_value_num_int } = 0 - { \pdfannot_dict_put:nnx {widget}{AS}{/0} } + \bool_if:NT\l__pdffield_radio_default_bool + { + \exp_args:Ne + \ref_label:nn{\l__pdffield_fieldID_tl}{pdfradioindex} + } + + \int_compare:nNnTF { \l__pdffield_radio_value_num_int } = + { + \ref_value:Vn\l__pdffield_fieldID_tl{pdfradioindex} + } + { \pdfannot_dict_put:nnx {widget}{AS}{/\ref_value:Vn\l__pdffield_fieldID_tl{pdfradioindex}} } { \pdfannot_dict_put:nnx {widget}{AS}{/Off} } \tl_if_empty:NT\l__pdffield_radio_appearance_code_tl { @@ -1251,16 +1277,32 @@ } \cs_new_protected:Npn \__pdffield_radio_value_handler:n #1 { - \pdf_string_from_unicode:nnN {utf8/string}{#1}\l__pdffield_radio_value_tl + \pdf_string_from_unicode:nnN {utf16/string}{#1}\l__pdffield_radio_value_tl } \cs_new_protected:Npn \__pdffield_radio_default_handler:n #1 { - \pdf_string_from_unicode:nnN {utf8/string}{#1}\l__pdffield_radio_default_tl + %\pdf_string_from_unicode:nnN {utf8/string}{#1}\l__pdffield_radio_default_tl + \bool_set_true:N \l__pdffield_radio_default_bool } \keys_define:nn { pdffield } { group .meta:n = {T=#1} } +\keys_define:nn { pdffield } + { + inunison .choice: + ,inunison / true .code:n = + { + \bool_set_true:N \l__pdffield_radio_unison_bool + \bitset_set_true:Nn \l__pdffield_Ff_bitset {RadiosInUnison} + } + ,inunison / false .code:n = + { + \bool_set_false:N \l__pdffield_radio_unison_bool + \bitset_set_false:Nn \l__pdffield_Ff_bitset {RadiosInUnison} + } + ,inunison .default:n = {true} + } \cs_new_protected:Npn \__pdffield_radio_appearance_handler:nnn #1 #2 #3 %name, type, text { \tl_put_right:Nn \l__pdffield_radio_appearance_code_tl 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 fac409e53c9..6cabadb5a00 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdflscape-ltx.sty +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdflscape-ltx.sty @@ -22,7 +22,7 @@ %% This work consists of the main source file pdflscape-ltx.sty %% \NeedsTeXFormat{LaTeX2e} -\ProvidesExplPackage{pdflscape-ltx}{2022-03-17}{0.95m} +\ProvidesExplPackage{pdflscape-ltx}{2022-04-14}{0.95n} {Display of landscape pages in PDF - adaption of pdflscape to the PDFmanagement bundle (testphase)} \DeclareOption*{\PassOptionsToPackage\CurrentOption{graphics}} diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-firstaid.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-firstaid.sty index 2100a3bd5b1..b653cc134b1 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}{2022-03-17}{0.95m} +\ProvidesExplPackage{pdfmanagement-firstaid}{2022-04-14}{0.95n} {LaTeX PDF management testphase bundle / firstaid-patches} \clist_map_inline:nn {pgf,transparent,hyperxmp,pdflscape,xcolor,color,beamer,output} 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 bc2badbb465..a74b2d1702d 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}{2022-03-17}{0.95m} +\ProvidesExplFile{pdfmanagement-testphase.ltx}{2022-04-14}{0.95n} {PDF~management~code~(testphase)} %% File: l3pdfdict.dtx \cs_new:Npn \__pdfdict_get_type:n #1 diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.sty index 9195d020adf..30ad83fa329 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}{2022-03-17}{0.95m} +\ProvidesExplPackage{pdfmanagement-testphase}{2022-04-14}{0.95n} {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 3599d318209..d92ef551d13 100644 --- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/transparent-ltx.sty +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/transparent-ltx.sty @@ -3,7 +3,7 @@ %% a replacement for transparent sty from Heiko Oberdiek %% \NeedsTeXFormat{LaTeX2e}[2020/10/01] -\ProvidesExplPackage{transparent-ltx}{2022-03-17}{0.95m} +\ProvidesExplPackage{transparent-ltx}{2022-04-14}{0.95n} {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 14ccb923a54..3c298e5b992 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}[2022-03-17 v0.95m patch xcolor for l3color] +\ProvidesPackage{xcolor-patches-tmp-ltx}[2022-04-14 v0.95n patch xcolor for l3color] \@ifundefined{color_set:nn}{\RequirePackage{l3color}}{} \ExplSyntaxOn -- cgit v1.2.3