[latex3-commits] [latex3/pdfresources] wtpdfdeclaration: use commands for wtpdf, WIP (36aac8e)
github at latex-project.org
github at latex-project.org
Sun Mar 24 20:04:46 CET 2024
Repository : https://github.com/latex3/pdfresources
On branch : wtpdfdeclaration
Link : https://github.com/latex3/pdfresources/commit/36aac8ecf664f349cbd33375dd05a8a09d9a6e43
>---------------------------------------------------------------
commit 36aac8ecf664f349cbd33375dd05a8a09d9a6e43
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Sun Mar 24 20:04:46 2024 +0100
use commands for wtpdf, WIP
>---------------------------------------------------------------
36aac8ecf664f349cbd33375dd05a8a09d9a6e43
l3pdfmeta.dtx | 43 +++++++++++++++++++++++++++++++++++--------
1 file changed, 35 insertions(+), 8 deletions(-)
diff --git a/l3pdfmeta.dtx b/l3pdfmeta.dtx
index d1088ad..6b78b51 100644
--- a/l3pdfmeta.dtx
+++ b/l3pdfmeta.dtx
@@ -602,7 +602,9 @@
% and use the \texttt{e} variant to expand it.
% \end{function}
%
-% \begin{function}{\pdfmeta_xmp_add_declaration:nnnnn,\pdfmeta_xmp_add_declaration:ennnn}
+% \begin{function}{\pdfmeta_xmp_add_declaration:nnnnn,
+% \pdfmeta_xmp_add_declaration:ennnn,
+% \pdfmeta_xmp_add_declaration:eeenn}
% \begin{syntax}
% \cs{pdfmeta_xmp_add_declaration:nnnnn}\Arg{uri}\Arg{By}\Arg{Date}\Arg{Credentials}\Arg{Report}
% \end{syntax}
@@ -1288,12 +1290,8 @@
{\prop_gput:Nnn \g__pdfmeta_standard_prop {Trailer_no_Info}{}}
\AddToHook{begindocument/before}
{
- \pdfmeta_xmp_add_declaration:ennnn
- {http://pdfa.org/declarations\c_hash_str
- wtpdf-reuse1.0}{LaTeX~Project}{2024-02-20}{}{}
- \pdfmeta_xmp_add_declaration:ennnn
- {http://pdfa.org/declarations\c_hash_str
- wtpdf-accessibility1.0}{LaTeX~Project}{2024-02-20}{}{}
+ \@@_xmp_wtpdf_accessibility_declaration:
+ \@@_xmp_wtpdf_reuse_declaration:
}
},
xmp .bool_gset:N = \g_@@_xmp_bool
@@ -2893,7 +2891,36 @@
\l_@@_tmpa_tl
}
}
-\cs_generate_variant:Nn\pdfmeta_xmp_add_declaration:nnnnn {e}
+\cs_generate_variant:Nn\pdfmeta_xmp_add_declaration:nnnnn {e,eee}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Default declarations}
+% The two declarations will be required quite often with ua-2, so we
+% provide some interface.
+
+% \begin{macro}{\@@_xmp_wtpdf_reuse_declaration:,\@@_xmp_wtpdf_accessibility_declaration:}
+% \begin{macrocode}
+\cs_new:Npn \@@_xmp_iso_today:
+ {
+ \c_sys_year_int-
+ \int_compare:nNnT {\c_sys_month_int} < {10}{0} \c_sys_month_int -
+ \int_compare:nNnT {\c_sys_day_int} < {10}{0} \c_sys_day_int
+ }
+\cs_new_protected:Npn \@@_xmp_wtpdf_reuse_declaration:
+ {
+ \pdfmeta_xmp_add_declaration:eeenn
+ {http://pdfa.org/declarations\c_hash_str wtpdf-reuse1.0}
+ {LaTeX~Project}
+ {\@@_xmp_iso_today:}{}{}
+ }
+\cs_new_protected:Npn \@@_xmp_wtpdf_accessibility_declaration:
+ {
+ \pdfmeta_xmp_add_declaration:ennnn
+ {http://pdfa.org/declarations\c_hash_str wtpdf-accessibility1.0}
+ {LaTeX~Project}
+ {\@@_xmp_iso_today:}{}{}
+ }
% \end{macrocode}
% \end{macro}
%
More information about the latex3-commits
mailing list.