summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3packages
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-08-30 03:01:17 +0000
committerNorbert Preining <norbert@preining.info>2023-08-30 03:01:17 +0000
commit4fee29360f7566a474b6143951b0744fa151edc9 (patch)
tree1af77d3ca21368f054b09f30dd60e8028a91be62 /macros/latex/contrib/l3packages
parent64e26532c685fd24d6983508c6239e3c268b810b (diff)
CTAN sync 202308300301
Diffstat (limited to 'macros/latex/contrib/l3packages')
-rw-r--r--macros/latex/contrib/l3packages/CHANGELOG.md7
-rw-r--r--macros/latex/contrib/l3packages/README.md23
-rw-r--r--macros/latex/contrib/l3packages/l3keys2e.dtx6
-rw-r--r--macros/latex/contrib/l3packages/l3keys2e.pdfbin412169 -> 412937 bytes
-rw-r--r--macros/latex/contrib/l3packages/xfp.dtx4
-rw-r--r--macros/latex/contrib/l3packages/xfp.pdfbin331857 -> 332628 bytes
-rw-r--r--macros/latex/contrib/l3packages/xfrac.dtx6
-rw-r--r--macros/latex/contrib/l3packages/xfrac.pdfbin482438 -> 483310 bytes
-rw-r--r--macros/latex/contrib/l3packages/xparse.dtx147
-rw-r--r--macros/latex/contrib/l3packages/xparse.pdfbin534081 -> 534879 bytes
-rw-r--r--macros/latex/contrib/l3packages/xtemplate.dtx6
-rw-r--r--macros/latex/contrib/l3packages/xtemplate.pdfbin450182 -> 450948 bytes
12 files changed, 166 insertions, 33 deletions
diff --git a/macros/latex/contrib/l3packages/CHANGELOG.md b/macros/latex/contrib/l3packages/CHANGELOG.md
index b82dd0c198..de080e8d41 100644
--- a/macros/latex/contrib/l3packages/CHANGELOG.md
+++ b/macros/latex/contrib/l3packages/CHANGELOG.md
@@ -7,6 +7,10 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+## [2023-08-29]
+
+- Re-add `\GetDocumentCommandArgSpec`, etc., to `xparse` stub
+
## [2023-02-02]
### Changed
@@ -227,7 +231,8 @@ this project uses date-based 'snapshot' version identifiers.
- Switch to ISO date format
- Improve cross-module use of internal functions
-[Unreleased]: https://github.com/latex3/latex3/compare/2023-02-02...HEAD
+[Unreleased]: https://github.com/latex3/latex3/compare/2023-08-29...HEAD
+[2023-08-29]: https://github.com/latex3/latex3/compare/2023-02-02...2023-08-29
[2023-02-02]: https://github.com/latex3/latex3/compare/2023-02-01...2023-02-02
[2023-02-01]: https://github.com/latex3/latex3/compare/2023-01-16...2023-02-01
[2023-01-16]: https://github.com/latex3/latex3/compare/2022-12-17...2023-01-16
diff --git a/macros/latex/contrib/l3packages/README.md b/macros/latex/contrib/l3packages/README.md
index 1fad88a499..e1f195b332 100644
--- a/macros/latex/contrib/l3packages/README.md
+++ b/macros/latex/contrib/l3packages/README.md
@@ -1,7 +1,7 @@
LaTeX3 High-Level Concepts
==========================
-Release 2023-02-02
+Release 2023-08-29
Overview
--------
@@ -34,7 +34,7 @@ and class options with LaTeX2e. This is tied to the method the existing kernel
uses for processing options, and so it is likely that a stand-alone LaTeX3
kernel will use a very different approach.
-`xfp`
+`xfp` (deprecated)
-----
The `xfp` package provides a document-level interface for the LaTeX3
@@ -42,7 +42,8 @@ FPU. As such, it is a wrapper around the core `\fp_eval:n` function
but does not require code syntax. It provides the expandable command
`\fpeval`, which can be used inside for example `\edef` or contexts
where TeX requires a number.
-From 2022-06-01 release if LaTeX this will be included in the format
+
+From 2022-06-01 release of LaTeX this will be included in the format
so that the package doesn't need loading any longer.
`xfrac`
@@ -73,20 +74,6 @@ functions using a key=val syntax. This is designed to be
"self-documenting", with the key definitions providing information
on how they are to be used.
-Discussion
-----------
-
-Discussion concerning the approach, suggestions for improvements,
-changes, additions, _etc._ should be addressed to the list
-[LaTeX-L](https://listserv.uni-heidelberg.de/cgi-bin/wa?A0=LATEX-L).
-
-You can subscribe to this list by sending mail to
-
- listserv@urz.uni-heidelberg.de
-
-with the body containing
-
- subscribe LATEX-L <Your-First-Name> <Your-Second-Name>
Issues
------
@@ -94,8 +81,6 @@ Issues
The issue tracker for LaTeX3 is currently located
[on GitHub](https://github.com/latex3/latex3/issues).
-Please report specific issues with LaTeX3 code there; more general
-discussion should be directed to the [LaTeX-L list](#Discussion).
The LaTeX Project
------------------
diff --git a/macros/latex/contrib/l3packages/l3keys2e.dtx b/macros/latex/contrib/l3packages/l3keys2e.dtx
index 2cd7f89e10..13fd652eaa 100644
--- a/macros/latex/contrib/l3packages/l3keys2e.dtx
+++ b/macros/latex/contrib/l3packages/l3keys2e.dtx
@@ -62,7 +62,7 @@
% }^^A
% }
%
-% \date{Released 2023-02-02}
+% \date{Released 2023-08-29}
%
% \maketitle
%
@@ -143,7 +143,7 @@
%
%\begin{implementation}
%
-%\subsection{\pkg{l3keys2e} Implementation}
+%\subsection{\pkg{l3keys2e} implementation}
%
% \begin{macrocode}
%<*package>
@@ -154,7 +154,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3keys2e}{2023-02-02}{}
+\ProvidesExplPackage{l3keys2e}{2023-08-29}{}
{LaTeX2e option processing using LaTeX3 keys}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3packages/l3keys2e.pdf b/macros/latex/contrib/l3packages/l3keys2e.pdf
index 674d39db04..754439a4ca 100644
--- a/macros/latex/contrib/l3packages/l3keys2e.pdf
+++ b/macros/latex/contrib/l3packages/l3keys2e.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3packages/xfp.dtx b/macros/latex/contrib/l3packages/xfp.dtx
index c2d14aadff..44fccd9271 100644
--- a/macros/latex/contrib/l3packages/xfp.dtx
+++ b/macros/latex/contrib/l3packages/xfp.dtx
@@ -63,7 +63,7 @@
% }^^A
% }
%
-% \date{Released 2023-02-02}
+% \date{Released 2023-08-29}
%
% \maketitle
%
@@ -171,7 +171,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{xfp}{2023-02-02}{}
+\ProvidesExplPackage{xfp}{2023-08-29}{}
{L3 Floating point unit}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3packages/xfp.pdf b/macros/latex/contrib/l3packages/xfp.pdf
index f68a2b225d..be5ed0387f 100644
--- a/macros/latex/contrib/l3packages/xfp.pdf
+++ b/macros/latex/contrib/l3packages/xfp.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3packages/xfrac.dtx b/macros/latex/contrib/l3packages/xfrac.dtx
index e12131e9e0..70981e871a 100644
--- a/macros/latex/contrib/l3packages/xfrac.dtx
+++ b/macros/latex/contrib/l3packages/xfrac.dtx
@@ -65,7 +65,7 @@
% }^^A
% }
%
-% \date{Released 2023-02-02}
+% \date{Released 2023-08-29}
%
% \maketitle
%
@@ -524,7 +524,7 @@
%
% \begin{implementation}
%
-% \section{\pkg{xfrac} Implementation}
+% \section{\pkg{xfrac} implementation}
%
% \begin{macrocode}
%<*package>
@@ -535,7 +535,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{xfrac}{2023-02-02}{}
+\ProvidesExplPackage{xfrac}{2023-08-29}{}
{L3 Experimental split-level fractions}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3packages/xfrac.pdf b/macros/latex/contrib/l3packages/xfrac.pdf
index 961c5b052e..7b124a040f 100644
--- a/macros/latex/contrib/l3packages/xfrac.pdf
+++ b/macros/latex/contrib/l3packages/xfrac.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3packages/xparse.dtx b/macros/latex/contrib/l3packages/xparse.dtx
index b5adb20dae..72a31e6871 100644
--- a/macros/latex/contrib/l3packages/xparse.dtx
+++ b/macros/latex/contrib/l3packages/xparse.dtx
@@ -67,7 +67,7 @@
% }^^A
% }
%
-% \date{Released 2023-02-02}
+% \date{Released 2023-08-29}
%
% \maketitle
%
@@ -1064,7 +1064,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{xparse}{2023-02-02}{}
+\ProvidesExplPackage{xparse}{2023-08-29}{}
{L3 Experimental document command parser}
% \end{macrocode}
%
@@ -1380,6 +1380,149 @@
% \end{macrocode}
% \end{macro}
%
+% \subsection{Access to the argument specification}
+%
+% At one point this was included in the kernel, so we have to use
+% \texttt{gset} (or similar) throughout this subsection.
+%
+% \begin{macro}{\@@_get_arg_spec_error:N, \@@_get_arg_spec_error:n}
+% \begin{macro}{\@@_get_arg_spec_error_aux:n}
+% Provide an informative error when trying to get the argument
+% specification of a non-\pkg{xparse} command or environment.
+% \begin{macrocode}
+\cs_gset_protected:Npn \@@_get_arg_spec_error:N #1
+ {
+ \bool_set_false:N \l_@@_environment_bool
+ \tl_set:Nn \l_@@_fn_tl {#1}
+ \@@_get_arg_spec_error_aux:n { \cs_if_exist:NTF #1 }
+ }
+\cs_gset_protected:Npn \@@_get_arg_spec_error:n #1
+ {
+ \bool_set_true:N \l_@@_environment_bool
+ \str_set:Nx \l_@@_environment_str {#1}
+ \@@_get_arg_spec_error_aux:n
+ { \cs_if_exist:cTF { \l_@@_environment_str } }
+ }
+\cs_gset_protected:Npn \@@_get_arg_spec_error_aux:n #1
+ {
+ #1
+ {
+ \msg_error:nnx { cmd } { non-xparse }
+ { \@@_environment_or_command: }
+ }
+ {
+ \msg_error:nnx { cmd } { unknown }
+ { \@@_environment_or_command: }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@_get_arg_spec:NTF}
+% If the command is not an \pkg{xparse} command, complain. If it is,
+% its second \enquote{item} is the argument specification.
+% \begin{macrocode}
+\cs_gset_protected:Npn \@@_get_arg_spec:NTF #1#2#3
+ {
+ \__kernel_cmd_if_xparse:NTF #1
+ {
+ \tl_set:Nx \ArgumentSpecification { \tl_item:Nn #1 { 2 } }
+ #2
+ }
+ {#3}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{variable}{\ArgumentSpecification}
+% \begin{macrocode}
+\tl_clear_new:N \ArgumentSpecification
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}{\@@_get_arg_spec:N}
+% \begin{macro}{\@@_get_arg_spec:n}
+% Recovering the argument specification is now trivial.
+% \begin{macrocode}
+\cs_gset_protected:Npn \@@_get_arg_spec:N #1
+ {
+ \@@_get_arg_spec:NTF #1 { }
+ { \@@_get_arg_spec_error:N #1 }
+ }
+\cs_gset_protected:Npn \@@_get_arg_spec:n #1
+ {
+ \exp_args:Nc \@@_get_arg_spec:NTF
+ { environment~ \tl_to_str:n {#1} }
+ { }
+ { \@@_get_arg_spec_error:n {#1} }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@_show_arg_spec:N}
+% \begin{macro}{\@@_show_arg_spec:n}
+% Showing the argument specification simply means finding it and then
+% calling the \cs{tl_show:N} function.
+% \begin{macrocode}
+\cs_gset_protected:Npn \@@_show_arg_spec:N #1
+ {
+ \@@_get_arg_spec:NTF #1
+ { \tl_show:N \ArgumentSpecification }
+ { \@@_get_arg_spec_error:N #1 }
+ }
+\cs_gset_protected:Npn \@@_show_arg_spec:n #1
+ {
+ \exp_args:Nc \@@_get_arg_spec:NTF
+ { environment~ \tl_to_str:n {#1} }
+ { \tl_show:N \ArgumentSpecification }
+ { \@@_get_arg_spec_error:n {#1} }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\GetDocumentCommandArgSpec}
+% \begin{macro}{\GetDocumentEnvironmentArgSpec}
+% \begin{macro}{\ShowDocumentCommandArgSpec}
+% \begin{macro}{\ShowDocumentEnvironmentArgSpec}
+% Simple mappings, with a check that the argument is a single
+% control sequence or active character.
+% \begin{macrocode}
+\cs_gset_protected:Npn \GetDocumentCommandArgSpec #1
+ {
+ \@@_check_definable:nNT {#1} \GetDocumentCommandArgSpec
+ { \@@_get_arg_spec:N #1 }
+ }
+\cs_gset_eq:NN \GetDocumentEnvironmentArgSpec \@@_get_arg_spec:n
+\cs_gset_protected:Npn \ShowDocumentCommandArgSpec #1
+ {
+ \@@_check_definable:nNT {#1} \ShowDocumentCommandArgSpec
+ { \@@_show_arg_spec:N #1 }
+ }
+\cs_gset_eq:NN \ShowDocumentEnvironmentArgSpec \@@_show_arg_spec:n
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+\msg_set:nnnn { cmd } { non-xparse }
+ { \str_uppercase:n #1~not~defined~using~xparse. }
+ {
+ You~have~asked~for~the~argument~specification~for~the~#1,~
+ but~this~was~not~defined~using~xparse.
+ }
+\msg_set:nnnn { cmd } { unknown }
+ { Unknown~document~#1. }
+ {
+ You~have~asked~for~the~argument~specification~for~the~#1,~
+ but~it~is~not~defined.
+ }
+% \end{macrocode}
+%
% \begin{macrocode}
%</package>
% \end{macrocode}
diff --git a/macros/latex/contrib/l3packages/xparse.pdf b/macros/latex/contrib/l3packages/xparse.pdf
index 6e009e3cd4..dffaa1ae59 100644
--- a/macros/latex/contrib/l3packages/xparse.pdf
+++ b/macros/latex/contrib/l3packages/xparse.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3packages/xtemplate.dtx b/macros/latex/contrib/l3packages/xtemplate.dtx
index 86b6ecc14a..8386be5d98 100644
--- a/macros/latex/contrib/l3packages/xtemplate.dtx
+++ b/macros/latex/contrib/l3packages/xtemplate.dtx
@@ -63,7 +63,7 @@
% }^^A
% }
%
-% \date{Released 2023-02-02}
+% \date{Released 2023-08-29}
%
% \maketitle
%
@@ -700,7 +700,7 @@
%
% \begin{implementation}
%
-% \section{\pkg{xtemplate} Implementation}
+% \section{\pkg{xtemplate} implementation}
%
% \begin{macrocode}
%<*package>
@@ -711,7 +711,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{xtemplate}{2023-02-02}{}
+\ProvidesExplPackage{xtemplate}{2023-08-29}{}
{L3 Experimental prototype document functions}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3packages/xtemplate.pdf b/macros/latex/contrib/l3packages/xtemplate.pdf
index fbac0e820e..31258f27de 100644
--- a/macros/latex/contrib/l3packages/xtemplate.pdf
+++ b/macros/latex/contrib/l3packages/xtemplate.pdf
Binary files differ