summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-08-06 23:37:15 +0000
committerKarl Berry <karl@freefriends.org>2008-08-06 23:37:15 +0000
commit7fe74d9b728f85523bb0a77b231fe16d379c6265 (patch)
tree4c55f17677758bd4ab08bb24a5fbcf58d3cb64f3
parentf26efa972afb0a49e7d84d043c942f138122752c (diff)
expl3 update (6aug08)
git-svn-id: svn://tug.org/texlive/trunk@10123 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/expl3/expl3.pdfbin155827 -> 155938 bytes
-rw-r--r--Master/texmf-dist/doc/latex/expl3/l32eproc.pdfbin108445 -> 108445 bytes
-rw-r--r--Master/texmf-dist/doc/latex/expl3/readme.txt53
-rw-r--r--Master/texmf-dist/doc/latex/expl3/source3.pdfbin964164 -> 953706 bytes
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3clist.dtx33
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3prg.dtx167
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3prop.dtx16
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3quark.dtx4
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3tlp.dtx30
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3vers.dtx4
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3clist.sty26
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3prg.sty42
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3prop.sty12
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3quark.sty4
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3tlp.sty23
15 files changed, 302 insertions, 112 deletions
diff --git a/Master/texmf-dist/doc/latex/expl3/expl3.pdf b/Master/texmf-dist/doc/latex/expl3/expl3.pdf
index 8df9474594f..189b52ee082 100644
--- a/Master/texmf-dist/doc/latex/expl3/expl3.pdf
+++ b/Master/texmf-dist/doc/latex/expl3/expl3.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/expl3/l32eproc.pdf b/Master/texmf-dist/doc/latex/expl3/l32eproc.pdf
index e47cbd55004..2ccd85c6f1b 100644
--- a/Master/texmf-dist/doc/latex/expl3/l32eproc.pdf
+++ b/Master/texmf-dist/doc/latex/expl3/l32eproc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/expl3/readme.txt b/Master/texmf-dist/doc/latex/expl3/readme.txt
index a3fee5a449c..81202555eaa 100644
--- a/Master/texmf-dist/doc/latex/expl3/readme.txt
+++ b/Master/texmf-dist/doc/latex/expl3/readme.txt
@@ -3,44 +3,39 @@
A Possible LaTeX3 Programming Convention
========================================
- 2008/08/01
+ 2008/08/05
WHERE TO GET IT
---------------
-The current version of these packages can be obtained by following the
-instructions at <http://www.latex-project.org/code.html>.
+The files in this distribution represent a snapshot of selected files
+from the Subversion (SVN) repository of the LaTeX3 Project.
+To obtain current versions of the files, visit
+<http://www.latex-project.org/code.html> which contains further
+instructions.
OVERVIEW
--------
-The packages in this directory implement a possible language for `low
-level' programming in TeX. The syntax conventions described here are NOT
-intended either for use in documents or for use in describing design
-layouts in document class files.
-
-All aspects of these packages are *experimental*. The names of the
-packages, and the names of any commands that they define, may change
-at any time. They are being released in this form to allow public
-discussion and comment.
-
-Currently all the code is distributed in a format suitable for running
-as LaTeX2e packages. Further documentation may be produced by
-processing either the individual .dtx files, or the file source3.tex
-with LaTeX2e. The packages may be installed by processing l3.ins with
-plain TeX or LaTeX. In order to produce the documentation, you must
-have generated the package files.
-
-This code has been developed over time and has been used in previous
-versions for prototype implementations, experiments, etc. Its internal
-documentation (in the .dtx files) reflects the age of parts of it; it
-often contains personal comments and it sometimes refers to parts that
-are at present not distributed. We kindly ask you to overlook its
-deficiencies and inaccuracies --- if we had tried to clean this up it
-would never have surfaced and, for the purpose of discussions and
-comments, we hope its present form is adequate.
+The files of the expl3 bundle provide a low-level API for TeX
+programmers with special syntax conventions, completely separating it
+from document level syntax. Hence, the commands provided are not
+intended for use at the document level nor for use in describing
+design layouts in document class files.
+
+This API provides the foundation on which the LaTeX3 kernel and other
+advanced extensions are built. Special care has been taken so that
+they can be used within a LaTeX2e context as regular packages.
+
+While the existing code is approaching a stable state, we cannot
+guarantee that names of packages or commands they define will not
+change. This is also related to the history of the code: It has been
+developed over time and has been used in previous versions for
+prototypes implementations, experiments, etc. It may therefore
+occasionally contain references to parts that are at present not
+distributed.
THE GUILTY PERSONS
@@ -99,6 +94,8 @@ so free to be defined for other purposes if needed. Of course this
breaks almost all existing LaTeX2 code, but it may be used for testing
purposes, see test2.tex.
+The option removeoldnames has been disabled temporarily.
+
l3basics
========
diff --git a/Master/texmf-dist/doc/latex/expl3/source3.pdf b/Master/texmf-dist/doc/latex/expl3/source3.pdf
index edcb0924486..29d7985fe97 100644
--- a/Master/texmf-dist/doc/latex/expl3/source3.pdf
+++ b/Master/texmf-dist/doc/latex/expl3/source3.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/expl3/l3clist.dtx b/Master/texmf-dist/source/latex/expl3/l3clist.dtx
index 1bee2934399..0155c64f394 100644
--- a/Master/texmf-dist/source/latex/expl3/l3clist.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3clist.dtx
@@ -36,7 +36,7 @@
\RequirePackage{l3names}
%</driver|package>
%\fi
-\GetIdInfo$Id: l3clist.dtx 725 2007-12-22 21:25:00Z mittelba $
+\GetIdInfo$Id: l3clist.dtx 745 2008-08-03 18:50:46Z morten $
{L3 Experimental comma separated lists}
%\iffalse
%<*driver>
@@ -736,7 +736,7 @@
% we did. If we didn't, place the function "#1" in front of the
% element "#2", which is surrounded by braces.
% \begin{macrocode}
-\def_new:Npn \clist_map_function_aux:Nw #1#2,{
+\def_long_new:Npn \clist_map_function_aux:Nw #1#2,{
\quark_if_recursion_tail_stop:n{#2}
#1{#2}
\clist_map_function_aux:Nw #1
@@ -760,13 +760,20 @@
% that all of the functions called have distict names. A simpler
% approach would of course be to use grouping and thus the save
% stack but then you lose the ability to do things locally.
+%
+% A funny little thing occured in one document: The command setting
+% up the first call of |\clist_map_inline:Nn| was used in a tabular
+% cell and the inline code used |\\| so the loop broke as soon as
+% this happened. Lesson to be learned from this: If you wish to have
+% group like structure but not using the groupings of \TeX, then do
+% every operation globally.
% \begin{macrocode}
-\int_new:N \l_clist_inline_level_int
-\def_new:Npn \clist_map_inline:Nn #1#2{
+\int_new:N \g_clist_inline_level_int
+\def_long_new:Npn \clist_map_inline:Nn #1#2{
\clist_if_empty:NF #1
{
- \int_incr:N \l_clist_inline_level_int
- \def:cpn {clist_map_inline_ \int_use:N \l_clist_inline_level_int :n}
+ \int_gincr:N \g_clist_inline_level_int
+ \gdef_long:cpn {clist_map_inline_ \int_use:N \g_clist_inline_level_int :n}
##1{#2}
% \end{macrocode}
% Recall that the |E| in |\exp_args:NcE| means `single token expanded
@@ -776,22 +783,22 @@
% |\clist_map_function_aux:Nw| for the actual loop.
% \begin{macrocode}
\exp_args:NcE \clist_map_function_aux:Nw
- {clist_map_inline_ \int_use:N \l_clist_inline_level_int :n}
+ {clist_map_inline_ \int_use:N \g_clist_inline_level_int :n}
#1 , \q_recursion_tail , \q_recursion_stop
- \int_decr:N \l_clist_inline_level_int
+ \int_gdecr:N \g_clist_inline_level_int
}
}
\def_new:Npn \clist_map_inline:cn{\exp_args:Nc\clist_map_inline:Nn}
-\def_new:Npn \clist_map_inline:nn #1#2{
+\def_long_new:Npn \clist_map_inline:nn #1#2{
\tlist_if_empty:nF {#1}
{
- \int_incr:N \l_clist_inline_level_int
- \def:cpn {clist_map_inline_ \int_use:N \l_clist_inline_level_int :n}
+ \int_gincr:N \g_clist_inline_level_int
+ \gdef_long:cpn {clist_map_inline_ \int_use:N \g_clist_inline_level_int :n}
##1{#2}
\exp_args:Nc \clist_map_function_aux:Nw
- {clist_map_inline_ \int_use:N \l_clist_inline_level_int :n}
+ {clist_map_inline_ \int_use:N \g_clist_inline_level_int :n}
#1 , \q_recursion_tail , \q_recursion_stop
- \int_decr:N \l_clist_inline_level_int
+ \int_gdecr:N \g_clist_inline_level_int
}
}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/expl3/l3prg.dtx b/Master/texmf-dist/source/latex/expl3/l3prg.dtx
index 72084e07132..b99caf822d7 100644
--- a/Master/texmf-dist/source/latex/expl3/l3prg.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3prg.dtx
@@ -36,7 +36,7 @@
\RequirePackage{l3names}
%</driver|package>
%\fi
-\GetIdInfo$Id: l3prg.dtx 697 2007-11-27 14:14:54Z morten $
+\GetIdInfo$Id: l3prg.dtx 768 2008-08-05 19:45:06Z morten $
{L3 Experimental control structures}
%\iffalse
%<*driver>
@@ -364,6 +364,71 @@
% \end{quote}
% ultimately returns \m{true}.
% \end{function}
+%
+% \subsubsection{Case switches}
+%
+%
+% \begin{function}{
+% \prg_case_int:nnn |
+%
+% }
+% \begin{syntax}
+% "\prg_case_int:nnn" "{"<integer expr>"}" "{"
+% " {"\m{integer expr$\sb 1$}"}""{"\m{code$\sb 1$}"}""{"\m{integer expr$\sb 2$}"}""{"\m{code$\sb 2$}"}"\\
+% " ...""{"\m{integer expr$\sb n$}"}""{"\m{code$\sb n$}"}"\\
+% "}" "{"\m{else case}"}"
+% \end{syntax}
+% This function evaluates the first \meta{integer expr} and then compares it
+% to the values found in the list. Thus the expression
+% \begin{verbatim}
+% \prg_case:nnn{2*5}{
+% {5}{Small} {4+6}{Medium} {-2*10}{Negative}
+% }{Other}
+% \end{verbatim}
+% evaluates first the term to look for and then tries to find this
+% value in the list of values. If the value is found, the code on its
+% right is executed after removing the remainder of the list. If the
+% value is not found, the \meta{else case} is executed. The example
+% above will return ``Medium''.
+%
+% The function is expandable and is written in such a way that
+% \texttt{f} style expansion can take place cleanly, i.e., no tokens
+% from within the function are left over.
+% \end{function}
+%
+% \begin{function}{
+% \prg_case_dim:nnn |
+%
+% }
+% \begin{syntax}
+% "\prg_case_int:nnn" "{"<dim expr>"}" "{"
+% " {"\m{dim expr$\sb 1$}"}""{"\m{code$\sb 1$}"}""{"\m{dim expr$\sb 2$}"}""{"\m{code$\sb 2$}"}"\\
+% " ...""{"\m{dim expr$\sb n$}"}""{"\m{code$\sb n$}"}"\\
+% "}" "{"\m{else case}"}"
+% \end{syntax}
+% This function works just like |\prg_case_int:nnn| except it works
+% for \meta{dim} registers.
+% \end{function}
+%
+% \begin{function}{
+% \prg_case_str:nnn |
+%
+% }
+% \begin{syntax}
+% "\prg_case_str:nnn" "{"<string>"}" "{"
+% " {"\m{string$\sb 1$}"}""{"\m{code$\sb 1$}"}""{"\m{string$\sb 2$}"}""{"\m{code$\sb 2$}"}"\\
+% " ...""{"\m{string$\sb n$}"}""{"\m{code$\sb n$}"}"\\
+% "}" "{"\m{else case}"}"
+% \end{syntax}
+% This function works just like |\prg_case_int:nnn| except it
+% compares strings. Each string is evaluated fully using \texttt{x}
+% style expansion.
+%
+% The function is expandable\footnote{Provided you use pdfTeX v1.30 or
+% later} and is written in such a way that
+% \texttt{f} style expansion can take place cleanly, i.e., no tokens
+% from within the function are left over.
+% \end{function}
%
% \subsubsection{Generic loops}
%
@@ -701,25 +766,26 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\l_prg_inline_level_int}
+% \begin{macro}{\g_prg_inline_level_int}
% \begin{macro}{\prg_stepwise_inline:nnnn}
% \begin{macro}{\prg_stepwise_inline_decr:nnnn}
% \begin{macro}{\prg_stepwise_inline_incr:nnnn}
% This function uses the same approach as for instance
% |\clist_map_inline:Nn| to allow arbitrary nesting. First construct
% the special function and then call an auxiliary one which just
-% carries the newly constructed csname.
+% carries the newly constructed csname. Must make assignments global
+% when we maintain our own stack.
% \begin{macrocode}
-\int_new:N\l_prg_inline_level_int
+\int_new:N\g_prg_inline_level_int
\def_long_new:NNn\prg_stepwise_inline:nnnn 4{
- \int_incr:N \l_prg_inline_level_int
- \def:cpn{prg_stepwise_inline_\int_use:N\l_prg_inline_level_int :n}##1{#4}
+ \int_gincr:N \g_prg_inline_level_int
+ \gdef:cpn{prg_stepwise_inline_\int_use:N\g_prg_inline_level_int :n}##1{#4}
\num_compare:nNnTF {#2}<\c_zero
{\exp_args:Nco \prg_stepwise_inline_decr:Nnnn }
{\exp_args:Nco \prg_stepwise_inline_incr:Nnnn }
- {prg_stepwise_inline_\int_use:N\l_prg_inline_level_int :n}
+ {prg_stepwise_inline_\int_use:N\g_prg_inline_level_int :n}
{\int_use:N\int_eval:n{#1}} {#2} {#3}
- \int_decr:N \l_prg_inline_level_int
+ \int_gdecr:N \g_prg_inline_level_int
}
\def_long_new:NNn \prg_stepwise_inline_incr:Nnnn 4{
\num_compare:nNnF {#2}>{#4}
@@ -1091,6 +1157,91 @@
% \end{macrocode}
% \end{macro}
%
+% \subsubsection{Case switch}
+%
+% \begin{macro}{\prg_case_int:nnn}
+% \begin{macro}{\prg_case_int_aux:nnn}
+% This case switch is in reality quite simple. It takes three arguments:
+% \begin{enumerate}
+% \item An integer expression you wish to find.
+% \item A list of pairs of "{"\meta{integer
+% expr}"}""{"\meta{code}"}". The list can be as long as is desired
+% and \meta{integer expr} can be negative.
+% \item The code to be executed if the value wasn't found.
+% \end{enumerate}
+% We don't need the else case here yet, so leave it dangling in the
+% input stream.
+% \begin{macrocode}
+\def_long:Npn \prg_case_int:nnn #1 #2 {
+% \end{macrocode}
+% We will be parsing on |#1| for each step so we might as well
+% evaluate it first in case it is complicated.
+% \begin{macrocode}
+ \exp_args:No \prg_case_int_aux:nnn {\num_value:w \int_eval:n{#1}} #2
+% \end{macrocode}
+% The \texttt{?} below is just so there are enough arguments when we
+% reach the end. And it made you look.~\texttt{;-)}
+% \begin{macrocode}
+ \q_recursion_tail ? \q_recursion_stop
+}
+\def_long_new:Npn \prg_case_int_aux:nnn #1#2#3{
+% \end{macrocode}
+% If we reach the end, return the else case. We just remove braces.
+% \begin{macrocode}
+ \quark_if_recursion_tail_stop_do:nn{#2}{\use_arg_i:n}
+% \end{macrocode}
+% Otherwise we compare (which evaluates |#2| for us)
+% \begin{macrocode}
+ \num_compare:nNnTF{#1}={#2}
+% \end{macrocode}
+% If true, we want to remove the remainder of the list, the else case
+% and then execute the code specified. Why not use |#3\use_none:n|?
+% Because if we are doing |f| style expansion, we will get
+% leftovers. If the test was false, we try the next pair, carrying the
+% |#1|.
+% \begin{macrocode}
+ { \use_arg_i_delimit_by_q_recursion_stop:nw {\use_arg_i:nn{#3}} }
+ { \prg_case_int_aux:nnn {#1}}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\prg_case_dim:nnn}
+% \begin{macro}{\prg_case_dim_aux:nnn}
+% Same as |\prg_case_dim:nnn| except it is for \meta{dim} registers.
+% \begin{macrocode}
+\def_long:Npn \prg_case_dim:nnn #1 #2 {
+ \exp_args:No \prg_case_dim_aux:nnn {\dim_use:N \dim_eval:n{#1}} #2
+ \q_recursion_tail ? \q_recursion_stop
+}
+\def_long_new:Npn \prg_case_dim_aux:nnn #1#2#3{
+ \quark_if_recursion_tail_stop_do:nn{#2}{\use_arg_i:n}
+ \dim_compare:nNnTF{#1}={#2}
+ { \use_arg_i_delimit_by_q_recursion_stop:nw {\use_arg_i:nn{#3}} }
+ { \prg_case_dim_aux:nnn {#1}}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\prg_case_str:nnn}
+% \begin{macro}{\prg_case_str_aux:nnn}
+% Same as |\prg_case_dim:nnn| except it is for strings.
+% \begin{macrocode}
+\def_long:Npn \prg_case_str:nnn #1 #2 {
+ \prg_case_str_aux:nnn {#1} #2
+ \q_recursion_tail ? \q_recursion_stop
+}
+\def_long_new:Npn \prg_case_str_aux:nnn #1#2#3{
+ \quark_if_recursion_tail_stop_do:nn{#2}{\use_arg_i:n}
+ \tlist_if_eq:xxTF{#1}{#2}
+ { \use_arg_i_delimit_by_q_recursion_stop:nw {\use_arg_i:nn{#3}} }
+ { \prg_case_str_aux:nnn {#1}}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
%
% \subsubsection{Sorting}
%
diff --git a/Master/texmf-dist/source/latex/expl3/l3prop.dtx b/Master/texmf-dist/source/latex/expl3/l3prop.dtx
index 08aa9b4a075..d9c9e1271cc 100644
--- a/Master/texmf-dist/source/latex/expl3/l3prop.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3prop.dtx
@@ -36,7 +36,7 @@
\RequirePackage{l3names}
%</driver|package>
%\fi
-\GetIdInfo$Id: l3prop.dtx 742 2008-08-01 13:37:45Z morten $
+\GetIdInfo$Id: l3prop.dtx 745 2008-08-03 18:50:46Z morten $
{L3 Experimental Property Lists}
%\iffalse
%<*driver>
@@ -272,7 +272,7 @@
% \end{function}
%
% \begin{function}{%
-% \l_prop_inline_level_num |
+% \g_prop_inline_level_num |
% }
% Fake integer used in internal name for function used inside
% "\prop_map_inline:NN".
@@ -720,19 +720,19 @@
%
% \begin{macro}{\prop_map_inline:Nn}
% \begin{macro}{\prop_map_inline:cn}
-% \begin{macro}{\l_prop_inline_level_num}
+% \begin{macro}{\g_prop_inline_level_num}
% The inline functions are straight forward. It takes longer
% to test if the list is empty than to run it on an empty list so
% we don't waste time doing that.
% \begin{macrocode}
-\num_new:N \l_prop_inline_level_num
+\num_new:N \g_prop_inline_level_num
\def_new:Npn \prop_map_inline:Nn #1#2 {
- \num_incr:N \l_prop_inline_level_num
- \def_long:cpn {prop_map_inline_ \num_use:N \l_prop_inline_level_num :n}
+ \num_gincr:N \g_prop_inline_level_num
+ \gdef_long:cpn {prop_map_inline_ \num_use:N \g_prop_inline_level_num :n}
##1##2{#2}
\prop_map_function:Nc #1
- {prop_map_inline_ \num_use:N \l_prop_inline_level_num :n}
- \num_decr:N \l_prop_inline_level_num
+ {prop_map_inline_ \num_use:N \g_prop_inline_level_num :n}
+ \num_gdecr:N \g_prop_inline_level_num
}
\def_new:Npn \prop_map_inline:cN { \exp_args:Nc \prop_map_inline:NN }
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/expl3/l3quark.dtx b/Master/texmf-dist/source/latex/expl3/l3quark.dtx
index 5379adeeda2..80328f6a768 100644
--- a/Master/texmf-dist/source/latex/expl3/l3quark.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3quark.dtx
@@ -36,7 +36,7 @@
\RequirePackage{l3names}
%</driver|package>
%\fi
-\GetIdInfo$Id: l3quark.dtx 705 2007-12-02 22:14:25Z morten $
+\GetIdInfo$Id: l3quark.dtx 761 2008-08-04 21:35:13Z morten $
{L3 Experimental Quark Commands}
%\iffalse
%<*driver>
@@ -337,7 +337,7 @@
% \begin{macrocode}
\def_long_new:Npn \quark_if_recursion_tail_stop_do:nn #1#2 {
\exp_after:NN\if_meaning:NN
- \quark_if_recursion_tail_aux:w #1?\q_nil\q_recursion_tail
+ \quark_if_recursion_tail_aux:w #1?\q_nil\q_recursion_tail\q_recursion_tail
\exp_after:NN \use_arg_i_delimit_by_q_recursion_stop:nw
\else:
\exp_after:NN\use_none:n
diff --git a/Master/texmf-dist/source/latex/expl3/l3tlp.dtx b/Master/texmf-dist/source/latex/expl3/l3tlp.dtx
index ae3e72abe60..2d722a77624 100644
--- a/Master/texmf-dist/source/latex/expl3/l3tlp.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3tlp.dtx
@@ -36,7 +36,7 @@
\RequirePackage{l3names}
%</driver|package>
%\fi
-\GetIdInfo$Id: l3tlp.dtx 740 2008-08-01 13:25:38Z morten $
+\GetIdInfo$Id: l3tlp.dtx 767 2008-08-05 19:44:21Z morten $
{L3 Experimental Token List Pointers}
%\iffalse
%<*driver>
@@ -439,6 +439,7 @@
%
% \begin{function}{%
% \tlist_elt_count:n |
+% \tlist_elt_count:o |
% \tlp_elt_count:N |
% }
% \begin{syntax}
@@ -1413,33 +1414,33 @@
% \begin{macro}{\tlp_map_inline:Nn}
% \begin{macro}{\tlp_map_inline:cn}
% \begin{macro}{\tlist_map_inline_aux:n}
-% \begin{macro}{\l_tlp_inline_level_num}
+% \begin{macro}{\g_tlp_inline_level_num}
% The inline functions are straight forward by now. We use a little
-% a trick with the fake counter |\l_tlp_inline_level_num| to make
+% a trick with the fake counter |\g_tlp_inline_level_num| to make
% them nestable.\footnote{This should be a proper integer, but I
% don't want to mess with the dependencies right now\dots} We can
% also make use of |\tlist_map_function:Nn| from before.
% \begin{macrocode}
\def_long_new:Npn \tlist_map_inline:nn #1#2{
- \num_incr:N \l_tlp_inline_level_num
- \def_long:cpn {tlist_map_inline_ \num_use:N \l_tlp_inline_level_num :n}
+ \num_gincr:N \g_tlp_inline_level_num
+ \gdef_long:cpn {tlist_map_inline_ \num_use:N \g_tlp_inline_level_num :n}
##1{#2}
\exp_args:Nc \tlist_map_function_aux:Nn
- {tlist_map_inline_ \num_use:N \l_tlp_inline_level_num :n}
+ {tlist_map_inline_ \num_use:N \g_tlp_inline_level_num :n}
#1 \q_recursion_tail\q_recursion_stop
- \num_decr:N \l_tlp_inline_level_num
+ \num_gdecr:N \g_tlp_inline_level_num
}
\def_long_new:Npn \tlp_map_inline:Nn #1#2{
- \num_incr:N \l_tlp_inline_level_num
- \def_long:cpn {tlist_map_inline_ \num_use:N \l_tlp_inline_level_num :n}
+ \num_gincr:N \g_tlp_inline_level_num
+ \gdef_long:cpn {tlist_map_inline_ \num_use:N \g_tlp_inline_level_num :n}
##1{#2}
\exp_args:NcE \tlist_map_function_aux:Nn
- {tlist_map_inline_ \num_use:N \l_tlp_inline_level_num :n}
+ {tlist_map_inline_ \num_use:N \g_tlp_inline_level_num :n}
#1 \q_recursion_tail\q_recursion_stop
- \num_decr:N \l_tlp_inline_level_num
+ \num_gdecr:N \g_tlp_inline_level_num
}
\def_new:Npn\tlp_map_inline:cN{\exp_args:Nc\tlp_map_inline:NN}
-\tlp_new:Nn \l_tlp_inline_level_num{0}
+\tlp_new:Nn \g_tlp_inline_level_num{0}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1489,6 +1490,7 @@
%
%
% \begin{macro}{\tlist_elt_count:n}
+% \begin{macro}{\tlist_elt_count:o}
% \begin{macro}{\tlp_elt_count:n}
% Count number of elements within a token list or token list
% pointer. Brace groups within the list are read as a single
@@ -1501,6 +1503,7 @@
\tlist_map_function:nN {#1}\num_elt_count:n
\num_eval_end:
}
+\def_new:Npn \tlist_elt_count:o {\exp_args:No\tlist_elt_count:n}
\def_new:Npn \tlp_elt_count:N #1{
\num_value:w \num_eval:w 0
\tlp_map_function:NN #1 \num_elt_count:n
@@ -1509,6 +1512,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
%
%
@@ -1961,7 +1965,7 @@
% and putting it in front of the ones before it.
% \begin{macrocode}
\def_long_new:Npn \tlist_reverse:n #1{
- \tlist_reverse_aux:nN {} #1 \q_recursion_tail\q_stop
+ \tlist_reverse_aux:nN {} #1 \q_recursion_tail\q_recursion_stop
}
\def_long_new:Npn \tlist_reverse_aux:nN #1#2{
\quark_if_recursion_tail_stop_do:nn {#2}{ #1 }
diff --git a/Master/texmf-dist/source/latex/expl3/l3vers.dtx b/Master/texmf-dist/source/latex/expl3/l3vers.dtx
index 1bd308c2970..b3cbde577bd 100644
--- a/Master/texmf-dist/source/latex/expl3/l3vers.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3vers.dtx
@@ -35,7 +35,7 @@
\RequirePackage{l3names}
%</driver|package>
%\fi
-\GetIdInfo$Id: l3vers.dtx 743 2008-08-01 14:02:18Z morten $
+\GetIdInfo$Id: l3vers.dtx 769 2008-08-05 19:48:40Z morten $
{L3 Experimental LaTeX format version}
%\iffalse
%<*driver>
@@ -63,7 +63,7 @@
% \begin{macrocode}
%<*initex>
\def:Npn\c_format_name{Experimental~ LaTeX3}
-\def:Npn\c_format_date{2008/08/01}
+\def:Npn\c_format_date{2008/08/05}
%^^A\def:Npx\c_format_version{--release--date--goes--here--}
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/tex/latex/expl3/l3clist.sty b/Master/texmf-dist/tex/latex/expl3/l3clist.sty
index 313e4ab79c7..ac82ec646f0 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3clist.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3clist.sty
@@ -48,7 +48,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3clist.dtx 725 2007-12-22 21:25:00Z mittelba $
+\GetIdInfo$Id: l3clist.dtx 745 2008-08-03 18:50:46Z morten $
{L3 Experimental comma separated lists}
\ProvidesExplPackage
{\filename}{\filedate}{\fileversion}{\filedescription}
@@ -131,36 +131,36 @@
\tlist_if_blank:nF {#1}
{ \clist_map_function_aux:Nw #2 #1 , \q_recursion_tail , \q_recursion_stop }
}
-\def_new:Npn \clist_map_function_aux:Nw #1#2,{
+\def_long_new:Npn \clist_map_function_aux:Nw #1#2,{
\quark_if_recursion_tail_stop:n{#2}
#1{#2}
\clist_map_function_aux:Nw #1
}
\let_new:NN \clist_map_break:w \use_none_delimit_by_q_recursion_stop:w
-\int_new:N \l_clist_inline_level_int
-\def_new:Npn \clist_map_inline:Nn #1#2{
+\int_new:N \g_clist_inline_level_int
+\def_long_new:Npn \clist_map_inline:Nn #1#2{
\clist_if_empty:NF #1
{
- \int_incr:N \l_clist_inline_level_int
- \def:cpn {clist_map_inline_ \int_use:N \l_clist_inline_level_int :n}
+ \int_gincr:N \g_clist_inline_level_int
+ \gdef_long:cpn {clist_map_inline_ \int_use:N \g_clist_inline_level_int :n}
##1{#2}
\exp_args:NcE \clist_map_function_aux:Nw
- {clist_map_inline_ \int_use:N \l_clist_inline_level_int :n}
+ {clist_map_inline_ \int_use:N \g_clist_inline_level_int :n}
#1 , \q_recursion_tail , \q_recursion_stop
- \int_decr:N \l_clist_inline_level_int
+ \int_gdecr:N \g_clist_inline_level_int
}
}
\def_new:Npn \clist_map_inline:cn{\exp_args:Nc\clist_map_inline:Nn}
-\def_new:Npn \clist_map_inline:nn #1#2{
+\def_long_new:Npn \clist_map_inline:nn #1#2{
\tlist_if_empty:nF {#1}
{
- \int_incr:N \l_clist_inline_level_int
- \def:cpn {clist_map_inline_ \int_use:N \l_clist_inline_level_int :n}
+ \int_gincr:N \g_clist_inline_level_int
+ \gdef_long:cpn {clist_map_inline_ \int_use:N \g_clist_inline_level_int :n}
##1{#2}
\exp_args:Nc \clist_map_function_aux:Nw
- {clist_map_inline_ \int_use:N \l_clist_inline_level_int :n}
+ {clist_map_inline_ \int_use:N \g_clist_inline_level_int :n}
#1 , \q_recursion_tail , \q_recursion_stop
- \int_decr:N \l_clist_inline_level_int
+ \int_gdecr:N \g_clist_inline_level_int
}
}
\def_new:Npn \clist_map_variable:nNn #1#2#3{
diff --git a/Master/texmf-dist/tex/latex/expl3/l3prg.sty b/Master/texmf-dist/tex/latex/expl3/l3prg.sty
index ccb7657e076..7cc170fef4f 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3prg.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3prg.sty
@@ -48,7 +48,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3prg.dtx 697 2007-11-27 14:14:54Z morten $
+\GetIdInfo$Id: l3prg.dtx 768 2008-08-05 19:45:06Z morten $
{L3 Experimental control structures}
\ProvidesExplPackage
{\filename}{\filedate}{\fileversion}{\filedescription}
@@ -143,16 +143,16 @@
{#2}{#3}{#4}
}
}
-\int_new:N\l_prg_inline_level_int
+\int_new:N\g_prg_inline_level_int
\def_long_new:NNn\prg_stepwise_inline:nnnn 4{
- \int_incr:N \l_prg_inline_level_int
- \def:cpn{prg_stepwise_inline_\int_use:N\l_prg_inline_level_int :n}##1{#4}
+ \int_gincr:N \g_prg_inline_level_int
+ \gdef:cpn{prg_stepwise_inline_\int_use:N\g_prg_inline_level_int :n}##1{#4}
\num_compare:nNnTF {#2}<\c_zero
{\exp_args:Nco \prg_stepwise_inline_decr:Nnnn }
{\exp_args:Nco \prg_stepwise_inline_incr:Nnnn }
- {prg_stepwise_inline_\int_use:N\l_prg_inline_level_int :n}
+ {prg_stepwise_inline_\int_use:N\g_prg_inline_level_int :n}
{\int_use:N\int_eval:n{#1}} {#2} {#3}
- \int_decr:N \l_prg_inline_level_int
+ \int_gdecr:N \g_prg_inline_level_int
}
\def_long_new:NNn \prg_stepwise_inline_incr:Nnnn 4{
\num_compare:nNnF {#2}>{#4}
@@ -295,6 +295,36 @@
\def_long_new:Npn \predicate_not_p:n #1{
\if:w \predicate_p:n{#1} \c_false \else: \c_true \fi:
}
+\def_long:Npn \prg_case_int:nnn #1 #2 {
+ \exp_args:No \prg_case_int_aux:nnn {\num_value:w \int_eval:n{#1}} #2
+ \q_recursion_tail ? \q_recursion_stop
+}
+\def_long_new:Npn \prg_case_int_aux:nnn #1#2#3{
+ \quark_if_recursion_tail_stop_do:nn{#2}{\use_arg_i:n}
+ \num_compare:nNnTF{#1}={#2}
+ { \use_arg_i_delimit_by_q_recursion_stop:nw {\use_arg_i:nn{#3}} }
+ { \prg_case_int_aux:nnn {#1}}
+}
+\def_long:Npn \prg_case_dim:nnn #1 #2 {
+ \exp_args:No \prg_case_dim_aux:nnn {\dim_use:N \dim_eval:n{#1}} #2
+ \q_recursion_tail ? \q_recursion_stop
+}
+\def_long_new:Npn \prg_case_dim_aux:nnn #1#2#3{
+ \quark_if_recursion_tail_stop_do:nn{#2}{\use_arg_i:n}
+ \dim_compare:nNnTF{#1}={#2}
+ { \use_arg_i_delimit_by_q_recursion_stop:nw {\use_arg_i:nn{#3}} }
+ { \prg_case_dim_aux:nnn {#1}}
+}
+\def_long:Npn \prg_case_str:nnn #1 #2 {
+ \prg_case_str_aux:nnn {#1} #2
+ \q_recursion_tail ? \q_recursion_stop
+}
+\def_long_new:Npn \prg_case_str_aux:nnn #1#2#3{
+ \quark_if_recursion_tail_stop_do:nn{#2}{\use_arg_i:n}
+ \tlist_if_eq:xxTF{#1}{#2}
+ { \use_arg_i_delimit_by_q_recursion_stop:nw {\use_arg_i:nn{#3}} }
+ { \prg_case_str_aux:nnn {#1}}
+}
\def_new:NNn \prg_define_quicksort:nnn 3 {
\def_long:cNx{#1_quicksort:n}1{
\exp_not:c{#1_quicksort_start_partition:w} ##1
diff --git a/Master/texmf-dist/tex/latex/expl3/l3prop.sty b/Master/texmf-dist/tex/latex/expl3/l3prop.sty
index fcf43c8f408..21ff956c0fd 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3prop.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3prop.sty
@@ -48,7 +48,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3prop.dtx 742 2008-08-01 13:37:45Z morten $
+\GetIdInfo$Id: l3prop.dtx 745 2008-08-03 18:50:46Z morten $
{L3 Experimental Property Lists}
\ProvidesExplPackage
{\filename}{\filedate}{\fileversion}{\filedescription}
@@ -207,14 +207,14 @@
\def_new:Npn \prop_map_function:cN {\exp_args:Nc \prop_map_function:NN }
\def_new:Npn \prop_map_function:Nc {\exp_args:NNc \prop_map_function:NN }
\def_new:Npn \prop_map_function:cc {\exp_args:Ncc \prop_map_function:NN}
-\num_new:N \l_prop_inline_level_num
+\num_new:N \g_prop_inline_level_num
\def_new:Npn \prop_map_inline:Nn #1#2 {
- \num_incr:N \l_prop_inline_level_num
- \def_long:cpn {prop_map_inline_ \num_use:N \l_prop_inline_level_num :n}
+ \num_gincr:N \g_prop_inline_level_num
+ \gdef_long:cpn {prop_map_inline_ \num_use:N \g_prop_inline_level_num :n}
##1##2{#2}
\prop_map_function:Nc #1
- {prop_map_inline_ \num_use:N \l_prop_inline_level_num :n}
- \num_decr:N \l_prop_inline_level_num
+ {prop_map_inline_ \num_use:N \g_prop_inline_level_num :n}
+ \num_gdecr:N \g_prop_inline_level_num
}
\def_new:Npn \prop_map_inline:cN { \exp_args:Nc \prop_map_inline:NN }
\let_new:NN \prop_map_break:w \use_none_delimit_by_q_stop:w
diff --git a/Master/texmf-dist/tex/latex/expl3/l3quark.sty b/Master/texmf-dist/tex/latex/expl3/l3quark.sty
index c766400bcbb..1b44ce2ab2d 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3quark.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3quark.sty
@@ -48,7 +48,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3quark.dtx 705 2007-12-02 22:14:25Z morten $
+\GetIdInfo$Id: l3quark.dtx 761 2008-08-04 21:35:13Z morten $
{L3 Experimental Quark Commands}
\ProvidesExplPackage
{\filename}{\filedate}{\fileversion}{\filedescription}
@@ -77,7 +77,7 @@
}
\def_long_new:Npn \quark_if_recursion_tail_stop_do:nn #1#2 {
\exp_after:NN\if_meaning:NN
- \quark_if_recursion_tail_aux:w #1?\q_nil\q_recursion_tail
+ \quark_if_recursion_tail_aux:w #1?\q_nil\q_recursion_tail\q_recursion_tail
\exp_after:NN \use_arg_i_delimit_by_q_recursion_stop:nw
\else:
\exp_after:NN\use_none:n
diff --git a/Master/texmf-dist/tex/latex/expl3/l3tlp.sty b/Master/texmf-dist/tex/latex/expl3/l3tlp.sty
index f7baf935951..1867f9e2e0e 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3tlp.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3tlp.sty
@@ -48,7 +48,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3tlp.dtx 740 2008-08-01 13:25:38Z morten $
+\GetIdInfo$Id: l3tlp.dtx 767 2008-08-05 19:44:21Z morten $
{L3 Experimental Token List Pointers}
\ProvidesExplPackage
{\filename}{\filedate}{\fileversion}{\filedescription}
@@ -235,25 +235,25 @@
}
\def_new:Npn\tlp_map_function:cN{\exp_args:Nc\tlp_map_function:NN}
\def_long_new:Npn \tlist_map_inline:nn #1#2{
- \num_incr:N \l_tlp_inline_level_num
- \def_long:cpn {tlist_map_inline_ \num_use:N \l_tlp_inline_level_num :n}
+ \num_gincr:N \g_tlp_inline_level_num
+ \gdef_long:cpn {tlist_map_inline_ \num_use:N \g_tlp_inline_level_num :n}
##1{#2}
\exp_args:Nc \tlist_map_function_aux:Nn
- {tlist_map_inline_ \num_use:N \l_tlp_inline_level_num :n}
+ {tlist_map_inline_ \num_use:N \g_tlp_inline_level_num :n}
#1 \q_recursion_tail\q_recursion_stop
- \num_decr:N \l_tlp_inline_level_num
+ \num_gdecr:N \g_tlp_inline_level_num
}
\def_long_new:Npn \tlp_map_inline:Nn #1#2{
- \num_incr:N \l_tlp_inline_level_num
- \def_long:cpn {tlist_map_inline_ \num_use:N \l_tlp_inline_level_num :n}
+ \num_gincr:N \g_tlp_inline_level_num
+ \gdef_long:cpn {tlist_map_inline_ \num_use:N \g_tlp_inline_level_num :n}
##1{#2}
\exp_args:NcE \tlist_map_function_aux:Nn
- {tlist_map_inline_ \num_use:N \l_tlp_inline_level_num :n}
+ {tlist_map_inline_ \num_use:N \g_tlp_inline_level_num :n}
#1 \q_recursion_tail\q_recursion_stop
- \num_decr:N \l_tlp_inline_level_num
+ \num_gdecr:N \g_tlp_inline_level_num
}
\def_new:Npn\tlp_map_inline:cN{\exp_args:Nc\tlp_map_inline:NN}
-\tlp_new:Nn \l_tlp_inline_level_num{0}
+\tlp_new:Nn \g_tlp_inline_level_num{0}
\def_long_new:Npn \tlist_map_variable:nNn #1#2#3{
\tlist_map_variable_aux:Nnn #2 {#3} #1 \q_recursion_tail \q_recursion_stop
}
@@ -271,6 +271,7 @@
\tlist_map_function:nN {#1}\num_elt_count:n
\num_eval_end:
}
+\def_new:Npn \tlist_elt_count:o {\exp_args:No\tlist_elt_count:n}
\def_new:Npn \tlp_elt_count:N #1{
\num_value:w \num_eval:w 0
\tlp_map_function:NN #1 \num_elt_count:n
@@ -492,7 +493,7 @@
\def_long_test_function_new:npn {tlist_if_head_eq_catcode:nN}#1#2{
\if:w\tlist_if_head_eq_catcode_p:nN{#1}#2}
\def_long_new:Npn \tlist_reverse:n #1{
- \tlist_reverse_aux:nN {} #1 \q_recursion_tail\q_stop
+ \tlist_reverse_aux:nN {} #1 \q_recursion_tail\q_recursion_stop
}
\def_long_new:Npn \tlist_reverse_aux:nN #1#2{
\quark_if_recursion_tail_stop_do:nn {#2}{ #1 }