summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-01-11 23:19:23 +0000
committerKarl Berry <karl@freefriends.org>2011-01-11 23:19:23 +0000
commit7bd702012caa7bf7f4c360eacb814e65773e38e0 (patch)
tree876d8b8ff7baa069560c1614e0dab49d20e74726 /Master
parent62764a821e78856fc5c6db6525928247bc194581 (diff)
xpackages 2126 (10jan11)
git-svn-id: svn://tug.org/texlive/trunk@21031 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/xpackages/xbase/ldcsetup.pdfbin339704 -> 339704 bytes
-rw-r--r--Master/texmf-dist/doc/latex/xpackages/xbase/template.pdfbin498338 -> 498338 bytes
-rw-r--r--Master/texmf-dist/doc/latex/xpackages/xbase/xparse.pdfbin508352 -> 510948 bytes
-rw-r--r--Master/texmf-dist/doc/latex/xpackages/xbase/xtemplate.pdfbin528479 -> 528479 bytes
-rw-r--r--Master/texmf-dist/doc/latex/xpackages/xcoffins/l3coffins.pdfbin456429 -> 456429 bytes
-rw-r--r--Master/texmf-dist/doc/latex/xpackages/xcoffins/xcoffins.pdfbin425125 -> 425125 bytes
-rw-r--r--Master/texmf-dist/doc/latex/xpackages/xhead/xhead.pdfbin464691 -> 464691 bytes
-rw-r--r--Master/texmf-dist/doc/latex/xpackages/xtras/l3keys2e.pdfbin327122 -> 327122 bytes
-rw-r--r--Master/texmf-dist/source/latex/xpackages/xbase/xparse.dtx112
-rw-r--r--Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty43
10 files changed, 153 insertions, 2 deletions
diff --git a/Master/texmf-dist/doc/latex/xpackages/xbase/ldcsetup.pdf b/Master/texmf-dist/doc/latex/xpackages/xbase/ldcsetup.pdf
index 7bbe633c462..61c6bc93b49 100644
--- a/Master/texmf-dist/doc/latex/xpackages/xbase/ldcsetup.pdf
+++ b/Master/texmf-dist/doc/latex/xpackages/xbase/ldcsetup.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/xpackages/xbase/template.pdf b/Master/texmf-dist/doc/latex/xpackages/xbase/template.pdf
index ea25911cffe..e495e035e32 100644
--- a/Master/texmf-dist/doc/latex/xpackages/xbase/template.pdf
+++ b/Master/texmf-dist/doc/latex/xpackages/xbase/template.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/xpackages/xbase/xparse.pdf b/Master/texmf-dist/doc/latex/xpackages/xbase/xparse.pdf
index 8b7b75992de..24747af109e 100644
--- a/Master/texmf-dist/doc/latex/xpackages/xbase/xparse.pdf
+++ b/Master/texmf-dist/doc/latex/xpackages/xbase/xparse.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/xpackages/xbase/xtemplate.pdf b/Master/texmf-dist/doc/latex/xpackages/xbase/xtemplate.pdf
index 85ed0f0edc5..de314bc0fcc 100644
--- a/Master/texmf-dist/doc/latex/xpackages/xbase/xtemplate.pdf
+++ b/Master/texmf-dist/doc/latex/xpackages/xbase/xtemplate.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/xpackages/xcoffins/l3coffins.pdf b/Master/texmf-dist/doc/latex/xpackages/xcoffins/l3coffins.pdf
index 7fb1c8aef51..120c741b297 100644
--- a/Master/texmf-dist/doc/latex/xpackages/xcoffins/l3coffins.pdf
+++ b/Master/texmf-dist/doc/latex/xpackages/xcoffins/l3coffins.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/xpackages/xcoffins/xcoffins.pdf b/Master/texmf-dist/doc/latex/xpackages/xcoffins/xcoffins.pdf
index 89b3b76675b..962c02a587d 100644
--- a/Master/texmf-dist/doc/latex/xpackages/xcoffins/xcoffins.pdf
+++ b/Master/texmf-dist/doc/latex/xpackages/xcoffins/xcoffins.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/xpackages/xhead/xhead.pdf b/Master/texmf-dist/doc/latex/xpackages/xhead/xhead.pdf
index 68732aa12db..3918fe303cc 100644
--- a/Master/texmf-dist/doc/latex/xpackages/xhead/xhead.pdf
+++ b/Master/texmf-dist/doc/latex/xpackages/xhead/xhead.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/xpackages/xtras/l3keys2e.pdf b/Master/texmf-dist/doc/latex/xpackages/xtras/l3keys2e.pdf
index b2d07e077c7..e5612c59a58 100644
--- a/Master/texmf-dist/doc/latex/xpackages/xtras/l3keys2e.pdf
+++ b/Master/texmf-dist/doc/latex/xpackages/xtras/l3keys2e.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/xpackages/xbase/xparse.dtx b/Master/texmf-dist/source/latex/xpackages/xbase/xparse.dtx
index dbcbbf28a84..ab2f5d2887c 100644
--- a/Master/texmf-dist/source/latex/xpackages/xbase/xparse.dtx
+++ b/Master/texmf-dist/source/latex/xpackages/xbase/xparse.dtx
@@ -41,7 +41,7 @@
\RequirePackage{l3names}
%</driver|package>
%\fi
-\GetIdInfo$Id: xparse.dtx 2073 2010-10-13 07:48:20Z joseph $
+\GetIdInfo$Id: xparse.dtx 2125 2011-01-09 15:24:39Z joseph $
{Generic document command parser}
%\iffalse
%<*driver>
@@ -541,6 +541,41 @@
% which does not conform to the first three requirements. The last
% item is an issue when the function is used, and so is beyond the
% scope of \pkg{xparse} itself.
+%\end{function}
+%
+%\subsection{Access to the argument specification}
+%
+% The argument specifications for document commands and environments are
+% available for examination and use.
+%
+%\begin{function}{
+% \GetDocumentCommandArgSpec |
+% \GetDocumentEnvironmentArgSpec |
+%}
+% \begin{syntax}
+% \cs{GetDocumentCommandArgSpec} \meta{function}
+% \cs{GetDocumentEnvironmentArgSpec} \meta{environment}
+% \end{syntax}
+% These functions transfer the current argument specification for the
+% requested \meta{function} or \meta{environment} into the token list
+% variable \cs{ArgumentSpecification}. If the \meta{function} or
+% \meta{environment} has no known argument specification then an error
+% is issued. The assignment to \cs{ArgumentSpecification} is local to
+% the current \TeX\ group.
+%\end{function}
+%
+%\begin{function}{
+% \ShowDocumentCommandArgSpec |
+% \ShowDocumentEnvironmentArgSpec |
+%}
+% \begin{syntax}
+% \cs{ShowDocumentCommandArgSpec} \meta{function}
+% \cs{ShowDocumentEnvironmentArgSpec} \meta{environment}
+% \end{syntax}
+% These functions show the current argument specification for the
+% requested \meta{function} or \meta{environment} at the terminal. If
+% the \meta{function} or \meta{environment} has no known argument
+% specification then an error is issued.
%\end{function}
%
%\subsection{Variables and constants}
@@ -2521,6 +2556,65 @@
\cs_new_eq:NN \xparse_exp_set:cpx \cs_set_nopar:cpx
% \end{macrocode}
%\end{macro}
+%
+%\subsection{Access to the argument specification}
+%
+%\begin{macro}{\parse_get_arg_spec:N}
+%\begin{macro}{\parse_get_arg_spec:n}
+%\begin{macro}{\ArgumentSpecification}
+% Recovering the argument specification is also trivial, using the
+% \cs{tl_set_eq:cN} function.
+% \begin{macrocode}
+\cs_new_protected:Npn \parse_get_arg_spec:N #1 {
+ \cs_if_exist:cTF { l_parse_ \token_to_str:N #1 _arg_spec_tl }
+ {
+ \tl_set_eq:Nc \ArgumentSpecification
+ { l_parse_ \token_to_str:N #1 _arg_spec_tl }
+ }
+ {
+ \msg_kernel_error:nx { unknown-document-command }
+ { \token_to_str:N #1 }
+ }
+}
+\cs_new_protected:Npn \parse_get_arg_spec:n #1 {
+ \cs_if_exist:cTF { l_parse_ #1 _arg_spec_tl }
+ { \tl_set_eq:Nc \ArgumentSpecification { l_parse_ #1 _arg_spec_tl } }
+ { \msg_kernel_error:nx { unknown-document-environment } {#1} }
+}
+\tl_new:N \ArgumentSpecification
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%\begin{macro}{\parse_show_arg_spec:N}
+%\begin{macro}{\parse_show_arg_spec:n}
+% Showing the argument specification simply means finding it and then
+% calling the \cs{tl_show:c} function.
+% \begin{macrocode}
+\cs_new_protected:Npn \parse_show_arg_spec:N #1 {
+ \cs_if_exist:cTF { l_parse_ \token_to_str:N #1 _arg_spec_tl }
+ {
+ \tl_set_eq:Nc \ArgumentSpecification
+ { l_parse_ \token_to_str:N #1 _arg_spec_tl }
+ \tl_show:N \ArgumentSpecification
+ }
+ {
+ \msg_kernel_error:nx { unknown-document-command }
+ { \token_to_str:N #1 }
+ }
+}
+\cs_new_protected:Npn \parse_show_arg_spec:n #1 {
+ \cs_if_exist:cTF { l_parse_ #1 _arg_spec_tl }
+ {
+ \tl_set_eq:Nc \ArgumentSpecification { l_parse_ #1 _arg_spec_tl }
+ \tl_show:N \ArgumentSpecification
+ }
+ { \msg_kernel_error:nx { unknown-document-environment } {#1} }
+}
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
%
%\subsection{Messages}
%
@@ -2829,6 +2923,22 @@
%\end{macro}
%\end{macro}
%
+%\begin{macro}{\GetDocumentCommandArgSpec}
+%\begin{macro}{\GetDocumentEnvironmentArgSpec}
+%\begin{macro}{\ShowDocumentCommandArgSpec}
+%\begin{macro}{\ShowDocumentEnvironmentArgSpec}
+% More simple mappings.
+% \begin{macrocode}
+\cs_new_eq:NN \GetDocumentCommandArgSpec \parse_get_arg_spec:N
+\cs_new_eq:NN \GetDocumentEnvironmmentArgSpec \parse_get_arg_spec:n
+\cs_new_eq:NN \ShowDocumentCommandArgSpec \parse_show_arg_spec:N
+\cs_new_eq:NN \ShowDocumentEnvironmentArgSpec \parse_show_arg_spec:n
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty b/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty
index 7d4cbcba4ec..f2c04ee2d9c 100644
--- a/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty
+++ b/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty
@@ -57,7 +57,7 @@
%% -----------------------------------------------------------------------
%%
\RequirePackage{l3names}
-\GetIdInfo$Id: xparse.dtx 2073 2010-10-13 07:48:20Z joseph $
+\GetIdInfo$Id: xparse.dtx 2125 2011-01-09 15:24:39Z joseph $
{Generic document command parser}
\ProvidesExplPackage
{\filename}{\filedate}{\fileversion}{\filedescription}
@@ -944,6 +944,43 @@
}
}
\cs_new_eq:NN \xparse_exp_set:cpx \cs_set_nopar:cpx
+\cs_new_protected:Npn \parse_get_arg_spec:N #1 {
+ \cs_if_exist:cTF { l_parse_ \token_to_str:N #1 _arg_spec_tl }
+ {
+ \tl_set_eq:Nc \ArgumentSpecification
+ { l_parse_ \token_to_str:N #1 _arg_spec_tl }
+ }
+ {
+ \msg_kernel_error:nx { unknown-document-command }
+ { \token_to_str:N #1 }
+ }
+}
+\cs_new_protected:Npn \parse_get_arg_spec:n #1 {
+ \cs_if_exist:cTF { l_parse_ #1 _arg_spec_tl }
+ { \tl_set_eq:Nc \ArgumentSpecification { l_parse_ #1 _arg_spec_tl } }
+ { \msg_kernel_error:nx { unknown-document-environment } {#1} }
+}
+\tl_new:N \ArgumentSpecification
+\cs_new_protected:Npn \parse_show_arg_spec:N #1 {
+ \cs_if_exist:cTF { l_parse_ \token_to_str:N #1 _arg_spec_tl }
+ {
+ \tl_set_eq:Nc \ArgumentSpecification
+ { l_parse_ \token_to_str:N #1 _arg_spec_tl }
+ \tl_show:N \ArgumentSpecification
+ }
+ {
+ \msg_kernel_error:nx { unknown-document-command }
+ { \token_to_str:N #1 }
+ }
+}
+\cs_new_protected:Npn \parse_show_arg_spec:n #1 {
+ \cs_if_exist:cTF { l_parse_ #1 _arg_spec_tl }
+ {
+ \tl_set_eq:Nc \ArgumentSpecification { l_parse_ #1 _arg_spec_tl }
+ \tl_show:N \ArgumentSpecification
+ }
+ { \msg_kernel_error:nx { unknown-document-environment } {#1} }
+}
\msg_kernel_new:nnnn { xparse } { command-already-defined }
{ Command~'#1'~already~defined! }
{
@@ -1120,6 +1157,10 @@
\cs_new_eq:NN \ReverseBoolean \_xparse_bool_reverse:N
\cs_new_eq:NN \SplitArgument \_xparse_split_argument:nnn
\cs_new_eq:NN \SplitList \_xparse_split_list:nn
+\cs_new_eq:NN \GetDocumentCommandArgSpec \parse_get_arg_spec:N
+\cs_new_eq:NN \GetDocumentEnvironmmentArgSpec \parse_get_arg_spec:n
+\cs_new_eq:NN \ShowDocumentCommandArgSpec \parse_show_arg_spec:N
+\cs_new_eq:NN \ShowDocumentEnvironmentArgSpec \parse_show_arg_spec:n
\endinput
%%
%% End of file `xparse.sty'.