summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-03-07 22:07:25 +0000
committerKarl Berry <karl@freefriends.org>2021-03-07 22:07:25 +0000
commita4f07934ee319fde60665d8fb4ace230e5f8b1c8 (patch)
tree068a7b77d848508c5372f2bd2433064021e24c47 /Master/texmf-dist
parentc786865a4c2198f1721d72fde7b6dbfddd5757c5 (diff)
pdfmanagement-testphase (7mar21) (branch)
git-svn-id: svn://tug.org/texlive/branches/branch2020.0@58206 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/pdfmanagement-testphase/CHANGELOG.md31
-rw-r--r--Master/texmf-dist/doc/latex/pdfmanagement-testphase/README.md2
-rw-r--r--Master/texmf-dist/doc/latex/pdfmanagement-testphase/hyperref-generic.pdfbin843358 -> 873009 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3backend-testphase.pdfbin545241 -> 565792 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfannot.pdfbin532029 -> 565696 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfdict.pdfbin496017 -> 523596 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield.pdfbin0 -> 556128 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffile.pdfbin519787 -> 547500 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfmanagement.pdfbin619976 -> 649554 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfmeta.pdfbin625958 -> 656456 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdftools.pdfbin487709 -> 514001 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfxform.pdfbin410316 -> 435022 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pdfmanagement-testphase/ltdocinit.pdfbin521875 -> 550289 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-firstaid.pdfbin395182 -> 419964 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-testphase.pdfbin419957 -> 444916 bytes
-rw-r--r--Master/texmf-dist/source/latex/pdfmanagement-testphase/hyperref-generic.dtx38
-rw-r--r--Master/texmf-dist/source/latex/pdfmanagement-testphase/l3backend-testphase.dtx14
-rw-r--r--Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfannot.dtx159
-rw-r--r--Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfdict.dtx4
-rw-r--r--Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield.dtx961
-rw-r--r--Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffile.dtx64
-rw-r--r--Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmanagement.dtx4
-rw-r--r--Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmeta.dtx4
-rw-r--r--Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdftools.dtx6
-rw-r--r--Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfxform.dtx4
-rw-r--r--Master/texmf-dist/source/latex/pdfmanagement-testphase/ltdocinit.dtx10
-rw-r--r--Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx15
-rw-r--r--Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.dtx10
-rw-r--r--Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.ins8
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/color-ltx.sty2
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def24
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty2
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvipdfmx.def2
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvips.def2
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvisvgm.def2
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-luatex.def2
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-pdftex.def2
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def2
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3pdffield-testphase.sty455
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdflscape-ltx.sty4
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-firstaid.sty8
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.ltx62
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.sty2
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/transparent-ltx.sty2
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty2
45 files changed, 1727 insertions, 182 deletions
diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/CHANGELOG.md b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/CHANGELOG.md
new file mode 100644
index 00000000000..4d417af72d2
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/CHANGELOG.md
@@ -0,0 +1,31 @@
+# Changelog
+All notable changes to the `pdfmanagement-testphase` bundle since the
+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.
+
+## [Unreleased]
+
+## [2021-03-07]
+
+### Added
+- \pdfannot_widget_box:nnnn
+- \pdfannot_dict_use:n
+- module l3pdffield for form fields. Currently it only supports checkboxes.
+
+### Changed
+-
+
+### Removed
+- \pdfannot_box:nnnnn: Concept to mix manual specs and dictionaries is wrong.
+ This can lead to duplicate entries in the dictionaries.
+
+### Fixed
+- Wrong default setting of \g_@@_active_bool (issue #13)
+- l3pdffile: Wrong casing: FileSpec -> Filespec
+- beamer linkbordercolor error (workaround in firstaid)
+
+## [2021-02-23]
+
+First release
diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/README.md b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/README.md
index a3743c6504b..e8ccd6bde2e 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.95a, 2021-02-22
+Version: 0.95b, 2021-03-07
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
index 910f9e61fd5..49fbd11925b 100644
--- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/hyperref-generic.pdf
+++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/hyperref-generic.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3backend-testphase.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3backend-testphase.pdf
index 0d2d78f683e..b89ccd6af04 100644
--- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3backend-testphase.pdf
+++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3backend-testphase.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfannot.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfannot.pdf
index 67a37e09210..6299ff3a302 100644
--- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfannot.pdf
+++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfannot.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfdict.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfdict.pdf
index f52defd0852..4d2d2c1841a 100644
--- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfdict.pdf
+++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfdict.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield.pdf
new file mode 100644
index 00000000000..6fc5c3844b2
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffile.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffile.pdf
index a79ea7df553..49e015fef5d 100644
--- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffile.pdf
+++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffile.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfmanagement.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfmanagement.pdf
index 51c580ade5f..3a21c93c56d 100644
--- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfmanagement.pdf
+++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfmanagement.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfmeta.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfmeta.pdf
index ef9a1db31b1..1162dcd1cf1 100644
--- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfmeta.pdf
+++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfmeta.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdftools.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdftools.pdf
index e185a813ecb..e8988db4248 100644
--- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdftools.pdf
+++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdftools.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfxform.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfxform.pdf
index a6faf38b593..4c345d40066 100644
--- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfxform.pdf
+++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfxform.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/ltdocinit.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/ltdocinit.pdf
index d4f5b63ecb4..99ee652c793 100644
--- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/ltdocinit.pdf
+++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/ltdocinit.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-firstaid.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-firstaid.pdf
index 3492a9b7afe..92144a63e74 100644
--- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-firstaid.pdf
+++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-firstaid.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-testphase.pdf b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-testphase.pdf
index d9c2da28627..c5021da1180 100644
--- a/Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-testphase.pdf
+++ b/Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-testphase.pdf
Binary files differ
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 c279519c3b5..ee7c99874ae 100644
--- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/hyperref-generic.dtx
+++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/hyperref-generic.dtx
@@ -86,7 +86,7 @@
% }^^A
% }
%
-% \date{Version 0.95a, released 2021-02-22}
+% \date{Version 0.95b, released 2021-03-07}
%
% \maketitle
% \begin{documentation}
@@ -813,7 +813,7 @@
% \end{macrocode}
% \begin{macrocode}
\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?
@@ -1822,12 +1822,13 @@
\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
+% <<
+% \pdfdict_use:n {l_hyp/annot/A/URI}
+% >>
}
{
#1
@@ -1877,12 +1878,13 @@
\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<<
+% \pdfdict_use:n {l_hyp/annot/A/GoToR}
+% >>
}
{
#1\Hy@xspace@end
@@ -1935,13 +1937,14 @@
\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
+% <<
+% \pdfdict_use:n {l_hyp/annot/A/Launch}
+% >>
}
{
#2\Hy@xspace@end
@@ -1986,12 +1989,13 @@
\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 }
- >>
+% /A
+% <<
+% \pdfdict_use:n { l_hyp/annot/A/Named }
+% >>
}
{
#2
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 ffa7fd0b633..796ba7f701a 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.95a, released 2021-02-22}
+% \date{Version 0.95b, released 2021-03-07}
%
% \maketitle
%
@@ -56,27 +56,27 @@
% \begin{macrocode}
%<drivers>\ProvidesExplFile
%<*dvipdfmx>
- {l3backend-testphase-dvipdfmx.def}{2021-02-22}{}
+ {l3backend-testphase-dvipdfmx.def}{2021-03-07}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: dvipdfmx}
%</dvipdfmx>
%<*dvips>
- {l3backend-testphase-dvips.def}{2021-02-22}{}
+ {l3backend-testphase-dvips.def}{2021-03-07}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: dvips}
%</dvips>
%<*dvisvgm>
- {l3backend-testphase-dvisvgm.def}{2021-02-22}{}
+ {l3backend-testphase-dvisvgm.def}{2021-03-07}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: dvisvgm}
%</dvisvgm>
%<*luatex>
- {l3backend-testphase-luatex.def}{2021-02-22}{}
+ {l3backend-testphase-luatex.def}{2021-03-07}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (LuaTeX)}
%</luatex>
%<*pdftex>
- {l3backend-testphase-pdftex.def}{2021-02-22}{}
+ {l3backend-testphase-pdftex.def}{2021-03-07}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (pdfTeX)}
%</pdftex>
%<*xdvipdfmx>
- {l3backend-testphase-xetex.def}{2021-02-22}{}
+ {l3backend-testphase-xetex.def}{2021-03-07}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: XeTeX}
%</xdvipdfmx>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfannot.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfannot.dtx
index 94b7a89af87..71ee24f53df 100644
--- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfannot.dtx
+++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfannot.dtx
@@ -52,7 +52,7 @@
% }^^A
% }
%
-% \date{Version 0.95a, released 2021-02-21}
+% \date{Version 0.95b, released 2021-02-21}
%
% \maketitle
% \begin{documentation}
@@ -70,26 +70,15 @@
% \subsection{General annotation commands}
%
% \begin{function}[added = 2019-09-05, updated = 2020-04-14]
-% { \pdfannot_box:nnnn }
+% { \pdfannot_box:nnnn,\pdfannot_box:nnnx }
% \begin{syntax}
% \cs{pdfannot_box:nnnn} \Arg{width} \Arg{height} \Arg{depth} \Arg{annot spec}
% \end{syntax}
% This creates an \texttt{/Type/Annot} object with the given dimensions.
-% It doesn't use hooks or dictionaries.
-% \end{function}
-% \begin{function}[added = 2020-03-30]
-% { \pdfannot_box:nnnnn }
-% \begin{syntax}
-% \cs{pdfannot_box:nnnnn} \Arg{type} \Arg{width} \Arg{height} \Arg{depth} \Arg{annot spec}
-% \end{syntax}
-% This creates an \texttt{/Type/Annot} object with the given dimensions.
-% \meta{type} should be currently one of |link/URI|, |link/GoToR|,
-% |link/Launch|, |link/GoTo| or |link/Named| or
-% |widget|, it will then insert the attribute dictionary of this type
-% additionally to the manually given \meta{annot spec}.
-% The attribute dictionaries can be filled with commands described below.
-% Hooks are not used.
+% It doesn't use hooks or dictionaries. The annotation doesn't occupy space but
+% as it is a whatsit it can affect spacing.
% \end{function}
+%
% \begin{function}[added = 2019-09-05]
% { \pdfannot_box_ref_last: }
% \begin{syntax}
@@ -97,6 +86,32 @@
% \end{syntax}
% This retrieves the object reference of the last box annotation created.
% \end{function}
+% \subsection{Dictionary for the annotation spec}
+%
+% \meta{annot spec} in the above command can be given in two ways. One way is
+% to enter the needed dictionary keys and values directly:
+% \begin{verbatim}
+% \pdfannot_box:nnnn{1cm}{1cm}{0cm}{/Subtype/Link /Border[0~0~1]}
+% \end{verbatim}
+%
+% A second method is to make use of the dictionary commands provided by \pkg{l3pdfdict}:
+%
+% \begin{verbatim}
+% \pdfdict_new:n {l_my_annot}
+% \pdfdict_put:nnn{l_my_annot}{Subtype}{/Link}
+% \pdfdict_put:nnn{l_my_annot}{Border}{[0~0~1]}
+% \pdfannot_box:nnnx{1cm}{1cm}{0cm}{\pdfdict_use:n{l_my_annot}}
+% \end{verbatim}
+%
+% The second method is clearly slower and more to type. But it has the advantage
+% that using such a dictionary makes it easy to add, remove and change entries.
+% It also avoids the potential problem that a key is added twice with different
+% values. This allows to create user interfaces to change settings and
+% also makes it easy to extend the interfaces in case some new setting
+% should be included. For these reasons both the PDF management itself,
+% but also the specific annotation commands in the following sections
+% all make use of such dictionaries.
+%
% \subsection{Link annotations}
% Link annotations are special cases of annotations. In the PDF they are identified
% by an |/Subtype/Link| entry in the dictionary.
@@ -152,16 +167,22 @@
% \begin{syntax}
% \cs{pdfannot_link:nnn} \Arg{type} \Arg{user action spec} \Arg{link text}
% \end{syntax}
-% This creates a link around the \meta{link text} with the specified
+% This creates a link around the \meta{link text}.
+% \texttt{/Subtype/Link} is added automatically through the dictionary.
% \meta{user action spec}\footnote{The wording follows the pdftex documentation}.
-% \texttt{/Subtype/Link} is added automatically.
+% is provided as a fast method to add dictionary contents,
+% but it should be noted that no provision is taken to avoid clashes with
+% values added through the dictionary. If needed clashing entries should be
+% removed from the dictionary first. Normally the argument is not needed, all
+% entries can be added through the dictionary too.
% \meta{type} should be one of \texttt{URI}, \texttt{GoToR},
% \texttt{Launch}, \texttt{GoTo} or \texttt{Named}. The |GoTo| variant does
% \emph{not} complain if the destination name is not known like
% \cs{pdfannot_link_goto_begin:nw}.
% The attributes stored in the local dictionary
% \texttt{link/}\meta{type} are inserted as
-% \emph{attr spec} and the code in the begin and end hook
+% \emph{attr spec} before \meta{user action spec}.
+% The code in the begin and end hook
% \texttt{pdfannot/link/\meta{type}/before}
% and \texttt{pdfannot/link/\meta{type}/after}
% is executed before and after the link (outside the link command)
@@ -193,10 +214,14 @@
% \cs{pdfannot_link_begin:nnw} \Arg{type} \Arg{user action spec} \meta{content}
% \cs{pdfannot_link_end:n} \Arg{type}
% \end{syntax}
-% This creates a link around the \meta{content} with the specified
-% \meta{user action spec} (e.g. an /A dictionary with an URI) or
-% \meta{destination} (a name as defined with the
-% first argument of \cs{pdf_destination:nn}).
+% This creates a link like the previous command.
+% \texttt{/Subtype/Link} is added automatically through the dictionary.
+% \meta{user action spec}\footnote{The wording follows the pdftex documentation}.
+% is provided as a fast method to add dictionary contents,
+% but it should be noted that no provision is taken to avoid clashes with
+% values added through the dictionary. If needed clashing entries should be
+% removed from the dictionary first. Normally the argument is not needed, all
+% entries can be added through the dictionary too.
% \texttt{/Subtype/Link} is added automatically.
% In contrast to \cs{pdfannot_link:nnn} this function
% does not absorb the argument when finding the \meta{content}, and so can
@@ -278,6 +303,17 @@
% \texttt{link/GoTo}, \texttt{link/Named}.
% \end{function}
%
+% \begin{function}[EXP,added = 2021-03-03]
+% { \pdfannot_dict_use:n }
+% \begin{syntax}
+% \cs{pdfannot_dict_use:n} \Arg{dictionary name}
+% \end{syntax}
+% This outputs the property list of the dictionary as a list of
+% |/key value| pairs.
+% This can be used e.g. when writing a dictionary object with
+% \cs{pdf_object_write:nx}
+% \end{function}
+%
% \begin{variable}[added = 2020-12-28]{\l_pdfannot_F_bitset}
% This is a bitset variable, with the named index names suitable for the
% /F flag in an annotation.
@@ -291,6 +327,27 @@
% |Print|, |NoZoom|, |NoRotate|, |NoView|, |ReadOnly|, |Locked|, |ToggleNoView|,
% |LockedContents| which correspond to the names used in the PDF references.
% \end{variable}
+% \subsection{Widget annotations}
+% Widget annotations are quite important for form fields, as they are used
+% to build the actually instance of such fields.
+%
+% As they can contain meaningful content hooks are probably needed to allow tagging
+% and other manipulations, so like with link special commands are provided.
+% Widget are normally in a box and line and page breaks are not relevant, so
+% the command is offered as box command.
+%
+% \begin{function}[added = 2021-03-02]
+% { \pdfannot_widget_box:nnn }
+% \begin{syntax}
+% \cs{pdfannot_widget_box:nnn} \Arg{width} \Arg{height} \Arg{depth}
+% \end{syntax}
+% This creates an \texttt{/Type/Annot} object with the given dimensions.
+% The annotation doesn't occupy space.
+% It will insert the attribute dictionary of the widget type (which
+% is prefilled with \texttt{/Subtype/Widget}).
+% The hooks \texttt{pdfannot/widget/before} and \texttt{pdfannot/widget/after}
+% are executed before and after the widget.
+% \end{function}
% \end{documentation}
%
% \begin{implementation}
@@ -300,7 +357,7 @@
% \begin{macrocode}
%<@@=pdfannot>
%<*header>
-\ProvidesExplPackage {l3pdfannot} {2021-02-22} {0.95a}
+\ProvidesExplPackage {l3pdfannot} {2021-03-07} {0.95b}
{PDF-annotations}
\RequirePackage{l3pdfdict}
%</header>
@@ -349,41 +406,45 @@
% type or not type? Syntax for type?
% should there be a version without type?
% \end{NOTE}
-
+% \begin{macro}{\pdfannot_box:nnnn,\pdfannot_box:nnnx,\pdfannot_box_ref_last:}
% \begin{macrocode}
\cs_new_protected:Npn \pdfannot_box:nnnn #1 #2 #3 #4
{
\__pdf_backend_annotation:nnnn {#1}{#2}{#3}{#4}
\bool_gset_false:N\g_@@_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_@@/#1 }
- {
- \pdfdict_use:n { l_@@/#1}
- }
- #5
- }
- \bool_gset_false:N\g_@@_use_lastlink_bool
- }
% \end{macrocode}
+% \end{macro}
% \subsection{Annotations, subtype Widget}\label{pdf:annot:widget}
-% Currently no code is provided here.
-% The local dictionary \texttt{l_@@/Widget} is a skeleton
-% dictionary for this subtype. It currently contains as only entry
+% Widgets are typically boxes, so we provide a box command.
+% A local dictionary \texttt{l_@@/Widget} is used.
+% It contains like the other dictionaries
% the subtype setting (the /Type is added by the backend).
% \begin{macrocode}
- \pdfdict_new:n { l_@@/widget }
+ \pdfdict_new:n { l_@@/widget }
\pdfdict_put:nnn { l_@@/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_@@/widget}
+ }
+ \hook_use:n { pdfannot/widget/after }
+ \bool_gset_false:N\g_@@_use_lastlink_bool
+ }
% \end{macrocode}
%
% \subsection{Annotations, subtype Link}\label{sec:links}
@@ -427,6 +488,7 @@
\seq_map_inline:Nn \c_pdfannot_link_types_seq
{
\pdfdict_new:n { l_@@/link/#1 }
+ \pdfdict_put:nnn { l_@@/link/#1 }{ Subtype }{ /Link }
\hook_new_pair:nn
{pdfannot/link/#1/before}
{pdfannot/link/#1/after}
@@ -454,7 +516,6 @@
}
}
{
- /Subtype/Link
#2 %exp_not?
}
\bool_gset_true:N \g_@@_use_lastlink_bool
@@ -504,7 +565,8 @@
% \begin{macrocode}
\cs_new_protected:Npn \pdfannot_link_goto_begin:nw #1 %#1 destination
{
- \hook_use:n { pdfannot/link/GoTo/before}
+ \pdfdict_remove:nn { l_@@/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
@@ -513,6 +575,7 @@
}
{ #1 }
\bool_gset_true:N \g_@@_use_lastlink_bool
+ \pdfdict_put:nnn { l_@@/link/GoTo} {Subtype}{GoTo}
\hook_use:n { pdfannot/link/GoTo/begin}
}
@@ -556,6 +619,7 @@
% \pdfannot_dict_put:nnx,
% \pdfannot_dict_remove:nn,
% \pdfannot_dict_show:n
+% \pdfannot_dict_use:n
% }
% \begin{macrocode}
\cs_new_protected:Npn \pdfannot_dict_put:nnn #1 #2 #3
@@ -575,6 +639,11 @@
{
\pdfdict_show:n { l_@@/#1 }
}
+
+\cs_new:Npn \pdfannot_dict_use:n #1
+ {
+ \pdfdict_use:n { l_@@/#1 }
+ }
%</package>
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfdict.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfdict.dtx
index 558b721ca57..2362863e3ac 100644
--- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfdict.dtx
+++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfdict.dtx
@@ -53,7 +53,7 @@
% }^^A
% }
%
-% \date{Version 0.95a, released 2021-02-22}
+% \date{Version 0.95b, released 2021-03-07}
%
% \maketitle
% \begin{documentation}
@@ -212,7 +212,7 @@
% \begin{macrocode}
%<@@=pdfdict>
%<*header>
-\ProvidesExplPackage {l3pdfdict} {2021-02-22} {0.95a}
+\ProvidesExplPackage {l3pdfdict} {2021-03-07} {0.95b}
{Tools for PDF dictionaries (LaTeX PDF management testphase bundle)}
%</header>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield.dtx
new file mode 100644
index 00000000000..3d7e6123e11
--- /dev/null
+++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield.dtx
@@ -0,0 +1,961 @@
+% \iffalse meta-comment
+%
+%% File: l3pdfpdffield-checkbox.dtx
+%
+% Copyright (C) 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
+%
+% http://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.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/pdfresources
+%
+% for those people who are interested.
+%
+%<*driver>
+\RequirePackage{pdfmanagement-testphase}
+\DeclareDocumentMetadata{}
+\makeatletter
+\declare@file@substitution{doc.sty}{doc-v3beta.sty}
+\makeatother
+\documentclass[full]{l3doc}
+\usepackage{array,booktabs}
+\usepackage{l3pdffield-testphase,bearwear}
+\hypersetup{pdfauthor=The LaTeX Project,
+ pdftitle=l3pdffield (LaTeX PDF management testphase bundle)}
+\begin{document}
+ \DocInput{\jobname.dtx}
+\end{document}
+%</driver>
+% \fi
+% \NewDocElement[
+% idxgroup=checkbox keys,
+% idxtype = {checkbox key},
+% printtype= \textit{checkbox key}
+% ]{Checkboxkey}{checkboxkey}
+% \providecommand\hook[1]{\texttt{#1}}
+% \ExplSyntaxOn
+% \pdffield_store_appearance:nn {bear/Yes}
+% {
+% \tikz\bear\bearwear[shirt=red,body~deco={\node[font=\tiny\bfseries,white]~at~(beartummy){Yes};}];
+% }
+% \pdffield_store_appearance:nn {bear/Off}
+% {
+% \tikz\bear\bearwear[body~deco={\node[font=\tiny\bfseries,white]~at~(beartummy){Off};}];
+% }
+% \ExplSyntaxOff
+% \title{^^A
+% The \pkg{l3pdffield} module\\ Commands to create form fields ^^A
+% \\ \LaTeX{} PDF management testphase bundle
+% }
+%
+% \author{^^A
+% The \LaTeX{} Project\thanks
+% {^^A
+% E-mail:
+% \href{mailto:latex-team@latex-project.org}
+% {latex-team@latex-project.org}^^A
+% }^^A
+% }
+%
+% \date{Version 0.95b, released 2021-03-07}
+%
+% \maketitle
+% \begin{documentation}
+% \section{\pkg{l3pdffield} Introduction}
+% The implementation of form fields in hyperref has some bugs, see for example
+% \url{https://github.com/latex3/hyperref/issues/94}. This package is a first step
+% towards the goal to review and improve the code of form fields.
+%
+% Like the \pkg{pdfmanagement-testphase} package itself it is a temporary package:
+% the definite home of the code is not yet decided.
+%
+% It handles for now \emph{only} checkboxes, other form fields like pushbutton,
+% radio buttons or text fields will follow later. As currently no fonts are used,
+% it doesn't relies on the hyperref code
+% to initialize the form, but it can be used with hyperref.
+%
+% The code requires the new PDF management. The code makes use of
+% \pkg{l3pdfxform} to create the Xobjects. This code doesn't support yet the
+% the dvips backend.
+%
+%
+%
+% Please keep in mind
+% \begin{itemize}
+% \item Not every PDF viewer supports checkboxes.
+% \item The handling can depend on settings in the PDF viewer. In adobe reader for
+% example I had to disable an option to avoid that it tries to create an appearance
+% itself
+% \item Standards like pdf/A disable form fields too (as you typically can't change the PDF).
+% \end{itemize}
+%
+% If \pkg{hyperref} is loaded before
+% the package will suppress the deprecated |/NeedAppearances| setting. If \pkg{hyperref}
+% is loaded later you should do it in the \cs{Form} options.
+%
+% So a typical use together with hyperref could look like this
+%
+% \begin{verbatim}
+% \RequirePackage{pdfmanagement-testphase}
+% \DeclareDocumentMetadata{uncompress}
+% \documentclass{article}
+% \usepackage{hyperref}
+% \usepackage{l3pdffield-testphase}
+% \begin{document}
+% \Form
+% \end{verbatim}
+% \section{Step 1: Checkboxes}
+% Click me:
+% \ExplSyntaxOn\pdffield_checkbox:n{name=bear,appearance=bear,width=23pt,height=30pt,depth=10pt}\ExplSyntaxOff
+%
+% \bigskip
+% \subsection{Commands}
+% \begin{function}{\pdffield_checkbox:n}
+% \begin{syntax}
+% \cs{pdffield_checkbox:n}\Arg{key val list}
+% \end{syntax}
+% This creates a checkbox to check and uncheck. The list of allowed keys is described below.
+% Typically the \meta{key val list} should at least set the name. Checkboxes with the same
+% name belong to the same field and are checked and unchecked together. The default appearance
+% is a quadratic frame with a \cs{texttimes} in it for the checked case.
+% \end{function}
+%
+%\begin{function}{\pdffield_setup:nn}
+% \begin{syntax}
+% \cs{pdffield_setup:nn}\Arg{field type}\Arg{key val list}
+% \end{syntax}
+% This allows to setup up values for following fields. \Arg{field type}
+% should be a field, currently the only allowed value is |checkbox|.
+% \end{function}
+%
+%\begin{function}{\pdffield_store_appearance:nn}
+% \begin{syntax}
+% \cs{pdffield_store_appearance:nn}\Arg{name/state}\Arg{content}
+% \end{syntax}
+% This is a small wrapper around \cs{pdfxform_new:nn} and store appearances for the fields.
+% \meta{state} should be for checkboxes either |Yes| or |Off| (and typically
+% you should define both). \meta{name} is the name
+% that is used in the |appearance| key, |checkbox/default| is predefined and so can't be used.
+% \meta{content} is arbitrary content. The dimensions should fit to the planed size of the
+% checkbox.%
+% \end{function}
+% \subsection{Keys}
+%
+% The new checkbox commands accepts following keys:
+%
+% \DescribeCheckboxkey{name} This sets the (internal) name of the field. It shouldn't contain
+% a period, be not empty and sensibly consist of simple chars. Checkboxes instances
+% with the same name belong to the same field and are checked and unchecked together.
+%
+% \DescribeCheckboxkey{altname} This sets an alternative name for user interaction.
+% This name can only be set at the first checkbox instance, when the field is initialized.
+% \DescribeCheckboxkey{mappingname} This sets an alternative name for export.
+% This name can only be set at the first checkbox instance, when the field is initialized.
+%
+% \DescribeCheckboxkey{width}
+% \DescribeCheckboxkey{height}
+% \DescribeCheckboxkey{depth} These keys allow to set the dimensions of checkbox instance.
+% The value should be a command that expands to a dimension expression. By default
+% |width| and |height| use \cs{normalbaselineskip}, the |depth| is zero.
+%
+% \DescribeCheckboxkey{appearance} This key sets the normal appearance. It takes as value a
+% \meta{name} and expects that the two appearances \meta{name}|/Yes| and \meta{name}|/Off|
+% has been created with the command described below. The initial value is |checkbox/default|
+% and shows a \cs{texttimes}.
+%
+% \DescribeCheckboxkey{rollover-appearance} This key sets the rollover appearance (when the
+% mouse hovers over the checkbox). It takes as value a
+% \meta{name} and expects that the two appearances \meta{name}|/Yes| and \meta{name}|/Off|
+% has been created with the command described below. Initially this is not set.
+% An empty value removes the entry.
+%
+% \DescribeCheckboxkey{down-appearance} This key sets the down appearance (when the
+% mouse clicks). It takes as value a
+% \meta{name} and expects that the two appearances \meta{name}|/Yes| and \meta{name}|/Off|
+% has been created with the command described below. Initially this is not set.
+% An empty value removes the entry.
+%
+% \DescribeCheckboxkey{checked} This is a boolean key which allows to set if the
+% checkbox should be initially checked or not. It sets the |/V| and |/DV| key of the field
+% and the |/AS| key of the annotation instance. It is possible to use different
+% values for different instances, if one wants to confuse the user.
+%
+% \DescribeCheckboxkey{setfieldflags}
+% \DescribeCheckboxkey{unsetfieldflags}
+% These keys allow to set or unset the field flags. They expect a comma lists of
+% flag names. Allowed names |ReadOnly|, |Required|,
+% |NoExport|, |Multiline|, |Password|, |NoToggleToOff|, |Radio|, |Pushbotton|,
+% |Combo|, |Edit|, |Sort|, |FileSelect|, |MultiSelect|, |DoNotSpellCheck|,
+% |DoNotScroll|, |Comb|, |RadiosInUnison|, |RichText|, |CommitOnSelChange|.
+%
+% From these |Radio|, |Pushbotton| are set automatically automatically by the code
+% as this is required for a checkbox. Not every one from the rest makes sense for
+% checkboxes but the same key will be used for other fields too.
+% Check the PDF reference to decide which one to set or unset.
+%
+% \begin{checkboxkey}{keystroke,format,validate,calculate}
+% These keys add the |/K, |/F, |/V|, |/C| key to the |/AA| dictionary of the field object.
+% Their value should be javascript code. The |/AA| dictionary is suppressed
+% if a pdf/A standard is set. These keys are probably not of much used with a checkbox.
+% \end{checkboxkey}
+%
+% \vspace{2\baselineskip}
+% \begin{checkboxkey}{onfocus,onblur,onmousedown,onmouseup,onenter,onexit}
+% These keys adds the |/F, |/Bl, |/D|, |/U|, |E| and |X| key to the |/AA| dictionary
+% of the widget annotation (the checkbox instance) object.
+% Their value should be javascript code. The |/AA| dictionary
+% is suppressed if a pdf/A standard is set.
+%
+% For example
+% \begin{verbatim}
+% onenter={app.alert('Hello');}
+% \end{verbatim}
+% \end{checkboxkey}
+%
+% \subsection{Using with hyperref}
+% The \cs{CheckBox} command from hyperref also prints a label, something that the
+% command here don't do. A redefinition like the following should allow to \cs{CheckBox}
+% to use the commands of this module. Be aware that the behaviour will not be identical!
+% Not every setting and key from \pkg{hyperref} has been copied.
+%
+% \begin{verbatim}
+% \ExplSyntaxOn\makeatletter
+% \def\@CheckBox[#1]#2{\LayoutCheckField{#2}{\pdffield_checkbox:n {name=#2,#1}}}
+% \ExplSyntaxOff\makeatother
+% \end{verbatim}
+%
+% \subsection{Some background}
+% Form fields consist of a field object and number of instances of the field:
+% A checkbox can appear on more than one page or location and if one instance
+% is checked all other instances follows and are checked too.
+%
+% All instances are in this case widget annotations and are referenced in the Kid array of the field
+% object\footnote{Fields can actually build a tree: between the root field and
+% widget annotations there can be more fields. The last one before the widget is
+% the \emph{terminal} field, but unless a sensible
+% use case comes up, I will assume that the widget annotations are direct children of
+% the root and that the root field is the terminal field.}.
+% This means that the code has to collect all the children and write
+% out the field object at the end of the document.
+%
+% If a field has only one children the content of the field dictionary and the
+% widget annotation dictionary can be merged---some examples in the PDF reference
+% show such merged dictionaries---but the code here keeps them separate, at the end
+% this is clearer.
+%
+% All the root field objects must be referenced in the AcroForm dictionary in the
+% Fields entry. This can be done with
+%
+% \begin{verbatim}
+% \pdfmanagement_add:nnx{Catalog/AcroForm}{Fields}{<obj ref>}
+% \end{verbatim}
+%
+% A checkbox has two different looks: checked and unchecked. The current hyperref
+% implementation uses symbolic names for the two states and and adds some
+% values with the /MK key and lets the PDF viewer
+% create a look from them. But this doesn't work reliably. Also newer PDF versions
+% deprecate the /NeedAppearances setting and require that such a look,
+% an \enquote{appearance}, is given as form XObjects:
+% such form XObjects are like small pictures stored in the PDF and can be referenced
+% in various part of the PDF. They can be created with the commands of
+% the \pkg{l3pdfxform} package.
+%
+% The checkbox instances---the widget annotations---cover a rectangular area on
+% the page, the XObjects are squeezed into this rectangle. So for the best result
+% both should have the same ratio of width and height.
+% XObjects used as appearances can not be rotated, if needed one has to
+% create a new appearance.
+%
+% \subsubsection{The field dictionary}
+%
+% The field dictionary shall or can have the following entries
+%
+% \begin{description}
+% \item[FT] required for terminal fields (here for the root field),
+% the value is always \texttt{Btn}, so this entry is set by the code.
+% \item[Parents] currently irrelevant as we don't have a field hierarchy.
+% \item[Kids] an array. Contains references to the children, in our case to
+% the widget annotations. The array is build by the code.
+%
+% \item[T] required, the name, a (unique) text string without a period.
+% This field is a mandatory argument which must be given by the user.
+% The value should be passed through a suitable string conversion and checked
+% if it contains a period (which is not allowed).
+%
+% \item[TU,TM] optional, alternative names for user messages (TU) and export (TM).
+% As these fields are optional they should be set by some key-val option.
+%
+% \item[Ff] A bitset, two flags must be unset for a checkbox (Radio and Pushbotton),
+% for the rest we need a keyval interface.
+%
+% \item[V] describes the initial value, for checkboxes is should be either |/Yes|
+% or |/Off|. The initial value will be |/Yes|, keys are need to set both the local
+% and the default value.
+%
+% \item[DV] optional, the default value after a reset. Should like |V| be either
+% |/Yes| or |/Off|.
+%
+% \item[AA] An action dictionary. For this we need a special command to setup such
+% dictionaries, so that they then can be used in various places.
+%
+% \end{description}
+%
+% \subsubsection{The widget annotation dictionary}
+%
+% \begin{description}
+% \item[Type] Value: |/Annot|, set automatically
+% \item[Subtype] Value: |/Widget| this is added automatically.
+% We use an internal dictionary which is locally copied over the one from l3pdfannot.
+% It can be filled with keyval options.
+% \item[Parent] The reference to the field, automatically added.
+% \item[Rect] the size, calculated from the box size
+% \item[Contents] a text string, not really needed but an optional key should allow to
+% set it,
+% \item[AP] the appearance dictionary. It should look like this
+% |/AP <</N <</Yes 17 0 R/Off 15 0 R>>>>|. I need to test if it makes sense here to
+% have a |/R| and |/D| entry too. The objects refer to suitable xforms.
+% \item[AS] should be either |/Yes| or |/Off|, and sensibly by default be
+% the same as the V entry in the field dictionary. If they differ the AS entry wins.
+%
+% \item[A] Action, this must be checked.
+% \item[AA] additional actions. This must be checked too.
+%
+% \item[Border, C, OC, AF, BM, Lang, P, NM, M, F, BS, H]: These are not specifically
+% needed for checkbox. An interface to add something to the used annot dictionary
+% is needed (or already there), but probably no special key-val support for now.
+%
+% \item[MK] this is what hyperref uses to set the appearance, but I
+% explicitly leave it out and use |AP|.
+%
+% \item[Q] (alignment), used by hyperref but not relevant as we don't have variable
+% text here.
+% \end{description}
+% \end{documentation}
+%
+% \begin{implementation}
+% \section{\pkg{l3pdffield-checkbox} Implementation}
+% \begin{macrocode}
+%<*package>
+%<@@=pdffield>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesExplPackage{l3pdffield-checkbox}{0000-00-00}{v0.00a}{form field checkbox}%
+% \end{macrocode}
+% \subsection{hyperref specific command}
+% hyperref sets NeedAppearances by default. As this is deprecated we disable this.
+% \begin{macrocode}
+\csname HyField@NeedAppearancesfalse\endcsname % suppress NeedAppearances
+% values from hyperref:
+%\def\DefaultOptionsofCheckBox{print}
+%\def\DefaultHeightofCheckBox{\normalbaselineskip}
+%\def\DefaultWidthofCheckBox{\normalbaselineskip}
+% \end{macrocode}
+% \subsection{local variables}
+% \begin{macrocode}
+\str_new:N \l_@@_field_name_str
+\str_new:N \l_@@_tmpa_str
+\str_new:N \l_@@_name_tmpa_str
+\tl_new:N \l_@@_keys_tmpa_tl
+% \end{macrocode}
+%
+% \subsection{messages}
+% \begin{macrocode}
+\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.
+ }
+% \end{macrocode}
+
+% \subsection{bitsets}
+% A bitset for the field flag Ff
+% and an internal copy of the annot bitset.
+% \begin{macrocode}
+\bitset_new:Nn \l_@@_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_@@_F_bitset
+ {
+ Invisible = 1,
+ Hidden = 2,
+ Print = 3,
+ NoZoom = 4,
+ NoRotate = 5,
+ NoView = 6,
+ ReadOnly = 7,
+ Locked = 8,
+ ToggleNoView = 9,
+ LockedContents = 10
+ }
+% \end{macrocode}
+% \subsection{The field dictionary}
+% The field dictionary is the main object. It references the
+% actual widget annotations as kids. It is created at the first
+% checkbox with a specific name.
+% To be able to set values from the outside it will use a
+% dictionary which can be filled by key-val.
+% \begin{macrocode}
+\pdfdict_new:n {l_@@/checkbox/field}
+\pdfdict_put:nnn {l_@@/checkbox/field}{FT}{/Btn}
+% \end{macrocode}
+% We need to check if the name contains a dot. But we will do this in an external command
+% to avoid to have it twice. Here we assume that the name is already converted and safe.
+%
+% We also assume that values that can be changed by the user are set outside
+% in the dictionary.
+% If the field object already exists nothing is done.
+% \begin{macro}{\@@_checkbox_field_add:n}
+% \begin{syntax}
+% \cs{@@_checkbox_field_add:n}\Arg{name}
+% \end{syntax}
+% \meta{name} should be a PDF text string without period. It identifies the
+% field.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_checkbox_field_new:n #1
+ {
+ \group_begin:
+ \pdf_object_new:nn {@@_checkbox/field/#1} {dict}
+ \pdf_object_new:nn {@@_checkbox/field/#1/Kids} {array}
+ \seq_new:c {g_@@_checkbox/field/#1/Kids_seq}
+ \hook_gput_code:nnn {shipout/lastpage}{pdffield} %xetex needs this ...
+ {
+ \pdf_object_write:nx {@@_checkbox/field/#1/Kids}
+ {
+ \seq_use:cn{g_@@_checkbox/field/#1/Kids_seq}{~}
+ }
+ }
+ \pdfdict_put:nnn {l_@@/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_@@/checkbox/field}
+ {Kids}
+ {
+ \pdf_object_ref:n {@@_checkbox/field/#1/Kids}
+ }
+ \bitset_set_false:Nn \l_@@_Ff_bitset {Radio}
+ \bitset_set_false:Nn \l_@@_Ff_bitset {Pushbutton}
+ \pdfdict_put:nnx {l_@@/checkbox/field}
+ {Ff}
+ {\bitset_to_arabic:N \l_@@_Ff_bitset }
+ \pdfdict_if_empty:nF{l_@@/checkbox/field/AA}
+ {
+ \pdfmeta_standard_verify:nT
+ {annot_widget_no_AA}
+ {
+ \pdfdict_put:nnx
+ {l_@@/checkbox/field}
+ {AA}
+ {<<\pdfdict_use:n {l_@@/checkbox/field/AA}>>}
+ }
+ }
+ \pdf_object_write:nx {@@_checkbox/field/#1} { \pdfdict_use:n {l_@@/checkbox/field} }
+ \pdfmanagement_add:nnx
+ { Catalog / AcroForm }
+ { Fields }
+ {\pdf_object_ref:n {@@_checkbox/field/#1} }
+ \group_end:
+ }
+
+% \end{macrocode}
+% \end{macro}
+% \subsection{The annot dictionary}
+% We assume that the annotation should really occupy space on the page and
+% leave vertical mode.
+% We also assume that keys like AP, AS are added before through keys to
+% the dictionary.
+% We use a local dictionary which is copied into |l__pdfannot/widget| in the code.
+% \begin{macrocode}
+\pdfdict_new:n {l_@@/checkbox/annot}
+\pdfdict_put:nnn {l_@@/checkbox/annot}{Subtype}{/Widget}
+% \end{macrocode}
+%
+% \begin{macro}{\@@_checkbox_annot_add:nnnn}
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_checkbox_annot_add:nnnn #1 #2 #3 #4 %name, wd, ht, dp,
+ {
+ \group_begin:
+% \end{macrocode}
+% Copy the internal dictionary to the pdfannot dictionary. This
+% perhaps need a function in l3pdfannot,
+% as it actually uses an internal name of another module.
+% \begin{macrocode}
+ \pdfdict_put:nnx {l_@@/checkbox/annot}{AP}{<<\pdfdict_use:n{l_@@/checkbox/annot/AP}>>}
+ \pdfmeta_standard_verify:nF
+ {annot_flags}
+ {
+ \bitset_set_true:Nn \l_@@_F_bitset {Print}
+ \bitset_set_false:Nn \l_@@_F_bitset {Hidden}
+ \bitset_set_false:Nn \l_@@_F_bitset {Invisible}
+ \bitset_set_false:Nn \l_@@_F_bitset {NoView}
+ }
+ \pdfdict_if_empty:nF{l_@@/checkbox/annot/AA}
+ {
+ \pdfmeta_standard_verify:nT
+ {annot_widget_no_AA}
+ {
+ \pdfdict_put:nnx
+ {l_@@/checkbox/annot}
+ {AA}
+ {<<\pdfdict_use:n {l_@@/checkbox/annot/AA}>>}
+ }
+ }
+ \pdfdict_put:nnx {l_@@/checkbox/annot}{F}{ \bitset_to_arabic:N \l_@@_F_bitset }
+ \pdfdict_set_eq:nn {l__pdfannot/widget}{l_@@/checkbox/annot}
+ \pdfannot_dict_put:nnx {widget}{Parent}{\pdf_object_ref:n{@@_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_@@_checkbox/field/#1/Kids_seq}{ \pdfannot_box_ref_last:}
+ \group_end:
+ }
+
+% \end{macrocode}
+% \end{macro}
+% \subsection{Appearances}
+% We don't try to force a size or content here.
+% The default appearances are a cross (\cs{texttimes}),
+% Every appearance should have two versions and follow the naming
+% checkbox/\meta{name}/Yes and checkbox/\meta{name}/Off.
+% TODO check if one delay the creation to a sensible place
+% (and don't forget that the appearance key sets an initial
+% value)
+% \begin{macro}{\pdffield_store_appearance:nn,\@@_store_default_appearances:}
+% \begin{macrocode}
+\cs_new_protected:Npn \pdffield_store_appearance:nn #1 #2
+ {
+ \pdfxform_new:nnn {@@_#1}{}{#2}
+ }
+
+\cs_new_protected:Nn \@@_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 }
+ }
+ }
+
+\@@_store_default_appearances:
+% \end{macrocode}
+% \end{macro}
+% We define a dictionary for the AP content, so that we can add R and D too
+% \begin{macrocode}
+\pdfdict_new:n {l_@@/checkbox/annot/AP}
+% \end{macrocode}
+%
+% \subsection{Assembling the checkbox}
+% \begin{macro}{\@@_checkbox_add:n}
+% \begin{macrocode}
+
+\cs_new_protected:Npn \@@_checkbox_add:n #1
+ {
+ \group_begin:
+ \keys_set_filter:nnnN {pdffield / checkbox }{field}{#1}\l_@@_keys_tmpa_tl
+ \str_if_empty:NT \l_@@_field_name_str
+ {
+ \msg_error:nn {pdffield}{empty-name}
+ }
+ \exp_args:Nx
+ \pdf_object_if_exist:nTF {@@_checkbox/field/\l_@@_field_name_str}
+ {
+ \tl_if_empty:NF \l_@@_keys_tmpa_tl
+ {
+ \msg_warning:nnxx
+ {pdffield}
+ {field-keys-ignored}
+ {\l_@@_field_name_str}
+ {\l_@@_keys_tmpa_tl}
+ }
+ }
+ {
+ \keys_set:nV { pdffield/checkbox } \l_@@_keys_tmpa_tl
+ \exp_args:No
+ \@@_checkbox_field_new:n {\l_@@_field_name_str}
+ }
+ \exp_args:No
+ \@@_checkbox_annot_add:nnnn
+ {\l_@@_field_name_str}
+ {\l_@@_annot_wd_tl }
+ {\l_@@_annot_ht_tl }
+ {\l_@@_annot_dp_tl }
+ \group_end:
+ }
+% \end{macrocode}
+% \end{macro}
+% \subsection{Keys}
+% The size of the checkbox
+%
+% \begin{macrocode}
+\tl_new:N \l_@@_annot_ht_tl
+\tl_new:N \l_@@_annot_wd_tl
+\tl_new:N \l_@@_annot_dp_tl
+
+\keys_define:nn { pdffield / checkbox }
+ {
+ ,width .tl_set:N = \l_@@_annot_wd_tl
+ ,height .tl_set:N = \l_@@_annot_ht_tl
+ ,depth .tl_set:N = \l_@@_annot_dp_tl
+ ,width .initial:n = \normalbaselineskip
+ ,height .initial:n = \normalbaselineskip
+ ,depth .initial:n = 0pt
+ }
+% \end{macrocode}
+% The names. The main name should not be empty, it is added to the dictionary
+% when the field is created. A new name means a new field.
+% The other names can only be set when the field is created,
+% so we put them in the field group.
+% \begin{macrocode}
+\keys_define:nn { pdffield / checkbox }
+ {
+ ,name .code:n =
+ {
+ \pdf_string_from_unicode:nnN {utf8/string-raw}{#1}\l_@@_field_name_str
+ \str_if_in:NnT \l_@@_field_name_str {.}
+ {
+ \msg_error:nnx {pdffield}{no-period}{\l_@@_field_name_str}
+ }
+ \str_if_empty:NT\l_@@_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_@@_name_tmpa_str
+ \pdfdict_put:nnx { l_@@/checkbox/field }{TU}{\l_@@_name_tmpa_str}
+ }
+ ,altname .groups:n = {field}
+ ,mappingname .code:n =
+ {
+ \pdf_string_from_unicode:nnN {utf8/string}{#1}\l_@@_name_tmpa_str
+ \pdfdict_put:nnx { l_@@/checkbox/field }{TM}{\l_@@_name_tmpa_str}
+ }
+ ,mappingname .groups:n = {field}
+ }
+% \end{macrocode}
+
+% A key to decide if the Box is initially checked or not
+% \begin{macrocode}
+\keys_define:nn { pdffield / checkbox }
+ {
+ ,checked .choice:
+ ,checked / false .code:n =
+ {
+ \pdfdict_put:nnn {l_@@/checkbox/field}{V}{/Off}
+ \pdfdict_put:nnn {l_@@/checkbox/annot}{AS}{/Off}
+ \pdfdict_put:nnn {l_@@/checkbox/field}{DV}{/Off}
+ }
+ ,checked / true .code:n =
+ {
+ \pdfdict_put:nnn {l_@@/checkbox/field}{V}{/Yes}
+ \pdfdict_put:nnn {l_@@/checkbox/annot}{AS}{/Yes}
+ \pdfdict_put:nnn {l_@@/checkbox/field}{DV}{/Yes}
+ }
+ ,checked .default:n = {true}
+ ,checked .initial:n = {false}
+ }
+% \end{macrocode}
+% Flags. We don't add lots of individual keys but mapped the key names directly
+% \begin{macrocode}
+\keys_define:nn { pdffield / checkbox }
+ {
+ ,setfieldflags .code:n =
+ {
+ \clist_map_inline:nn {#1}
+ {
+ \bitset_set_true:Nn \l_@@_Ff_bitset {##1}
+ }
+ }
+ ,setfieldflags .groups:n = {field}
+ ,unsetfieldflags .code:n =
+ {
+ \clist_map_inline:nn {#1}
+ {
+ \bitset_set_false:Nn \l_@@_Ff_bitset {##1}
+ }
+ }
+ ,unsetfieldflags .groups:n = {field}
+ ,setannotflags .code:n =
+ {
+ \clist_map_inline:nn {#1}
+ {
+ \bitset_set_true:Nn \l_@@_F_bitset {##1}
+ }
+ }
+ ,unsetannotflags .code:n =
+ {
+ \clist_map_inline:nn {#1}
+ {
+ \bitset_set_false:Nn \l_@@_F_bitset {##1}
+ }
+ }
+ }
+
+\keys_define:nn { pdffield / checkbox }
+ {
+ appearance .code:n = %value is a name of an appearance
+ {
+ \pdfxform_if_exist:nTF { @@_#1/Yes }
+ {
+ \pdfdict_put:nnn {l_@@/checkbox/annot/AP}
+ {N}
+ {
+ <<
+ /Yes ~ \pdfxform_ref:n { @@_#1/Yes}
+ /Off ~ \pdfxform_ref:n { @@_#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_@@/checkbox/annot/AP} {R}
+ }
+ {
+ \pdfxform_if_exist:nTF { @@_#1/Yes }
+ {
+ \pdfdict_put:nnn {l_@@/checkbox/annot/AP}
+ {R}
+ {
+ <<
+ /Yes ~ \pdfxform_ref:n { @@_#1/Yes}
+ /Off ~ \pdfxform_ref:n { @@_#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_@@/checkbox/annot/AP} {D}
+ }
+ {
+ \pdfxform_if_exist:nTF { @@_#1/Yes }
+ {
+ \pdfdict_put:nnn {l_@@/checkbox/annot/AP}
+ {D}
+ {
+ <<
+ /Yes ~ \pdfxform_ref:n { @@_#1/Yes}
+ /Off ~ \pdfxform_ref:n { @@_#1/Off}
+ >>
+ }
+ }
+ {
+ \msg_warning:nnnn{pdffield}{appearance-missing}{#1}{down}
+ }
+ }
+ },
+ }
+% \end{macrocode}
+%
+% Keys for the AA dictionary. They all trigger javascript option.
+% \begin{macro}{\@@_define_AAaction_key:nnn}
+% \begin{macrocode}
+\pdfdict_new:n {l_@@/checkbox/annot/AA}
+\pdfdict_new:n {l_@@/checkbox/field/AA}
+
+\cs_new_protected:Npn \@@_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_@@_tmpa_str
+ \str_if_empty:NTF \l_@@_tmpa_str
+ {
+ \pdfdict_remove:nn {l_@@/checkbox/#3/AA}{#2}
+ }
+ {
+ \pdfdict_put:nnx {l_@@/checkbox/#3/AA}
+ {#2}
+ {<</S/JavaScript/JS\l_@@_tmpa_str>>}
+ }
+ },
+ #1 .groups:n = {#3}
+ }
+ }
+\@@_define_AAaction_key:nnn {keystroke}{K}{field}
+\@@_define_AAaction_key:nnn {format} {F}{field}
+\@@_define_AAaction_key:nnn {validate} {V}{field}
+\@@_define_AAaction_key:nnn {calculate}{C}{field}
+\@@_define_AAaction_key:nnn {onfocus} {Fo}{annot}
+\@@_define_AAaction_key:nnn {onblur} {Bl}{annot}
+\@@_define_AAaction_key:nnn {onmousedown}{D}{annot}
+\@@_define_AAaction_key:nnn {onmouseup}{U}{annot}
+\@@_define_AAaction_key:nnn {onenter} {E}{annot}
+\@@_define_AAaction_key:nnn {onexit} {X}{annot}
+% \end{macrocode}
+% \end{macro}
+% \subsection{user commands}
+% \begin{macro}{\pdffield_checkbox:n,\pdffield_setup:nn}
+% \begin{macrocode}
+\cs_set_eq:NN \pdffield_checkbox:n \@@_checkbox_add:n
+
+\cs_new_protected:Npn \pdffield_setup:nn #1 #2
+ {
+ \keys_set:n {pdffield / #1 } {#2}
+ }
+%</package>
+% \end{macrocode}
+% \end{macro}
+%\end{implementation}
+
+\endinput%
+%%%%
+%
+%Field dict
+%Ft : /Btn /Tx /Ch /Sig
+%Parent : OR
+%Kids: array, other fields or annot/widget
+%T: partial fieldname (test string)
+%TU: alternate description (test string)
+%TM: mapping name
+%Q integer (variable text field)
+%Ff: flags ->pdffield/checkbox/field
+%V: value % not pushbutton
+%DV: default value % not pushbutton
+%AA: Action dict ... -> see below
+%Opt: array of strings, connected to kids
+% or for choices, choices
+%TI integer (lists)
+%I array Ch (complicated ...)
+%
+%/DA ( 0 0 1 rg /Ti 12 Tf ) %text field
+%/MaxLen %text field
+%
+%Lock dict (Sig)
+%SV dict (Sig)
+%
+%
+%
+%
+%Connected widget:
+%/AS default appearance from AP ( here/Yes or /Off)
+%% Appearance
+%%checkbox
+%/AP <</N <</Yes 2 0 R /Off 3 0 R>>>>
+%/C / Border /BS
+%
+%/OC ?
+%/Structparens?
+%/F flags
+%
+%
+%AA: Submit:
+% /S /SubmitForm
+% /F file /URI (/F ( ftp : / / www . beatles . com / Movies / AbbeyRoad . mov )
+% /Fields array
+%
+% /S /ImportData
+% /F file
+%
+% /S /ResetData
+% /Fields array
+%
+% /S /JavaScript
+% /JS text string or stream
+% %\pdf_flag_new:nn {annot/field/submit} %name is wrong ...
+% {
+% Include/Exclude = 0,
+% IncludeNoValueFields = 1,
+% ExportFormat = 2,
+% GetMethod = 3, % if ExportFormat=0 -> =0 to
+% SubmitCoordinates = 4, % if ExportFormat=0 -> =0 to
+% XFDF = 5,
+% IncludeAppendSaves = 6,
+% IncludeAnnotations = 7,
+% SubmitPDF = 8,
+% CanonicalFormat = 9,
+% ExclNonUserAnnots = 10,
+% ExclFKey = 11,
+% EmbedForm = 12
+% }
+% source: %adapted from https://chat.stackexchange.com/transcript/message/54421537#54421537
diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffile.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffile.dtx
index c1a2a25591d..4a65e09fd67 100644
--- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffile.dtx
+++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffile.dtx
@@ -53,7 +53,7 @@
% }^^A
% }
%
-% \date{Version 0.95a, released 2021-02-22}
+% \date{Version 0.95b, released 2021-03-07}
%
% \maketitle
% \begin{documentation}
@@ -70,7 +70,7 @@
% Case 1 (Links) are created with the \cs{pdfannot} commands.
% This module handles the two other cases. Actually from the view
% of the PDF format they are quite similar: Case 2 is case 3 without the stream
-% object and without the /EF entry in the /FileSpec dictionary (this points to the
+% object and without the /EF entry in the /Filespec dictionary (this points to the
% stream object of the file). Not embedding the file makes the PDF smaller. But it is
% also less portable: the files can only be found if they are in the right location
% relative to the PDF. The normal case is to embed the file.
@@ -78,7 +78,7 @@
% The tasks to embed and reference such a file are
% \begin{enumerate}
% \item Embed the file in a stream.
-% \item Create a FileSpec dictionary which references the stream object in the /EF
+% \item Create a Filespec dictionary which references the stream object in the /EF
% dictionary:
% \begin{verbatim}
% <<
@@ -94,7 +94,7 @@
% and name it \texttt{blub.tex}. The second name is then what the user will see
% in the attachment list or in the properties of an annotation.
%
-%\item Reference the FileSpec dictionary so that the user can access the file.
+%\item Reference the Filespec dictionary so that the user can access the file.
% This can be done in various way:
% \begin{enumerate}
% \item With an annotation (/Subtype/FileAttachment). This is done by
@@ -104,7 +104,7 @@
% \medskip
% \begin{tabular}{lll}
% key & value type & notes\\\hline
-% /FS & object reference &(FileSpec dictionary)\\
+% /FS & object reference &(Filespec dictionary)\\
% /Name & name & /Graph, /PushPin, /Paperclip, /Tag\\
% /Contents & text string & optional but recommended\\
% /F & integer & Flags\\
@@ -137,7 +137,7 @@
% /AF /NamedAF BDC
% /Properties <</NamedAF [12 0 R]
% \end{verbatim}
-% The related |/FileSpec| dictionary should contain an
+% The related |/Filespec| dictionary should contain an
% |/AFRelationship| key in this case (but it doesn't harm to add it by
% default anyway). The values of this key is describe in table~\ref{tab:AFrel}.
%
@@ -183,7 +183,7 @@
% \cs{pdf_object_new:nn}/\cs{pdf_object_write:nn} or primitive commands
% to create objects.
% The object number should be stored for the reference
-% in the |/FileSpec| dictionary.
+% in the |/Filespec| dictionary.
%
% \begin{verbatim}
% \pdf_object_unnamed_write:nx {fstream}
@@ -215,12 +215,12 @@
% see the pdf reference.
% \end{itemize}
%
-% \subsubsection{Task 2: Creating the \texttt{/FileSpec} dictionary}
-% The |/FileSpec| dictionary is a simple dictionary object, and can also
+% \subsubsection{Task 2: Creating the \texttt{/Filespec} dictionary}
+% The |/Filespec| dictionary is a simple dictionary object, and can also
% be created in various ways. If it refers to an embedded file it should
% reference it in the |/EF| key.
%
-% \subsubsection{Task 3: Referencing the \texttt{/FileSpec} dictionary}
+% \subsubsection{Task 3: Referencing the \texttt{/Filespec} dictionary}
%
% Using the dictionary reference in annotations and |/AF| keys is unproblematic.
%
@@ -233,9 +233,9 @@
% |\pdfmanagement_add:nnx{Catalog/Names}{EmbeddedFiles}{|\meta{objref}|}|
%
% \subsection{Commands and tools of these module}
-% \begin{function}{file, file/Params, file/streamParams,file/FileSpec}
+% \begin{function}{file, file/Params, file/streamParams,file/Filespec}
% The module predefines and uses a number of local dictionaries for the
-% components of the stream and the |/FileSpec| object. These dictionaries are
+% components of the stream and the |/Filespec| object. These dictionaries are
% then used by the \cs{pdffile_embed_XX}.
% The content of these dictionaries can be changed by users with the commands
% from the \pkg{l3pdfdict} module, but it should be done only locally
@@ -252,8 +252,8 @@
% l\_pdffile/Params& ModDate & |(\file_timestamp:n {\l_pdffile_source_name_str})|\\
% l\_pdffile/Params& CheckSum & |(\file_mdfive_hash:n{\l_pdffile_source_name_str})|\\
% l\_pdffile/streamParams& & a /ModDate entry with year/month/date (used with \cs{pdffile_embed_stream:nnn})\\
-% l\_pdffile/FileSpec & Type & /FileSpec\\
-% l\_pdffile/FileSpec & AFRelationship &Unspecified
+% l\_pdffile/Filespec & Type & /Filespec\\
+% l\_pdffile/Filespec & AFRelationship &Unspecified
% \end{tabular}
% \end{table}
% \begin{function}{\pdffile_embed_file:nnn}
@@ -261,12 +261,12 @@
% \cs{pdffile_embed_file:nnn} \Arg{source filename} \Arg{target filename} \Arg{object name }
% \end{syntax}
% This commands embeds the file \meta{source filename} in the PDF,
-% and creates a |/FileSpec| dictionary object named \meta{object name}.
+% and creates a |/Filespec| dictionary object named \meta{object name}.
% The object name must be unique.
% The command uses the content of the local
-% dictionaries |l_pdffile|, |l_pdffile/Params| and |l_pdffile/FileSpec|
+% dictionaries |l_pdffile|, |l_pdffile/Params| and |l_pdffile/Filespec|
% to setup the dictionary entries of the stream object and the
-% |/FileSpec| dictionary. The |/F| and |/UF| entry are filled
+% |/Filespec| dictionary. The |/F| and |/UF| entry are filled
% with \meta{target filename}.
%
% It is an error if both \meta{target filename} and \meta{source filename}
@@ -274,7 +274,7 @@
%
% If \meta{target filename} is empty \meta{source filename} is used instead.
%
-% If \meta{source filename} is empty, only a |/FileSpec| dictionary is
+% If \meta{source filename} is empty, only a |/Filespec| dictionary is
% created.
%
% If the |l_pdffile| dictionary doesn't contain a
@@ -303,11 +303,11 @@
% \cs{pdffile_embed_stream:nnn} \Arg{content} \Arg{target filename} \Arg{object name }
% \end{syntax}
% This commands embeds the \meta{content} in the PDF in a stream objects and
-% creates a |/FileSpec| dictionary object named \meta{object name}.
+% creates a |/Filespec| dictionary object named \meta{object name}.
% \meta{content} is wrapped in a \cs{exp_not:n}.
% The object name must be unique. The command uses the content of the local
-% dictionaries |l_pdffile|, |l_pdffile/streamParams| and |l_pdffile/FileSpec|
-% to setup the dictionary entries of the stream object and the /FileSpec dictionary.
+% dictionaries |l_pdffile|, |l_pdffile/streamParams| and |l_pdffile/Filespec|
+% to setup the dictionary entries of the stream object and the /Filespec dictionary.
% The /F and /UF entry are filled with \meta{target filename}.
% If \meta{target filename} is empty the fix name \texttt{stream.txt}
% is used instead.
@@ -353,12 +353,12 @@
% \begin{verbatim}
% \group_begin:
% %set the relationship:
-% \pdfdict_put:nnn {l_pdffile/FileSpec} {AFRelationship}{/Source}
+% \pdfdict_put:nnn {l_pdffile/Filespec} {AFRelationship}{/Source}
% %set the description key. The text must first be converted:
% \pdf_string_from_unicode:nnN {utf16/string}
% {this~is~an~odd~description~with~öäü}
% \l_tmpa_str
-% \pdfdict_put:nnx {l_pdffile/FileSpec} {Desc}{\l_tmpa_str}
+% \pdfdict_put:nnx {l_pdffile/Filespec} {Desc}{\l_tmpa_str}
% %embeds testinput.txt and calls it grüße.txt
% \pdffile_embed_file:nnn {testinput.txt}{grüße.txt}{file:example1}
% %reference it in the panel
@@ -376,7 +376,7 @@
%
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage {l3pdffile} {2021-02-22} {0.95a}
+\ProvidesExplPackage {l3pdffile} {2021-03-07} {0.95b}
{embedding and referencing files in PDF---LaTeX PDF management testphase bundle}
\RequirePackage{l3pdftools} %temporarly!!
%</header>
@@ -402,7 +402,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 }
@@ -492,10 +492,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 }
% \end{macrocode}
@@ -621,11 +621,11 @@
\pdf_object_new:nn { #1 } {dict}
\group_begin:
\@@_filename_convert_to_print:nN { #2 } \l_@@_tmpa_str
- \pdfdict_put:nnx {l_pdffile/FileSpec}{F} { \l_@@_tmpa_str }
- \pdfdict_put:nnx {l_pdffile/FileSpec}{UF}{ \l_@@_tmpa_str }
+ \pdfdict_put:nnx {l_pdffile/Filespec}{F} { \l_@@_tmpa_str }
+ \pdfdict_put:nnx {l_pdffile/Filespec}{UF}{ \l_@@_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/source/latex/pdfmanagement-testphase/l3pdfmanagement.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmanagement.dtx
index 55514bd06c0..f6b9a7fafe1 100644
--- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmanagement.dtx
+++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmanagement.dtx
@@ -61,7 +61,7 @@
% }^^A
% }
%
-% \date{Version 0.95a,released 2021-02-22}
+% \date{Version 0.95b,released 2021-03-07}
%
% \maketitle
% \begin{documentation}
@@ -557,7 +557,7 @@
%<@@=pdfmanagement>
%<*header>
%
-\ProvidesExplPackage {l3pdfmanagement} {2021-02-22} {0.95a}
+\ProvidesExplPackage {l3pdfmanagement} {2021-03-07} {0.95b}
{Management of core PDF dictionaries (LaTeX PDF management testphase bundle)}
%</header>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmeta.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmeta.dtx
index a374e39fc7f..48d2f147592 100644
--- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmeta.dtx
+++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmeta.dtx
@@ -53,7 +53,7 @@
% }^^A
% }
%
-% \date{Version 0.95a, released 2021-02-21}
+% \date{Version 0.95b, released 2021-02-21}
%
% \maketitle
% \begin{documentation}
@@ -340,7 +340,7 @@
% \begin{macrocode}
%<@@=pdfmeta>
%<*header>
-\ProvidesExplPackage {l3pdfmeta} {2021-02-22} {0.95a}
+\ProvidesExplPackage {l3pdfmeta} {2021-03-07} {0.95b}
{PDF-Standards---LaTeX PDF management testphase bundle}
%</header>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdftools.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdftools.dtx
index 481ddce8724..d1ded1659b8 100644
--- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdftools.dtx
+++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdftools.dtx
@@ -53,7 +53,7 @@
% }^^A
% }
%
-% \date{Version 0.95a, released 2021-02-22}
+% \date{Version 0.95b, released 2021-03-07}
%
% \maketitle
% \begin{documentation}
@@ -164,7 +164,7 @@
% This command adds a BDC marked content operator to the current page stream.
% \meta{tag} is the tag of this operator (without the leading slash).
% As object this commands uses the last anonymous dictionary object created with
-% \cs{pdf_object_now:nn}. It lies in the responsibility of the user that the last
+% \cs{pdf_object_unnamed_write:nn}. It lies in the responsibility of the user that the last
% object is the wanted one. Like with \cs{pdf_bdcobject:nn} the command works correctly
% only if the resources management has been activated and should be used only
% if this can be ensured.
@@ -208,7 +208,7 @@
%
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage {l3pdftools} {2021-02-22} {0.95a}
+\ProvidesExplPackage {l3pdftools} {2021-03-07} {0.95b}
{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 ec9afe865db..fa522534717 100644
--- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfxform.dtx
+++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfxform.dtx
@@ -52,7 +52,7 @@
% }^^A
% }
%
-% \date{Version 0.95a, released 2021-02-22}
+% \date{Version 0.95b, released 2021-03-07}
%
% \maketitle
% \begin{documentation}
@@ -133,7 +133,7 @@
% \begin{macrocode}
%<@@=pdf>
%<*header>
-\ProvidesExplPackage {l3pdfxform-beta} {2021-02-22} {0.95a}
+\ProvidesExplPackage {l3pdfxform-beta} {2021-03-07} {0.95b}
{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 f37514d936c..53bb237c696 100644
--- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/ltdocinit.dtx
+++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/ltdocinit.dtx
@@ -51,7 +51,7 @@
% }^^A
% }
%
-% \date{Version 0.95a, released 2021-02-22}
+% \date{Version 0.95b, released 2021-03-07}
%
% \maketitle
% \begin{documentation}
@@ -164,7 +164,7 @@
% \begin{macrocode}
%<@@=pdfmanagement>
%<*header>
-\ProvidesExplPackage {ltdocinit} {2021-02-22} {0.95a}
+\ProvidesExplPackage {ltdocinit} {2021-03-07} {0.95b}
{Initialize document metadata}
%</header>
% \end{macrocode}
@@ -189,18 +189,19 @@
% \end{macrocode}
% The wanted backend must be detected first, we read the init key and then
% force the loading by either loading l3pdf (+ expl3) or only expl3.
+% The backend contains now management command, so the boolean should true first.
% \begin{macrocode}
\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_@@_active_bool
\cs_if_free:NTF \pdf_uncompress:
{\RequirePackage{l3pdf}}{\RequirePackage{expl3}}
% \end{macrocode}
-% Now we load the extra backend code and set the boolean to true
+% Now we load the extra backend code
% \begin{macrocode}
\ExplSyntaxOn\makeatletter
\file_input:n {l3backend-testphase-\c_sys_backend_str.def}
\ExplSyntaxOff\makeatother
- \bool_gset_true:N \g_@@_active_bool
% \end{macrocode}
% set the default language, process the rest of the keys,
% and setup the generic driver
@@ -341,7 +342,6 @@
\msg_warning:nnn{pdf}{unknown-standard}{#1}
}
,pdfmanagement .bool_gset:N = \g_@@_active_bool
- ,pdfmanagement .initial:n = {true}
,firstaidoff .clist_gset:N = \g_@@_firstaidoff_clist
}
% \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 08fbf856db1..dc33bf093c1 100644
--- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx
+++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx
@@ -51,7 +51,7 @@
% }^^A
% }
%
-% \date{Version 0.95a, released 2021-02-22}
+% \date{Version 0.95b, released 2021-03-07}
%
% \maketitle
% \begin{documentation}
@@ -67,11 +67,11 @@
% |firstaidoff={name1,name2,...}|.
% \begin{macrocode}
%<*package>
-\ProvidesExplPackage {pdfmanagement-firstaid} {2021-02-22} {0.95a}
+\ProvidesExplPackage {pdfmanagement-firstaid} {2021-03-07} {0.95b}
{LaTeX PDF management testphase bundle / firstaid-patches}
%<@@=pdfmanagement>
-\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_@@_firstaid_#1_bool }
\bool_gset_true:c { g_@@_firstaid_#1_bool }
@@ -86,6 +86,15 @@
\msg_new:nnn { pdfmanagement } { firstaid }
{ loading~pdfmanagement~firstaid~code~for~#1 }
% \end{macrocode}
+% \subsection{\pkg{beamer}}
+% \pkg{beamer} makes use of the now unsupported syntax |linkbordercolor={.5 .5 .5}|.
+% To avoid an error we define this color as a name.
+% \begin{macrocode}
+\bool_if:NT \g_@@_firstaid_beamer_bool
+ {
+ \color_set:nnn{.5~.5~.5}{rgb}{0.5,0.5,0.5}
+ }
+% \end{macrocode}
% \subsection{\pkg{color}}
%
% \pkg{color} is not incompatible, but the new \pkg{hyperref} driver makes use of
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 4b63544d179..7f37e132d7a 100644
--- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.dtx
+++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.dtx
@@ -51,7 +51,7 @@
% }^^A
% }
%
-% \date{Version 0.95a, released 2021-02-22}
+% \date{Version 0.95b, released 2021-03-07}
%
% \maketitle
% \begin{documentation}
@@ -274,6 +274,10 @@
% for external incompatible packages. This patches will disappear as soon as
% the packages are natively compatible. It is loaded automatically.
%
+% \item[l3pdffield] Commands for form fields. Currently it only provides commands
+% for checkboxes. It must be loaded explicitly as with
+% |\usepackage{l3pdffield-testphase}|.
+%
% \end{description}
% \section{Incompabilities}
%
@@ -380,7 +384,7 @@
% \begin{macrocode}
%<@@=pdf>
%<*package>
-\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}{}{
@@ -408,7 +412,7 @@
% \begin{macrocode}
%<*header>
\ProvidesExplFile
- {pdfmanagement-testphase.ltx}{2021-02-22}{0.95a}
+ {pdfmanagement-testphase.ltx}{2021-03-07}{0.95b}
{PDF~management~code~(testphase)}
%</header>
%<*package>
diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.ins b/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.ins
index 6452b24c68d..87ac62f1b03 100644
--- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.ins
+++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.ins
@@ -124,6 +124,14 @@ and all files in that bundle must be distributed together.
% }
\generate
+ {%
+ \file{l3pdffield-testphase.sty}
+ {%
+ \from{l3pdffield.dtx}{package}
+ }%
+ }
+
+\generate
{
\file{l3backend-testphase-dvipdfmx.def}
{
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