[latex3-commits] [git/LaTeX3-latex3-pdfresources] main: rename l3pdfutils to xform and move loading (1bad2b1)
Ulrike Fischer
fischer at troubleshooting-tex.de
Sun Feb 14 20:04:35 CET 2021
Repository : https://github.com/latex3/pdfresources
On branch : main
Link : https://github.com/latex3/pdfresources/commit/1bad2b1f5ef495246c22d4bb3b3ea039cd2cfdde
>---------------------------------------------------------------
commit 1bad2b1f5ef495246c22d4bb3b3ea039cd2cfdde
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Sun Feb 14 20:04:35 2021 +0100
rename l3pdfutils to xform and move loading
>---------------------------------------------------------------
1bad2b1f5ef495246c22d4bb3b3ea039cd2cfdde
hyperref-generic.dtx | 14 ++++----
l3backend-pdf-extra.dtx | 14 ++++----
l3pdfutils.pdf | Bin 402577 -> 0 bytes
l3pdfutils.dtx => l3pdfxform.dtx | 65 ++++++++++++++++++++-----------------
ltdocinit.dtx | 4 +--
newpackages/hyp-field-checkbox.sty | 20 ++++++------
newpackages/new-attachfile.sty | 18 +++++-----
pdfmanagement.dtx | 14 ++++----
pdfmanagement.ins | 4 +--
testfiles/xform-preamble.pvt | 4 +--
testfiles/xform.pvt | 14 ++++----
11 files changed, 89 insertions(+), 82 deletions(-)
diff --git a/hyperref-generic.dtx b/hyperref-generic.dtx
index b1eb46d..430836c 100644
--- a/hyperref-generic.dtx
+++ b/hyperref-generic.dtx
@@ -3770,7 +3770,7 @@
% \begin{macrocode}
\NewDocumentCommand \MakeFieldObject { m m }
{
- \pdf_xform_new:nnn { #2 }{} { #1 }
+ \pdfxform_new:nnn { #2 }{} { #1 }
}
@@ -4130,8 +4130,8 @@
<<
/N
<<
- /\@currValue\c_space_tl \pdf_xform_ref:o {__hyp_xform_Ding}
- %/Off \c_space_tl \pdf_xform_ref:n {__hyp_xform_DingOff} %hm
+ /\@currValue\c_space_tl \pdfxform_ref:o {__hyp_xform_Ding}
+ %/Off \c_space_tl \pdfxform_ref:n {__hyp_xform_DingOff} %hm
>>
>>
}
@@ -4225,8 +4225,8 @@
{
\PDFForm at Submit
/AP<<
- /N~\pdf_xform_ref:n {__hyp_xform_Submit}~
- /D~\pdf_xform_ref:n {__hyp_xform_SubmitP}
+ /N~\pdfxform_ref:n {__hyp_xform_Submit}~
+ /D~\pdfxform_ref:n {__hyp_xform_SubmitP}
>>
}
\HyField at AddToFields
@@ -4510,8 +4510,8 @@
<<
/N
<<
- /Yes~\pdf_xform_ref:o{\l_@@_CheckmarkYes_tl}
- /Off~\pdf_xform_ref:o{\l_@@_CheckmarkOff_tl}
+ /Yes~\pdfxform_ref:o{\l_@@_CheckmarkYes_tl}
+ /Off~\pdfxform_ref:o{\l_@@_CheckmarkOff_tl}
>>
>>
/MK<<
diff --git a/l3backend-pdf-extra.dtx b/l3backend-pdf-extra.dtx
index 3b4dfe4..a32c30f 100644
--- a/l3backend-pdf-extra.dtx
+++ b/l3backend-pdf-extra.dtx
@@ -1365,9 +1365,9 @@
\@@_backend:x
{
bxobj ~ \@@_backend_xform_ref:n { #1 }
- \c_space_tl width ~ \pdf_xform_wd:n { #1 }
- \c_space_tl height ~ \pdf_xform_ht:n { #1 }
- \c_space_tl depth ~ \pdf_xform_dp:n { #1 }
+ \c_space_tl width ~ \pdfxform_wd:n { #1 }
+ \c_space_tl height ~ \pdfxform_ht:n { #1 }
+ \c_space_tl depth ~ \pdfxform_dp:n { #1 }
}
\box_use_drop:c { g_@@_backend_xform_#1_box }
\@@_backend:x {put ~ @resources ~<<#3>> }
@@ -1421,9 +1421,9 @@
uxobj~ \@@_backend_xform_ref:n { #1 }
}
}
- \box_set_wd:Nn \l_@@_backend_tmpa_box { \pdf_xform_wd:n { #1 } }
- \box_set_ht:Nn \l_@@_backend_tmpa_box { \pdf_xform_ht:n { #1 } }
- \box_set_dp:Nn \l_@@_backend_tmpa_box { \pdf_xform_dp:n { #1 } }
+ \box_set_wd:Nn \l_@@_backend_tmpa_box { \pdfxform_wd:n { #1 } }
+ \box_set_ht:Nn \l_@@_backend_tmpa_box { \pdfxform_ht:n { #1 } }
+ \box_set_dp:Nn \l_@@_backend_tmpa_box { \pdfxform_dp:n { #1 } }
\box_use_drop:N \l_@@_backend_tmpa_box
}
%</dvipdfmx|xdvipdfmx>
@@ -1441,7 +1441,7 @@
{ \prg_return_true: }
{ \prg_return_false:}
}
-\prg_new_eq_conditional:NNn \pdf_xform_if_exist:n\@@_backend_xform_if_exist:n
+\prg_new_eq_conditional:NNn \pdfxform_if_exist:n\@@_backend_xform_if_exist:n
{ TF , T , F , p }
%</drivers>
% \end{macrocode}
diff --git a/l3pdfutils.pdf b/l3pdfutils.pdf
deleted file mode 100644
index 6ccb5cb..0000000
Binary files a/l3pdfutils.pdf and /dev/null differ
diff --git a/l3pdfutils.dtx b/l3pdfxform.dtx
similarity index 71%
rename from l3pdfutils.dtx
rename to l3pdfxform.dtx
index 4cedc59..f30fe0c 100644
--- a/l3pdfutils.dtx
+++ b/l3pdfxform.dtx
@@ -1,8 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3pdfutils.dtx
+%% File: l3pdfxform.dtx
%
-% Copyright (C) 2018-2020 The LaTeX3 Project
+% Copyright (C) 2018-2021 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -31,7 +31,7 @@
% \fi
%
% \title{^^A
-% The \pkg{l3pdfutils} package\\ pdf-utilities ^^A
+% The \pkg{l3pdfxform} package\\ Commands for form XObjects ^^A
% }
%
% \author{^^A
@@ -48,14 +48,20 @@
% \maketitle
% \begin{documentation}
%
-% \section{\pkg{l3pdfutils} documentation}
-% This module contains a number of commands to create xforms.
-% \begin{function}[added = 2019-08-05]
+% \section{\pkg{l3pdfxform} documentation}
+% This module contains a number of commands to create \enquote{form XObjects},
+% for which pdf\TeX{} introduced the short name \enquote{xforms}.
+%
+% The status is still beta, so the style itself is named
+% \pkg{l3pdfxform-beta}. Missing is for example code for the dvips route.
+% Probably some of the function will also need to be enhanced by hooks.
+%
+% \begin{function}[added = 2019-08-05,updated=2021-02-14]
% {
-% \pdf_xform_new:nnn
+% \pdfxform_new:nnn
% }
% \begin{syntax}
-% \cs{pdf_xform_new:nnn} \Arg{name} \Arg{attributes} \Arg{content}
+% \cs{pdfxform_new:nnn} \Arg{name} \Arg{attributes} \Arg{content}
% \end{syntax}
% This command create a new form XObject that can be used as appearance or
% directly later.
@@ -64,48 +70,48 @@
% BDC-marks can be added to the resources of the xform. The xform will automatically
% include the resources of the current page.
% The content will be typeset in a hbox. With pdflatex and luatex
-% the surrounding color is \emph{not} stored in the XObject
+% the surrounding color is \emph{not} stored in the form XObject
% but should be if wanted added e.g. with |\color_select:n{.}|. This keeps
% the option of color injection open.
% \end{function}
% \begin{function}[added = 2019-08-05]
% {
-% \pdf_xform_use:n
+% \pdfxform_use:n
% }
% \begin{syntax}
-% \cs{pdf_xform_use:n} \Arg{name}
+% \cs{pdfxform_use:n} \Arg{name}
% \end{syntax}
% This command uses (typesets) a previously created form XObject.
-% If the surrounding color is different, it is injected in the XObject with the
+% If the surrounding color is different, it is injected in the form XObject with the
% engines pdftex or luatex.
% \end{function}
% \begin{function}[EXP,added = 2019-08-05]
% {
-% \pdf_xform_ref:n
+% \pdfxform_ref:n
% }
% \begin{syntax}
-% \cs{pdf_xform_ref:n} \Arg{name}
+% \cs{pdfxform_ref:n} \Arg{name}
% \end{syntax}
% Inserts the appropriate information to reference the xform \meta{name}
% in for example appearance dictionaries.
% \end{function}
% \begin{function}[EXP,added = 2019-08-05]
% {
-% \pdf_xform_wd:n, \pdf_xform_ht:n, \pdf_xform_dp:n
+% \pdfxform_wd:n, \pdfxform_ht:n, \pdfxform_dp:n
% }
% \begin{syntax}
-% \cs{pdf_xform_wd:n} \Arg{name}
+% \cs{pdfxform_wd:n} \Arg{name}
% \end{syntax}
-% These command give back the sizes of the XObject. The values are stored in
+% These command give back the sizes of the form XObject. The values are stored in
% tl-variables with the unit pt and not in dimensions!
% \end{function}
% \begin{function}[EXP,pTF,added = 2020-04-29]
% {
-% \pdf_xform_if_exist:n
+% \pdfxform_if_exist:n
% }
% \begin{syntax}
-% \cs{pdf_xform_if_exist_p:n} \Arg{name}
-% \cs{pdf_xform_if_exist:NTF} \meta{name} \Arg{true code} \Arg{false code}
+% \cs{pdfxform_if_exist_p:n} \Arg{name}
+% \cs{pdfxform_if_exist:NTF} \meta{name} \Arg{true code} \Arg{false code}
% \end{syntax}
% These command tests if an xform with name \Arg{name} has been already defined.
% \end{function}%
@@ -113,12 +119,12 @@
%
% \begin{implementation}
%
-% \section{\pkg{l3pdfutils} implementation}
+% \section{\pkg{l3pdfxform} implementation}
%
% \begin{macrocode}
%<*package>
%<@@=pdf>
-\ProvidesExplPackage {l3pdfutils} {2020-12-04} {0.2}
+\ProvidesExplPackage {l3pdfxform-beta} {2021-02-14} {0.3}
{command to create xforms}
% \end{macrocode}
% \subsection{Form XObject (pdfxform)}
@@ -134,37 +140,36 @@
% - dvips implementation is missing for ideas: pdfbase, atfi-dvips.def,
% \end{NOTE}
%
-% \subsubsection{Form XObject / management}
% \begin{macrocode}
%<*package>
-\cs_new_protected:Npn \pdf_xform_new:nnn #1 #2 #3
+\cs_new_protected:Npn \pdfxform_new:nnn #1 #2 #3
{
\@@_backend_xform_new:nnnn { #1 } { #2 } { } { #3 }
}
-\cs_new_protected:Npn \pdf_xform_use:n #1
+\cs_new_protected:Npn \pdfxform_use:n #1
{
\@@_backend_xform_use:n { #1 }
}
% expansion?
-\cs_new:Npn \pdf_xform_ref:n #1
+\cs_new:Npn \pdfxform_ref:n #1
{
\@@_backend_xform_ref:n { #1 }
}
-\cs_generate_variant:Nn \pdf_xform_ref:n {o}
+\cs_generate_variant:Nn \pdfxform_ref:n {o}
-\cs_new:Npn \pdf_xform_wd:n #1
+\cs_new:Npn \pdfxform_wd:n #1
{
\tl_use:c { c_@@_backend_xform_wd_ \tl_to_str:n { #1 } _tl }
}
-\cs_new:Npn \pdf_xform_ht:n #1
+\cs_new:Npn \pdfxform_ht:n #1
{
\tl_use:c { c_@@_backend_xform_ht_ \tl_to_str:n { #1 } _tl }
}
-\cs_new:Npn \pdf_xform_dp:n #1
+\cs_new:Npn \pdfxform_dp:n #1
{
\tl_use:c { c_@@_backend_xform_dp_ \tl_to_str:n { #1 } _tl }
}
diff --git a/ltdocinit.dtx b/ltdocinit.dtx
index ba48ad9..2863d5f 100644
--- a/ltdocinit.dtx
+++ b/ltdocinit.dtx
@@ -223,8 +223,8 @@
% \end{macrocode}
% Load more modules and the firstaid code.
% \begin{macrocode}
- \RequirePackage{l3pdfutils}
- \RequirePackage{l3pdfannot}
+ % \RequirePackage{l3pdfutils}
+ % \RequirePackage{l3pdfannot}
\RequirePackage{pdfmanagement-firstaid}
}
}
diff --git a/newpackages/hyp-field-checkbox.sty b/newpackages/hyp-field-checkbox.sty
index 14e4350..d8c931d 100644
--- a/newpackages/hyp-field-checkbox.sty
+++ b/newpackages/hyp-field-checkbox.sty
@@ -49,10 +49,10 @@
% }
%
-\cs_generate_variant:Nn \pdf_xform_wd:n {e}
-\cs_generate_variant:Nn \pdf_xform_ht:n {e}
-\cs_generate_variant:Nn \pdf_xform_dp:n {e}
-\cs_generate_variant:Nn \pdf_xform_ref:n{e}
+\cs_generate_variant:Nn \pdfxform_wd:n {e}
+\cs_generate_variant:Nn \pdfxform_ht:n {e}
+\cs_generate_variant:Nn \pdfxform_dp:n {e}
+\cs_generate_variant:Nn \pdfxform_ref:n{e}
\pdfdict_new:nn {l} {hyp/checkbox/Field}
\pdfdict_new:nn {l} {hyp/checkbox/Annot}
@@ -102,7 +102,7 @@
\NewDocumentCommand \newcheckboxappearance { s m m } %#2=name, #3 = content
{
- \pdf_xform_new:nnn {#2}{}
+ \pdfxform_new:nnn {#2}{}
{
\normalsize
\hbox_set:Nn \l_tmpa_box { #3 \strut }
@@ -173,11 +173,11 @@
\cs_new_protected:Nn \__uf_normalise_boxes:
{
\dim_set:Nn \l__uf_field_wd_dim
- { \dim_max:nn { \pdf_xform_wd:e {\l__uf_normal_off_tl} }{ \pdf_xform_wd:e {\l__uf_normal_yes_tl} } }
+ { \dim_max:nn { \pdfxform_wd:e {\l__uf_normal_off_tl} }{ \pdfxform_wd:e {\l__uf_normal_yes_tl} } }
\dim_set:Nn \l__uf_field_ht_dim
- { \dim_max:nn { \pdf_xform_ht:e {\l__uf_normal_off_tl} }{ \pdf_xform_ht:e {\l__uf_normal_yes_tl} } }
+ { \dim_max:nn { \pdfxform_ht:e {\l__uf_normal_off_tl} }{ \pdfxform_ht:e {\l__uf_normal_yes_tl} } }
\dim_set:Nn \l__uf_field_dp_dim
- { \dim_max:nn { \pdf_xform_dp:e {\l__uf_normal_off_tl} }{ \pdf_xform_dp:e {\l__uf_normal_yes_tl} } }
+ { \dim_max:nn { \pdfxform_dp:e {\l__uf_normal_off_tl} }{ \pdfxform_dp:e {\l__uf_normal_yes_tl} } }
}
@@ -232,8 +232,8 @@
/AP ~
<<
/N ~
- << /Yes ~ \pdf_xform_ref:e { \l__uf_normal_yes_tl}
- /Off ~ \pdf_xform_ref:e { \l__uf_normal_off_tl}
+ << /Yes ~ \pdfxform_ref:e { \l__uf_normal_yes_tl}
+ /Off ~ \pdfxform_ref:e { \l__uf_normal_off_tl}
>>
>>
}
diff --git a/newpackages/new-attachfile.sty b/newpackages/new-attachfile.sty
index 73a5b29..9fe250e 100644
--- a/newpackages/new-attachfile.sty
+++ b/newpackages/new-attachfile.sty
@@ -403,9 +403,9 @@
% create the appearance xform:
\cs_new_protected:Npn \__atfi_annot_xform_appearance:n #1
{
- \pdf_xform_if_exist:nF { g__atfi_annot_iconxform_#1 }
+ \pdfxform_if_exist:nF { g__atfi_annot_iconxform_#1 }
{
- \pdf_xform_new:nnn
+ \pdfxform_new:nnn
{ g__atfi_annot_iconxform_#1 }
{ } % attributes?
{ \use:c { __atfi_annot_print_icon_#1 } }
@@ -426,36 +426,36 @@
\pdfdict_put:nnx
{ annot/FileAttachment/AP }
{ N }
- { \pdf_xform_ref:n { g__atfi_annot_iconxform_\l__atfi_annot_icon_tl } }
+ { \pdfxform_ref:n { g__atfi_annot_iconxform_\l__atfi_annot_icon_tl } }
\pdfdict_put:nnx
{ annot/FileAttachment/AP }
{ R }
- { \pdf_xform_ref:n { g__atfi_annot_iconxform_\l__atfi_annot_icon_tl } }
+ { \pdfxform_ref:n { g__atfi_annot_iconxform_\l__atfi_annot_icon_tl } }
\pdfdict_put:nnx
{ annot/FileAttachment/AP }
{ D }
- { \pdf_xform_ref:n { g__atfi_annot_iconxform_\l__atfi_annot_icon_tl } }
+ { \pdfxform_ref:n { g__atfi_annot_iconxform_\l__atfi_annot_icon_tl } }
}
\pdfannot_box:nnnn
{
\fp_to_dim:n
{
\l__atfi_annot_scale_fp *
- \pdf_xform_wd:n{g__atfi_annot_iconxform_\l__atfi_annot_icon_tl}
+ \pdfxform_wd:n{g__atfi_annot_iconxform_\l__atfi_annot_icon_tl}
}
}
{
\fp_to_dim:n
{
\l__atfi_annot_scale_fp *
- \pdf_xform_ht:n{g__atfi_annot_iconxform_\l__atfi_annot_icon_tl}
+ \pdfxform_ht:n{g__atfi_annot_iconxform_\l__atfi_annot_icon_tl}
}
}
{
\fp_to_dim:n
{
\l__atfi_annot_scale_fp *
- \pdf_xform_dp:n{g__atfi_annot_iconxform_\l__atfi_annot_icon_tl}
+ \pdfxform_dp:n{g__atfi_annot_iconxform_\l__atfi_annot_icon_tl}
}
}
{
@@ -538,7 +538,7 @@
\__atfi_annot_store_appearancebox: %????
\bool_if:NTF \l__atfi_annot_print_bool
{
- \pdf_xform_use:n { atfi at appearancebox\l__atfi_annot_icon_tl } %icon, is use meant here??
+ \pdfxform_use:n { atfi at appearancebox\l__atfi_annot_icon_tl } %icon, is use meant here??
}
{
\makebox[\atfi at appearancewidth]{}% \strut?
diff --git a/pdfmanagement.dtx b/pdfmanagement.dtx
index aa6b2fb..79d5d69 100644
--- a/pdfmanagement.dtx
+++ b/pdfmanagement.dtx
@@ -180,7 +180,8 @@
%
% \section{Modules}
% The bundle contains a number of modules. The organization and naming is bound
-% to change over time.
+% to change over time. The description items give the name of the documentation
+% of the bundles. There doesn't exist in all cases a related |.sty|.
%
% \begin{description}
% \item[l3pdfdict] This modules provides commands for PDF dictionaries. Its main
@@ -209,9 +210,8 @@
% It is quite incomplete currently. It is loaded by the bundle, and
% should not be loaded independently.
%
-% \item[l3pdfutils] A number of commands like e.g. for xform objects.
-% It will probably disappear. It is loaded by the bundle, and
-% should not be loaded independently.
+% \item[l3pdfxform] Commands for form XObjects (xforms).
+% The code is loaded by the bundle.
%
% \item[l3pdftool] A number of commands like text conversion commands and
% bcd/emc. It will probably disappear. It is loaded by the bundle, and
@@ -353,8 +353,10 @@
%<*package>
\RequirePackage{l3pdfdict} % needed by l3pdfmanagement
\RequirePackage{l3pdfmanagement} % loads the core code with the boolean
-\RequirePackage{ltdocinit} % DeclareDocumentMetadata, l3pdfannot, l3pdfutils
-% optional?
+\RequirePackage{ltdocinit} % DeclareDocumentMetadata,
+% can perhaps be combined or made optional ...
+\RequirePackage{l3pdfannot}
+\RequirePackage{l3pdfxform-beta}
\RequirePackage{l3pdfmeta} %
\RequirePackage{l3pdftools}
diff --git a/pdfmanagement.ins b/pdfmanagement.ins
index 69c850c..5e51e04 100644
--- a/pdfmanagement.ins
+++ b/pdfmanagement.ins
@@ -109,9 +109,9 @@ and all files in that bundle must be distributed together.
\generate
{%
- \file{l3pdfutils.sty}
+ \file{l3pdfxform-beta.sty}
{%
- \from{l3pdfutils.dtx}{package}
+ \from{l3pdfxform.dtx}{package}
}%
}
diff --git a/testfiles/xform-preamble.pvt b/testfiles/xform-preamble.pvt
index e0f88cf..387a6f9 100644
--- a/testfiles/xform-preamble.pvt
+++ b/testfiles/xform-preamble.pvt
@@ -4,13 +4,13 @@
\RequirePackage{pdfmanagement-regressiontest}
\documentclass{article}
\ExplSyntaxOn
-\pdf_xform_new:nnn {myxformA}{/yyy~(bla)}{yyyyy}
+\pdfxform_new:nnn {myxformA}{/yyy~(bla)}{yyyyy}
\ExplSyntaxOff
\begin{document}
\START
text
\ExplSyntaxOn
-\pdf_xform_use:n {myxformA}
+\pdfxform_use:n {myxformA}
some~text~
\ExplSyntaxOff
\end{document}
\ No newline at end of file
diff --git a/testfiles/xform.pvt b/testfiles/xform.pvt
index 8c8f76e..bcdb7c4 100644
--- a/testfiles/xform.pvt
+++ b/testfiles/xform.pvt
@@ -9,18 +9,18 @@
text
\ExplSyntaxOn
-\pdf_xform_new:nnn {myxformA}{/yyy~(bla)}{yyyyy}
+\pdfxform_new:nnn {myxformA}{/yyy~(bla)}{yyyyy}
\pdfmanagement_add:nnn{Page/Resources/ExtGState}{bearopacity}{<</ca~0.7/CA~0.7>>}
-\pdf_xform_new:nnn {myxform}{/yyy~(bla)}{xxxxxxxxxx}
+\pdfxform_new:nnn {myxform}{/yyy~(bla)}{xxxxxxxxxx}
-\pdf_xform_use:n {myxform}~\pdf_xform_use:n {myxformA}
+\pdfxform_use:n {myxform}~\pdfxform_use:n {myxformA}
some~text~
-\pdf_xform_use:n {myxform}
+\pdfxform_use:n {myxform}
~
-~\pdf_xform_ref:n {myxform}
-%~\pdf_xform_name_ref:n {myxform}
-%\prop_show:N\g__pdf_xform_prop
+~\pdfxform_ref:n {myxform}
+%~\pdfxform_name_ref:n {myxform}
+%\prop_show:N\g__pdfxform_prop
\ExplSyntaxOff
\end{document}
\ No newline at end of file
More information about the latex3-commits
mailing list.