[latex3-commits] [git/LaTeX3-latex3-pdfresources] test-checkbox: starting dtx (0cb9059)
Ulrike Fischer
fischer at troubleshooting-tex.de
Mon Mar 1 15:33:44 CET 2021
Repository : https://github.com/latex3/pdfresources
On branch : test-checkbox
Link : https://github.com/latex3/pdfresources/commit/0cb9059b6cce5ece67155c96a02adfbaec66288a
>---------------------------------------------------------------
commit 0cb9059b6cce5ece67155c96a02adfbaec66288a
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Mon Mar 1 15:33:44 2021 +0100
starting dtx
>---------------------------------------------------------------
0cb9059b6cce5ece67155c96a02adfbaec66288a
build.lua | 2 +-
experiments/checkbox2-test.tex | 69 +++++++
...ffield-checkbox.sty => l3pdffield-checkbox.dtx} | 214 ++++++++++++---------
pdfmanagement-testphase.ins | 8 +
4 files changed, 200 insertions(+), 93 deletions(-)
diff --git a/build.lua b/build.lua
index 6aec518..70ae364 100644
--- a/build.lua
+++ b/build.lua
@@ -31,7 +31,7 @@ else
"newpackages/bkm-generic.def",
"newpackages/new-attachfile.sty",
"newpackages/atfi-generic.def",
- "newpackages/l3pdffield-checkbox.sty"
+ "newpackages/l3pdffield-checkbox.dtx"
}
end
diff --git a/experiments/checkbox2-test.tex b/experiments/checkbox2-test.tex
index 63b75ad..bdff786 100644
--- a/experiments/checkbox2-test.tex
+++ b/experiments/checkbox2-test.tex
@@ -10,9 +10,72 @@
\usepackage{hyperref}
\usepackage{l3pdffield-checkbox}
+
+\newcheckboxappearance* {checkbox/Yes/depth}
+ {
+ xxxxxxxxxxxxxxx
+ }
+
+\newcheckboxappearance* {checkbox/Off/depth}
+ { }
+\usepackage{pdflscape,iftex}
+
\begin{document}%\showoutput
\Form[NeedAppearances=false]
+\ExplSyntaxOn
+%\bitset_set_true:Nn \l__pdffield_Ff_bitset {NoRotate}
+%\bitset_set_true:Nn \l_pdfannot_F_bitset {NoRotate}
+%\pdfannot_dict_put:nnn{widget}
+%%\pdfdict_put:nnn{l__pdfannot/widget}
+%{F}{\bitset_to_arabic:N \l_pdfannot_F_bitset}
+
+\ExplSyntaxOff
+\rotatebox{45}{form\checkboxfield[%
+normal off = checkbox/Off/bear,
+normal yes = checkbox/Yes/bear]{checkbox10}}
+
+\newpage
+%\begin{landscape}
+
+form\checkboxfield[%
+normal off = checkbox/Off/bear,
+normal yes = checkbox/Yes/bear]{checkbox10}
+
+\hspace*{5cm}
+\ExplSyntaxOn
+\pdfmanagement_add:nnn{ThisPage}{Rotate}{90}
+\bool_gset_true:N\g__pdf_landscape_bool
+\ExplSyntaxOff
+depth\checkboxfield[%
+normal off = checkbox/Off/bear,
+normal yes = checkbox/Yes/bear]{checkbox11}
+
+%\end{landscape}
+
+\begin{landscape}
+
+
+form\checkboxfield[%
+normal off = checkbox/Off/bear,
+normal yes = checkbox/Yes/bear]{checkbox10}
+
+\hspace*{5cm}
+\ExplSyntaxOn
+%\pdfmanagement_add:nnn{ThisPage}{Rotate}{90}
+
+\pdfxform_use:n{checkbox/Yes/bear}
+
+\rotatebox{45}{\pdfxform_use:n{checkbox/Yes/bear}}
+
+T\bool_gset_true:N\g__pdf_landscape_bool
+\ExplSyntaxOff
+depth\checkboxfield[%
+normal off = checkbox/Off/bear,
+normal yes = checkbox/Yes/bear]{checkbox11}
+
+\end{landscape}
+\end{document}
1: \checkboxfield{checkbox1}
\checkboxfield{checkbox1}
@@ -45,6 +108,12 @@ normal off = checkbox/Off/bear,
normal yes = checkbox/Yes/bear]{checkbox2}
+
+depth\checkboxfield[%
+normal off = checkbox/Off/depth,
+normal yes = checkbox/Yes/depth]{checkbox7}
+
+
\end{document}
%%%
diff --git a/newpackages/l3pdffield-checkbox.sty b/newpackages/l3pdffield-checkbox.dtx
similarity index 72%
rename from newpackages/l3pdffield-checkbox.sty
rename to newpackages/l3pdffield-checkbox.dtx
index ffe8ab0..8b20c7b 100644
--- a/newpackages/l3pdffield-checkbox.sty
+++ b/newpackages/l3pdffield-checkbox.dtx
@@ -1,6 +1,68 @@
-% !Mode:: "TeX:DE:UTF-8:Main"
+% \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{pdfstandard=A-2b}
+\makeatletter
+\declare at file@substitution{doc.sty}{doc-v3beta.sty}
+\makeatother
+\documentclass[full]{l3doc}
+\usepackage{array,booktabs,hyperxmp}
+\hypersetup{pdfauthor=The LaTeX Project,
+ pdftitle=l3pdffield-checkbox (LaTeX PDF management testphase bundle)}
+\begin{document}
+ \DocInput{\jobname.dtx}
+\end{document}
+%</driver>
+% \fi
+% \providecommand\hook[1]{\texttt{#1}}
+% \title{^^A
+% The \pkg{l3pdffield-checkbox} module\\ Commands to create checkbox fields ^^A
+% \\ \LaTeX{} PDF management testphase bundle
+% }
+%
+% \author{^^A
+% The \LaTeX{} Project\thanks
+% {^^A
+% E-mail:
+% \href{mailto:latex-team at latex-project.org}
+% {latex-team at latex-project.org}^^A
+% }^^A
+% }
+%
+% \date{Version 0.00a, released 0000-00-00}
+%
+% \maketitle
+% \begin{documentation}
+%
+% \end{documentation}
+% \begin{implementation}
+% \begin{macrocode}
+%<*package>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesExplPackage{l3pdffield-checkbox}{2021-02-28}{v0.2}{form field checkbox}%
+\ProvidesExplPackage{l3pdffield-checkbox}{0000-00-00}{v0.00a}{form field checkbox}%
% values from hyperref:
%\def\DefaultOptionsofCheckBox{print}
@@ -185,7 +247,6 @@
% checkbox with a specific name.
%
%
-% \begin{macrocode}
\cs_new_protected:Npn \__pdffield_checkbox_fielddict:n #1
{
@@ -279,93 +340,62 @@
\group_end:
}
-\ExplSyntaxOff
-\endinput
-
-\begin{document}\showoutput
-\begin{Form}[NeedAppearances=false]
-
-1: \checkboxfield{checkbox1}
-
-2: \checkboxfield{checkbox2}
-
-3: \checkboxfield{checkbox3}
-
-1: \checkboxfield{checkbox1}
-
-3: \checkboxfield{checkbox3}
-4: \checkboxfield[%
-normal off = checkbox/Off/unicode,
-normal yes = checkbox/Yes/unicode]{checkbox4}
-
-5: \checkboxfield[%
-normal off = checkbox/Off/tikz,
-normal yes = checkbox/Yes/tikz]{checkbox5}
-
-6: \checkboxfield[%
-normal off = checkbox/Off/bear,
-normal yes = checkbox/Yes/bear]{checkbox6}
-
-
-2: \checkboxfield[%
-normal off = checkbox/Off/bear,
-normal yes = checkbox/Yes/bear]{checkbox2}
-
-
-\end{Form}
-\end{document}
-
-%%%
-
-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
+%
+%
+%%%%
+%
+%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
+%</package>
+% \end{macrocode}
+%\end{implementation}
diff --git a/pdfmanagement-testphase.ins b/pdfmanagement-testphase.ins
index 6452b24..d5dd038 100644
--- a/pdfmanagement-testphase.ins
+++ b/pdfmanagement-testphase.ins
@@ -123,6 +123,14 @@ and all files in that bundle must be distributed together.
% }%
% }
+\generate
+ {%
+ \file{l3pdffield-checkbox.sty}
+ {%
+ \from{l3pdffield-checkbox.dtx}{package}
+ }%
+ }
+
\generate
{
\file{l3backend-testphase-dvipdfmx.def}
More information about the latex3-commits
mailing list.