summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-07-29 11:23:34 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-07-29 11:23:34 +0000
commitef285e6a49a93af098150d0b3125a34d3477ba55 (patch)
tree124a55595390d358e0cda8ae26f78e9a263e9a21 /Master/texmf-dist
parente7477f362711cc9d05dfa1ee71301fb34cce2d94 (diff)
expl3 update (2008/06/20)
git-svn-id: svn://tug.org/texlive/trunk@9869 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/expl3/ChangeLog.fmi13
-rw-r--r--Master/texmf-dist/doc/latex/expl3/expl3.pdfbin161313 -> 155070 bytes
-rw-r--r--Master/texmf-dist/doc/latex/expl3/l32eproc.pdfbin112902 -> 108098 bytes
-rw-r--r--Master/texmf-dist/doc/latex/expl3/readme.txt55
-rw-r--r--Master/texmf-dist/doc/latex/expl3/source3.pdfbin439909 -> 962916 bytes
-rw-r--r--Master/texmf-dist/source/latex/expl3/expl3.tex (renamed from Master/texmf-dist/doc/latex/expl3/expl3.tex)0
-rw-r--r--Master/texmf-dist/source/latex/expl3/l32eproc.tex (renamed from Master/texmf-dist/doc/latex/expl3/l32eproc.tex)0
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3alloc.dtx26
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3basics.dtx52
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3box.dtx90
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3calc.dtx305
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3chk.dtx26
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3clist.dtx56
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3expan.dtx253
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3final.dtx31
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3int.dtx140
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3io.dtx27
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3keyval.dtx27
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3messages.dtx88
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3names.dtx388
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3num.dtx88
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3precom.dtx27
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3prg.dtx433
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3prop.dtx479
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3quark.dtx172
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3seq.dtx28
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3skip.dtx44
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3tlp.dtx255
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3token.dtx89
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3toks.dtx41
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3vers.dtx29
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3xref-test.tex (renamed from Master/texmf-dist/doc/latex/expl3/l3xref-test.tex)14
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3xref.dtx37
-rw-r--r--Master/texmf-dist/source/latex/expl3/source3.tex (renamed from Master/texmf-dist/doc/latex/expl3/source3.tex)4
-rw-r--r--Master/texmf-dist/source/latex/expl3/test1.tex (renamed from Master/texmf-dist/doc/latex/expl3/test1.tex)0
-rw-r--r--Master/texmf-dist/source/latex/expl3/test2.tex (renamed from Master/texmf-dist/doc/latex/expl3/test2.tex)0
-rw-r--r--Master/texmf-dist/source/latex/expl3/test3.tex (renamed from Master/texmf-dist/doc/latex/expl3/test3.tex)0
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3basics.sty13
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3box.sty25
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3calc.sty175
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3chk.sty4
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3clist.sty25
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3doc.cls9
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3expan.sty109
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3int.sty49
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3io.sty4
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3keyval.sty4
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3messages.sty43
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3names.sty167
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3num.sty15
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3precom.sty4
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3prg.sty102
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3prop.sty202
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3quark.sty46
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3seq.sty4
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3skip.sty15
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3tlp.sty140
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3token.sty24
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3toks.sty10
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3xref.sty4
-rw-r--r--Master/texmf-dist/tex/latex/expl3/lbase.ini (renamed from Master/texmf-dist/doc/latex/expl3/lbase.ini)0
-rw-r--r--Master/texmf-dist/tex/latex/expl3/lbase.ltx921
62 files changed, 3430 insertions, 2001 deletions
diff --git a/Master/texmf-dist/doc/latex/expl3/ChangeLog.fmi b/Master/texmf-dist/doc/latex/expl3/ChangeLog.fmi
deleted file mode 100644
index 5257f0f1092..00000000000
--- a/Master/texmf-dist/doc/latex/expl3/ChangeLog.fmi
+++ /dev/null
@@ -1,13 +0,0 @@
-2005-01-22 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
-
- * updates for xlang and fix for seq inline mapping which defined
- \seq_elt:w globally
-
-2004-09-19 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
-
- * l3io.dtx: added \ior_close:N and \if_eof:w (pr/2850)
-
-Mon Jul 6 22:37:45 1998 Frank Mittelbach <Frank.Mittelbach@uni-mainz.de>
-
- * l3seq.dtx: added forgotten doc on stacks
-
diff --git a/Master/texmf-dist/doc/latex/expl3/expl3.pdf b/Master/texmf-dist/doc/latex/expl3/expl3.pdf
index f1724b88d1e..63fc49bb884 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 ea0168b10a3..39d6ed345d4 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 e1012dc0353..895c54120da 100644
--- a/Master/texmf-dist/doc/latex/expl3/readme.txt
+++ b/Master/texmf-dist/doc/latex/expl3/readme.txt
@@ -3,7 +3,14 @@
A Possible LaTeX3 Programming Convention
========================================
- 2006/08/15
+ 2008/06/20
+
+
+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>.
OVERVIEW
@@ -14,16 +21,17 @@ 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 package are *experimental*. The names of the
+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.
+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
@@ -35,30 +43,6 @@ would never have surfaced and, for the purpose of discussions and
comments, we hope its present form is adequate.
-NOTE (docstrip version)
------------------------
-
-If latex l3.ins
-produces the `docstrip interactive mode' prompt:
-
- * First type the extension of your input file(s): *
- \infileext=
-
-Then your version of docstrip is too old.
-Quit (eg by hitting `enter' to all questions) and get a newer
-docstrip.tex. It must be at least version 2.4.
-
-A suitable docstrip.tex may be found from `CTAN' archives such as
-ftp.dante.de tex-archive/macros/latex/unpacked/docstrip.tex
-
-Docstrip is part of the base LaTeX distribution, so if you have
-an old docstrip then your LaTeX is out of date and you may consider
-getting the whole of that directory and re-installing LaTeX.
-However you need to fetch only the file docstrip.tex to unpack
-this expl3 distribution with your existing format.
-
-
-
THE GUILTY PERSONS
------------------
@@ -86,10 +70,11 @@ BUGS
----
If you find a real bug that makes a package stop working you can
-report it via the standard latexbug.tex mechanism of the LaTeX
-distribution (see bugs.txt there) using the category "l3exp".
-However please do *not* use this method for suggestions / comments /
-improvements / etc. For this the list LATEX-L should be used instead.
+report it via the standard LaTeX bug reporting mechanism of the LaTeX
+distribution (see bugs.txt there) using the category "Experimental
+LaTeX kernel". However please do *not* use this method for
+suggestions / comments / improvements / etc. For this the list LATEX-L
+should be used instead.
Also please don't expect these package to work with *any* code that
floats around in the LaTeX2e world. :-)
@@ -325,6 +310,6 @@ This tests the io and precomp modules.
=====================================================================
---- Copyright 1998 -- 2006
+--- Copyright 1998 -- 2008
The LaTeX3 Project. All rights reserved ---
diff --git a/Master/texmf-dist/doc/latex/expl3/source3.pdf b/Master/texmf-dist/doc/latex/expl3/source3.pdf
index 5a3c071a71f..8091b95dff8 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/doc/latex/expl3/expl3.tex b/Master/texmf-dist/source/latex/expl3/expl3.tex
index 8d9e1880667..8d9e1880667 100644
--- a/Master/texmf-dist/doc/latex/expl3/expl3.tex
+++ b/Master/texmf-dist/source/latex/expl3/expl3.tex
diff --git a/Master/texmf-dist/doc/latex/expl3/l32eproc.tex b/Master/texmf-dist/source/latex/expl3/l32eproc.tex
index d560c0c2338..d560c0c2338 100644
--- a/Master/texmf-dist/doc/latex/expl3/l32eproc.tex
+++ b/Master/texmf-dist/source/latex/expl3/l32eproc.tex
diff --git a/Master/texmf-dist/source/latex/expl3/l3alloc.dtx b/Master/texmf-dist/source/latex/expl3/l3alloc.dtx
index 0fa4f2aef57..76f141a25b0 100644
--- a/Master/texmf-dist/source/latex/expl3/l3alloc.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3alloc.dtx
@@ -32,25 +32,21 @@
%%
%% -----------------------------------------------------------------------
%
-%<package>\RequirePackage{l3names}
-%<*dtx>
+%<*driver|package>
+\RequirePackage{l3names}
+%</driver|package>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-}
-%\iffalse
-%</dtx>
-%\fi
-\GetIdInfo$Id: l3alloc.dtx 581 2006-12-12 12:28:27Z morten $
+\GetIdInfo$Id: l3alloc.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental register allocation}%
-% \iffalse
+%\iffalse
%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
-
\begin{document}
-\DocInput{l3alloc.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
% \fi
@@ -128,6 +124,8 @@
% this file is loaded as a package on top of \LaTeXe.
%
% \begin{macrocode}
+%<package>\ProvidesExplPackage
+%<package> {\filename}{\filedate}{\fileversion}{\filedescription}
%<package>\RequirePackage{l3expan}
%<package>\RequirePackage{l3num}
%<package>\RequirePackage{l3seq}\par
diff --git a/Master/texmf-dist/source/latex/expl3/l3basics.dtx b/Master/texmf-dist/source/latex/expl3/l3basics.dtx
index 4181fad3182..e34e42f2732 100644
--- a/Master/texmf-dist/source/latex/expl3/l3basics.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3basics.dtx
@@ -31,29 +31,26 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-%<package>\RequirePackage{l3names}
-%<*dtx>
+%<*driver|package>
+\RequirePackage{l3names}
+%</driver|package>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-}
-%\iffalse
-%</dtx>
-%\fi
-\GetIdInfo$Id: l3basics.dtx 583 2006-12-12 17:26:44Z morten $
+\GetIdInfo$Id: l3basics.dtx 702 2007-11-27 14:21:49Z morten $
{L3 Experimental basic definitions}
-% \iffalse
+%\iffalse
%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
-
\begin{document}
-\DocInput{l3basics.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
% \fi
%
+%
% \title{The \textsf{l3basics} package\thanks{This file
% has version number \fileversion, last
% revised \filedate.}\\
@@ -429,14 +426,18 @@
% \begin{function}{%
% \use_arg_i_after_fi:nw |
% \use_arg_i_after_else:nw |
-% \use_arg_i_after_or:nw
+% \use_arg_i_after_or:nw |
+% \use_arg_i_after_orelse:nw
% }
% \begin{syntax}
% "\use_arg_i_after_fi:nw" "{"<arg>"}" "\fi:"
% "\use_arg_i_after_else:nw" "{"<arg>"}" "\else:" <balanced text> "\fi:"
% "\use_arg_i_after_or:nw" "{"<arg>"}" "\or:" <balanced text> "\fi:"
+% "\use_arg_i_after_orelse:nw" "{"<arg>"}" "\or:/\else:" <balanced text> "\fi:"
% \end{syntax}
-% Executes <arg> after executing closing out "\fi:".
+% Executes <arg> after executing closing out
+% "\fi:". "\use_arg_i_after_orelse:nw" can be used anywhere where
+% "\use_arg_i_after_else:nw" or "\use_arg_i_after_or:nw" are used.
% \end{function}
%
% \subsection{Internal functions}
@@ -1089,9 +1090,9 @@
%
% \subsection{Engine specific definitions}
%
-% \begin{function}{\engine_aleph:TF}
+% \begin{function}{\engine_if_aleph:TF}
% \begin{syntax}
-% "\engine_aleph:TF" "{"<true code>"}" "{"<false code>"}"
+% "\engine_if_aleph:TF" "{"<true code>"}" "{"<false code>"}"
% \end{syntax}
% This function detects if we're running an Aleph based format. This
% is particularly useful when allocating registers.
@@ -1119,6 +1120,8 @@
% in terms of csname usage, an alternative scheme would be to just use
% the ``tex\ldots D'' name in the cases where no good alternative exists.}
% \begin{macrocode}
+%<package>\ProvidesExplPackage
+%<package> {\filename}{\filedate}{\fileversion}{\filedescription}
%<*initex|package>
\tex_let:D \let:NwN \tex_let:D
% \end{macrocode}
@@ -2264,6 +2267,8 @@
\def_long_new:Npn \def_test_function_aux:Nnnn #1#2#3#4{
#1 {#2TF} #3 {#4
\exp_after:NN\use_arg_i:nn\else:\exp_after:NN\use_arg_ii:nn\fi:}
+ #1 {#2FT} #3 {#4
+ \exp_after:NN\use_arg_ii:nn\else:\exp_after:NN\use_arg_i:nn\fi:}
#1 {#2T} #3 {#4
\else:\exp_after:NN\use_none:nn\fi:\use_arg_i:n}
#1 {#2F} #3 {#4
@@ -2271,6 +2276,8 @@
\def_long_new:Npn \def_test_function_aux:Nnnx #1#2#3#4{
#1 {#2TF} #3 {#4
\exp_not:n{\exp_after:NN\use_arg_i:nn\else:\exp_after:NN\use_arg_ii:nn\fi:}}
+ #1 {#2FT} #3 {#4
+ \exp_not:n{\exp_after:NN\use_arg_ii:nn\else:\exp_after:NN\use_arg_i:nn\fi:}}
#1 {#2T} #3 {#4
\exp_not:n{\else:\exp_after:NN\use_none:nn\fi:\use_arg_i:n}}
#1 {#2F} #3 {#4
@@ -2414,10 +2421,10 @@
%
% \subsubsection{Engine specific definitions}
%
-% \begin{macro}{\engine_aleph:TF}
+% \begin{macro}{\engine_if_aleph:TF}
% In some cases it will be useful to know which engine we're running.
% \begin{macrocode}
-\def_test_function_new:npn {engine_aleph:}{\if_cs_exist:N \aleph_textdir:D}
+\def_test_function_new:npn {engine_if_aleph:}{\if_cs_exist:N \aleph_textdir:D}
% \end{macrocode}
% \end{macro}
%
@@ -2529,15 +2536,18 @@
% \begin{macro}{\use_arg_i_after_fi:nw}
% \begin{macro}{\use_arg_i_after_else:nw}
% \begin{macro}{\use_arg_i_after_or:nw}
+% \begin{macro}{\use_arg_i_after_or:nw}
% Returns the first argument after ending the conditional.
% \begin{macrocode}
\def_long_new:Npn \use_arg_i_after_fi:nw #1\fi:{\fi: #1}
\def_long_new:Npn \use_arg_i_after_else:nw #1\else:#2\fi:{\fi: #1}
-\def_long_new:Npn \use_arg_i_after_or:nw #1\or: #2\fi: {\or:\fi:#1}
+\def_long_new:Npn \use_arg_i_after_or:nw #1\or: #2\fi: {\fi:#1}
+\def_long_new:Npn \use_arg_i_after_orelse:nw #1 #2#3\fi: {\fi:#1}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \subsubsection{Gobbling tokens from input}
%
diff --git a/Master/texmf-dist/source/latex/expl3/l3box.dtx b/Master/texmf-dist/source/latex/expl3/l3box.dtx
index 96e0d4696a8..c697225b8b3 100644
--- a/Master/texmf-dist/source/latex/expl3/l3box.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3box.dtx
@@ -1,5 +1,5 @@
% \iffalse
-%% File: l3box.dtx Copyright (C) 2005-2006 LaTeX3 project
+%% File: l3box.dtx Copyright (C) 2005-2007 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
@@ -32,26 +32,21 @@
%%
%% -----------------------------------------------------------------------
%
-%<package>\RequirePackage{l3names}
-%<*dtx>
+%<*driver|package>
+\RequirePackage{l3names}
+%</driver|package>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-}
-%\iffalse
-%</dtx>
-%\fi
-\GetIdInfo$Id: l3box.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3box.dtx 718 2007-12-16 22:59:58Z morten $
{L3 Experimental Box module}
-%
-% \iffalse
+%\iffalse
%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
-
\begin{document}
-\DocInput{l3box.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
% \fi
@@ -109,6 +104,8 @@
% \end{function}
%
% \begin{function}{%
+% \box_if_empty_p:N |
+% \box_if_empty_p:c |
% \box_if_empty:NTF |
% \box_if_empty:cTF |
% \box_if_empty:NT |
@@ -155,16 +152,16 @@
%
%
% \begin{function}{%
-% \box_set_to_previous:N |
-% \box_set_to_previous:c |
-% \box_gset_to_previous:N |
-% \box_gset_to_previous:c |
+% \box_set_to_last:N |
+% \box_set_to_last:c |
+% \box_gset_to_last:N |
+% \box_gset_to_last:c |
% }
% \begin{syntax}
-% "\box_set_to_previous:N" <box>
+% "\box_set_to_last:N" <box>
% \end{syntax}
-% Sets <box> equal to the previous box |\R_previous_box| and removes
-% |\R_previous_box| from the current list (unless in outer vertical
+% Sets <box> equal to the previous box |\R_last_box| and removes
+% |\R_last_box| from the current list (unless in outer vertical
% or math mode).
% \end{function}
%
@@ -261,11 +258,11 @@
%
%
% \begin{variable}{%
-% \R_previous_box |
+% \R_last_box |
% }
% \begin{syntax}
% \end{syntax}
-% "\R_previous_box" is a read-only box register. You can set other
+% "\R_last_box" is a read-only box register. You can set other
% boxes to this box, which will then be removed from the current
% list.
% \end{variable}
@@ -322,8 +319,10 @@
%
% \begin{function}{%
% \hbox_set_inline_begin:N |
+% \hbox_set_inline_begin:c |
% \hbox_set_inline_end: |
% \hbox_gset_inline_begin:N |
+% \hbox_gset_inline_begin:c |
% \hbox_gset_inline_end: |
% }
% \begin{syntax}
@@ -454,9 +453,11 @@
% \subsection{The Implementation}
%
%
-% We start by ensuring that the required packages are loaded.
+% Announce and ensure that the required packages are loaded.
% \begin{macrocode}
-%<package&!check>\RequirePackage{l3prg}\par
+%<package>\ProvidesExplPackage
+%<package> {\filename}{\filedate}{\fileversion}{\filedescription}
+%<package&!check>\RequirePackage{l3prg,l3token}\par
%<package&check>\RequirePackage{l3chk}\par
%<*initex|package>
% \end{macrocode}
@@ -507,6 +508,8 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\box_if_empty_p:N}
+% \begin{macro}{\box_if_empty_p:c}
% \begin{macro}{\box_if_empty:NTF}
% \begin{macro}{\box_if_empty:cTF}
% \begin{macro}{\box_if_empty:NT}
@@ -515,6 +518,9 @@
% \begin{macro}{\box_if_empty:cF}
% Testing if a \m{box} is empty/void.
% \begin{macrocode}
+\def_new:Npn \box_if_empty_p:N #1{
+ \if_box_empty:N #1 \c_true \else: \c_false \fi:}
+\def_new:Npn \box_if_empty_p:c {\exp_args:Nc \box_if_empty_p:N}
\def_test_function_new:npn {box_if_empty:N}#1{\if_box_empty:N #1}
\def_new:Npn \box_if_empty:cTF {\exp_args:Nc \box_if_empty:NTF}
\def_new:Npn \box_if_empty:cT {\exp_args:Nc \box_if_empty:NT}
@@ -526,6 +532,8 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
%
% \begin{macro}{\box_set_eq:NN}
@@ -561,23 +569,23 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\R_previous_box}
+% \begin{macro}{\R_last_box}
% A different name for this read-only primitive.
% \begin{macrocode}
-\let_new:NN \R_previous_box \tex_lastbox:D
+\let_new:NN \R_last_box \tex_lastbox:D
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\box_set_to_previous:N}
-% \begin{macro}{\box_set_to_previous:c}
-% \begin{macro}{\box_gset_to_previous:N}
-% \begin{macro}{\box_gset_to_previous:c}
+% \begin{macro}{\box_set_to_last:N}
+% \begin{macro}{\box_set_to_last:c}
+% \begin{macro}{\box_gset_to_last:N}
+% \begin{macro}{\box_gset_to_last:c}
% Set a box to the previous box.
% \begin{macrocode}
-\def_new:Npn \box_set_to_previous:N #1{\tex_setbox:D#1\R_previous_box}
-\def_new:Npn \box_set_to_previous:c {\exp_args:Nc \box_set_to_previous:N}
-\def_new:Npn \box_gset_to_previous:N {\pref_global:D \box_set_to_previous:N}
-\def_new:Npn \box_gset_to_previous:c {\exp_args:Nc \box_gset_to_previous:N}
+\def_new:Npn \box_set_to_last:N #1{\tex_setbox:D#1\R_last_box}
+\def_new:Npn \box_set_to_last:c {\exp_args:Nc \box_set_to_last:N}
+\def_new:Npn \box_gset_to_last:N {\pref_global:D \box_set_to_last:N}
+\def_new:Npn \box_gset_to_last:c {\exp_args:Nc \box_gset_to_last:N}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -835,23 +843,31 @@
%
%
% \begin{macro}{\hbox_set_inline_begin:N}
+% \begin{macro}{\hbox_set_inline_begin:c}
% \begin{macro}{\hbox_set_inline_end:}
% \begin{macro}{\hbox_gset_inline_begin:N}
+% \begin{macro}{\hbox_gset_inline_begin:c}
% \begin{macro}{\hbox_set_inline_end:}
% Storing material in a horizontal box. This type is useful in
% environment definitions.
% \begin{macrocode}
\def_new:Npn \hbox_set_inline_begin:N #1 {
\tex_setbox:D #1 \tex_hbox:D \c_group_begin_token }
+\def:Npn \hbox_set_inline_begin:c {\exp_args:Nc
+ \hbox_set_inline_begin:N}
\let_new:NN \hbox_set_inline_end: \c_group_end_token
\def_new:Npn \hbox_gset_inline_begin:N {
\pref_global:D \hbox_set_inline_begin:N }
+\def:Npn \hbox_gset_inline_begin:c {\exp_args:Nc
+ \hbox_gset_inline_begin:N }
\let_new:NN \hbox_gset_inline_end: \c_group_end_token
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\hbox_to_wd:nn}
% \begin{macro}{\hbox_to_zero:n}
diff --git a/Master/texmf-dist/source/latex/expl3/l3calc.dtx b/Master/texmf-dist/source/latex/expl3/l3calc.dtx
index f00c2941940..842e68864c7 100644
--- a/Master/texmf-dist/source/latex/expl3/l3calc.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3calc.dtx
@@ -31,25 +31,21 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-%<package>\RequirePackage{l3names}
-%<*dtx>
+%<*driver|package>
+\RequirePackage{l3names}
+%</driver|package>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-}
-%\iffalse
-%</dtx>
-%\fi
-\GetIdInfo$Id: l3calc.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3calc.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental calc module}
-% \iffalse
+%\iffalse
%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
-
\begin{document}
-\DocInput{l3calc.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
% \fi
@@ -70,14 +66,23 @@
% \begin{itemize}
% \item The calc expression is expanded fully, which means there are
% no problems with unfinished conditionals. However, the contents of
-% |\widthof| etc.\ is not expanded at all.
+% |\widthof| etc.\ is not expanded at all. This includes uses in
+% traditional \LaTeX\ as in the \textsf{array} package, which tries
+% to do an |\edef| several times. The code used in \textsf{l3calc}
+% provides self-protection for these cases.
% \item Muskip registers are supported although they can only be used
% in |\ratio| if already evaluating a muskip expression. For the
% other three register types, you can use points.
% \item All results are rounded, not truncated. More precisely, the
-% primitive \TeX\ operations |\divide| and |\multiply| are not used.
+% primitive \TeX\ operations |\divide| and |\multiply| are not
+% used. The only instance where one will observe an effect is when
+% dividing integers.
% \end{itemize}
%
+% This version of \textsf{l3calc} is a now a complete replacement for
+% the original \textsf{calc} package providing the same functionality
+% and will prevent the original \textsf{calc} package from loading.
+%
% \begin{function}{
% \calc_int_set:Nn |
% \calc_int_gset:Nn |
@@ -179,6 +184,8 @@
% We start by ensuring that the required packages are loaded.
% \begin{macrocode}
%<*package>
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\RequirePackage{l3int}
\RequirePackage{l3skip}
\RequirePackage{l3box}
@@ -246,39 +253,41 @@
%
%
%
-% \begin{macro}{\calc_assign_generic:NNNNNn}
+% \begin{macro}{\calc_assign_generic:NNNNnn}
% The generic function. |#1| is a number denoting which type we are
% doing. (0=int, 1=dim, 2=skip, 3=muskip), |#2| = temp register A,
% |#3| = temp register B, |#4| is a function acting on |#5| which is
-% the register to be set. |#6| is the calc expression. This version
-% relies on |\real| and |\ratio| having our definitions.
+% the register to be set. |#6| is the calc expression. We do a
+% little extra work so that |\real| and |\ratio| can still be used
+% by the user.
% \begin{macrocode}
-\def_long_new:Npn \calc_assign_generic:NNNNNn#1#2#3#4#5#6{
- \let:NN\g_calc_A_register#2\let:NN\l_calc_B_register#3
+\def_long_new:Npn \calc_assign_generic:NNNNnn#1#2#3#4#5#6{
+ \let:NN\g_calc_A_register#2
+ \let:NN\l_calc_B_register#3
\int_set:Nn \l_calc_current_type_int {#1}
- \tlp_set:Nx\l_calc_expression_tlp{#6}
- \exp_after:NN\calc_open:w\exp_after:NN(\l_calc_expression_tlp!
+ \group_begin:
+ \let:NN \real \calc_real:n
+ \let:NN \ratio\calc_ratio:nn
+ \tlp_set:Nx\l_calc_expression_tlp{#6}
+ \exp_after:NN
+ \group_end:
+ \exp_after:NN\calc_open:w\exp_after:NN(\l_calc_expression_tlp !
\pref_global:D\g_calc_A_register\l_calc_B_register
\group_end:
- #4#5\l_calc_B_register
+ #4{#5}\l_calc_B_register
}
% \end{macrocode}
-% One could lift these restrictions by defining |\calc_generic:NNNNNn|
-% like this:
+% A simpler version relying on |\real| and |\ratio| having our
+% definition is
% \begin{verbatim}
-% \def_long_new:Npn \calc_assign_generic:NNNNNn#1#2#3#4#5#6{
+% \def_long_new:Npn \calc_assign_generic:NNNNnn#1#2#3#4#5#6{
% \let:NN\g_calc_A_register#2\let:NN\l_calc_B_register#3
% \int_set:Nn \l_calc_current_type_int {#1}
-% \group_begin:
-% \let:NN \real\calc_real:n
-% \let:NN \ratio\calc_ratio:nn
-% \tlp_set:Nx\l_calc_expression_tlp{#6}
-% \exp_after:NN
-% \group_end:
-% \exp_after:NN\calc_open:w\exp_after:NN(\l_calc_expression_tlp!
+% \tlp_set:Nx\l_calc_expression_tlp{#6}
+% \exp_after:NN\calc_open:w\exp_after:NN(\l_calc_expression_tlp !
% \pref_global:D\g_calc_A_register\l_calc_B_register
% \group_end:
-% #4#5\l_calc_B_register
+% #4{#5}\l_calc_B_register
% }
% \end{verbatim}
% \end{macro}
@@ -295,22 +304,22 @@
% types. First integer registers.
% \begin{macrocode}
\def_new:Npn\calc_int_set:Nn{
- \calc_assign_generic:NNNNNn\c_zero\g_calc_A_int\l_calc_B_int\int_set:Nn
+ \calc_assign_generic:NNNNnn\c_zero\g_calc_A_int\l_calc_B_int\int_set:Nn
}
\def_new:Npn\calc_int_gset:Nn{
- \calc_assign_generic:NNNNNn\c_zero\g_calc_A_int\l_calc_B_int\int_gset:Nn
+ \calc_assign_generic:NNNNnn\c_zero\g_calc_A_int\l_calc_B_int\int_gset:Nn
}
\def_new:Npn\calc_int_add:Nn{
- \calc_assign_generic:NNNNNn\c_zero\g_calc_A_int\l_calc_B_int\int_add:Nn
+ \calc_assign_generic:NNNNnn\c_zero\g_calc_A_int\l_calc_B_int\int_add:Nn
}
\def_new:Npn\calc_int_gadd:Nn{
- \calc_assign_generic:NNNNNn\c_zero\g_calc_A_int\l_calc_B_int\int_gadd:Nn
+ \calc_assign_generic:NNNNnn\c_zero\g_calc_A_int\l_calc_B_int\int_gadd:Nn
}
\def_new:Npn\calc_int_sub:Nn{
- \calc_assign_generic:NNNNNn\c_zero\g_calc_A_int\l_calc_B_int\int_sub:Nn
+ \calc_assign_generic:NNNNnn\c_zero\g_calc_A_int\l_calc_B_int\int_sub:Nn
}
\def_new:Npn\calc_int_gsub:Nn{
- \calc_assign_generic:NNNNNn\c_zero\g_calc_A_int\l_calc_B_int\int_gsub:Nn
+ \calc_assign_generic:NNNNnn\c_zero\g_calc_A_int\l_calc_B_int\int_gsub:Nn
}
% \end{macrocode}
% \end{macro}
@@ -329,22 +338,22 @@
% Dimens.
% \begin{macrocode}
\def_new:Npn\calc_dim_set:Nn{
- \calc_assign_generic:NNNNNn\c_one\g_calc_A_dim\l_calc_B_dim\dim_set:Nn
+ \calc_assign_generic:NNNNnn\c_one\g_calc_A_dim\l_calc_B_dim\dim_set:Nn
}
\def_new:Npn\calc_dim_gset:Nn{
- \calc_assign_generic:NNNNNn\c_one\g_calc_A_dim\l_calc_B_dim\dim_gset:Nn
+ \calc_assign_generic:NNNNnn\c_one\g_calc_A_dim\l_calc_B_dim\dim_gset:Nn
}
\def_new:Npn\calc_dim_add:Nn{
- \calc_assign_generic:NNNNNn\c_one\g_calc_A_dim\l_calc_B_dim\dim_add:Nn
+ \calc_assign_generic:NNNNnn\c_one\g_calc_A_dim\l_calc_B_dim\dim_add:Nn
}
\def_new:Npn\calc_dim_gadd:Nn{
- \calc_assign_generic:NNNNNn\c_one\g_calc_A_dim\l_calc_B_dim\dim_gadd:Nn
+ \calc_assign_generic:NNNNnn\c_one\g_calc_A_dim\l_calc_B_dim\dim_gadd:Nn
}
\def_new:Npn\calc_dim_sub:Nn{
- \calc_assign_generic:NNNNNn\c_one\g_calc_A_int\l_calc_B_int\dim_sub:Nn
+ \calc_assign_generic:NNNNnn\c_one\g_calc_A_int\l_calc_B_int\dim_sub:Nn
}
\def_new:Npn\calc_dim_gsub:Nn{
- \calc_assign_generic:NNNNNn\c_one\g_calc_A_int\l_calc_B_int\dim_gsub:Nn
+ \calc_assign_generic:NNNNnn\c_one\g_calc_A_int\l_calc_B_int\dim_gsub:Nn
}
% \end{macrocode}
% \end{macro}
@@ -363,22 +372,22 @@
% Skips.
% \begin{macrocode}
\def_new:Npn\calc_skip_set:Nn{
- \calc_assign_generic:NNNNNn\c_two\g_calc_A_dim\l_calc_B_dim\skip_set:Nn
+ \calc_assign_generic:NNNNnn\c_two\g_calc_A_skip\l_calc_B_skip\skip_set:Nn
}
\def_new:Npn\calc_skip_gset:Nn{
- \calc_assign_generic:NNNNNn\c_two\g_calc_A_dim\l_calc_B_dim\skip_gset:Nn
+ \calc_assign_generic:NNNNnn\c_two\g_calc_A_skip\l_calc_B_skip\skip_gset:Nn
}
\def_new:Npn\calc_skip_add:Nn{
- \calc_assign_generic:NNNNNn\c_two\g_calc_A_dim\l_calc_B_dim\skip_add:Nn
+ \calc_assign_generic:NNNNnn\c_two\g_calc_A_skip\l_calc_B_skip\skip_add:Nn
}
\def_new:Npn\calc_skip_gadd:Nn{
- \calc_assign_generic:NNNNNn\c_two\g_calc_A_dim\l_calc_B_dim\skip_gadd:Nn
+ \calc_assign_generic:NNNNnn\c_two\g_calc_A_skip\l_calc_B_skip\skip_gadd:Nn
}
\def_new:Npn\calc_skip_sub:Nn{
- \calc_assign_generic:NNNNNn\c_two\g_calc_A_dim\l_calc_B_dim\skip_sub:Nn
+ \calc_assign_generic:NNNNnn\c_two\g_calc_A_skip\l_calc_B_skip\skip_sub:Nn
}
\def_new:Npn\calc_skip_gsub:Nn{
- \calc_assign_generic:NNNNNn\c_two\g_calc_A_dim\l_calc_B_dim\skip_gsub:Nn
+ \calc_assign_generic:NNNNnn\c_two\g_calc_A_skip\l_calc_B_skip\skip_gsub:Nn
}
% \end{macrocode}
% \end{macro}
@@ -397,22 +406,28 @@
% Muskips.
% \begin{macrocode}
\def_new:Npn\calc_muskip_set:Nn{
- \calc_assign_generic:NNNNNn\c_three\g_calc_A_dim\l_calc_B_dim\muskip_set:Nn
+ \calc_assign_generic:NNNNnn\c_three\g_calc_A_muskip\l_calc_B_muskip
+ \muskip_set:Nn
}
\def_new:Npn\calc_muskip_gset:Nn{
- \calc_assign_generic:NNNNNn\c_three\g_calc_A_dim\l_calc_B_dim\muskip_gset:Nn
+ \calc_assign_generic:NNNNnn\c_three\g_calc_A_muskip\l_calc_B_muskip
+ \muskip_gset:Nn
}
\def_new:Npn\calc_muskip_add:Nn{
- \calc_assign_generic:NNNNNn\c_three\g_calc_A_dim\l_calc_B_dim\muskip_add:Nn
+ \calc_assign_generic:NNNNnn\c_three\g_calc_A_muskip\l_calc_B_muskip
+ \muskip_add:Nn
}
\def_new:Npn\calc_muskip_gadd:Nn{
- \calc_assign_generic:NNNNNn\c_three\g_calc_A_dim\l_calc_B_dim\muskip_gadd:Nn
+ \calc_assign_generic:NNNNnn\c_three\g_calc_A_muskip\l_calc_B_muskip
+ \muskip_gadd:Nn
}
\def_new:Npn\calc_muskip_sub:Nn{
- \calc_assign_generic:NNNNNn\c_three\g_calc_A_dim\l_calc_B_dim\muskip_add:Nn
+ \calc_assign_generic:NNNNnn\c_three\g_calc_A_muskip\l_calc_B_muskip
+ \muskip_add:Nn
}
\def_new:Npn\calc_muskip_gsub:Nn{
- \calc_assign_generic:NNNNNn\c_three\g_calc_A_dim\l_calc_B_dim\muskip_gadd:Nn
+ \calc_assign_generic:NNNNnn\c_three\g_calc_A_muskip\l_calc_B_muskip
+ \muskip_gadd:Nn
}
% \end{macrocode}
% \end{macro}
@@ -485,13 +500,16 @@
\if_meaning:NN#1*\let:NN\calc_next:w\calc_multiply:N \else:
\if_meaning:NN#1/\let:NN\calc_next:w\calc_divide:N \else:
\if_meaning:NN#1)\let:NN\calc_next:w\calc_close: \else:
+ \if_meaning:NN#1\scan_stop:\let:NN\calc_next:w\calc_post_scan:N
+ \else:
% \end{macrocode}
% If we get here, there is an error but let's also disable
% |\calc_next:w| since it is otherwise undefined. No need to give
% extra errors just for that.
% \begin{macrocode}
- \let:NN \calc_next:w \scan_stop:
- \calc_error:N#1
+ \let:NN \calc_next:w \use_noop:
+ \calc_error:N#1
+ \fi:
\fi:
\fi:
\fi:
@@ -600,6 +618,7 @@
\group_begin:
\let:NN\g_calc_A_register\g_calc_A_int
\let:NN\l_calc_B_register\l_calc_B_int
+ \int_zero:N \l_calc_current_type_int
\group_execute_after:N#1\calc_pre_scan:N
}
\def_new:Npn\calc_multiply_B_by_A:{
@@ -655,10 +674,10 @@
% \begin{macrocode}
\def_protected_long:Npn \calc_textsize:Nn#1#2{
\group_begin:
- \let:NN\widthof\box_wd:N
- \let:NN\heightof\box_ht:N
- \let:NN\depthof\box_dp:N
- \def:Npn\totalheightof{\box_ht:N\box_dp:N}
+ \let:NN\calc_widthof_aux:n\box_wd:N
+ \let:NN\calc_heightof_aux:n\box_ht:N
+ \let:NN\calc_depthof_aux:n\box_dp:N
+ \def:Npn\calc_totalheightof_aux:n{\box_ht:N\box_dp:N}
\exp_args:No\calc_calculate_box_size:nnn{#1}
{\dim_gset:Nn\g_calc_A_register}
% \end{macrocode}
@@ -666,10 +685,10 @@
% call.
% \begin{macrocode}
{
- \let:NN \depthof\calc_depthof:n
- \let:NN \widthof\calc_widthof:n
- \let:NN \heightof\calc_heightof:n
- \let:NN \totalheightof\calc_totalheightof:n
+ \let:NN \calc_depthof_aux:n \calc_depthof_auxi:n
+ \let:NN \calc_widthof_aux:n \calc_widthof_auxi:n
+ \let:NN \calc_heightof_aux:n \calc_heightof_auxi:n
+ \let:NN \calc_totalheightof_aux:n \calc_totalheightof_auxi:n
#2
}
\group_end:
@@ -845,8 +864,8 @@
\def_long_new:Npn \calc_minof:nn#1#2{
\calc_maxmin_operation:Nnn < \exp_not:n{{#1}{#2}}
}
-\let_new:NN \maxof \calc_maxof:nn
-\let_new:NN \minof \calc_minof:nn
+\let:NN \maxof \calc_maxof:nn
+\let:NN \minof \calc_minof:nn
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -854,31 +873,47 @@
% \end{macro}
%
% \begin{macro}{\calc_widthof:n}
+% \begin{macro}{\calc_widthof_aux:n}
+% \begin{macro}{\calc_widthof_auxi:n}
% \begin{macro}{\calc_heightof:n}
+% \begin{macro}{\calc_heightof_aux:n}
+% \begin{macro}{\calc_heightof_auxi:n}
% \begin{macro}{\calc_depthof:n}
+% \begin{macro}{\calc_depthof_aux:n}
+% \begin{macro}{\calc_depthof_auxi:n}
% \begin{macro}{\calc_totalheightof:n}
-% \begin{macro}{\widthof}
-% \begin{macro}{\heightof}
-% \begin{macro}{\depthof}
-% \begin{macro}{\totalheightof}
+% \begin{macro}{\calc_totalheightof_aux:n}
+% \begin{macro}{\calc_totalheightof_auxi:n}
% Text dimension commands.
% \begin{macrocode}
\def_long_new:Npn \calc_widthof:n#1{
- \calc_textsize:Nn \exp_not:N\widthof\exp_not:n{{#1}}
+ \calc_textsize:Nn \exp_not:N\calc_widthof_aux:n\exp_not:n{{#1}}
}
\def_long_new:Npn \calc_heightof:n#1{
- \calc_textsize:Nn \exp_not:N\heightof\exp_not:n{{#1}}
+ \calc_textsize:Nn \exp_not:N\calc_heightof_aux:n\exp_not:n{{#1}}
}
\def_long_new:Npn \calc_depthof:n#1{
- \calc_textsize:Nn \exp_not:N\depthof\exp_not:n{{#1}}
+ \calc_textsize:Nn \exp_not:N\calc_depthof_aux:n\exp_not:n{{#1}}
}
\def_long_new:Npn \calc_totalheightof:n#1{
- \calc_textsize:Nn \exp_not:N\totalheightof\exp_not:n{{#1}}
+ \calc_textsize:Nn \exp_not:N\calc_totalheightof_aux:n \exp_not:n{{#1}}
}
-\let:NN \depthof\calc_depthof:n
-\let:NN \widthof\calc_widthof:n
-\let:NN \heightof\calc_heightof:n
-\let:NN \totalheightof\calc_totalheightof:n
+\def_long_new:Npn \calc_widthof_aux:n #1{
+ \exp_not:N\calc_widthof_aux:n\exp_not:n{{#1}}
+}
+\let_new:NN \calc_widthof_auxi:n \calc_widthof_aux:n
+\def_long_new:Npn \calc_depthof_aux:n #1{
+ \exp_not:N\calc_depthof_aux:n\exp_not:n{{#1}}
+}
+\let_new:NN \calc_depthof_auxi:n \calc_depthof_aux:n
+\def_long_new:Npn \calc_heightof_aux:n #1{
+ \exp_not:N\calc_heightof_aux:n\exp_not:n{{#1}}
+}
+\let_new:NN \calc_heightof_auxi:n \calc_heightof_aux:n
+\def_long_new:Npn \calc_totalheightof_aux:n #1{
+ \exp_not:N\calc_totalheightof_aux:n\exp_not:n{{#1}}
+}
+\let_new:NN \calc_totalheightof_auxi:n \calc_totalheightof_aux:n
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -888,25 +923,119 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\calc_ratio:nn}
% \begin{macro}{\calc_real:n}
-% \begin{macro}{\ratio}
-% \begin{macro}{\real}
% Ratio and real.
% \begin{macrocode}
\def_long_new:Npn \calc_ratio:nn#1#2{
\calc_ratio_multiply:nn\exp_not:n{{#1}{#2}}}
-\let_new:NN \calc_real:n \calc_real_evaluate:nn
+\def_new:Npn \calc_real:n {\calc_real_evaluate:nn}
% \end{macrocode}
% We can implement real and ratio without actually using these
% names. We'll see.
% \begin{macrocode}
-\let_new:NN \ratio\calc_ratio:nn
-\let_new:NN \real\calc_real:n
% \end{macrocode}
% \end{macro}
% \end{macro}
+%
+% \begin{macro}{\widthof}
+% \begin{macro}{\heightof}
+% \begin{macro}{\depthof}
+% \begin{macro}{\totalheightof}
+% \begin{macro}{\ratio}
+% \begin{macro}{\real}
+% User commands.
+% \begin{macrocode}
+\let:NN \depthof\calc_depthof:n
+\let:NN \widthof\calc_widthof:n
+\let:NN \heightof\calc_heightof:n
+\let:NN \totalheightof\calc_totalheightof:n
+%%\let:NN \ratio\calc_ratio:nn
+%%\let:NN \real\calc_real:n
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\setlength}
+% \begin{macro}{\gsetlength}
+% \begin{macro}{\addtolength}
+% \begin{macro}{\gaddtolength}
+% \begin{macrocode}
+\def_protected:Npn \setlength{\calc_skip_set:Nn}
+\def_protected:Npn \gsetlength{\calc_skip_gset:Nn}
+\def_protected:Npn \addtolength{\calc_skip_add:Nn}
+\def_protected:Npn \gaddtolength{\calc_skip_gadd:Nn}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\calc_setcounter:nn}
+% \begin{macro}{\calc_addtocounter:nn}
+% \begin{macro}{\calc_stepcounter:n}
+% \begin{macro}{\setcounter}
+% \begin{macro}{\addtocounter}
+% \begin{macro}{\stepcounter}
+% \begin{macro}{\calc_chk_document_counter:nn}
+% Document commands for \LaTeXe\ counters. Also add support for
+% \textsf{amstext}. Note that when \textsf{l3breqn} is used,
+% |\mathchoice| will no longer need this switch as the argument is
+% only executed once.
+% \begin{macrocode}
+\newif\iffirstchoice@ \firstchoice@true
+\def_protected:Npn \calc_setcounter:nn#1#2{
+ \calc_chk_document_counter:nn{#1}{
+ \exp_args:Nc\calc_int_gset:Nn {c@#1}{#2}
+ }
+}
+\def_protected:Npn \calc_addtocounter:nn#1#2{
+ \iffirstchoice@
+ \calc_chk_document_counter:nn{#1}{
+ \exp_args:Nc\calc_int_gadd:Nn {c@#1}{#2}
+ }
+ \fi:
+}
+\def_protected:Npn \calc_stepcounter:n#1{
+ \iffirstchoice@
+ \calc_chk_document_counter:nn{#1}{
+ \int_gincr:c {c@#1}
+ \group_begin:
+ \let:NN \@elt\@stpelt \cs_use:c{cl@#1}
+ \group_end:
+ }
+ \fi:
+}
+\def_new:Npn \calc_chk_document_counter:nn#1{
+ \cs_if_free:cTF{c@#1}{\@nocounterr {#1}}
+}
+\let:NN \setcounter \calc_setcounter:nn
+\let:NN \addtocounter \calc_addtocounter:nn
+\let:NN \stepcounter \calc_stepcounter:n
+\AtBeginDocument{
+ \let:NN \setcounter \calc_setcounter:nn
+ \let:NN \addtocounter \calc_addtocounter:nn
+ \let:NN \stepcounter \calc_stepcounter:n
+}
+% \end{macrocode}
+% Prevent the usual \textsf{calc} from loading.
+% \begin{macrocode}
+%<package>\def:cpn{ver@calc.sty}{2005/08/06}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
% \end{macro}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/expl3/l3chk.dtx b/Master/texmf-dist/source/latex/expl3/l3chk.dtx
index f492a516903..281ba7bc1cc 100644
--- a/Master/texmf-dist/source/latex/expl3/l3chk.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3chk.dtx
@@ -32,25 +32,21 @@
%%
%% -----------------------------------------------------------------------
%%
-%<package>\RequirePackage{l3names}
-%<*dtx>
+%<*driver|package>
+\RequirePackage{l3names}
+%</driver|package>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-}
-%\iffalse
-%</dtx>
-%\fi
-\GetIdInfo$Id: l3chk.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3chk.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental check module}
-% \iffalse
+%\iffalse
%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
-
\begin{document}
-\DocInput{l3chk.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
% \fi
@@ -142,6 +138,8 @@
%
% We start by ensuring that the required packages are loaded.
% \begin{macrocode}
+%<package>\ProvidesExplPackage
+%<package> {\filename}{\filedate}{\fileversion}{\filedescription}
%<package>\RequirePackage{l3basics}
%<package>\RequirePackage{l3int,l3prg}
%<*initex|package>
diff --git a/Master/texmf-dist/source/latex/expl3/l3clist.dtx b/Master/texmf-dist/source/latex/expl3/l3clist.dtx
index f8fdba275bb..1bee2934399 100644
--- a/Master/texmf-dist/source/latex/expl3/l3clist.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3clist.dtx
@@ -32,25 +32,21 @@
%%
%% -----------------------------------------------------------------------
%
-%<package>\RequirePackage{l3names}
-%<*dtx>
+%<*driver|package>
+\RequirePackage{l3names}
+%</driver|package>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-}
-%\iffalse
-%</dtx>
-%\fi
-\GetIdInfo$Id: l3clist.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3clist.dtx 725 2007-12-22 21:25:00Z mittelba $
{L3 Experimental comma separated lists}
-%
-% \iffalse
+%\iffalse
%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
\begin{document}
-\DocInput{l3clist.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
% \fi
@@ -459,6 +455,8 @@
%
% We start by ensuring that the required packages are loaded.
% \begin{macrocode}
+%<package>\ProvidesExplPackage
+%<package> {\filename}{\filedate}{\fileversion}{\filedescription}
%<*package>
\NeedsTeXFormat{LaTeX2e}
%<!check>\RequirePackage{l3prg,l3quark}
@@ -693,7 +691,7 @@
% An here the global variants.
% \begin{macrocode}
\def_new:Npn \clist_gput_right:Nn {
- \clist_put_aux:NNnnNn \tlp_set:Nn \tlp_put_right:Nn , {}
+ \clist_put_aux:NNnnNn \tlp_gset:Nn \tlp_gput_right:Nn , {}
}
\def_new:Npn \clist_gput_right:No {\exp_args:NNo \clist_gput_right:Nn}
\def_new:Npn \clist_gput_right:cn {\exp_args:Nc \clist_gput_right:Nn}
@@ -720,13 +718,13 @@
\clist_if_empty:NF #1
{
\exp_after:NN \clist_map_function_aux:Nw
- \exp_after:NN #2 #1 , \q_nil , \q_stop
+ \exp_after:NN #2 #1 , \q_recursion_tail , \q_recursion_stop
}
}
\def_new:Npn \clist_map_function:cN{\exp_args:Nc\clist_map_function:NN}
\def_new:Npn \clist_map_function:nN #1#2{
- \tlist_if_empty:nF {#1}
- { \clist_map_function_aux:Nw #2 #1 , \q_nil , \q_stop }
+ \tlist_if_blank:nF {#1}
+ { \clist_map_function_aux:Nw #2 #1 , \q_recursion_tail , \q_recursion_stop }
}
% \end{macrocode}
% \end{macro}
@@ -739,7 +737,7 @@
% element "#2", which is surrounded by braces.
% \begin{macrocode}
\def_new:Npn \clist_map_function_aux:Nw #1#2,{
- \quark_if_nil:nT{#2} \clist_map_break:w
+ \quark_if_recursion_tail_stop:n{#2}
#1{#2}
\clist_map_function_aux:Nw #1
}
@@ -747,13 +745,10 @@
% \end{macro}
%
% \begin{macro}{\clist_map_break:w}
-% The break statement is easy: Just gobble everything op to the last
-% of the two stop markers "\q_stop" waiting at the end and close the
-% "\if_..." we're in. Technically this should get an "w" specifier,
-% but it doesn't take any arguments when you call it -- at least not
-% any you would expect.
+% The break statement is easy. Same as in other modules, gobble
+% everything up to the special recursion stop marker.
% \begin{macrocode}
-\let_new:NN \clist_map_break:w \use_none_delimit_by_q_stop:w
+\let_new:NN \clist_map_break:w \use_none_delimit_by_q_recursion_stop:w
% \end{macrocode}
% \end{macro}
%
@@ -782,7 +777,7 @@
% \begin{macrocode}
\exp_args:NcE \clist_map_function_aux:Nw
{clist_map_inline_ \int_use:N \l_clist_inline_level_int :n}
- #1 , \q_nil , \q_stop
+ #1 , \q_recursion_tail , \q_recursion_stop
\int_decr:N \l_clist_inline_level_int
}
}
@@ -795,7 +790,7 @@
##1{#2}
\exp_args:Nc \clist_map_function_aux:Nw
{clist_map_inline_ \int_use:N \l_clist_inline_level_int :n}
- #1 , \q_nil , \q_stop
+ #1 , \q_recursion_tail , \q_recursion_stop
\int_decr:N \l_clist_inline_level_int
}
}
@@ -814,7 +809,8 @@
\def_new:Npn \clist_map_variable:nNn #1#2#3{
\tlist_if_empty:nF{#1}
{
- \clist_map_variable_aux:Nnw #2 {#3} #1 , \q_nil , \q_stop
+ \clist_map_variable_aux:Nnw #2 {#3} #1
+ , \q_recursion_tail , \q_recursion_stop
}
}
\def_new:Npn \clist_map_variable:NNn {\exp_args:No \clist_map_variable:nNn}
@@ -831,7 +827,7 @@
% \begin{macrocode}
\def_new:Npn \clist_map_variable_aux:Nnw #1#2#3,{
\def:Npn #1{#3}
- \quark_if_nil:NT #1 \clist_map_break:w
+ \quark_if_recursion_tail_stop:N #1
#2 \clist_map_variable_aux:Nnw #1{#2}
}
% \end{macrocode}
@@ -923,7 +919,7 @@
\if_meaning:NN #1 \scan_stop:
% \end{macrocode}
% \dots\ if \m{clist} equals |\scan_stop:| it is probably stemming
-% from a |\cs:w ... \cd_end:| that was created by mistake somewhere.
+% from a |\cs:w ... \cs_end:| that was created by mistake somewhere.
% \begin{macrocode}
\err_latex_bug:x {Comma~list~ `\token_to_string:N #1'~
has~ an~ erroneous~ structure!}
diff --git a/Master/texmf-dist/source/latex/expl3/l3expan.dtx b/Master/texmf-dist/source/latex/expl3/l3expan.dtx
index 8eaac134482..1efadb1dab3 100644
--- a/Master/texmf-dist/source/latex/expl3/l3expan.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3expan.dtx
@@ -32,26 +32,21 @@
%%
%% -----------------------------------------------------------------------
%
-%<package>\RequirePackage{l3names}
-%<*dtx>
+%<*driver|package>
+\RequirePackage{l3names}
+%</driver|package>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-}
-%\iffalse
-%</dtx>
-%\fi
-\GetIdInfo$Id: l3expan.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3expan.dtx 735 2008-01-14 22:31:02Z morten $
{L3 Experimental Argument Expansion module}
-%
-% \iffalse
+%\iffalse
%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
-
\begin{document}
-\DocInput{l3expan.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
% \fi
@@ -167,7 +162,8 @@
% functions is postponed until later.
% \begin{description}
% \item[d] This is pretty much like the |o| type except the token list
-% get's expanded twice before being passed on. (|d| is for double)
+% get's expanded twice before being passed on. (|d| is for double.)
+% It is often useful in conjunction with a forced expansion.
%
% \item[E] Sometimes you need to unpack a token list or something else
% but you don't want it to add the braces that the |o| type
@@ -279,6 +275,20 @@
% "c", "N", "O", "o" or "f" in the last position) whenever possible.
% \end{itemize}
%
+%
+% When pdf\TeX\ 1.50 arrives, it will contain a primitive for
+% performing the equivalent of an "x" expansion after only one
+% expansion and most importantly: as an expandable operation.
+% \begin{function}{%
+% \exp_arg:x
+% }
+% \begin{syntax}
+% " \exp_arg:x" "{" <arg> "}"
+% \end{syntax}
+% <arg> is expanded fully using an "x" expansion.
+% \end{function}
+%
+%
% \subsection{Manipulating the first argument}
%
% \begin{function}{%
@@ -449,13 +459,15 @@
% \end{function}
%
%
-% \begin{function}{\exp_not:o}
+% \begin{function}{\exp_not:o |
+% \exp_not:d |
+% \exp_not:f}
% \begin{syntax}
% "\exp_not:o" "{"<token list>"}"
% \end{syntax}
-% Same as "\exp_not:n" except <token list> is expanded once and the
-% result of this expansion is then prohibited from being expanded
-% further.
+% Same as "\exp_not:n" except <token list> is expanded once for the
+% "o" type and twice for the "d" type and the result of this expansion
+% is then prohibited from being expanded further.
% \end{function}
%
% \begin{function}{\exp_not:E}
@@ -474,6 +486,28 @@
% \end{function}
%
%
+% \begin{function}{\exp_stop_f: }
+% \begin{syntax}
+% <f expansion> ... "\exp_stop_f:"
+% \end{syntax}
+% This function stops an "f" type expansion. An example use is one such as
+% \begin{verbatim}
+% \tlp_set:Nf \l_tmpa_tlp {
+% \if_case:w \l_tmpa_int
+% \or: \use_arg_i_after_orelse:nw{\exp_stop_f: \textbullet}
+% \or: \use_arg_i_after_orelse:nw{\exp_stop_f: \textendash}
+% \else: \use_arg_i_after_orelse:nw{\exp_stop_f: else-item}
+% \fi:
+% }
+% \end{verbatim}
+% This ensures the expansion in stopped right after finishing the
+% conditional but without expanding "\textbullet" etc.
+% \begin{texnote}
+% This function is a space token but it is better to distinguish
+% this expansion stopping token from a desired space token when
+% writing code.
+% \end{texnote}
+% \end{function}
%
%
% \begin{variable}{\l_exp_tlp | }
@@ -489,6 +523,8 @@
%
% We start by ensuring that the required packages are loaded.
% \begin{macrocode}
+%<package>\ProvidesExplPackage
+%<package> {\filename}{\filedate}{\fileversion}{\filedescription}
%<package>\RequirePackage{l3tlp}
%<*initex|package>
% \end{macrocode}
@@ -515,12 +551,14 @@
% \end{macrocode}
% \end{macro}
%
-% This code uses internal functions with names that start with |\::|
-% to perform the expansions.
+% This code uses internal functions with names that start with |\::|
+% to perform the expansions. All macros are |long| as this turned out
+% to be desirable since the tokens undergoing expansion may be
+% arbitrary user input.
% \begin{macro}{\exp_arg_next:nnn}
% This is basically the same function as |\Dexp_arg_next:nnn|.
% \begin{macrocode}
-\def_new:Npn\exp_arg_next:nnn#1#2#3{
+\def_long_new:Npn\exp_arg_next:nnn#1#2#3{
#2\:::{#3#1}
}
% \end{macrocode}
@@ -530,7 +568,7 @@
% This function is used to skip an argument that doesn't need to
% be expanded.
% \begin{macrocode}
-\def_new:Npn\::n#1\:::#2#3{
+\def_long_new:Npn\::n#1\:::#2#3{
#1\:::{#2{#3}}
}
% \end{macrocode}
@@ -541,7 +579,7 @@
% single token and doesn't need to be expanded.
%^^A was \let_new:NN\::N\::n (changed to match \;N above.
% \begin{macrocode}
-\def_new:Npn\::N#1\:::#2#3{
+\def_long_new:Npn\::N#1\:::#2#3{
#1\:::{#2#3}
}
% \end{macrocode}
@@ -551,7 +589,7 @@
% This function is used to skip an argument that is turned into
% as control sequence without expansion.
% \begin{macrocode}
-\def_new:Npn\::c#1\:::#2#3{
+\def_long_new:Npn\::c#1\:::#2#3{
\exp_after:NN\exp_arg_next:nnn\cs:w #3\cs_end:{#1}{#2}
}
% \end{macrocode}
@@ -560,7 +598,7 @@
% \begin{macro}{\::o}
% This function is used to expand an argument once.
% \begin{macrocode}
-\def_new:Npn\::o#1\:::#2#3{
+\def_long_new:Npn\::o#1\:::#2#3{
\exp_after:NN\exp_arg_next:nnn\exp_after:NN{\exp_after:NN{#3}}{#1}{#2}
}
% \end{macrocode}
@@ -568,43 +606,58 @@
%
%
% \begin{macro}{\::f}
-% This function is used to expand a token list until the first
-% unexpandable token is found.
-% The underlying "\int_to_roman:w -`0" expands everything in its
-% way to find something terminating the number and thereby expands the
-% function in front of it. This scanning procedure is terminated once
-% the expansion hits something non-expandable or a space; in case the
-% scanner hits a number, this number also terminates the scanning and
-% is left untouched. In the example shown earlier the scanning was
-% stopped once \TeX{} had fully expanded
-% "\let:Nc \aaa {b \l_tmpa_tlp b}" into "\let:NwN \aaa = \blurb" which
-% then turned out to contain the non-expandable token "\let:NwN".
-% Since the expansion of "\int_to_roman:w -`0" is \m{null}, we
-% wind up with a fully expanded list, only \TeX{} has not tried to
-% execute any of the non-expandable tokens. This is what
-% differentiates this function from the "x" argument type.
+% \begin{macro}{\exp_stop_f:}
+% This function is used to expand a token list until the first
+% unexpandable token is found. The underlying "\int_to_roman:w -`0"
+% expands everything in its way to find something terminating the
+% number and thereby expands the function in front of it. This
+% scanning procedure is terminated once the expansion hits
+% something non-expandable or a space. We introduce "\exp_stop_f:"
+% to mark such an end of expansion marker; in case the scanner hits
+% a number, this number also terminates the scanning and is left
+% untouched. In the example shown earlier the scanning was stopped
+% once \TeX{} had fully expanded "\let:Nc \aaa {b \l_tmpa_tlp b}"
+% into "\let:NwN \aaa = \blurb" which then turned out to contain
+% the non-expandable token "\let:NwN". Since the expansion of
+% "\int_to_roman:w -`0" is \m{null}, we wind up with a fully
+% expanded list, only \TeX{} has not tried to execute any of the
+% non-expandable tokens. This is what differentiates this function
+% from the "x" argument type.
% \begin{macrocode}
-\def_new:Npn\::f#1\:::#2#3{
+\def_long_new:Npn\::f#1\:::#2#3{
\exp_after:NN\exp_arg_next:nnn
\exp_after:NN{\exp_after:NN{\int_to_roman:w -`0 #3}}
{#1}{#2}
}
+\def_new:Npn \exp_stop_f: {~}
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\::x}
-% This function is used to expand an argument fully.
+% This function is used to expand an argument fully. If the
+% pdf\TeX\ primitive "\expanded" is present, we use it.
% \begin{macrocode}
-\def_new:Npn\::x#1\:::#2#3{
- \tlp_set:Nx\l_exp_tlp{{{#3}}}
- \exp_after:NN\exp_arg_next:nnn\l_exp_tlp{#1}{#2}}
+\let_new:NN \exp_arg:x \expanded % Move eventually.
+\cs_if_free:NTF\exp_arg:x{
+ \def_long_new:Npn\::x#1\:::#2#3{
+ % \tlp_set:Nx\l_exp_tlp{{{#3}}}
+ \def:Npx \l_exp_tlp{{{#3}}}
+ \exp_after:NN\exp_arg_next:nnn\l_exp_tlp{#1}{#2}}
+}
+{
+ \def_long_new:Npn\::x#1\:::#2#3{
+ \exp_after:NN\exp_arg_next:nnn
+ \exp_after:NN{\exp_arg:x{{#3}}}{#1}{#2}
+ }
+}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\:::}
% Just another name for the identity function.
% \begin{macrocode}
-\def_new:Npn\:::#1{#1}
+\def_long_new:Npn\:::#1{#1}
% \end{macrocode}
% \end{macro}
%
@@ -612,7 +665,7 @@
% This function creates a control sequence out of |#3| and expands
% that once before passing it on to |\exp_arg_next:nnn|.
% \begin{macrocode}
-\def_new:Npn\::C#1\:::#2#3{
+\def_long_new:Npn\::C#1\:::#2#3{
\exp_after:NN\exp_C_aux:nnn\cs:w #3\cs_end:{#1}{#2}}
% \end{macrocode}
% \end{macro}
@@ -621,8 +674,7 @@
% A helper function for |\::C| wich expands its argument before
% passing it on to |\exp_arg_next:nnn|.
% \begin{macrocode}
-\def_new:Npn\exp_C_aux:nnn #1
- {
+\def_long_new:Npn\exp_C_aux:nnn #1{
\exp_after:NN
\exp_arg_next:nnn
\exp_after:NN
@@ -630,7 +682,7 @@
\exp_after:NN
{#1}
}
- }
+}
% \end{macrocode}
% \end{macro}
%
@@ -641,7 +693,7 @@
% comfortable about your input! Actually this is pretty much just
% generic wrapper for |\exp_after:NN|.
% \begin{macrocode}
-\def:Npn\::E#1\:::#2#3{
+\def_long_new:Npn\::E#1\:::#2#3{
\exp_after:NN\exp_arg_next:nnn \exp_after:NN{#3}{#1}{#2}
}
% \end{macrocode}
@@ -650,7 +702,7 @@
% \begin{macro}{\::e}
% Same as |\::E| really but conceptually they are different.
% \begin{macrocode}
-\def:Npn\::e#1\:::#2#3{
+\def_long_new:Npn\::e#1\:::#2#3{
\exp_after:NN\exp_arg_next:nnn \exp_after:NN{#3}{#1}{#2}
}
% \end{macrocode}
@@ -660,7 +712,7 @@
% This function is used to expand an argument twice. Mostly useful
% for |toks| type things.
% \begin{macrocode}
-\def:Npn\::d#1\:::#2#3{
+\def_long_new:Npn\::d#1\:::#2#3{
\exp_after:NN\exp_after:NN\exp_after:NN\exp_arg_next:nnn
\exp_after:NN\exp_after:NN\exp_after:NN{
\exp_after:NN\exp_after:NN\exp_after:NN{#3}}{#1}{#2}
@@ -706,50 +758,56 @@
% \begin{macro}{\exp_args:Nxx}
% \begin{macro}{\exp_args:NNC}
% \begin{macro}{\exp_args:Nnnc}
+% \begin{macro}{\exp_args:NNnx}
+% \begin{macro}{\exp_args:NNoo}
+% \begin{macro}{\exp_args:NNox}
% Here are the actual function definitions, using the helper functions
% above.
% \begin{macrocode}
-\def:Npn \exp_args:NC {\::C\:::}
+%\def:Npn \exp_args:NNNo {\::N\::N\::o\:::}
+%\def:Npn \exp_args:NNOo {\::N\::O\::o\:::}
+%\def:Npn \exp_args:NNc {\::N\::c\:::}
+%\def:Npn \exp_args:NNo {\::N\::o\::\:::}
+%\def:Npn \exp_args:NOOo {\::O\::O\::o\:::}
+%\def:Npn \exp_args:NOc {\::O\::c\:::}
+%\def:Npn \exp_args:NOo {\::O\::o\:::}
%\def:Npn \exp_args:Nc {\::c\:::}
%\def:Npn \exp_args:Ncc {\::c\::c\:::}
%\def:Npn \exp_args:Nccc {\::c\::c\::c\:::}
-\def:Npn \exp_args:Ncx {\::c\::x\:::}
-\def:Npn \exp_args:Ncco {\::c\::c\::o\:::}
-\def:Npn \exp_args:Nccx {\::c\::c\::x\:::}
-\def:Npn \exp_args:Ncnx {\::c\::n\::x\:::}
+%\def:Npn \exp_args:Nco {\::c\::o\:::}
+%\def:Npn \exp_args:No {\::o\:::}
+
+\def:Npn \exp_args:NC {\::C\:::}
+\def:Npn \exp_args:NNC {\::N\::C\:::}
+\def:Npn \exp_args:NNf {\::N\::f\:::}
+\def:Npn \exp_args:NNno {\::N\::n\::o\:::}
+\def:Npn \exp_args:NNnx {\::N\::n\::x\:::} % new
+\def:Npn \exp_args:NNoo {\::N\::o\::o\:::} % new
+\def:Npn \exp_args:NNox {\::N\::o\::x\:::} % new
+\def:Npn \exp_args:NNx {\::N\::x\:::}
\def:Npn \exp_args:NcNc {\::c\::N\::c\:::}
\def:Npn \exp_args:NcNo {\::c\::N\::o\:::}
\def:Npn \exp_args:Ncco {\::c\::c\::o\:::}
-%\def:Npn \exp_args:Nco {\::c\::o\:::}
-%\def:Npn \exp_args:NNc {\::N\::c\:::}
+\def:Npn \exp_args:Ncco {\::c\::c\::o\:::}
+\def:Npn \exp_args:Nccx {\::c\::c\::x\:::}
+\def:Npn \exp_args:Ncnx {\::c\::n\::x\:::}
+\def:Npn \exp_args:Ncx {\::c\::x\:::}
\def:Npn \exp_args:Nf {\::f\:::}
-\def:Npn \exp_args:NNf {\::N\::f\:::}
\def:Npn \exp_args:Nfo{\::f\::o\:::}
\def:Npn \exp_args:Nnf {\::n\::f\:::}
-%\def:Npn \exp_args:NNNo {\::N\::N\::o\:::}
-\def:Npn \exp_args:NNno {\::N\::n\::o\:::}
-%% Strange one this next one...
-\def:Npn \exp_args:NnnN {\::n\::n\::N\:::}
+\def:Npn \exp_args:NnnN {\::n\::n\::N\:::} %% Strange one this one...
+\def:Npn \exp_args:Nnnc {\::n\::n\::c\:::}
\def:Npn \exp_args:Nnno {\::n\::n\::o\:::}
\def:Npn \exp_args:Nnnx {\::n\::n\::x\:::}
-%\def:Npn \exp_args:NNo {\::N\::o\::\:::}
\def:Npn \exp_args:Nno {\::n\::o\:::}
-%\def:Npn \exp_args:NNOo {\::N\::O\::o\:::}
\def:Npn \exp_args:Nnox {\::n\::o\::x\:::}
-\def:Npn \exp_args:NNx {\::N\::x\:::}
\def:Npn \exp_args:Nnx {\::n\::x\:::}
-%\def:Npn \exp_args:No {\::o\:::}
-%\def:Npn \exp_args:NOc {\::O\::c\:::}
-%\def:Npn \exp_args:NOo {\::O\::o\:::}
\def:Npn \exp_args:Noo {\::o\::o\:::}
-%\def:Npn \exp_args:NOOo {\::O\::O\::o\:::}
\def:Npn \exp_args:Noox {\::o\::o\::x\:::}
\def:Npn \exp_args:Nox {\::o\::x\:::}
\def:Npn \exp_args:Nx {\::x\:::}
\def:Npn \exp_args:Nxo {\::x\::o\:::}
\def:Npn \exp_args:Nxx {\::x\::x\:::}
-\def:Npn \exp_args:NNC {\::N\::C\:::}
-\def:Npn \exp_args:Nnnc {\::n\::n\::c\:::}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -777,23 +835,36 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
%
% \subsubsection{Preventing expansion}
%
%
% \begin{macro}{\exp_not:o}
+% \begin{macro}{\exp_not:d}
+% \begin{macro}{\exp_not:f}
% \begin{macrocode}
-\def_new:Npn\exp_not:o#1{\exp_not:n\exp_after:NN{#1}}
+\def_long_new:Npn\exp_not:o#1{\exp_not:n\exp_after:NN{#1}}
+\def_long_new:Npn\exp_not:d#1{
+ \exp_not:n\exp_after:NN\exp_after:NN\exp_after:NN{#1}
+}
+\def_long_new:Npn\exp_not:f#1{
+ \exp_not:n\exp_after:NN{\int_to_roman:w -`0 #1}
+}
% \end{macrocode}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\exp_not:E}
% \begin{macro}{\exp_not:c}
% Two helper functions, which we can probably live without it.
% \begin{macrocode}
\def_new:Npn\exp_not:E{\exp_after:NN\exp_not:N}
-\def_new:Npn\exp_not:c#1{\exp_after:NN\exp_not:N\cs:w#1\cs_end:}
+\def_long_new:Npn\exp_not:c#1{\exp_after:NN\exp_not:N\cs:w#1\cs_end:}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -826,18 +897,18 @@
% syntax. It is important to see that these functions really need
% single tokens as arguments whenever capital letters are used.
% \begin{macrocode}
-\def_new:Npn \exp_args:No #1#2{\exp_after:NN#1\exp_after:NN{#2}}
-\def_new:Npn \exp_args:NOo #1#2#3{\exp_after:NN\exp_args:No \exp_after:NN#1
+\def_long_new:Npn \exp_args:No #1#2{\exp_after:NN#1\exp_after:NN{#2}}
+\def_long_new:Npn \exp_args:NOo #1#2#3{\exp_after:NN\exp_args:No \exp_after:NN#1
\exp_after:NN#2\exp_after:NN{#3}}
-\def_new:Npn \exp_args:NOOo #1#2#3#4{\exp_after:NN\exp_args:NOo
+\def_long_new:Npn \exp_args:NOOo #1#2#3#4{\exp_after:NN\exp_args:NOo
\exp_after:NN#1\exp_after:NN#2\exp_after:NN#3\exp_after:NN{#4}}
-\def_new:Npn \exp_args:NNo #1#2#3{\exp_after:NN#1\exp_after:NN#2
+\def_long_new:Npn \exp_args:NNo #1#2#3{\exp_after:NN#1\exp_after:NN#2
\exp_after:NN{#3}}
-\def_new:Npn \exp_args:NNO #1#2#3 {\exp_after:NN#1
+\def_long_new:Npn \exp_args:NNO #1#2#3 {\exp_after:NN#1
\exp_after:NN#2 #3}
-\def_new:Npn \exp_args:NNOo #1#2#3#4{\exp_after:NN\exp_args:NNo
+\def_long_new:Npn \exp_args:NNOo #1#2#3#4{\exp_after:NN\exp_args:NNo
\exp_after:NN#1\exp_after:NN#2\exp_after:NN#3\exp_after:NN{#4}}
-\def_new:Npn \exp_args:NNNo #1#2#3#4{\exp_after:NN#1\exp_after:NN#2
+\def_long_new:Npn \exp_args:NNNo #1#2#3#4{\exp_after:NN#1\exp_after:NN#2
\exp_after:NN#3\exp_after:NN{#4}}
% \end{macrocode}
% \end{macro}
@@ -857,14 +928,14 @@
% Here are the functions that turn their argument into csnames but
% are expandable.
% \begin{macrocode}
-\def_new:Npn \exp_args:Nc #1#2{\exp_after:NN#1\cs:w#2\cs_end:}
-\def_new:Npn \exp_args:NNc #1#2#3{\exp_after:NN#1\exp_after:NN#2
+\def_long_new:Npn \exp_args:Nc #1#2{\exp_after:NN#1\cs:w#2\cs_end:}
+\def_long_new:Npn \exp_args:NNc #1#2#3{\exp_after:NN#1\exp_after:NN#2
\cs:w#3\cs_end:}
-\def_new:Npn \exp_args:NOc#1#2#3{\exp_after:NN\exp_args:No\exp_after:NN
+\def_long_new:Npn \exp_args:NOc#1#2#3{\exp_after:NN\exp_args:No\exp_after:NN
#1\exp_after:NN#2\cs:w#3\cs_end:}
-\def_new:Npn \exp_args:Ncc #1#2#3{\exp_after:NN#1
+\def_long_new:Npn \exp_args:Ncc #1#2#3{\exp_after:NN#1
\cs:w#2\exp_after:NN\cs_end:\cs:w#3\cs_end:}
-\def_new:Npn \exp_args:Nccc #1#2#3#4{\exp_after:NN#1
+\def_long_new:Npn \exp_args:Nccc #1#2#3#4{\exp_after:NN#1
\cs:w#2\exp_after:NN\cs_end:\cs:w#3\exp_after:NN
\cs_end:\cs:w #4\cs_end:}
% \end{macrocode}
@@ -880,7 +951,7 @@
% always has braces, we could implement this function
% with less tokens and only two arguments.
% \begin{macrocode}
-\def_new:Npn \exp_args:Nco #1#2#3{\exp_after:NN#1\cs:w#2\exp_after:NN
+\def_long_new:Npn \exp_args:Nco #1#2#3{\exp_after:NN#1\cs:w#2\exp_after:NN
\cs_end:\exp_after:NN{#3}}
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/expl3/l3final.dtx b/Master/texmf-dist/source/latex/expl3/l3final.dtx
index 2eb42fb4a41..f23db756876 100644
--- a/Master/texmf-dist/source/latex/expl3/l3final.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3final.dtx
@@ -32,31 +32,26 @@
%%
%% -----------------------------------------------------------------------
%
-%<package>\RequirePackage{l3names}
-%<*dtx>
+%<*driver|package>
+\RequirePackage{l3names}
+%</driver|package>
+%<*-ini>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-}
-%\iffalse
-%</dtx>
-%\fi
-%<*!ini>
-\GetIdInfo$Id: l3final.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3final.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental final module}
-%</!ini>
-%
-% \iffalse
+%\iffalse
+%</-ini>
%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
-
\begin{document}
-\DocInput{l3final.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
-% \fi
+%\fi
%
% \section{Final Wrap-up}
%
diff --git a/Master/texmf-dist/source/latex/expl3/l3int.dtx b/Master/texmf-dist/source/latex/expl3/l3int.dtx
index f4e582ec12f..ccc30e7dd83 100644
--- a/Master/texmf-dist/source/latex/expl3/l3int.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3int.dtx
@@ -32,26 +32,21 @@
%%
%% -----------------------------------------------------------------------
%
-%<package>\RequirePackage{l3names}
-%<*dtx>
+%<*driver|package>
+\RequirePackage{l3names}
+%</driver|package>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-}
-%\iffalse
-%</dtx>
-%\fi
-\GetIdInfo$Id: l3int.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3int.dtx 702 2007-11-27 14:21:49Z morten $
{L3 Experimental Integer module}
-%
-% \iffalse
+%\iffalse
%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
-
\begin{document}
-\DocInput{l3int.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
% \fi
@@ -99,6 +94,7 @@
%
% \begin{function}{%
% \int_incr:N |
+% \int_incr:c |
% \int_gincr:N |
% \int_gincr:c |
% }
@@ -111,6 +107,7 @@
%
% \begin{function}{%
% \int_decr:N |
+% \int_decr:c |
% \int_gdecr:N |
% \int_gdecr:c |
% }
@@ -154,6 +151,7 @@
% \int_add:Nn |
% \int_add:cn |
% \int_gadd:Nn |
+% \int_gadd:cn |
% }
% \begin{syntax}
% "\int_add:Nn" <int> "{" <integer expr> "}"
@@ -165,7 +163,9 @@
%
% \begin{function}{%
% \int_sub:Nn |
+% \int_sub:cn |
% \int_gsub:Nn |
+% \int_gsub:cn |
% }
% \begin{syntax}
% "\int_gsub:Nn" <int> "{" <integer expr> "}"
@@ -356,6 +356,25 @@
% \end{function}
%
% \begin{function}{%
+% \int_max_of:nn |
+% \int_min_of:nn |
+% }
+% \begin{syntax}
+% "\int_max_of:nn" "{"<int~expr>"}" "{"<int~expr>"}"
+% \end{syntax}
+% Return the largest or smallest of two integer expressions.
+% \end{function}
+%
+% \begin{function}{%
+% \int_abs:n |
+% }
+% \begin{syntax}
+% "\int_abs:n" "{"<int~expr>"}"
+% \end{syntax}
+% Return the numerical value of an integer expression.
+% \end{function}
+%
+% \begin{function}{%
% \int_if_odd:nTF |
% \int_if_odd_p:n |
% }
@@ -419,6 +438,8 @@
%
% We start by ensuring that the required packages are loaded.
% \begin{macrocode}
+%<package>\ProvidesExplPackage
+%<package> {\filename}{\filedate}{\fileversion}{\filedescription}
%<package&!check>\RequirePackage{l3num}
%<package&check>\RequirePackage{l3chk}
%<*initex|package>
@@ -443,6 +464,10 @@
% \begin{macro}{\int_decr:N}
% \begin{macro}{\int_gincr:N}
% \begin{macro}{\int_gdecr:N}
+% \begin{macro}{\int_incr:c}
+% \begin{macro}{\int_decr:c}
+% \begin{macro}{\int_gincr:c}
+% \begin{macro}{\int_gdecr:c}
% Incrementing and decrementing of integer registers is done with
% the following functions.
% \begin{macrocode}
@@ -485,11 +510,19 @@
\def:Npn \int_decr:N #1{\int_add:Nn#1\c_minus_one}
\def:Npn \int_gincr:N #1{\int_gadd:Nn#1\c_one}
\def:Npn \int_gdecr:N #1{\int_gadd:Nn#1\c_minus_one}
+\def:Npn \int_incr:c {\exp_args:Nc\int_incr:N}
+\def:Npn \int_decr:c {\exp_args:Nc\int_decr:N}
+\def:Npn \int_gincr:c {\exp_args:Nc\int_gincr:N}
+\def:Npn \int_gdecr:c {\exp_args:Nc\int_gdecr:N}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
%
% \begin{macro}{\int_new:N}
@@ -556,8 +589,11 @@
% \begin{macro}{\int_add:Nn}
% \begin{macro}{\int_add:cn}
% \begin{macro}{\int_gadd:Nn}
+% \begin{macro}{\int_gadd:cn}
% \begin{macro}{\int_sub:Nn}
+% \begin{macro}{\int_sub:cn}
% \begin{macro}{\int_gsub:Nn}
+% \begin{macro}{\int_gsub:cn}
% Adding and substracting to and from a counter \ldots
% We should think of using these functions
% \begin{macrocode}
@@ -591,12 +627,18 @@
%</check>
%<-check> \pref_global:D
\int_sub:Nn }
+\def_new:Npn \int_gadd:cn{\exp_args:Nc\int_gadd:Nn}
+\def_new:Npn \int_sub:cn{\exp_args:Nc\int_sub:Nn}
+\def_new:Npn \int_gsub:cn{\exp_args:Nc\int_gsub:Nn}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
%
% \begin{macro}{\int_use:N}
@@ -610,15 +652,6 @@
% \end{macro}
%
%
-% \begin{macro}{\int_gincr:c}
-% \begin{macro}{\int_gdecr:c}
-% We also need \ldots
-% \begin{macrocode}
-\def_new:Npn \int_gincr:c {\exp_args:Nc \int_gincr:N}
-\def_new:Npn \int_gdecr:c {\exp_args:Nc \int_gdecr:N}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
%
%
% \begin{macro}{\int_to_arabic:n}
@@ -782,7 +815,7 @@
% Turning a number into a symbol is also easy enough.
% \begin{macrocode}
\def_new:Npn \int_to_symbol:n #1{
- \mode_math:TF
+ \mode_if_math:TF
{
\int_convert_number_with_rule:nnN {#1}{9}
\int_symbol_math_conversion_rule:n
@@ -896,8 +929,38 @@
\def_new:Npn \int_div_truncate:nn {
\int_pre_eval_two_args:Nnn\int_div_truncate_raw:nn
}
+% \end{macrocode}
+% Initial version didn't work correctly with e\TeX's implementation.
+% \begin{macrocode}
+%\def_new:Npn \int_div_truncate_raw:nn #1#2 {
+% \int_eval:n{ (2*#1 - #2) / (2* #2) }
+%}
+% \end{macrocode}
+% New version by Heiko:
+% \begin{macrocode}
\def_new:Npn \int_div_truncate_raw:nn #1#2 {
- \int_eval:n{ (2*#1 - #2) / (2* #2) }
+ \int_eval:w
+ \if_num:w \int_eval:w#1 = \c_zero
+ 0
+ \else:
+ (#1
+ \if_num:w \int_eval:w #1 < \c_zero
+ \if_num:w \int_eval:w#2 < \c_zero
+ -( #2 +
+ \else:
+ +( #2 -
+ \fi:
+ \else:
+ \if_num:w \int_eval:w #2 < \c_zero
+ +( #2 +
+ \else:
+ -( #2 -
+ \fi:
+ \fi:
+ 1)/2)
+ \fi:
+ /(#2)
+ \scan_stop:
}
% \end{macrocode}
% For the sake of completeness:
@@ -935,6 +998,20 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\int_max_of:nn}
+% \begin{macro}{\int_min_of:nn}
+% \begin{macro}{\int_abs:n}
+% Simple comparison tests.
+% \begin{macrocode}
+\let_new:NN \int_max_of:nn \num_max_of:nn
+\let_new:NN \int_min_of:nn \num_min_of:nn
+\let_new:NN \int_abs:nn \num_abs:nn
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
% \begin{macro}{\int_compare_p:nNn}
% A predicate function.
% \begin{macrocode}
@@ -968,18 +1045,19 @@
% \begin{macro}{\int_dowhile:nNnF}
% These are quite easy given the above functions. The "while" versions
% test first and then execute the body. The "dowhile" does it the
-% other way round.
+% other way round. The have to be defined as ``long'' since the "T" argument
+% might contain "\par" tokens.
% \begin{macrocode}
-\def_new:Npn \int_whiledo:nNnT #1#2#3#4{
+\def_long_new:Npn \int_whiledo:nNnT #1#2#3#4{
\int_compare:nNnT {#1}#2{#3}{#4 \int_whiledo:nNnT {#1}#2{#3}{#4}}
}
-\def_new:Npn \int_whiledo:nNnF #1#2#3#4{
+\def_long_new:Npn \int_whiledo:nNnF #1#2#3#4{
\int_compare:nNnF {#1}#2{#3}{#4 \int_whiledo:nNnF {#1}#2{#3}{#4}}
}
-\def_new:Npn \int_dowhile:nNnT #1#2#3#4{
+\def_long_new:Npn \int_dowhile:nNnT #1#2#3#4{
#4 \int_compare:nNnT {#1}#2{#3}{\int_dowhile:nNnT {#1}#2{#3}{#4}}
}
-\def_new:Npn \int_dowhile:nNnF #1#2#3#4{
+\def_long_new:Npn \int_dowhile:nNnF #1#2#3#4{
#4 \int_compare:nNnF {#1}#2{#3}{\int_dowhile:nNnF {#1}#2{#3}{#4}}
}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/expl3/l3io.dtx b/Master/texmf-dist/source/latex/expl3/l3io.dtx
index 04efa42b8d7..b382744776b 100644
--- a/Master/texmf-dist/source/latex/expl3/l3io.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3io.dtx
@@ -32,26 +32,21 @@
%%
%% -----------------------------------------------------------------------
%
-%<package>\RequirePackage{l3names}
-%<*dtx>
+%<*driver|package>
+\RequirePackage{l3names}
+%</driver|package>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-}
-%\iffalse
-%</dtx>
-%\fi
-\GetIdInfo$Id: l3io.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3io.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental i/o module}
-%
-% \iffalse
+%\iffalse
%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
-
\begin{document}
-\DocInput{l3io.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
% \fi
@@ -298,6 +293,8 @@
%
% We start by ensuring that the required packages are loaded.
% \begin{macrocode}
+%<package>\ProvidesExplPackage
+%<package> {\filename}{\filedate}{\fileversion}{\filedescription}
%<package&check>\RequirePackage{l3chk}\par
%<package>\RequirePackage{l3toks}\par
%<*initex|package>
diff --git a/Master/texmf-dist/source/latex/expl3/l3keyval.dtx b/Master/texmf-dist/source/latex/expl3/l3keyval.dtx
index 8848946602a..4134b0fef51 100644
--- a/Master/texmf-dist/source/latex/expl3/l3keyval.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3keyval.dtx
@@ -31,29 +31,26 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-%<package>\RequirePackage{l3names}
-%<*dtx>
+%<*driver|package>
+\RequirePackage{l3names}
+%</driver|package>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-}
-%\iffalse
-%</dtx>
-%\fi
-\GetIdInfo$Id: l3keyval.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3keyval.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental keyval processing}
-% \iffalse
+%\iffalse
%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
-
\begin{document}
-\DocInput{l3keyval.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
% \fi
%
+%
% \title{The \textsf{l3keyval} package\thanks{This file
% has version number \fileversion, last
% revised \filedate.}\\
@@ -185,6 +182,8 @@
% We start by ensuring that the required packages are loaded.
% \begin{macrocode}
%<*package>
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\RequirePackage{l3quark}
\RequirePackage{l3toks}
\RequirePackage{l3int}
diff --git a/Master/texmf-dist/source/latex/expl3/l3messages.dtx b/Master/texmf-dist/source/latex/expl3/l3messages.dtx
index 5aea5a26d35..b5ae9e6025f 100644
--- a/Master/texmf-dist/source/latex/expl3/l3messages.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3messages.dtx
@@ -1,5 +1,5 @@
% \iffalse
-%% File: l3messages.dtx Copyright (C) 1990-2006 LaTeX3 project
+%% File: l3messages.dtx Copyright (C) 1990-2007 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
@@ -32,33 +32,21 @@
%%
%% -----------------------------------------------------------------------
%
-%<package>\RequirePackage{l3names}
-%<package>\RequirePackage{l3basics}
-%<package>\RequirePackage{l3tlp}
-%<package>\RequirePackage{l3expan}
-%<package>\RequirePackage{l3num}
-%<package>\RequirePackage{l3io}
-%<package>\RequirePackage{l3int}
-%<package>\RequirePackage{l3toks}
-%<*dtx>
+%<*driver|package>
+\RequirePackage{l3names}
+%</driver|package>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-}
-%\iffalse
-%</dtx>
-%\fi
-\GetIdInfo$Id: l3messages.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3messages.dtx 673 2007-09-28 20:50:33Z mittelba $
{L3 Experimental LaTeX Messages module}
-%
-% \iffalse
+%\iffalse
%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
-
\begin{document}
-\DocInput{l3messages.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
% \fi
@@ -129,7 +117,8 @@
% \end{syntax}
% Is used to break an informational, warning or error message up
% into multiple lines. May be defined in such a way that the new
-% line starts with a standard <continuation>.
+% line starts with a standard <continuation>. A normal line break in such
+% messages can be achieved with "\iow_newline:" from the l3iow module.
% \end{function}
%
% \subsection{Storing the information}
@@ -264,11 +253,6 @@
%
% \subsection{Variables and constants}
%
-% \begin{variable}{\iow_newline}
-% Identifier denoting the character that triggers a line break in
-% the output.
-% \end{variable}
-%
% \begin{variable}{\c_iow_err_stream}
% Output stream used to access the error files during their
% generation.
@@ -312,6 +296,16 @@
% \subsection{The implementation}
%
% \begin{macrocode}
+%<package>\ProvidesExplPackage
+%<package> {\filename}{\filedate}{\fileversion}{\filedescription}
+%<package>\RequirePackage{l3basics}
+%<package>\RequirePackage{l3tlp}
+%<package>\RequirePackage{l3expan}
+%<package>\RequirePackage{l3num}
+%<package>\RequirePackage{l3io}
+%<package>\RequirePackage{l3int}
+%<package>\RequirePackage{l3toks}
+%<package>\RequirePackage{l3token}
%<*initex|package>
% \end{macrocode}
%
@@ -453,13 +447,13 @@
% \end{macrocode}
% Make sure that the \emph{continuation} is part of "\err_newline:".
% \begin{macrocode}
- \def:Npn\err_newline:{\iow_newline#2}
+ \def:Npn\err_newline:{\iow_newline:#2}
% \end{macrocode}
% Then write the message.
% \begin{macrocode}
\io_put_log:x {#1~\io_show_file_lineno:}}
\def_new:Npn \err_warn:nn #1#2{
- \def:Npn\err_newline:{\iow_newline#2}
+ \def:Npn\err_newline:{\iow_newline:#2}
\io_put_term:x {#1~\io_show_file_lineno:}}
% \end{macrocode}
% \end{macro}
@@ -471,10 +465,10 @@
% linenumber to the message.
% \begin{macrocode}
\def_new:Npn \err_info_noline:nn #1#2{
- \def:Npn\err_newline:{\iow_newline#2}
+ \def:Npn\err_newline:{\iow_newline:#2}
\io_put_log:x {#1}}
\def_new:Npn \err_warn_noline:nn #1#2{
- \def:Npn\err_newline:{\iow_newline#2}
+ \def:Npn\err_newline:{\iow_newline:#2}
\io_put_term:x {#1}}
% \end{macrocode}
% \end{macro}
@@ -522,7 +516,7 @@
% \end{macrocode}
% Make sure that the \emph{continuation} is part of "\err_newline".
% \begin{macrocode}
- \def:Npn\err_newline:{\iow_newline#2}
+ \def:Npn\err_newline:{\iow_newline:#2}
% \end{macrocode}
% Then write the message.
% \begin{macrocode}
@@ -537,7 +531,7 @@
% occured.
% \begin{macrocode}
\def_new:Npn \err_fatal_noline:nn #1#2{
- \def:Npn\err_newline:{\iow_newline#2}
+ \def:Npn\err_newline:{\iow_newline:#2}
\io_put_term:x {#1}
\tex_end:D
}
@@ -610,9 +604,9 @@
{\err_latex_bug:x{You~closed~the~wrong~error~file~`#1'.~
Open~is~`\g_err_curr_fname'.}}
\iow_long_unexpanded:Nn \c_iow_err_stream {\err_latex_bug:x{Didn't~find~the~
- correct~error~message~to~show.\iow_newline
+ correct~error~message~to~show.\iow_newline:
Was~searching~for~a~function~
- with~the~following~meaning:\iow_newline
+ with~the~following~meaning:\iow_newline:
\token_to_string:N\token_to_meaning:N
\token_to_string:N\l_err_label_token}
% \end{macrocode}
@@ -651,7 +645,7 @@
% Both \m{errmsg} and \m{code} might contain hashmarks denoting
% arguments to the error handler.
% \begin{macrocode}
- \group_begin: \tex_catcode:D`\#\c_other_char_code
+ \group_begin: \char_set_catcode:nn{`\#}{12}
% \end{macrocode}
% We also have to check that output goes to the correct error file.
% \begin{macrocode}
@@ -692,9 +686,9 @@
\cmd_declare:Nnn\err_display_aux:w [#2]{
\group_end:
\toks_gset:Nx\g_err_help_toks{#4}
- \io_put_term:x{LaTeX~error~\io_show_file_lineno:.\iow_newline
+ \io_put_term:x{LaTeX~error~\io_show_file_lineno:.\iow_newline:
\text_put_sp:\text_put_four_sp: \text_put_sp:
- See~LaTeX~manual~for~explanation.\iow_newline
+ See~LaTeX~manual~for~explanation.\iow_newline:
\text_put_sp:\text_put_four_sp: \text_put_sp:
Type~\text_put_sp: H~<return>~\text_put_sp: for~
immediate~help.}
@@ -801,9 +795,9 @@
% \begin{macrocode}
%<*package>
\def:Npn\err_help_ignored: {
- Your~command~was~ignored.\iow_newline
+ Your~command~was~ignored.\iow_newline:
Type \text_put_sp: I~<command>~<return>
- \text_put_sp: to~replace~it~with~another~command,\iow_newline
+ \text_put_sp: to~replace~it~with~another~command,\iow_newline:
or~\text_put_sp: <return> \text_put_sp: to~continue~without~it.}
\def:Npn\err_help_textlost: {
@@ -811,7 +805,7 @@
\def:Npn\err_help_return_or_X: {
Try~typing\text_put_sp: <return>
- \text_put_sp: to~proceed.\iow_newline
+ \text_put_sp: to~proceed.\iow_newline:
If~that~doesn't~work,~type
\text_put_sp: X~<return>\text_put_sp: to~quit.}
@@ -826,10 +820,10 @@
\err_kernel_interrupt_new:NNnnn\cs_free_p:N{1}
{Command~name~`\tex_string:D#1'~already~used}
{You~tried~to~define~a~command~which~already~has~
- a~meaning.\iow_newline
+ a~meaning.\iow_newline:
If~you~really~want~to~redefine~it~try~
\token_to_string:N\cmd_declare:Nnn\text_put_sp:
- next~time.\iow_newline
+ next~time.\iow_newline:
For~this~run~I~will~ignore~your~definition.}
{}
@@ -842,7 +836,7 @@
\err_kernel_interrupt_new:NNnnn\newcnt{0}
{No~such~counter}
{The~counter~name~mentioned~in~the~operation~is~not~
- known~to~me.\iow_newline
+ known~to~me.\iow_newline:
Check~the~spelling.}
{}
@@ -969,4 +963,4 @@
%
% Revision 1.1 2005/04/29 22:30:44 braams
% first version that can be loaded without producing errors.
-% Just a translation from the old stuff, haven't looked at the docu yet \ No newline at end of file
+% Just a translation from the old stuff, haven't looked at the docu yet
diff --git a/Master/texmf-dist/source/latex/expl3/l3names.dtx b/Master/texmf-dist/source/latex/expl3/l3names.dtx
index e9345ce37e0..3bd4dbf2612 100644
--- a/Master/texmf-dist/source/latex/expl3/l3names.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3names.dtx
@@ -39,33 +39,57 @@
\catcode`\#=6 % hash mark is macro parameter character
\catcode`\^=7 %
\catcode`\^^I=10 % ascii tab is a blank space
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \immediate\write-1{#1; v#2, #3/#4/#5; #8}%
+%</initex>
+%<package>\begingroup
+%<*initex|package>
+\def\GetIdInfo$#1 #2.#3 #4 #5 #6 #7${%
+ \GetIdInfoAux #5\relax{#2}#5\relax{#4}%
+}
+\def\GetIdInfoAux #1#2#3#4#5#6\relax{%
+ \ifx#5/%
+ \expandafter\GetIdInfoAuxCVS
+ \else
+ \expandafter\GetIdInfoAuxSVN
+ \fi
+}
+%</initex|package>
+%<*initex>
+\def\GetIdInfoAuxCVS #1#2\relax#3#4{%
+ \immediate\write-1{#1; v#2, #3; #4}%
+}
+\def\GetIdInfoAuxSVN #1#2-#3-#4\relax#5#6{%
+ \immediate\write-1{#1; #2/#3/#4 v#5 #6}%
}
%</initex>
%<*package>
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesPackage{#1}[#3/#4/#5 v#2 #8]%
+\def\GetIdInfoAuxCVS #1#2\relax#3#4{%
+ \gdef\fileversion{#3}%
+ \gdef\filedate{#2}%
+ \gdef\filedescription{#4}%
+ \ProvidesPackage{#1}[#2 v#3 #4]%
}
-%</package>
-%<*dtx>
-%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
+\def\GetIdInfoAuxSVN #1#2-#3-#4\relax#5#6{%
+ \gdef\fileversion{#5}%
+ \gdef\filedate{#2/#3/#4}%
+ \gdef\filedescription{#6}%
+ \ProvidesPackage{#1}[#2/#3/#4 v#5 #6]
}
-%\iffalse
-%</dtx>
+%</package>
+%<*driver>
+\RequirePackage{l3names}
+%</driver>
%\fi
-\GetIdInfo$Id: l3names.dtx 577 2006-11-21 18:10:26Z morten $
+\GetIdInfo$Id: l3names.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental Naming Scheme for TeX Primitives}
%
%
% \iffalse
+%<package>\endgroup
%<*driver>
+%\fi
+\ProvidesFile{l3names.dtx}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
\begin{document}
\DocInput{l3names.dtx}
@@ -274,7 +298,7 @@
%
% \end{description}
%
-%
+%
%
% \section{Modules}
%
@@ -284,6 +308,75 @@
% with special prefixes, for example "\tlp_" is the prefix for functions
% dealing with token list pointers.
%
+% \subsection{Using the modules}
+%
+% Most of the modules can be used on top of \LaTeX\ and are loaded
+% with the usual "\usepackage" or "\RequirePackage" instructions. As
+% the packages use a coding syntax different from standard \LaTeX\ it
+% provides a few functions for setting it up.
+%
+% \begin{function}{
+% \ExplSyntaxOn |
+% \ExplSyntaxOff
+% }
+% \begin{syntax}
+% "\ExplSyntaxOn" <code> "\ExplSyntaxOff"
+% \end{syntax}
+% Issues a catcode regime where spaces are ignored and colon and
+% underscore are letters.
+% \end{function}
+%
+% \begin{function}{
+% l3names |
+% \ProvidesExplPackage |
+% \ProvidesExplClass
+% }
+% \begin{syntax}
+% "\RequirePackage{l3names}" \\
+% "\ProvidesExplPackage" "{"<package>"}"
+% "{"<date>"}" "{"<version>"}" "{"<description>"}"
+% \end{syntax}
+% The package "l3names" (this module) provides
+% "\ProvidesExplPackage" which is a wrapper for "\ProvidesPackage"
+% and sets up the \LaTeX3 catcode settings for programming
+% automatically. Similar for the relationship between
+% "\ProvidesExplClass" and "\ProvidesClass". Spaces are not ignored
+% in the arguments of these commands.
+% \end{function}
+%
+% \begin{function}{
+% \GetIdInfo |
+% \filename |
+% \filenameext |
+% \filedate |
+% \fileversion |
+% \filetimestamp |
+% \fileauthor
+% }
+% \begin{syntax}
+% "\RequirePackage{l3names}" \\
+% "\GetIdInfo" "$Id:" <cvs or svn info field> "$" "{"<description>"}"
+% \end{syntax}
+% Extracts all information from a cvs or svn field. Spaces are not
+% ignored in these fields. The information pieces are stored in
+% separate control sequences with "\filename" for the part of the
+% file name leading up to the period, "\filenameext" for the
+% extension, "\filedate" for date, "\fileversion" for version,
+% "\filetimestamp" for the time and "\fileauthor" for the author.
+% \end{function}
+%
+% To summarize: Every single package using this syntax should identify
+% itself using one of the above methods. Special care is taken so that
+% every package or class file loaded with "\RequirePackage" or alike
+% are loaded with usual \LaTeX\ catcodes and the \LaTeX3 catcode
+% scheme is reloaded when needed afterwards. See implementation for
+% details. If you use the "\GetIdInfo" command you can use the
+% information when loading a package with
+% \begin{verbatim}
+% \ProvidesExplPackage{\filename}{\filedate}{\fileversion}{\filedescription}
+% \end{verbatim}
+%
+%
%
%
% \StopEventually{}
@@ -306,15 +399,17 @@
\catcode`\^^I=10 % ascii tab is a blank space
%</initex>
% \end{macrocode}
-%
+% Reason for |\endlinechar=32| is that a line ending with a backslash
+% will be interpreted as the token \verb*|\ | which seems most natural
+% and since spaces are ignored it works as we intend elsewhere.
% \begin{macrocode}
%<*initex|package>
-\catcode`\ =9\relax
-\catcode`\^^I=9\relax
-\catcode`\^^M=9\relax
-\catcode`\~=10\relax
-\catcode`\_=11\relax\catcode`\:=11\relax
-\catcode`\@=11\relax % as long as we use old LaTeX stuff.
+\catcode126=10\relax % tilde is a space char.
+\catcode32=9\relax % space is ignored
+\catcode9=9\relax % tab also ignored
+\endlinechar=32\relax % endline is space
+\catcode95=11\relax % underscore letter
+\catcode58=11\relax % colon letter
% \end{macrocode}
%
%
@@ -332,7 +427,8 @@
% is run after the end of this file, to skip past the code which has
% been inserted by \LaTeXe\ to manage the file name stack, this code
% would break if run once the \TeX\ primitives have been undefined.
-% (What a surprise!)
+% (What a surprise!) \textbf{The option has been temporarily
+% disabled.}
%
% To get things started, give a new name for |\let|.
% \begin{macrocode}
@@ -918,31 +1014,38 @@
% Here we define functions that are used to turn on and off the
% special conventions used in the kernel of \LaTeX3.
%
-% First of all, the space, tab and the return characters will all be
-% ignored inside \LaTeX3 code. When space characters are needed in
-% \LaTeX3 code the |~| character will be used for that purpose.
+% First of all, the space, tab and the return characters will all
+% be ignored inside \LaTeX3 code, the latter because endline is set
+% to a space instead. When space characters are needed in \LaTeX3
+% code the |~| character will be used for that purpose.
%
% \begin{macrocode}
-\tex_def:D\CodeStart{%
- \tex_catcode:D `\ =9\tex_relax:D
- \tex_catcode:D `\^^M=9\tex_relax:D
- \tex_catcode:D `\^^I=9\tex_relax:D
- \tex_catcode:D `\~=10\tex_relax:D
-%<!initex> \tex_catcode:D `\@=11\tex_relax:D % For LaTeX2e
- \tex_catcode:D `\_=11\tex_relax:D
- \tex_catcode:D `\:=11\tex_relax:D}
+\tex_def:D\ExplSyntaxOn{
+ \tex_def:D\ExplSyntaxStatus{00}
+ \tex_catcode:D 126=10 \tex_relax:D % tilde is a space char.
+ \tex_catcode:D 32=9 \tex_relax:D % space is ignored
+ \tex_catcode:D 9=9 \tex_relax:D % tab also ignored
+ \tex_endlinechar:D =32 \tex_relax:D % endline is space
+ \tex_catcode:D 95=11 \tex_relax:D % underscore letter
+ \tex_catcode:D 58=11 \tex_relax:D % colon letter
+}
% \end{macrocode}
%
% \begin{macrocode}
-\tex_def:D\CodeStop{
- \tex_catcode:D `\ =10\tex_relax:D
- \tex_catcode:D `\^^M=5\tex_relax:D
- \tex_catcode:D `\^^I=10\tex_relax:D
- \tex_catcode:D `\~=13\tex_relax:D
-%<!initex> \tex_catcode:D `\@=12\tex_relax:D % For LaTeX2e
- \tex_catcode:D `\_=8\tex_relax:D
- \tex_catcode:D `\:=12\tex_relax:D}
-%</initex|package>
+\tex_def:D\ExplSyntaxOff{
+ \tex_def:D\ExplSyntaxStatus{01}
+ \tex_catcode:D 126=13 \tex_relax:D
+ \tex_catcode:D 32=10 \tex_relax:D
+ \tex_catcode:D 9=10 \tex_relax:D
+ \tex_endlinechar:D =13 \tex_relax:D
+ \tex_catcode:D 95=8 \tex_relax:D
+ \tex_catcode:D 58=12 \tex_relax:D
+}
+% \end{macrocode}
+% Temporary while names change.
+% \begin{macrocode}
+\tex_let:D \CodeStart \ExplSyntaxOn
+\tex_let:D \CodeStop \ExplSyntaxOff
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -954,61 +1057,173 @@
% characters. These macros provide the necessary settings.
% \begin{macrocode}
\tex_def:D \NamesStart{
- \tex_catcode:D `\_=11\scan_stop:
- \tex_catcode:D `\:=11\scan_stop:
- }
+ \tex_catcode:D `\_=11\tex_relax:D
+ \tex_catcode:D `\:=11\tex_relax:D
+}
\tex_def:D \NamesStop{
- \tex_catcode:D `\_=8\scan_stop:
- \tex_catcode:D `\:=12\scan_stop:
- }
+ \tex_catcode:D `\_=8\tex_relax:D
+ \tex_catcode:D `\:=12\tex_relax:D
+}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\GetIdInfo}
+% \begin{macro}{\GetIdInfoAuxi:w}
+% \begin{macro}{\GetIdInfoAuxii:w}
+% \begin{macro}{\GetIdInfoAuxCVS:w}
+% \begin{macro}{\GetIdInfoAuxSVN:w}
+% Extract all information from a cvs or svn field. The
+% formats are slightly different but at least the information is in
+% the same positions so we check in the date format so see if it
+% contains a "/" after the four-digit year. If it does it is cvs
+% else svn and we extract information. To be on the safe side we
+% ensure that spaces in the argument are seen.
% \begin{macrocode}
-%<*initex>
-\tex_def:D\GetIdInfo{\CodeStop\GetIdInfoAux}
-\tex_def:D\GetIdInfoAux$#1~#2.dtx~#3~#4-#5-#6~#7~#8$#9{%
- \tex_immediate:D\tex_write:D-1{#2;~v#3,~#4/#5/#6;~#9}%
- \CodeStart
+\tex_def:D\GetIdInfo{
+ \tex_begingroup:D
+ \tex_catcode:D 32=10 \tex_relax:D % needed? Probably for now.
+ \GetIdInfoAuxi:w
}
-%</initex>
+\tex_def:D\GetIdInfoAuxi:w$#1~#2.#3~#4~#5~#6~#7~#8$#9{
+ \tex_endgroup:D
+ \tex_def:D\filename{#2}
+ \tex_def:D\fileversion{#4}
+ \tex_def:D\filedescription{#9}
+ \tex_def:D\fileauthor{#7}
+ \GetIdInfoAuxii:w #5\tex_relax:D
+ #3\tex_relax:D#5\tex_relax:D#6\tex_relax:D
+}
+\tex_def:D\GetIdInfoAuxii:w #1#2#3#4#5#6\tex_relax:D{
+ \tex_ifx:D#5/
+ \tex_expandafter:D\GetIdInfoAuxCVS:w
+ \tex_else:D
+ \tex_expandafter:D\GetIdInfoAuxSVN:w
+ \tex_fi:D
+}
+\tex_def:D\GetIdInfoAuxCVS:w #1,v\tex_relax:D
+ #2\tex_relax:D#3\tex_relax:D{
+ \tex_def:D\filedate{#2}
+ \tex_def:D\filenameext{#1}
+ \tex_def:D\filetimestamp{#3}
+% \end{macrocode}
+% When creating the format we want the information in the log straight
+% away.
+% \begin{macrocode}
+%<initex>\tex_immediate:D\tex_write:D-1
+%<initex> {\filename;~ v\fileversion,~\filedate;~\filedescription}
+}
+\tex_def:D\GetIdInfoAuxSVN:w #1\tex_relax:D#2-#3-#4
+ \tex_relax:D#5Z\tex_relax:D{
+ \tex_def:D\filenameext{#1}
+ \tex_def:D\filedate{#2/#3/#4}
+ \tex_def:D\filetimestamp{#5}
+%<-package>\tex_immediate:D\tex_write:D-1
+%<-package> {\filename;~ v\fileversion,~\filedate;~\filedescription}
+}
+%</initex|package>
% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% Finally some corrections in the case we are running over \LaTeXe.
%
-% Every single experimental package should start by doing something
-% like this:
+%
+%
+% We want to set things up so that experimental packages and regular
+% packages can coexist with the former using the \LaTeX3 programming
+% catcode settings. Since it cannot be the task of the end user to
+% know how a package is constructed under the hood we make it so that
+% the experimental packages have to identify themselves. As an example
+% it can be done as
% \begin{verbatim}
% \RequirePackage{l3names}
-% \GetIdInfo$Id: l3names.dtx 577 2006-11-21 18:10:26Z morten $
-% {L3 Experimental sequences and stacks}
+% \ProvidesExplPackage{agent}{2007/08/28}{007}{bonding module}
% \end{verbatim}
-% \emph{OR}
+% or by using the "\file"\meta{field} informations from "\GetIdInfo"
+% as the packages in this distribution do like this:
% \begin{verbatim}
% \RequirePackage{l3names}
-% \CodeStart
+% \GetIdInfo$Id: l3names.dtx 621 2007-09-01 20:14:19Z morten $
+% {L3 Experimental Box module}
+% \ProvidesExplPackage
+% {\filename}{\filedate}{\fileversion}{\filedescription}
% \end{verbatim}
-% Since we have to make |\GetIdInfo| stop the special catcode regime
-% when reading the package in order to get the information extracted
-% correctly, we might as well use it to also issue |\CodeStart|. This
-% also means that we automatically get |\CodeStart| issued at the
-% beginning of every package without tampering with |\ProvidesPackage|
-% which can cause problems when using these experimental packages with
-% code relying on characters having traditional catcodes, noticeably
-% the catcode of the space character. We cannot simply use the code
-% from the top of this file since it contains a call to |\def| which
-% may not exist at this point.
+%
+%
+% \begin{macro}{\ProvidesExplPackage}
+% \begin{macro}{\ProvidesExplClass}
+% First up is the identification. Rather trivial
% \begin{macrocode}
%<*package>
-\tex_def:D\GetIdInfo{\CodeStop\GetIdInfoAux}
-\tex_def:D\GetIdInfoAux$#1~#2.dtx~#3~#4-#5-#6~#7~#8$#9{%
- \tex_def:D \fileversion{#3}%
- \tex_def:D \filedate{#4/#5/#6}%
- \ProvidesPackage{#2}[#4/#5/#6~ v#3~ #9]%
- \CodeStart
+\tex_def:D \ProvidesExplPackage#1#2#3#4{
+ \ProvidesPackage{#1}[#2~v#3~#4]
+ \ExplSyntaxOn
}
-% \end{macrocode}
+\tex_def:D \ProvidesExplClass#1#2#3#4{
+ \ProvidesClass{#1}[#2~v#3~#4]
+ \ExplSyntaxOn
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\org@onefilewithoptions}
+% \begin{macro}{\@onefilewithoptions}
+% \begin{macro}{\@popfilename}
+% The idea behind the code is to record whether or not the \LaTeX3
+% syntax is on or off when about to load a file with class or
+% package extension. This status stored in the parameter
+% |\ExplSyntaxStatus| and set by |\ExplSyntaxOn| and
+% |\ExplSyntaxOff| to |00| and |01| respectively is puched onto the
+% stack |\ExplSyntaxStack|. Then the catcodes are set back to
+% normal, the file loaded with its options and finally the stack is
+% popped again.
+%
+% |\@popfilename| is appended with a preamble check. If the catcode
+% of "@" is being reset it is a fair assumption that we are back in
+% the usual preamble and so we switch off our syntax as well.
+% \begin{macrocode}
+\tex_let:D \org@onefilewithoptions\@onefilewithoptions
+\tex_def:D \@onefilewithoptions#1[#2][#3]#4{
+ \tex_edef:D \ExplSyntaxStack{ \ExplSyntaxStatus\ExplSyntaxStack }
+ \ExplSyntaxOff
+ \org@onefilewithoptions{#1}[{#2}][{#3}]{#4}
+ \tex_expandafter:D\ExplSyntaxPopStack\ExplSyntaxStack\tex_relax:D
+}
+\g@addto@macro\@popfilename{%
+ \tex_ifnum:D\tex_the:D\tex_catcode:D`\@=12\tex_relax:D
+ \ExplSyntaxOff
+ \tex_fi:D
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\ExplSyntaxPopStack}
+% \begin{macro}{\ExplSyntaxStack}
+% Popping the stack is simple: Take the first two tokens which are
+% either the sequence "00" or "01" and use them in an if test. The
+% stack is initially empty.
+% \begin{macrocode}
+\tex_def:D\ExplSyntaxPopStack#1#2#3\tex_relax:D{
+ \tex_def:D\ExplSyntaxStack{#3}
+ \tex_if:D#1#2
+ \ExplSyntaxOn
+ \tex_else:D
+ \ExplSyntaxOff
+ \tex_fi:D
+}
+\tex_def:D\ExplSyntaxStack{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
%
% A few of the `primitives' assigned above have already been stolen
% by \LaTeX, so assign them by hand to the saved real primitive.
@@ -1034,14 +1249,9 @@
\tex_ifx:D\name_undefine:N\@gobble
% \end{macrocode}
%
-% Normally just set the catcodes, and let \LaTeXe\ handle the
-% package stack. If \LaTeXe\ resets @ reset the white space as well.
% \begin{macrocode}
+ \AtEndOfPackage{\ExplSyntaxOff}
\tex_def:D\name_pop_stack:w{}
- \g@addto@macro\@popfilename{%
- \tex_ifnum:D12=\tex_the:D\tex_catcode:D`@
- \CodeStop
- \tex_fi:D}
% \end{macrocode}
%
% \begin{macrocode}
@@ -1059,7 +1269,7 @@
% \begin{macrocode}
\tex_def:D\ProvidesPackage{
\tex_begingroup:D
- \CodeStop
+ \ExplSyntaxOff
\package_provides:w}
% \end{macrocode}
%
@@ -1079,7 +1289,7 @@
% one file, with no options.
% \begin{macrocode}
\tex_def:D\name_pop_stack:w#1\relax{%
- \CodeStop
+ \ExplSyntaxOff
\tex_expandafter:D\@p@pfilename\@currnamestack\@nil
\tex_let:D\default@ds\@unknownoptionerror
\tex_global:D\tex_let:D\ds@\@empty
@@ -1099,7 +1309,7 @@
\tex_def:D\RequirePackage#1{
\tex_expandafter:D\tex_ifx:D
\tex_csname:D ver@#1.sty\tex_endcsname:D\tex_relax:D
- \CodeStart
+ \ExplSyntaxOn
\tex_input:D#1.sty\tex_relax:D
\tex_fi:D}
\tex_fi:D
diff --git a/Master/texmf-dist/source/latex/expl3/l3num.dtx b/Master/texmf-dist/source/latex/expl3/l3num.dtx
index e74c57db79b..624cd7668e5 100644
--- a/Master/texmf-dist/source/latex/expl3/l3num.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3num.dtx
@@ -32,26 +32,21 @@
%%
%% -----------------------------------------------------------------------
%
-%<package>\RequirePackage{l3names}
-%<*dtx>
+%<*driver|package>
+\RequirePackage{l3names}
+%</driver|package>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-}
-%\iffalse
-%</dtx>
-%\fi
-\GetIdInfo$Id: l3num.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3num.dtx 702 2007-11-27 14:21:49Z morten $
{L3 Experimental token numbers}
-%
-% \iffalse
+%\iffalse
%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
-
\begin{document}
-\DocInput{l3num.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
% \fi
@@ -159,7 +154,9 @@
%
% \begin{function}{%
% \num_add:Nn |
+% \num_add:cn |
% \num_gadd:Nn |
+% \num_gadd:cn |
% }
% \begin{syntax}
% "\num_add:Nn" <num> "{" <integer> "}"
@@ -222,6 +219,25 @@
% A predicate version of the above functions.
% \end{function}
%
+% \begin{function}{%
+% \num_max_of:nn |
+% \num_min_of:nn |
+% }
+% \begin{syntax}
+% "\num_max_of:nn" "{"<num~expr>"}" "{"<num~expr>"}"
+% \end{syntax}
+% Return the largest or smallest of two \m{num} expressions.
+% \end{function}
+%
+% \begin{function}{%
+% \num_abs:n |
+% }
+% \begin{syntax}
+% "\num_abs:n" "{"<num~expr>"}"
+% \end{syntax}
+% Return the numerical value of a \m{num} expression.
+% \end{function}
+
%
% \subsection{Formatting a counter value}
%
@@ -283,6 +299,20 @@
%
%
% \begin{function}{%
+% \num_value:w |
+% }
+% \begin{syntax}
+% "\num_value:w" <integer> \\
+% "\num_value:w" <tokens> <optional space>
+% \end{syntax}
+% Expands <tokens> until an <integer> is formed. One space may be
+% gobbled in the process. Preferably use with "\num_eval:n".
+% \begin{texnote}
+% This is the \TeX{} primitive \tn{number}.
+% \end{texnote}
+% \end{function}
+%
+% \begin{function}{%
% \num_eval:w |
% }
% \begin{syntax}
@@ -345,11 +375,14 @@
%
% We start by ensuring that the required packages are loaded.
% \begin{macrocode}
+%<package>\ProvidesExplPackage
+%<package> {\filename}{\filedate}{\fileversion}{\filedescription}
%<package&!check>\RequirePackage{l3expan}\par
%<package&check>\RequirePackage{l3chk}\par
%<*initex|package>
% \end{macrocode}
%
+% \begin{macro}{\num_value:w}
% \begin{macro}{\num_eval:w}
% \begin{macro}{\if_num:w}
% \begin{macro}{\if_num_odd:w}
@@ -358,6 +391,7 @@
% Here are the remaining primitives for number comparisons and
% expressions.
% \begin{macrocode}
+\let_new:NN \num_value:w \tex_number:D
\let_new:NN \num_eval:w \etex_numexpr:D
\let_new:NN \if_num:w \tex_ifnum:D
\let_new:NN \if_num_odd:w \tex_ifodd:D
@@ -369,6 +403,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\use_arg_after_or:w}
% \begin{macro}{\use_arg_after_else:w}
@@ -514,15 +549,21 @@
% \end{macro}
%
% \begin{macro}{\num_add:Nn}
+% \begin{macro}{\num_add:cn}
% \begin{macro}{\num_gadd:Nn}
+% \begin{macro}{\num_gadd:cn}
% Adding is easily done as the second argument goes through
% |\num_eval:n|.
% \begin{macrocode}
\def_new:Npn \num_add:Nn #1#2 {\num_set:Nn #1{#1+#2}}
+\def_new:Npn \num_add:cn {\exp_args:Nc\num_add:Nn}
\def_new:Npn \num_gadd:Nn {\pref_global:D \num_add:Nn}
+\def_new:Npn \num_gadd:cn {\exp_args:Nc\num_gadd:Nn}
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
%
% \begin{macro}{\num_use:N}
@@ -563,6 +604,21 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\num_max_of:nn}
+% \begin{macro}{\num_min_of:nn}
+% \begin{macro}{\num_abs:n}
+% Functions for $\min$, $\max$, and absolute value.
+% \begin{macrocode}
+\def_new:Npn \num_abs:n#1{
+ \if_num:w \num_eval:n{#1}<\c_zero \exp_after:NN -\fi: #1
+}
+\def_new:Npn \num_max_of:nn#1#2{\num_compare:nNnTF {#1}>{#2}{#1}{#2}}
+\def_new:Npn \num_min_of:nn#1#2{\num_compare:nNnTF {#1}<{#2}{#1}{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{\l_tmpa_num}
% \begin{macro}{\l_tmpb_num}
% \begin{macro}{\l_tmpc_num}
@@ -593,7 +649,7 @@
% \begin{macro}{\const_new_aux:Nw}
% \begin{macrocode}
% \begin{macrocode}
-\engine_aleph:TF
+\engine_if_aleph:TF
{
\let_new:NN \const_new_aux:Nw \tex_chardef:D
\const_new_aux:Nw \c_max_register_num = 65535 \scan_stop:
diff --git a/Master/texmf-dist/source/latex/expl3/l3precom.dtx b/Master/texmf-dist/source/latex/expl3/l3precom.dtx
index de22e1fe5ab..786181d93b5 100644
--- a/Master/texmf-dist/source/latex/expl3/l3precom.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3precom.dtx
@@ -32,26 +32,21 @@
%%
%% -----------------------------------------------------------------------
%
-%<package>\RequirePackage{l3names}
-%<*dtx>
+%<*driver|package>
+\RequirePackage{l3names}
+%</driver|package>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-}
-%\iffalse
-%</dtx>
-%\fi
-\GetIdInfo$Id: l3precom.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3precom.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental precompilation module}
-%
-% \iffalse
+%\iffalse
%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
-
\begin{document}
-\DocInput{l3precom.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
% \fi
@@ -127,6 +122,8 @@
%
% We start by ensuring that the required packages are loaded.
% \begin{macrocode}
+%<package>\ProvidesExplPackage
+%<package> {\filename}{\filedate}{\fileversion}{\filedescription}
%<package>\RequirePackage{l3num}
%<package>\RequirePackage{l3io}
%<package>\RequirePackage{l3seq}
diff --git a/Master/texmf-dist/source/latex/expl3/l3prg.dtx b/Master/texmf-dist/source/latex/expl3/l3prg.dtx
index 43e2e77448a..72084e07132 100644
--- a/Master/texmf-dist/source/latex/expl3/l3prg.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3prg.dtx
@@ -32,30 +32,26 @@
%%
%% -----------------------------------------------------------------------
%
-%<package>\RequirePackage{l3names}
-%<*dtx>
+%<*driver|package>
+\RequirePackage{l3names}
+%</driver|package>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-}
-%\iffalse
-%</dtx>
-%\fi
-\GetIdInfo$Id: l3prg.dtx 574 2006-08-21 23:30:10Z morten $
+\GetIdInfo$Id: l3prg.dtx 697 2007-11-27 14:14:54Z morten $
{L3 Experimental control structures}
-%
-% \iffalse
+%\iffalse
%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
-
\begin{document}
-\DocInput{l3prg.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
% \fi
%
+%
% \title{The \textsf{l3prg} package\thanks{This file
% has version number \fileversion, last
% revised \filedate.}\\
@@ -69,25 +65,25 @@
%
% \subsection{Choosing modes}
%
-% \begin{function}{\mode_vertical_p:|
-% \mode_vertical:TF |
-% \mode_vertical:T |
-% \mode_vertical:F
+% \begin{function}{\mode_if_vertical_p:|
+% \mode_if_vertical:TF |
+% \mode_if_vertical:T |
+% \mode_if_vertical:F
% }
% \begin{syntax}
-% "\mode_vertical:TF" "{"<true code>"}" "{"<false code>"}"
+% "\mode_if_vertical:TF" "{"<true code>"}" "{"<false code>"}"
% \end{syntax}
% Determines if \TeX{} is in vertical mode or not and executes either
% <true code> or <false code> accordingly.
% \end{function}
%
-% \begin{function}{\mode_horizontal_p:|
-% \mode_horizontal:TF |
-% \mode_horizontal:T |
-% \mode_horizontal:F
+% \begin{function}{\mode_if_horizontal_p:|
+% \mode_if_horizontal:TF |
+% \mode_if_horizontal:T |
+% \mode_if_horizontal:F
% }
% \begin{syntax}
-% "\mode_horizontal:TF" "{"<true code>"}" "{"<false code>"}"
+% "\mode_if_horizontal:TF" "{"<true code>"}" "{"<false code>"}"
% \end{syntax}
% Determines if \TeX{} is in horizontal mode or not and executes either
% <true code> or <false code> accordingly.
@@ -95,25 +91,25 @@
%
%
% \begin{function}{
-% \mode_inner_p:|
-% \mode_inner:TF|
-% \mode_inner:T|
-% \mode_inner:F
+% \mode_if_inner_p:|
+% \mode_if_inner:TF|
+% \mode_if_inner:T|
+% \mode_if_inner:F
% }
% \begin{syntax}
-% "\mode_inner:TF" "{"<true code>"}" "{"<false code>"}"
+% "\mode_if_inner:TF" "{"<true code>"}" "{"<false code>"}"
% \end{syntax}
% Determines if \TeX{} is in inner mode or not and executes either
% <true code> or <false code> accordingly.
% \end{function}
%
% \begin{function}{
-% \mode_math:TF|
-% \mode_math:T|
-% \mode_math:F|
+% \mode_if_math:TF|
+% \mode_if_math:T|
+% \mode_if_math:F|
% }
% \begin{syntax}
-% "\mode_math:TF" "{"<true code>"}" "{"<false code>"}"
+% "\mode_if_math:TF" "{"<true code>"}" "{"<false code>"}"
% \end{syntax}
% Determines if \TeX{} is in math mode or not and executes either
% <true code> or <false code> accordingly.
@@ -214,14 +210,14 @@
% connected to both parts as sometimes you want to execute some code
% depending on the value of a switch (e.g.,~draft/final) and other
% times you perhaps want to use it as a predicate function in an
-% "\if:w" test. Here \TeX's original concept with "\iffalse" and
-% "\iftrue" is a little difficult to handle so the easiest is simply
-% to let a boolean either be "\c_true" or "\c_false". This also means
-% we get the logical operations And, Or, and Not which can then be
-% used on both the boolean type and predicate functions. All
-% functions by the name |\prg_if_predicate_| are expandable and
-% expect the input to also be fully expandable. More generic
-% constructs do not contain |predicate| in their names.
+% "\if:w" test. Parsing "\iffalse"
+% and "\iftrue" tokens can be quite tricky at times so the easiest is to
+% simply let a boolean either be "\c_true" or "\c_false". This
+% also means we get the logical operations And, Or, and Not which can
+% then be used on both the boolean type and predicate functions. All
+% functions by the name |\predicate| are expandable and expect the
+% input to also be fully expandable. More generic constructs do not
+% contain |predicate| in their names.
%
%
% \subsubsection{The boolean data type}
@@ -324,48 +320,49 @@
%
%
% \begin{function}{%
-% \prg_if_predicate:nTF |
-% \prg_if_predicate:nT |
-% \prg_if_predicate:nF |
+% \predicate_p:n |
+% \predicate:nTF |
+% \predicate:nT |
+% \predicate:nF |
% }
% \begin{syntax}
-% "\prg_if_predicate:nTF" "{"<predicate>"}" "{"<true>"}" "{"<false>"}" \\
+% "\predicate:nTF" "{"<list of predicates>"}" "{"<true>"}"
+% "{"<false>"}"
% \end{syntax}
-% The first argument can either be a predicate function like
-% "\cs_free_p:N \foo" or one of the logic tests below.
+% The functions evaluate the truth value of \m{list of predicates}
+% where each predicate is separated by \verb+&&+ or \verb+||+
+% denoting logical And and Or functions. Minimal evaluation is
+% carried out so that whenever a truth value cannot be changed
+% anymore, the remainding tests are not carried out. Hence
+% \begin{verbatim}
+% \predicate_p:n{
+% \int_compare_p:nNn 1=1 &&
+% \predicate_p:n {
+% \int_compare_p:nNn 2=3 ||
+% \int_compare_p:nNn 4=4 ||
+% \int_compare_p:nNn 1=\error % is skipped
+% } &&
+% \int_compare_p:nNn 2=2
+% }
+% \end{verbatim}
+% returns \meta{true}.
% \end{function}
%
%
%
%
% \begin{function}{%
-% \prg_if_predicate_ors_p:n |
-% \prg_if_predicate_or_p:nn |
-% \prg_if_predicate_ands_p:n |
-% \prg_if_predicate_and_p:nn |
-% \prg_if_predicate_not_p:n |
+% \predicate_not_p:n |
% }
% \begin{syntax}
-% "\prg_if_predicate_ors_p:n" "{"<predicate> <predicate> ..."}" \\
-% "\prg_if_predicate_or_p:nn" "{"<predicate>"}" "{"<predicate>"}" \\
-% "\prg_if_predicate_ands_p:n" "{"<predicate> <predicate> ..."}" \\
-% "\prg_if_predicate_and_p:nn" "{"<predicate>"}" "{"<predicate>"}" \\
-% "\prg_if_predicate_not_p:n" "{"<predicate>"}"
+% "\predicate_not_p:n" "{"<list of predicates>"}"
% \end{syntax}
-% "\prg_if_predicate_or_p:nn" compares the outcome of two predicate
-% functions (or other logic tests) and if either turns out to be
-% \m{true} returns \m{true} itself. "\prg_if_predicate_and_p:nn"
-% works in a similar way but requires both outcomes to be \m{true} in
-% order for it to return \m{true} itself. "\prg_if_predicate_not_p:n"
-% reverses the truth value of a predicate test or a logic
-% operation. Thus
+% "\predicate_not_p:n"
+% reverses the truth value of its argument. Thus
% \begin{quote}
% "\prg_if_predicate_not_p:n {\prg_if_predicate_not_p:n {\c_true}}"
% \end{quote}
-% ultimately returns \m{true}. The argument of the functions
-% "\prg_if_predicate_ors_p:n" and "\prg_if_predicate_ands_p:n" take a
-% list of predicate functions (and their arguments) and return either
-% \m{true} or \m{false}.
+% ultimately returns \m{true}.
% \end{function}
%
% \subsubsection{Generic loops}
@@ -446,6 +443,8 @@
% We start by ensuring that the required packages are loaded.
% \begin{macrocode}
%<*package>
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\RequirePackage{l3quark}
\RequirePackage{l3toks}
\RequirePackage{l3int}
@@ -456,57 +455,57 @@
%
% \subsubsection{Choosing modes}
%
-% \begin{macro}{\mode_vertical_p:}
-% \begin{macro}{\mode_vertical:TF}
-% \begin{macro}{\mode_vertical:T}
-% \begin{macro}{\mode_vertical:F}
+% \begin{macro}{\mode_if_vertical_p:}
+% \begin{macro}{\mode_if_vertical:TF}
+% \begin{macro}{\mode_if_vertical:T}
+% \begin{macro}{\mode_if_vertical:F}
% For testing vertical mode.
% \begin{macrocode}
-\def_new:Npn \mode_vertical_p: {
+\def_new:Npn \mode_if_vertical_p: {
\if_mode_vertical: \c_true \else: \c_false\fi:}
-\def_test_function_new:npn{mode_vertical:}{\if_mode_vertical:}
+\def_test_function_new:npn{mode_if_vertical:}{\if_mode_vertical:}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\mode_horizontal_p:}
-% \begin{macro}{\mode_horizontal:TF}
-% \begin{macro}{\mode_horizontal:T}
-% \begin{macro}{\mode_horizontal:F}
+% \begin{macro}{\mode_if_horizontal_p:}
+% \begin{macro}{\mode_if_horizontal:TF}
+% \begin{macro}{\mode_if_horizontal:T}
+% \begin{macro}{\mode_if_horizontal:F}
% For testing horizontal mode.
% \begin{macrocode}
-\def_new:Npn \mode_horizontal_p: {
+\def_new:Npn \mode_if_horizontal_p: {
\if_mode_horizontal: \c_true \else: \c_false\fi:}
-\def_test_function_new:npn{mode_horizontal:}{\if_mode_horizontal:}
+\def_test_function_new:npn{mode_if_horizontal:}{\if_mode_horizontal:}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\mode_inner_p:}
-% \begin{macro}{\mode_inner:TF}
-% \begin{macro}{\mode_inner:T}
-% \begin{macro}{\mode_inner:F}
+% \begin{macro}{\mode_if_inner_p:}
+% \begin{macro}{\mode_if_inner:TF}
+% \begin{macro}{\mode_if_inner:T}
+% \begin{macro}{\mode_if_inner:F}
% For testing inner mode.
% \begin{macrocode}
-\def_new:Npn \mode_inner_p: {
+\def_new:Npn \mode_if_inner_p: {
\if_mode_inner: \c_true \else: \c_false\fi:}
-\def_test_function_new:npn{mode_inner:}{\if_mode_inner:}
+\def_test_function_new:npn{mode_if_inner:}{\if_mode_inner:}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\mode_math:TF}
-% \begin{macro}{\mode_math:T}
-% \begin{macro}{\mode_math:F}
+% \begin{macro}{\mode_if_math:TF}
+% \begin{macro}{\mode_if_math:T}
+% \begin{macro}{\mode_if_math:F}
% For testing math mode. Uses the kern-save |\scan_align_safe_stop:|.
% \begin{macrocode}
-\def_test_function_new:npn{mode_math:} {
+\def_test_function_new:npn{mode_if_math:} {
\scan_align_safe_stop: \if_mode_math: }
% \end{macrocode}
% \end{macro}
@@ -535,8 +534,9 @@
% by using code documented only in Appendix~D of
% \emph{The \TeX book}\dots
% \begin{macrocode}
-\def_new:Npn \group_align_safe_begin: {\if_false:{\fi:\if_num:w0=`}\fi:}
-\def_new:Npn \group_align_safe_end: {\if_num:w0=`{\fi:\if_false:}\fi:}
+\def_new:Npn \group_align_safe_begin: {
+ \if_false:{\fi:\if_num:w`}=\c_zero\fi:}
+\def_new:Npn \group_align_safe_end: {\if_num:w`{=\c_zero}\fi:}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -797,15 +797,15 @@
% Defining and setting a boolean is easy.
% \begin{macrocode}
\def_new:Npn \bool_new:N #1 { \let_new:NN #1 \c_false }
-\def_new:Npn \bool_new:c #1 { \let_new:cN #1 \c_false }
+\def_new:Npn \bool_new:c #1 { \let_new:cN {#1} \c_false }
\def_new:Npn \bool_set_true:N #1 { \let:NN #1 \c_true }
-\def_new:Npn \bool_set_true:c #1 { \let:cN #1 \c_true }
+\def_new:Npn \bool_set_true:c #1 { \let:cN {#1} \c_true }
\def_new:Npn \bool_set_false:N #1 { \let:NN #1 \c_false }
-\def_new:Npn \bool_set_false:c #1 { \let:cN #1 \c_false }
+\def_new:Npn \bool_set_false:c #1 { \let:cN {#1} \c_false }
\def_new:Npn \bool_gset_true:N #1 { \glet:NN #1 \c_true }
-\def_new:Npn \bool_gset_true:c #1 { \glet:cN #1 \c_true }
+\def_new:Npn \bool_gset_true:c #1 { \glet:cN {#1} \c_true }
\def_new:Npn \bool_gset_false:N #1 { \glet:NN #1 \c_false }
-\def_new:Npn \bool_gset_false:c #1 { \glet:cN #1 \c_false }
+\def_new:Npn \bool_gset_false:c #1 { \glet:cN {#1} \c_false }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -995,177 +995,102 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\prg_if_predicate:nTF}
-% \begin{macro}{\prg_if_predicate:nT}
-% \begin{macro}{\prg_if_predicate:nF}
-% As the boolean type is actually a predicate function, the next ones
-% are just aliases.
-% \begin{macrocode}
-\let_new:NN \prg_if_predicate:nTF \bool_if:NTF
-\let_new:NN \prg_if_predicate:nT \bool_if:NT
-\let_new:NN \prg_if_predicate:nF \bool_if:NF
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\prg_if_predicate_or_p:nn}
-% \begin{macro}{\prg_if_predicate_and_p:nn}
-% \begin{macro}{\prg_if_predicate_not_p:n}
-% The logic operations require a little more work. The idea is to have
-% the end result of the logic "and" and "or" functions return "00" and
-% "01" resp.\ to be used in an "\if:w" test. The arguments of the
-% functions are always something expanding to "\c_true" or "\c_false"
-% which is usually resulting from a predicate function or from another
-% logical operation. All the functions start with a "0" and depending
-% on the results of the tests return either "0" or "1" to the input
-% stream to form a new true or false statement.
-%
-% The comments in the following is mostly to convince myseld of the
-% validity of the code.
-% \begin{macrocode}
-\def_new:Npn \prg_if_predicate_or_p:nn #1#2{
-% \end{macrocode}
-% Form a number of the input which is one of "0000", "0001", "0100", or
-% "0101". If the truth value of both tests are false we get the "0101"
-% else we get a number less than that. So we check if the number formed
-% is less than $101$.
-% \begin{macrocode}
- \if_num:w #1#2<\c_hundred_one
-% \end{macrocode}
-% If it is we put a "\c_true" back into the input stream.
+% \begin{macro}{\predicate_p:n}
+% \begin{macro}{\predicate:nTF}
+% \begin{macro}{\predicate:nT}
+% \begin{macro}{\predicate:nF}
+% \begin{macro}{\predicate_auxi:NN}
+% \begin{macro}{\predicate_auxii:NNN}
+% \begin{macro}{\predicate_88_0:w}^^A% fix!
+% \begin{macro}{\predicate_88_1:w}^^A% fix!
+% \begin{macro}{\predicate_II_0:w}^^A% fix!
+% \begin{macro}{\predicate_II_1:w}^^A fix!
+% \begin{macro}{\predicate_02_0:w}
+% \begin{macro}{\predicate_02_1:w}
+%
+% Evaluating the truth value of a list of predicates is done using
+% an input syntax somewhat similar to the one found in other
+% programming languages. The function evaluates predicates from
+% left to right, expanding them to 00 and 01 resp., which leads to
+% six different situations of tokens in the input stream:
+% \begin{itemize}
+% \item[\texttt{00\&\&}] Current truth value is true, logical And
+% seen, continue to see if next is also true.
+% \item[\texttt{01\&\&}] Current truth value is false, logical And
+% seen, break the scanning and return \meta{false}.
+% \item[\texttt{00\char`\|\char`\|}] Current truth value is true,
+% logical Or seen, break the scanning and return \meta{true}.
+% \item[\texttt{01\char`\|\char`\|}] Current truth value is false,
+% logical Or seen, continue to see if a later predicate is true.
+% \item[\texttt{0002}] Current truth value is true, end marker
+% seen, return \meta{true}.
+% \item[\texttt{0102}] Current truth value is false, end marker
+% seen, return \meta{false}.
+% \end{itemize}
+% To accomplish this we pre-expand the predicate list using |f|
+% type expansion which leads to |00| or |01|, possibly with a
+% sequence of unfinished |\else: \c_false \fi:| or similar after
+% it, which we remove using the same trick. We also carry over the
+% truth value of the evaluated predicate. The expansion stops when
+% it sees the end marker or \verb+&&+ or \verb+||+ (assuming these
+% are not active characters at the programming level).
% \begin{macrocode}
- \c_true
- \else:
-% \end{macrocode}
-% Otherwise we insert "\c_false".
-% \begin{macrocode}
- \c_false
- \fi:
+\def_long_new:Npn \predicate_p:n #1{
+ \group_align_safe_begin:
+ \exp_after:NN \predicate_auxi:NN
+ \int_to_roman:w-`\q #1 02\scan_stop:
}
-% \end{macrocode}
-% The "and" function is a little different. Again we can have input of
-% the types "0000", "0001", "0100", or "0101". As we require both
-% values to be \m{true} in order to continue we simply check if the
-% number formed by the input is "0" or not and then put the
-% corresponding "0" or "1" back in the input stream as above. We could
-% use "\if_num:w" for this test as well but that'll require us to read
-% the additional "=\c_zero" which runs a little slower than using
-% "\if_case:w" directly, so we use the latter.
-% \begin{macrocode}
-\def_new:Npn \prg_if_predicate_and_p:nn #1#2{
- \if_case:w #1#2 ~
- \c_true
- \else:
- \c_false
- \fi:
+\def_long_test_function_new:npn {predicate:n}#1{
+ \group_align_safe_begin:
+ \if:w \exp_after:NN \predicate_auxi:NN
+ \int_to_roman:w-`\q #1 02\scan_stop:
+}
+\def_new:Npn \predicate_auxi:NN 0 #1{
+ \exp_after:NN \predicate_auxii:NNN \exp_after:NN #1
+ \int_to_roman:w-`\q
}
% \end{macrocode}
-% The "not" function checks a single truth value and reverses it. Here
-% we either get a "00" or "01". If the input equals "0" we put a "1"
-% in the input stream, else we put a "0". Again we use "\if_case:w"
-% because it's slightly faster.
+% After removing trailing conditionals we call a macro for the case we
+% are in (see list above).
% \begin{macrocode}
-\def_new:Npn \prg_if_predicate_not_p:n #1{
- \if_case:w #1 ~
- \c_false
- \or:
- \c_true
- \fi:
+\def_new:Npn \predicate_auxii:NNN #1#2#3{
+ \cs_use:c{predicate_#2#3_#1:w} }
+\def_new:cpn{predicate_&&_0:w}{
+ \exp_after:NN \predicate_auxi:NN\int_to_roman:w-`\q
+}
+\def_long_new:cpn{predicate_&&_1:w} #1 02\scan_stop:{
+ \group_align_safe_end: 01}
+\def_long_new:cpn{predicate_||_0:w} #1 02\scan_stop:{
+ \group_align_safe_end: 00}
+\def_new:cpn{predicate_||_1:w}{
+ \exp_after:NN \predicate_auxi:NN\int_to_roman:w-`\q
}
+\def_new:cpn{predicate_02_0:w}\scan_stop:{ \group_align_safe_end: 00 }
+\def_new:cpn{predicate_02_1:w}\scan_stop:{ \group_align_safe_end: 01 }
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
%
-% \begin{macro}{\prg_if_predicate_ors_p:n}
-% \begin{macro}{\prg_if_predicate_ands_p:n}
-% \begin{macro}{\prg_if_predicate_andor_aux:NNN}
-% \begin{macro}{\prg_if_predicate_andor_break:NNN }
-% For longer lists of predicates we can't rely on such structures
-% as above. The "\prg_if_predicate_ands_p:n" would have been easy to
-% program as simply
-% \begin{verbatim}
-% \def_new:Npn \prg_if_predicate_and_p:n #1 {
-% 0\tex_ifcase:D #1 ~ \exp_after:NN 0 \else: \exp_after:NN 1 \fi:
-% }
-% \end{verbatim}
-% but this would fail with a "! Number too big." in case we were
-% testing six predicate functions where the first was false. This
-% would mean we would have to first convert the string from binary
-% into numerical and then check. While challenging and interesting
-% in itself (See \textsf{binhex}) it still imposes a restriction of
-% 15 predicate functions\footnote{We would probably never hit that
-% limit but why create a restriction when we can avoid it?} and we
-% haven't dealt with the "or" case either.
-%
-% The solution below expands a predicate function until |\c_false| or
-% |\c_true| are seen and expanded to |01| or |00| respectively. If
-% we're testing the logical AND operation, all predicate functions
-% must return \meta{true}; if they don't we can exit and return
-% \meta{false}. In an OR operation, we just need one predicate
-% function to return \meta{true}, the rest don't matter. Since every
-% expansion in the internal loop results in a result of either |00|
-% or |01|, we can test against this number to decide what to do.
-%
-% First up is the top level functions.
-% \begin{macrocode}
-\def_long_new:Npn \prg_if_predicate_ands_p:n #1{
- \exp_after:NN \prg_if_predicate_andor_aux:NNN \exp_after:NN \c_true
- \int_to_roman:w -`0 #1 \scan_stop: \scan_stop:
-}
-\def_long_new:Npn \prg_if_predicate_ors_p:n #1{
- \exp_after:NN \prg_if_predicate_andor_aux:NNN \exp_after:NN \c_false
- \int_to_roman:w -`0 #1 \scan_stop: \scan_stop:
-}
-% \end{macrocode}
-% When we reach the inner loop we have already expanded all tokens in
-% the first predicate function as far as possible. This means that
-% either are arguments |#2| and |#3| \emph{both} |\scan_stop:| or else
-% |#2| is |0| and |#3| is |0| if the predicate returned \meta{true} or
-% |1| if it returned \meta{false}. If we reached the end we return
-% \meta{true} for the AND function and \meta{false} for the OR
-% function. If |#3| is |0| and we are doing the OR test, we want to
-% exit and return \meta{true}. If |#3| is |0| and we are in the AND
-% test we must continue to check the remaining predicate functions. If
-% |#3| is |1| and we are in the OR test we continue in case a later
-% predicate function returns \meta{true}. Finally, if |#3| is |1| and
-% we are in the AND test we can exit and return \meta{false} before
-% deciding what to do.
-% \begin{macrocode}
-\def_new:Npn \prg_if_predicate_andor_aux:NNN #1#2#3{
- \token_if_eq_meaning:NNTF \scan_stop: #2
- { #1 }
- {
- \int_compare:nNnTF #3 = #1
- { \exp_after:NN \prg_if_predicate_andor_aux:NNN }
- { \exp_after:NN \prg_if_predicate_andor_break:NNN }
- \exp_after:NN #1 \int_to_roman:w -`0
- }
-}
-% \end{macrocode}
-% The break loop is called when we know what the final outcome
-% is. However we keep expanding because a)~we don't know which tokens
-% we might have left dangling ahead and b)~it also provides error
-% checking on the remaining predicate functions. |#1| is \meta{false}
-% for the OR function and \meta{true} for the AND function so we
-% reverse them here.
+% \begin{macro}{\predicate_not_p:n}
+% The "not" variant just reverses the outcome of |\predicate_p:n|.
% \begin{macrocode}
-\def_new:Npn \prg_if_predicate_andor_break:NNN #1#2#3{
- \token_if_eq_meaning:NNTF \scan_stop: #2
- { \if:w #1\c_false\else:\c_true\fi: }
- {
- \exp_after:NN \prg_if_predicate_andor_break:NNN \exp_after:NN #1
- \int_to_roman:w -`0
- }
+\def_long_new:Npn \predicate_not_p:n #1{
+ \if:w \predicate_p:n{#1} \c_false \else: \c_true \fi:
}
% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \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 2315892f1a6..22d7a7ecaeb 100644
--- a/Master/texmf-dist/source/latex/expl3/l3prop.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3prop.dtx
@@ -32,26 +32,21 @@
%%
%% -----------------------------------------------------------------------
%
-%<package>\RequirePackage{l3names}
-%<*dtx>
+%<*driver|package>
+\RequirePackage{l3names}
+%</driver|package>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-}
-%\iffalse
-%</dtx>
-%\fi
-\GetIdInfo$Id: l3prop.dtx 581 2006-12-12 12:28:27Z morten $
+\GetIdInfo$Id: l3prop.dtx 668 2007-09-27 15:54:23Z mittelba $
{L3 Experimental Property Lists}
-%
-% \iffalse
+%\iffalse
%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
-
\begin{document}
-\DocInput{l3prop.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
% \fi
@@ -95,21 +90,21 @@
% \end{function}
%
% \begin{function}{%
-% \prop_put:NNn |
+% \prop_put:Nnn |
% \prop_put:ccn |
-% \prop_gput:NNn |
-% \prop_gput:NNo |
-% \prop_gput:NOo |
+% \prop_gput:Nnn |
+% \prop_gput:Nno |
+% \prop_gput:Noo |
% \prop_gput:Ncn |
-% \prop_gput:OOo |
-% \prop_gput:NOx |
-% \prop_gput:cNn |
+% \prop_gput:Ooo |
+% \prop_gput:Nox |
+% \prop_gput:cnn |
% \prop_gput:ccn |
% \prop_gput:cco |
% \prop_gput:ccx |
% }
% \begin{syntax}
-% "\prop_put:NNn" <plist> <key> "{"<token list>"}"
+% "\prop_put:Nnn" <plist> "{"<key>"}" "{"<token list>"}"
% \end{syntax}
% Locally or globally associates <token list> with <key> in the p-list
% <plist>. If <key> has already a meaning within <plist> this value is
@@ -117,10 +112,10 @@
% \end{function}
%
% \begin{function}{%
-% \prop_gput_if_new:NNn |
+% \prop_gput_if_new:Nnn |
% }
% \begin{syntax}
-% "\prop_gput_if_new:NNn" <plist> <key> "{"<token list>"}"
+% "\prop_gput_if_new:Nnn" <plist> "{"<key>"}" "{"<token list>"}"
% \end{syntax}
% Globally associates <token list> with <key> in the p-list
% <plist> but only if <key> has so far no meaning within <plist>.
@@ -128,14 +123,14 @@
% \end{function}
%
% \begin{function}{%
-% \prop_get:NNN |
-% \prop_get:cNN |
-% \prop_gget:NNN |
+% \prop_get:NnN |
+% \prop_get:cnN |
+% \prop_gget:NnN |
% \prop_gget:NcN |
-% \prop_gget:cNN |
+% \prop_gget:cnN |
% }
% \begin{syntax}
-% "\prop_get:NNN" <plist> <key> <tlp>
+% "\prop_get:NnN" <plist> "{"<key>"}" <tlp>
% \end{syntax}
% If <info> is the information associated with <key> in the p-list
% <plist> then the token list pointer <tlp> gets <info> assigned.
@@ -157,21 +152,21 @@
% \end{function}
%
% \begin{function}{%
-% \prop_get_gdel:NNN |
+% \prop_get_gdel:NnN |
% }
% \begin{syntax}
-% "\prop_get_gdel:NNN" <plist> <key> <tlp>
+% "\prop_get_gdel:NnN" <plist> "{"<key>"}" <tlp>
% \end{syntax}
-% Like "\prop_get:NNN" but additionally removes <key> (and its <info>)
+% Like "\prop_get:NnN" but additionally removes <key> (and its <info>)
% from <plist>.
% \end{function}
%
% \begin{function}{%
-% \prop_del:NN |
-% \prop_gdel:NN |
+% \prop_del:Nn |
+% \prop_gdel:Nn |
% }
% \begin{syntax}
-% "\prop_del:NN" <plist> <key>
+% "\prop_del:Nn" <plist> "{"<key>"}"
% \end{syntax}
% Locally or globally deletes <key> and its <info> from <plist> if
% found. Otherwise does nothing.
@@ -180,6 +175,7 @@
%
% \begin{function}{\prop_map_function:NN |
% \prop_map_function:cN |
+% \prop_map_function:Nc |
% \prop_map_function:cc |
% }
% \begin{syntax}
@@ -197,8 +193,7 @@
% \end{syntax}
% Just like "\prop_map_function:NN" but with the function of two arguments
% supplied as inline code. Within <inline function> refer to the
-% arguments via "##1" (<key>) and "##2" (<info>). Fast but not
-% expandable.
+% arguments via "#1" (<key>) and "#2" (<info>). Nestable.
% \end{function}
%
%
@@ -235,12 +230,12 @@
%
%
% \begin{function}{%
-% \prop_if_in:NNTF |
-% \prop_if_in:NOTF |
+% \prop_if_in:NnTF |
+% \prop_if_in:NoTF |
% \prop_if_in:ccTF |
% }
% \begin{syntax}
-% "\prop_if_in:NNTF" <plist><key>"{"<true code>"}{"<false code>"}"
+% "\prop_if_in:NnTF" <plist>"{"<key>"}{"<true code>"}{"<false code>"}"
% \end{syntax}
% Tests if <key> is used in <plist> and then either executes <true code>
% or <false code>.
@@ -283,9 +278,9 @@
% "\prop_map_inline:NN".
% \end{function}
%
-% \begin{function}{\prop_split_aux:NNn}
+% \begin{function}{\prop_split_aux:Nnn}
% \begin{syntax}
-% "\prop_split_aux:NNn" <plist> <key> <cmd>
+% "\prop_split_aux:Nnn" <plist> <key> <cmd>
% \end{syntax}
% Internal function that invokes <cmd> with 3 arguments: 1st is the
% beginning of <plist> before <key>, 2nd is the value associated with
@@ -303,16 +298,26 @@
%
% We start by ensuring that the required packages are loaded.
% \begin{macrocode}
+%<package>\ProvidesExplPackage
+%<package> {\filename}{\filedate}{\fileversion}{\filedescription}
%<package>\RequirePackage{l3toks}\par
+%<package>\RequirePackage{l3quark}\par
%<*initex|package>
% \end{macrocode}
%
% A property list is a token register whose contents is
-% of the form `\zz{tok$\sb1$}\zv{val$\sb1$} \ldots{}
-% \zz{tok$\sb{}n$}\zv{val$\sb{}n$}'. The properties have to be single
+% of the form `\zz{q_prop}key$\sb1$\zz{q_prop}\zv{val$\sb1$} \ldots{}
+% \zz{q_prop}key$\sb n$\zz{q_prop}\zv{val$\sb{}n$}'.
+% The properties have to be single
% token, the values might be arbitrary token lists they get surrounded
% by braces.
%
+% \begin{macro}{\q_prop}
+% \begin{macrocode}
+\quark_new:N\q_prop
+% \end{macrocode}
+% \end{macro}
+
% To get values from property-lists, token lists should be passed to
% the appropriate functions.
%
@@ -343,56 +348,51 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\prop_use:N}
-% The same goes for clearing a property list, either
-% locally or globally.
-% \begin{macrocode}
-\let_new:NN \prop_use:N \toks_use:N
-% \end{macrocode}
-% \end{macro}
%
-% \begin{macro}{\prop_split_aux:NNn}
+%
+% \begin{macro}{\prop_split_aux:Nnn}
% |\prop_split_aux:NNn|\zz{plist}\zz{prop}\zz{cmd} invokes \zz{cmd}
% with 3 arguments: 1st is the beginning of \zz{plist} before
% \zz{prop}, 2nd is the value associated with \zz{prop}, 3rd is the
% rest of \zz{plist} after \zz{prop}. If there is no property
% \zz{prop} in \zz{plist}, then the 2nd argument will be |\q_no_value|
-% and the 3rd argument is empty; otherwise the 3rd argument has the two
-% extra tokens \zz{prop} |\q_no_value| at the end.
+% and the 3rd argument is empty; otherwise the 3rd argument has the
+% extra tokens |\q_prop| \zz{prop} |\q_prop| |\q_no_value| at the end.
% \begin{macrocode}
-\def_long_new:Npn \prop_split_aux:NNn #1#2#3{
- \def:Npn \tmp:w ##1#2##2##3\q_stop {#3{##1}{##2}{##3}}
- \exp_after:NN\tmp:w \prop_use:N#1#2\q_no_value \q_stop}
+\def_long_new:Npn \prop_split_aux:Nnn #1#2#3{
+ \def:Npn \tmp:w ##1\q_prop#2\q_prop##2##3\q_stop {#3{##1}{##2}{##3}}
+ \exp_after:NN\tmp:w \toks_use:N#1\q_prop#2\q_prop\q_no_value \q_stop
+}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\prop_get:NNN}
-% \begin{macro}{\prop_get:cNN}
+% \begin{macro}{\prop_get:NnN}
+% \begin{macro}{\prop_get:cnN}
% \begin{macro}{\prop_get_aux:w}
% |\prop_get:NNN |\zz{plist}\zz{prop}\zz{tlp} defines
% \zz{tlp} to be the value associated with \zz{prop} in \zz{plist},
% |\q_no_value| if not found.
% \begin{macrocode}
-\def_long_new:NNn \prop_get:NNN 2{
- \prop_split_aux:NNn #1#2\prop_get_aux:w}
-\def_long_new:NNn \prop_get_aux:w 4{\toks_set:Nn#4{#2}}
-\def_new:Npn \prop_get:cNN { \exp_args:Nc \prop_get:NNN }
+\def_long_new:NNn \prop_get:NnN 2{
+ \prop_split_aux:Nnn #1{#2}\prop_get_aux:w}
+\def_long_new:NNn \prop_get_aux:w 4{\tlp_set:Nx#4{\exp_not:n{#2}}}
+\def_new:Npn \prop_get:cnN { \exp_args:Nc \prop_get:NnN }
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\prop_gget:NNN}
+% \begin{macro}{\prop_gget:NnN}
% \begin{macro}{\prop_gget:NcN}
-% \begin{macro}{\prop_gget:cNN}
+% \begin{macro}{\prop_gget:cnN}
% \begin{macro}{\prop_gget_aux:w}
% The global version of the previous function.
% \begin{macrocode}
-\def_long_new:NNn \prop_gget:NNN 2{
- \prop_split_aux:NNn #1#2\prop_gget_aux:w}
-\def_new:Npn \prop_gget:NcN {\exp_args:NNc \prop_gget:NNN}
-\def_new:Npn \prop_gget:cNN {\exp_args:Nc \prop_gget:NNN}
-\def_long_new:NNn \prop_gget_aux:w 4{\toks_gset:Nn#4{#2}}
+\def_long_new:NNn \prop_gget:NnN 2{
+ \prop_split_aux:Nnn #1{#2}\prop_gget_aux:w}
+\def_new:Npn \prop_gget:NcN {\exp_args:NNc \prop_gget:NnN}
+\def_new:Npn \prop_gget:cnN {\exp_args:Nc \prop_gget:NnN}
+\def_long_new:NNn \prop_gget_aux:w 4{\tlp_gset:Nx#4{\exp_not:n{#2}}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -406,63 +406,66 @@
% from \m{property_list}. One probably also needs the local
% variants or only the local one, or\ldots\ We decide this later.
% \begin{macrocode}
-\def_long_new:NNn \prop_get_gdel:NNN 3{
- \prop_split_aux:NNn #1#2{\prop_get_del_aux:w #3{\toks_gset:Nn #1}#2}}
+\def_long_new:NNn \prop_get_gdel:NnN 3{
+ \prop_split_aux:Nnn #1{#2}{\prop_get_del_aux:w #3{\toks_gset:Nn #1}{#2}}}
\def_long_new:NNn \prop_get_del_aux:w 6{
- \quark_if_no_value:nF{#5} {
- \def:Npn \tmp:w ##1#3\q_no_value {#2{#4##1}}
+ \tlp_set:Nx #1{\exp_not:n{#5}}
+ \quark_if_no_value:NF #1 {
+ \def:Npn \tmp:w ##1\q_prop#3\q_prop\q_no_value {#2{#4##1}}
\tmp:w #6}
}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\prop_put:NNn}
+% \begin{macro}{\prop_put:Nnn}
% \begin{macro}{\prop_put:ccn}
-% \begin{macro}{\prop_gput:NNn}
-% \begin{macro}{\prop_gput:NNo}
-% \begin{macro}{\prop_gput:NNx}
-% \begin{macro}{\prop_gput:NOx}
-% \begin{macro}{\prop_gput:NOo}
+% \begin{macro}{\prop_gput:Nnn}
+% \begin{macro}{\prop_gput:Nno}
+% \begin{macro}{\prop_gput:Nnx}
+% \begin{macro}{\prop_gput:Nox}
+% \begin{macro}{\prop_gput:Noo}
% \begin{macro}{\prop_gput:Ncn}
-% \begin{macro}{\prop_gput:OOo}
+% \begin{macro}{\prop_gput:Ooo}
% \begin{macro}{\prop_gput:cNn}
% \begin{macro}{\prop_gput:ccn}
% \begin{macro}{\prop_gput:cco}
% \begin{macro}{\prop_gput:ccx}
% \begin{macro}{\prop_put_aux:w}
-% |\prop_put:NNn |\zz{plist}\zz{prop}\zv{val} adds/changes the
+% |\prop_put:Nnn |\zz{plist}\zz{prop}\zv{val} adds/changes the
% value associated with \zz{prop} in \zz{plist} to \zv{val}.
% \begin{macrocode}
-\def_long_new:NNn \prop_put:NNn 2{
- \prop_split_aux:NNn #1#2{
- \toks_clear:N #1
- \prop_put_aux:w {\toks_put_right:Nn #1}#2}
+\def_long_new:NNn \prop_put:Nnn 2{
+ \prop_split_aux:Nnn #1{#2}{
+ \prop_clear:N #1
+ \prop_put_aux:w {\toks_put_right:Nn #1}{#2}}
}
-\def_new:Npn \prop_put:ccn {\exp_args:Ncc \prop_put:NNn }
-\def_long_new:NNn \prop_gput:NNn 2{
- \prop_split_aux:NNn #1#2{
- \toks_gclear:N #1
- \prop_put_aux:w {\toks_gput_right:Nn #1}#2}
+\def_new:Npn \prop_put:ccn {\exp_args:Ncc \prop_put:Nnn }
+
+\def_long_new:NNn \prop_gput:Nnn 2{
+ \prop_split_aux:Nnn #1{#2}{
+ \prop_gclear:N #1
+ \prop_put_aux:w {\toks_gput_right:Nn #1}{#2}}
}
-\def_new:Npn \prop_gput:NNo {\exp_args:NNNo \prop_gput:NNn}
-\def_new:Npn \prop_gput:NNx {\exp_args:Nnnx \prop_gput:NNn}
-\def_new:Npn \prop_gput:NOx {\exp_args:Nnox \prop_gput:NNn}
-\def_new:Npn \prop_gput:NOo {\exp_args:NNOo \prop_gput:NNn}
-\def_new:Npn \prop_gput:Ncn {\exp_args:NNc \prop_gput:NNn }
-\def_new:Npn \prop_gput:OOo {\exp_args:NOOo \prop_gput:NNn}
-\def_new:Npn \prop_gput:cNn {\exp_args:Nc \prop_gput:NNn}
-\def_new:Npn \prop_gput:ccn {\exp_args:Ncc \prop_gput:NNn}
-\def_new:Npn \prop_gput:cco {\exp_args:Ncco \prop_gput:NNn}
-\def_new:Npn \prop_gput:ccx {\exp_args:Nccx \prop_gput:NNn}
+
\def_long_new:NNn \prop_put_aux:w 6{
- #1{#2{#6}#3}
- \quark_if_no_value:nF {#4}
+ #1{\q_prop#2\q_prop{#6}#3}
+ \tlist_if_empty:nF{#5}
{
- \def:Npn \tmp:w ##1#2\q_no_value {#1{##1}}
+ \def:Npn \tmp:w ##1\q_prop#2\q_prop\q_no_value {#1{##1}}
\tmp:w #5
}
}
+\def_new:Npn \prop_gput:Nno {\exp_args:NNno \prop_gput:Nnn}
+\def_new:Npn \prop_gput:Nnx {\exp_args:NNnx \prop_gput:Nnn}
+\def_new:Npn \prop_gput:Nox {\exp_args:NNox \prop_gput:Nnn}
+\def_new:Npn \prop_gput:Noo {\exp_args:NNoo \prop_gput:Nnn}
+\def_new:Npn \prop_gput:Ncn {\exp_args:NNc \prop_gput:Nnn}
+\def_new:Npn \prop_gput:Ooo {\exp_args:NOoo \prop_gput:Nnn}
+\def_new:Npn \prop_gput:cnn {\exp_args:Nc \prop_gput:Nnn}
+\def_new:Npn \prop_gput:ccn {\exp_args:Ncc \prop_gput:Nnn}
+\def_new:Npn \prop_gput:cco {\exp_args:Ncco \prop_gput:Nnn}
+\def_new:Npn \prop_gput:ccx {\exp_args:Nccx \prop_gput:Nnn}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -479,23 +482,21 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\prop_del:NN}
-% \begin{macro}{\prop_gdel:NN}
+% \begin{macro}{\prop_del:Nn}
+% \begin{macro}{\prop_gdel:Nn}
% \begin{macro}{\prop_del_aux:w}
% |\prop_del:NN |\zz{plist}\zz{prop} deletes the entry for
% \zz{prop} in \zz{plist}, if any.
% \begin{macrocode}
-\def_long_new:NNn \prop_del:NN 2{
- \prop_split_aux:NNn #1#2{\prop_del_aux:w {\toks_set:Nn #1}#2}}
-\def_long_new:NNn \prop_gdel:NN 2{
- \prop_split_aux:NNn #1#2{\prop_del_aux:w {\toks_gset:Nn #1}#2}}
-\def_long_new:NNn \prop_del_aux:w 5{\quark_if_no_value:nF {#4}
-% \end{macrocode}
-% I see no reason for updating the property list if we don't find
-% any entry.
-% \begin{macrocode}
-% {#1{#3}}
- {\def:Npn \tmp:w ##1#2\q_no_value {#1{#3##1}}\tmp:w #5}}
+\def_long_new:NNn \prop_del:Nn 2{
+ \prop_split_aux:Nnn #1{#2}{\prop_del_aux:w {\toks_set:Nn #1}{#2}}}
+\def_long_new:NNn \prop_gdel:Nn 2{
+ \prop_split_aux:Nnn #1{#2}{\prop_del_aux:w {\toks_gset:Nn #1}{#2}}}
+\def_long_new:NNn \prop_del_aux:w 5{
+ \def:Npn \tmp:w {#4}
+ \quark_if_no_value:NF \tmp:w
+ {\def:Npn \tmp:w ##1\q_prop#2\q_prop\q_no_value {#1{#3##1}}
+ \tmp:w #5}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -503,8 +504,8 @@
%
%
%
-% \begin{macro}{\prop_if_in:NNTF}
-% \begin{macro}{\prop_if_in:NOTF}
+% \begin{macro}{\prop_if_in:NnTF}
+% \begin{macro}{\prop_if_in:NoTF}
% \begin{macro}{\prop_if_in:ccTF}
% \begin{macro}{\prop_if_in_aux:w}
% |\prop_if_in:NNTF| \m{property_list} \m{property_key}
@@ -512,25 +513,26 @@
% \m{property_key} is on the \m{property_list} and then select
% either the true or false case.
% \begin{macrocode}
-\def_new:NNn \prop_if_in:NNTF 2{
- \prop_split_aux:NNn #1#2\prop_if_in_aux:w}
-\def_new:Npn \prop_if_in:NOTF {\exp_args:Nno \prop_if_in:NNTF}
-\def_new:Npn \prop_if_in:ccTF {\exp_args:Ncc \prop_if_in:NNTF}
+\def_new:NNn \prop_if_in:NnTF 2{
+ \prop_split_aux:Nnn #1{#2}\prop_if_in_aux:w}
\def_new:NNn \prop_if_in_aux:w 3{\quark_if_no_value:nFT {#2}}
+
+\def_new:Npn \prop_if_in:NoTF {\exp_args:NNo \prop_if_in:NnTF}
+\def_new:Npn \prop_if_in:ccTF {\exp_args:Ncc \prop_if_in:NnTF}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\prop_gput_if_new:NNn}
+% \begin{macro}{\prop_gput_if_new:Nnn}
% |\prop_gput_if_new:NNn| \m{property_list} \m{property_key}
% \m{property_value} is equivalent to
% \begin{tabbing}
% xxxxx\=xxxxx\= \kill
% |\prop_if_in:NNTF |\m{property}\m{property_key} \\
% \> |{}%| \\
-% \> |{\prop_gput:NNn| \\
+% \> |{\prop_gput:Nnn| \\
% \>\> \m{property_list} \\
% \>\> \m{property_key} \\
% \>\> \m{property_value}|}|
@@ -539,10 +541,10 @@
% F. and Louis A. which makes writing macros sometimes difficult; I
% find myself humming instead of working):
% \begin{macrocode}
-\def_long_new:NNn \prop_gput_if_new:NNn 2{
- \prop_split_aux:NNn #1#2{\prop_put_if_new_aux:w #1#2}}
+\def_long_new:NNn \prop_gput_if_new:Nnn 2{
+ \prop_split_aux:Nnn #1{#2}{\prop_put_if_new_aux:w #1{#2}}}
\def_long_new:NNn \prop_put_if_new_aux:w 6{
- \quark_if_no_value:nT {#4}{#1{#2{#6}#3}}}
+ \tlist_if_empty:nT {#5}{#1{\q_prop#2\q_prop{#6}#3}}}
% \end{macrocode}
% \end{macro}
%
@@ -558,12 +560,12 @@
% This makes two \m{plist}s have the same contents.
% \begin{macrocode}
\let_new:NN \prop_set_eq:NN \toks_set_eq:NN
-\let_new:NN \prop_set_eq:Nc \toks_set_eq:Nc
+\let_new:NN \prop_set_eq:Nc \toks_set_eq:Nc
\let_new:NN \prop_set_eq:cN \toks_set_eq:cN
-\let_new:NN \prop_set_eq:cc \toks_set_eq:cc
-\let_new:NN \prop_gset_eq:NN \toks_gset_eq:NN
+\let_new:NN \prop_set_eq:cc \toks_set_eq:cc
+\let_new:NN \prop_gset_eq:NN \toks_gset_eq:NN
\let_new:NN \prop_gset_eq:Nc \toks_gset_eq:Nc
-\let_new:NN \prop_gset_eq:cN \toks_gset_eq:cN
+\let_new:NN \prop_gset_eq:cN \toks_gset_eq:cN
\let_new:NN \prop_gset_eq:cc \toks_gset_eq:cc
% \end{macrocode}
% \end{macro}
@@ -622,13 +624,13 @@
% two arguments are equal; if they are not |#3| is executed.
% \begin{macrocode}
\def_new:NNn \prop_if_eq:NNTF 2 {
- \tlist_if_eq:xxTF{\prop_use:N #1}{\prop_use:N #2}
+ \tlist_if_eq:xxTF{\toks_use:N #1}{\toks_use:N #2}
}
\def_new:NNn \prop_if_eq:NNT 2 {
- \tlist_if_eq:xxT{\prop_use:N #1}{\prop_use:N #2}
+ \tlist_if_eq:xxT{\toks_use:N #1}{\toks_use:N #2}
}
\def_new:NNn \prop_if_eq:NNF 2 {
- \tlist_if_eq:xxF{\prop_use:N #1}{\prop_use:N #2}
+ \tlist_if_eq:xxF{\toks_use:N #1}{\toks_use:N #2}
}
\def_new:Npn \prop_if_eq:NcTF {\exp_args:NNc \prop_if_eq:NNTF}
\def_new:Npn \prop_if_eq:NcT {\exp_args:NNc \prop_if_eq:NNT}
@@ -655,33 +657,69 @@
%
% \begin{macro}{\prop_map_function:NN}
% \begin{macro}{\prop_map_function:cN}
+% \begin{macro}{\prop_map_function:Nc}
% \begin{macro}{\prop_map_function:cc}
-% \begin{macro}{\prop_map_function_aux:NNn}
+% \begin{macro}{\prop_map_function_aux:w}
% Maps a function on every entry in the property list. The
% function must take 2 arguments: a key and a value.
% \begin{macrocode}
\def_new:Npn \prop_map_function:NN #1#2{
- \exp_after:NN \prop_map_function_aux:NNn
- \exp_after:NN #2 \prop_use:N #1 \q_nil \q_no_value \q_stop
+ \exp_after:NN \prop_map_function_aux:w
+ \exp_after:NN #2 \toks_use:N #1 \q_prop{}\q_prop \q_no_value \q_stop
+}
+\def_new:Npn \prop_map_function_aux:w #1\q_prop#2\q_prop#3{
+ \if:w \tlist_if_empty_p:n{#2}
+ \exp_after:NN \prop_map_break:w
+ \fi:
+ #1{#2}{#3}
+ \prop_map_function_aux:w #1
+}
+% problem with the above impl, is that an empty key stops the mapping but all
+% other functions in the module allow the use of empty keys (as one value)
+
+\def:Npn \prop_map_function:NN #1#2{
+ \exp_after:NN \prop_map_function_aux:w
+ \exp_after:NN #2 \toks_use:N #1 \q_prop \q_no_value \q_prop \q_no_value
+}
+\def:Npn \prop_map_function_aux:w #1\q_prop#2\q_prop#3{
+ \quark_if_no_value:nF{#2}
+ {
+ #1{#2}{#3}
+ \prop_map_function_aux:w #1
+ }
+}
+% problem with the above impl is that \quark_if_no_value:nF is fairly slow and
+% if \quark_if_no_value:NF is used instead we have to do an assignment thus
+% making the mapping not expandable (is that important?)
+
+\def:Npn \prop_map_function:NN #1#2{
+ \exp_after:NN \prop_map_function_aux:w
+ \exp_after:NN #2 \toks_use:N #1 \q_prop \q_nil \q_prop \q_no_value \q_stop
}
-\def_new:Npn \prop_map_function_aux:NNn #1#2#3{
- \if_meaning:NN \q_nil #1
+\def:Npn \prop_map_function_aux:w #1\q_prop#2\q_prop#3{
+ \if_meaning:NN \q_nil #2
\exp_after:NN \prop_map_break:w
\fi:
- #1#2{#3}
- \prop_map_function_aux:NNn #1
+ #1{#2}{#3}
+ \prop_map_function_aux:w #1
}
+
+% (potential) problem with the above impl is that it will returns true is #2
+% contains more than just \q_nil thus executing whatever follows. Claim: this
+% can't happen :-) so we should be ok
+
\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}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\prop_map_inline:Nn}
% \begin{macro}{\prop_map_inline:cn}
-% \begin{macro}{\prop_map_inline_aux:Nn}
% \begin{macro}{\l_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
@@ -692,19 +730,15 @@
\num_incr:N \l_prop_inline_level_num
\def_long:cpn {prop_map_inline_ \num_use:N \l_prop_inline_level_num :n}
##1##2{#2}
- \exp_args:NcE \prop_map_function:N
- {prop_map_inline_ \num_use:N \l_prop_inline_level_num :n}
- \prop_use:N #1
- \q_nil \q_no_value \q_stop
+ \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
}
\def_new:Npn \prop_map_inline:cN { \exp_args:Nc \prop_map_inline:NN }
-
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
-% \end{macro}
%
% \begin{macro}{\prop_map_break:w}
% The break statement.
@@ -713,6 +747,37 @@
% \end{macrocode}
% \end{macro}
%
+% Finally a bunch of compatibility commands with the old syntax: they will
+% vanish soon!
+% \begin{macrocode}
+\def:Npn \prop_put:NNn {\typeout{Warning:~name~
+ changed~ to~ \string\prop_put:Nnn}\prop_put:Nnn}
+\def:Npn \prop_gput:NNn {\typeout{Warning:~name~
+ changed~ to~ \string\prop_gput:Nnn }\prop_gput:Nnn }
+\def:Npn \prop_gput:NNo {\typeout{Warning:~name~
+ changed~ to~ \string\prop_gput:Nno }\prop_gput:Nno }
+\def:Npn \prop_gput:cNn {\typeout{Warning:~name~
+ changed~ to~ \string\prop_gput:cnn }\prop_gput:cnn }
+\def:Npn \prop_gput_if_new:NNn {\typeout{Warning:~name~
+ changed~ to~ \string\prop_gput_if_new:Nnn }\prop_gput_if_new:Nnn }
+\def:Npn \prop_get:NNN {\typeout{Warning:~name~
+ changed~ to~ \string\prop_get:NnN }\prop_get:NnN }
+\def:Npn \prop_get:cNN {\typeout{Warning:~name~
+ changed~ to~ \string\prop_get:cnN }\prop_get:cnN }
+\def:Npn \prop_gget:NNN {\typeout{Warning:~name~
+ changed~ to~ \string\prop_gget:NnN }\prop_gget:NnN }
+\def:Npn \prop_gget:cNN {\typeout{Warning:~name~
+ changed~ to~ \string\prop_gget:cnN }\prop_gget:cnN }
+\def:Npn \prop_get_gdel:NNN {\typeout{Warning:~name~
+ changed~ to~ \string\prop_get_gdel:NnN }\prop_get_gdel:NnN }
+\def:Npn \prop_del:NN {\typeout{Warning:~name~
+ changed~ to~ \string\prop_del:Nn }\prop_del:Nn }
+\def:Npn \prop_gdel:NN {\typeout{Warning:~name~
+ changed~ to~ \string\prop_gdel:Nn }\prop_gdel:Nn }
+\def:Npn \prop_if_in:NNTF {\typeout{Warning:~name~
+ changed~ to~ \string\prop_if_in:NnTF }\prop_if_in:NnTF }
+% \end{macrocode}
+%
% Show token usage:
% \begin{macrocode}
%</initex|package>
@@ -728,123 +793,9 @@
\file_input_stop:
% \end{macrocode}
%
-%
-% \section {Properties}
-%
-%
-% This is the version that uses individual pointers to hold the values.
-% maybe we need both?
-% It is currently disabled because it does not work with the
-% implementation of the mark mechanism.
-%
-% A property list is a control sequence whose top_level expansion is
-% of the form `\zz{tok$\sb1$}\zv{val$\sb1$} \ldots{}
-% \zz{tok$\sb{}n$}\zv{val$\sb{}n$}'. The properties have to be single token,
-% the values might be arbitrary token lists they get surrounded by
-% braces.
-%
-% To get values from property_lists token_lists should be passed to
-% the appropriate functions.
-%
-%
-% \begin{macro}{\prop_split_aux:NNn}
-% |\prop_split_aux:NNn|\zz{plist}\zz{prop}\zz{cmd} invokes \zz{cmd}
-% with 3 arguments: 1st is the beginning of \zz{plist} before
-% \zz{prop}, 2nd is the value associated with \zz{prop}, 3rd is the
-% rest of \zz{plist} after \zz{prop}. If there is no property
-% \zz{prop} in \zz{plist}, then the 2 arg is |\q_no_value | and
-% the 3rd arg is empty; otherwise the 3rd argument has the two
-% extra tokens \zz{prop} |\q_no_value| at the end.
-% \begin{macrocode}
-\def_long:Npn \prop_split_aux:NNn #1#2#3{
- \def:Npn \tmp:w ##1#2##2##3\q_stop {#3{##1}##2{##3}}
- \exp_after:NN\tmp:w #1#2\q_no_value \q_stop}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\prop_get:NNN}
-% \begin{macro}{\prop_get_aux:w}
-% |\prop_get:NNN |\zz{plist}\zz{prop}\zz{tlp} defines
-% command to be the value associated with \zz{prop} in \zz{plist},
-% |\q_no_value| if not found.
-% \begin{macrocode}
-\def_long:Npn \prop_get:NNN #1#2{\prop_split_aux:NNn
- #1#2\prop_get_aux:w}
-\def_long:Npn \prop_get_aux:w #1#2#3#4{\tlp_set_eq:NN#4#2}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\prop_put:NNn}
-% \begin{macro}{\prop_put_aux:w}
-% \begin{macro}{\prop_gput:NNn}
-% \begin{macro}{\prop_gput:NNx}
-% \begin{macro}{\prop_gput:NNo}
-% \begin{macro}{\prop_gput:NOx}
-% \begin{macro}{\prop_gput:NOo}
-% \begin{macro}{\prop_gput:OOo}
-% \begin{macro}{\prop_gput:ccx}
-% |\prop_put:NNn |\zz{plist}\zz{prop}\zv{val} adds/changes the
-% value associated with \zz{prop} in \zz{plist} to \zv{val}.
-% \begin{macrocode}
-\def_long:Npn \prop_put:NNn #1#2{\prop_split_aux:NNn
- #1#2{\prop_put_aux:w \tlp_set:Nn #1#2}}
-\def_long:Npn \prop_gput:NNn #1#2{\prop_split_aux:NNn
- #1#2{\prop_put_aux:w \tlp_gset:Nn #1#2}}
-\def:Npn \prop_gput:NNo {\exp_args:Nnno \prop_gput:NNn}
-\def:Npn \prop_gput:NOx {\exp_args:Nnox \prop_gput:NNn}
-\def:Npn \prop_gput:NNx {\exp_args:Nnnx \prop_gput:NNn}
-\def:Npn \prop_gput:NOo {\exp_args:NNOo \prop_gput:NNn}
-\def:Npn \prop_gput:OOo {\exp_args:NOOo \prop_gput:NNn}
-\def:Npn \prop_gput:ccn {\exp_args:Ncc \prop_gput:NNn}
-\def:Npn \prop_gput:ccx {\exp_args:Nccx \prop_gput:NNn}
-\def_long:Npn \prop_put_aux:w #1#2#3#4#5#6#7{
- \quark_if_no_value:nTF#5
- {
- \cs_ggen_sym:N\l_testa_tlp
- \exp_after:NN#1\exp_after:NN#2\exp_after:NN{\exp_after:NN#3\l_testa_tlp#4}
- \exp_after:NN\tlp_gset:Nn\l_testa_tlp
- }
- {#1#5}
- {#7}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-%
-% Show token usage:
% \begin{macrocode}
-%<*showmemory>
-%\showMemUsage
-%</showmemory>
%</unused>
% \end{macrocode}
%
% \endinput
%
-% $Log$
-% Revision 1.15 2006/03/20 18:26:38 braams
-% Updated the copyright notice (2006) and demoted all implementation
-% sections to subsections and so on to clean up the toc for source3.tex
-%
-% Revision 1.14 2005/12/27 16:00:44 morten
-% Update map functions and changed RCS information retrieval
-%
-% Revision 1.13 2005/03/22 23:26:14 morten
-% Added more functions, removed dependency of l3seq
-%
-% Revision 1.12 2005/03/16 22:36:04 braams
-% Added the tweaks necessary to be able to load with initex
-%
-% Revision 1.11 2005/03/11 21:40:35 braams
-% Fixed the use of RCS information; added \StopEventually
-%
diff --git a/Master/texmf-dist/source/latex/expl3/l3quark.dtx b/Master/texmf-dist/source/latex/expl3/l3quark.dtx
index 2511109c1cf..5379adeeda2 100644
--- a/Master/texmf-dist/source/latex/expl3/l3quark.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3quark.dtx
@@ -32,26 +32,21 @@
%%
%% -----------------------------------------------------------------------
%
-%<package>\RequirePackage{l3names}
-%<*dtx>
+%<*driver|package>
+\RequirePackage{l3names}
+%</driver|package>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-}
-%\iffalse
-%</dtx>
-%\fi
-\GetIdInfo$Id: l3quark.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3quark.dtx 705 2007-12-02 22:14:25Z morten $
{L3 Experimental Quark Commands}
-%
-% \iffalse
+%\iffalse
%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
-
\begin{document}
-\DocInput{l3quark.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
% \fi
@@ -85,6 +80,9 @@
%
% By convention all constants of type quark start out with "\q_".
%
+% The documentation needs some updating.
+%
+%
% \subsection{Functions}
%
% \begin{function}{%
@@ -171,6 +169,60 @@
% "\q_nil" as an end marker.
% \end{function}
%
+% \subsection{Recursion}
+%
+% This module provides a uniform interface to intercepting and
+% terminating loops as when one is doing tail recursion. The building
+% blocks follow below.
+%
+% \begin{variable}{\q_recursion_tail}
+% This quark is appended to the data structure in question and
+% appears as a real element there. This means it gets any list
+% separators around it.
+% \end{variable}
+%
+% \begin{variable}{\q_recursion_stop}
+% This quark is added \emph{after} the data structure. Its purpose
+% is to make it possible to terminate the recursion at any point
+% easily.
+% \end{variable}
+%
+% \begin{function}{%
+% \quark_if_recursion_tail_stop:N |
+% \quark_if_recursion_tail_stop:n |
+% \quark_if_recursion_tail_stop:o |
+% }
+% \begin{syntax}
+% "\quark_if_recursion_tail_stop:n" "{"<list element>"}" \\
+% "\quark_if_recursion_tail_stop:N" <list element>
+% \end{syntax}
+% This tests whether or not <list element> is equal to
+% "\q_recursion_tail" and then exits, i.e., it gobbles the remainder of
+% the list up to and including "\q_recursion_stop" which \emph{must}
+% be present.
+%
+% If <list element> is not under your complete control it is advisable
+% to use the "n". If you wish to use the "N" form you \emph{must}
+% ensure it is really a single token such as if you have
+% \begin{quote}
+% "\tlp_set:Nn \l_tmpa_tlp {" <list element> "}"
+% \end{quote}
+% \end{function}
+%
+% \begin{function}{%
+% \quark_if_recursion_tail_stop_do:Nn |
+% \quark_if_recursion_tail_stop_do:nn |
+% \quark_if_recursion_tail_stop_do:on |
+% }
+% \begin{syntax}
+% "\quark_if_recursion_tail_stop_do:nn"\\
+% "{"<list element>"}" "{" <post action> "}"
+% "\quark_if_recursion_tail_stop_do:Nn"
+% <list element> "{" <post action> "}"
+% \end{syntax}
+% Same as "\quark_if_recursion_tail_stop:N" except here the second
+% argument is executed after the recursion has been terminated.
+% \end{function}
%
% \subsection{Constants}
%
@@ -196,6 +248,8 @@
% We check for \texttt{l3expan} since this a basic package that is
% essential for use of any higher-level package.
% \begin{macrocode}
+%<package>\ProvidesExplPackage
+%<package> {\filename}{\filedate}{\fileversion}{\filedescription}
%<package>\RequirePackage{l3expan}\par
%<*initex|package>
% \end{macrocode}
@@ -236,6 +290,94 @@
% \end{macro}
%
%
+% \begin{macro}{\q_recursion_tail}
+% \begin{macro}{\q_recursion_stop}
+% Quarks for ending recursions. Only ever used there!
+% |\q_recursion_tail| is appended to whatever list structure we are
+% doing recursion on, meaning it is added as a proper list item with
+% whatever list separator is in use. |\q_recursion_stop| is placed
+% directly after the list.
+% \begin{macrocode}
+\quark_new:N\q_recursion_tail
+\quark_new:N\q_recursion_stop
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\quark_if_recursion_tail_stop:n}
+% \begin{macro}{\quark_if_recursion_tail_stop:N}
+% \begin{macro}{\quark_if_recursion_tail_stop:o}
+% When doing recursions it is easy to spend a lot of time testing if
+% we found the end marker. To avoid this, we use a recursion end
+% marker every time we do this kind of task. Also, if the recursion
+% end marker is found, we wrap things up and finish.
+% \begin{macrocode}
+\def_long_new:Npn \quark_if_recursion_tail_stop:n #1 {
+ \exp_after:NN\if_meaning:NN
+ \quark_if_recursion_tail_aux:w #1?\q_nil\q_recursion_tail\q_recursion_tail
+ \exp_after:NN \use_none_delimit_by_q_recursion_stop:w
+ \fi:
+}
+\def_long_new:Npn \quark_if_recursion_tail_stop:N #1 {
+ \if_meaning:NN#1\q_recursion_tail
+ \exp_after:NN \use_none_delimit_by_q_recursion_stop:w
+ \fi:
+}
+\def_new:Npn \quark_if_recursion_tail_stop:o{
+ \exp_args:No\quark_if_recursion_tail_stop:n
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\quark_if_recursion_tail_stop_do:nn}
+% \begin{macro}{\quark_if_recursion_tail_stop_do:Nn}
+% \begin{macro}{\quark_if_recursion_tail_stop_do:on}
+% \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
+ \exp_after:NN \use_arg_i_delimit_by_q_recursion_stop:nw
+ \else:
+ \exp_after:NN\use_none:n
+ \fi:
+ {#2}
+}
+\def_long_new:Npn \quark_if_recursion_tail_stop_do:Nn #1#2 {
+ \if_meaning:NN #1\q_recursion_tail
+ \exp_after:NN \use_arg_i_delimit_by_q_recursion_stop:nw
+ \else:
+ \exp_after:NN\use_none:n
+ \fi:
+ {#2}
+}
+\def_new:Npn \quark_if_recursion_tail_stop_do:on{
+ \exp_args:No\quark_if_recursion_tail_stop_do:nn
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\quark_if_recursion_tail_aux:w}
+% \begin{macro}{\use_none_delimit_by_q_recursion_stop:w}
+% \begin{macro}{\use_arg_i_delimit_by_q_recursion_stop:nw}
+% Helper macros for picking up the first token of a list to see if
+% it is "\q_recursion_tail" and to stop the recursion.
+% \begin{macrocode}
+\def_long_new:Npn \quark_if_recursion_tail_aux:w
+ #1#2\q_nil\q_recursion_tail{#1}
+\def_long_new:Npn\use_none_delimit_by_q_recursion_stop:w
+ #1\q_recursion_stop {}
+\def_long_new:Npn\use_arg_i_delimit_by_q_recursion_stop:nw
+ #1#2\q_recursion_stop {#1}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
% \begin{macro}{\quark_if_no_value_p:N}
% \begin{macro}{\quark_if_no_value:NTF}
% \begin{macro}{\quark_if_no_value:NT}
diff --git a/Master/texmf-dist/source/latex/expl3/l3seq.dtx b/Master/texmf-dist/source/latex/expl3/l3seq.dtx
index dff922a84d2..259d5630c43 100644
--- a/Master/texmf-dist/source/latex/expl3/l3seq.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3seq.dtx
@@ -32,27 +32,21 @@
%%
%% -----------------------------------------------------------------------
%
-%<package>\RequirePackage{l3names}
-%<*dtx>
+%<*driver|package>
+\RequirePackage{l3names}
+%</driver|package>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-}
-%\iffalse
-%</dtx>
-%\fi
-\GetIdInfo$Id: l3seq.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3seq.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental sequences and stacks}
-%
-%
-% \iffalse
+%\iffalse
%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
-
\begin{document}
-\DocInput{l3seq.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
% \fi
@@ -375,6 +369,8 @@
%
% We start by ensuring that the required packages are loaded.
% \begin{macrocode}
+%<package>\ProvidesExplPackage
+%<package> {\filename}{\filedate}{\fileversion}{\filedescription}
%<package&!check>\RequirePackage{l3quark}
%<package&!check>\RequirePackage{l3tlp}
%<package&check>\RequirePackage{l3chk}
diff --git a/Master/texmf-dist/source/latex/expl3/l3skip.dtx b/Master/texmf-dist/source/latex/expl3/l3skip.dtx
index fee0baa4d0a..11545f09d82 100644
--- a/Master/texmf-dist/source/latex/expl3/l3skip.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3skip.dtx
@@ -1,5 +1,5 @@
% \iffalse
-%% File: l3skip.dtx Copyright (C) 2005-2006 Frank Mittelbach, LaTeX3 project
+%% File: l3skip.dtx Copyright (C) 2005-2007 Frank Mittelbach, 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
@@ -32,26 +32,21 @@
%%
%% -----------------------------------------------------------------------
%
-%<package>\RequirePackage{l3names}
-%<*dtx>
+%<*driver|package>
+\RequirePackage{l3names}
+%</driver|package>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-}
-%\iffalse
-%</dtx>
-%\fi
-\GetIdInfo$Id: l3skip.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3skip.dtx 666 2007-09-27 15:53:26Z mittelba $
{L3 Experimental skip registers}
-%
-% \iffalse
+%\iffalse
%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
-
\begin{document}
-\DocInput{l3skip.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
% \fi
@@ -125,6 +120,7 @@
% \skip_add:Nn |
% \skip_add:cn |
% \skip_gadd:Nn |
+% \skip_gadd:cn |
% }
% \begin{syntax}
% "\skip_add:Nn" <skip> "{" <length> "}"
@@ -315,6 +311,7 @@
% \dim_add:Nn |
% \dim_add:cn |
% \dim_gadd:Nn |
+% \dim_gadd:cn |
% }
% \begin{syntax}
% "\dim_add:Nn" <dim> "{" <length> "}"
@@ -519,6 +516,8 @@
%
% We start by ensuring that the required packages are loaded.
% \begin{macrocode}
+%<package>\ProvidesExplPackage
+%<package> {\filename}{\filedate}{\fileversion}{\filedescription}
%<package&!check>\RequirePackage{l3int}
%<package&!check>\RequirePackage{l3prg}
%<package&check>\RequirePackage{l3chk}
@@ -740,10 +739,9 @@
% and the logic test will take the true branch.
% \begin{macrocode}
\def_new:Npn \skip_infinite_glue:nTF #1{
- \prg_logic_test:nTF {
- \prg_logic_or_p:nn
- { \int_compare_p:nNn {\etex_gluestretchorder:D #1 } > \c_zero }
- { \int_compare_p:nNn {\etex_glueshrinkorder:D #1 } > \c_zero }
+ \predicate:nTF {
+ \int_compare_p:nNn {\etex_gluestretchorder:D #1 } > \c_zero ||
+ \int_compare_p:nNn {\etex_glueshrinkorder:D #1 } > \c_zero
}
}
% \end{macrocode}
@@ -840,6 +838,7 @@
% \begin{macro}{\dim_add:cn}
% \begin{macro}{\dim_add:Nc}
% \begin{macro}{\dim_gadd:Nn}
+% \begin{macro}{\dim_gadd:cn}
% Addition.
% \begin{macrocode}
\def_new:Npn \dim_add:Nn #1#2{
@@ -852,27 +851,32 @@
\def_new:Npn\dim_add:cn{\exp_args:Nc\dim_add:Nn}
\def_new:Npn\dim_add:Nc{\exp_args:NNc\dim_add:Nn}
\def_new:Npn \dim_gadd:Nn { \pref_global:D \dim_add:Nn }
+\def_new:Npn\dim_gadd:cn{\exp_args:Nc\dim_gadd:Nn}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\dim_sub:Nn}
% \begin{macro}{\dim_sub:cn}
% \begin{macro}{\dim_sub:Nc}
% \begin{macro}{\dim_gsub:Nn}
+% \begin{macro}{\dim_gsub:cn}
% Subtracting.
% \begin{macrocode}
\def_new:Npn \dim_sub:Nn #1#2{\tex_advance:D#1-#2\scan_stop:}
\def_new:Npn\dim_sub:cn{\exp_args:Nc\dim_sub:Nn}
\def_new:Npn\dim_sub:Nc{\exp_args:NNc\dim_sub:Nn}
\def_new:Npn \dim_gsub:Nn {\pref_global:D \dim_sub:Nn }
+\def_new:Npn\dim_gsub:cn{\exp_args:Nc\dim_gsub:Nn}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\dim_use:N}
% \begin{macro}{\dim_use:c}
diff --git a/Master/texmf-dist/source/latex/expl3/l3tlp.dtx b/Master/texmf-dist/source/latex/expl3/l3tlp.dtx
index 9cf83e3912b..8cf7b54eb5f 100644
--- a/Master/texmf-dist/source/latex/expl3/l3tlp.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3tlp.dtx
@@ -1,5 +1,5 @@
% \iffalse
-%% File: l3tlp.dtx Copyright (C) 1990-2006 LaTeX3 project
+%% File: l3tlp.dtx Copyright (C) 1990-2007 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
@@ -32,25 +32,21 @@
%%
%% -----------------------------------------------------------------------
%
-%<package>\RequirePackage{l3names}
-%<*dtx>
+%<*driver|package>
+\RequirePackage{l3names}
+%</driver|package>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-}
-%\iffalse
-%</dtx>
-%\fi
-\GetIdInfo$Id: l3tlp.dtx 581 2006-12-12 12:28:27Z morten $
+\GetIdInfo$Id: l3tlp.dtx 735 2008-01-14 22:31:02Z morten $
{L3 Experimental Token List Pointers}
-%
-% \iffalse
+%\iffalse
%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
\begin{document}
-\DocInput{l3tlp.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
% \fi
@@ -83,7 +79,9 @@
%
% \subsection{Functions}
%
-% \begin{function}{\tlp_new:Nn |
+% \begin{function}{\tlp_new:N |
+% \tlp_new:c |
+% \tlp_new:Nn |
% \tlp_new:cn |
% \tlp_new:Nx }
% \begin{syntax}
@@ -92,6 +90,8 @@
% Defines <tlp> to be a new variable (or constant) of type token list
% pointer. <initial token list> is the initial value of <tlp>. This
% makes it possible to assign values to a constant token list pointer.
+%
+% The form "\tlp_new:N" initializes the token list pointer with an empty value.
% \end{function}
%
% \begin{function}{%
@@ -101,18 +101,23 @@
% \begin{syntax}
% "\tlp_use:N" <tlp>
% \end{syntax}
-% Function that inserts the <tlp> into the processing stream.
+% Function that inserts the <tlp> into the processing stream. Instead of
+% |\tlp_use:N| simply placing the <tlp> into the input stream is also
+% supported.|\tlp_use:c| will complain is the <tlp> hasn't been declared
+% previously!
% \end{function}
%
% \begin{function}{%
% \tlp_set:Nn |
% \tlp_set:Nc |
% \tlp_set:No |
+% \tlp_set:Nd |
% \tlp_set:Nf |
% \tlp_set:Nx |
% \tlp_gset:Nn |
% \tlp_gset:Nc |
% \tlp_gset:No |
+% \tlp_gset:Nd |
% \tlp_gset:Nx |
% \tlp_gset:cn |
% \tlp_gset:cx }
@@ -156,13 +161,17 @@
% \begin{function}{%
% \tlp_put_left:Nn |
% \tlp_put_left:No |
+% \tlp_put_left:Nx |
% \tlp_gput_left:Nn |
% \tlp_gput_left:No |
% \tlp_gput_left:Nx |
% \tlp_put_right:Nn |
+% \tlp_put_right:No |
+% \tlp_put_right:Nx |
% \tlp_put_right:cc |
% \tlp_gput_right:Nn |
% \tlp_gput_right:No|
+% \tlp_gput_right:Nx|
% \tlp_gput_right:cn|
% \tlp_gput_right:co|
% }
@@ -174,6 +183,21 @@
% list> might be subject to expansion before assignment.
% \end{function}
%
+% A word of warning is appropriate here: Token list pointers are
+% implemented as macros and as such currently inherit some of the
+% peculiarities of how \TeX\ handles "#"s in the argument of
+% macros. In particular, the following actions are legal
+% \begin{verbatim}
+% \tlp_set:Nn \l_tmpa_tlp{##1}
+% \tlp_put_right:Nn \l_tmpa_tlp{##2}
+% \tlp_set:No \l_tmpb_tlp{\l_tmpa_tlp ##3}
+% \end{verbatim}
+% |x| type expansions where macros being expanded contain |#|s do not
+% work and will not work until there is an |\expanded| primitive in
+% the engine. If you want them to work you must double |#|s another
+% level.
+%
+%
% \begin{function}{%
% \tlp_set_eq:NN |
% \tlp_set_eq:Nc |
@@ -487,9 +511,6 @@
% support arbitrary string comparison.
% \end{variable}
%
-% \begin{function}{\tlp_put_left_aux:w}
-% Used by "\tlp_put_left:Nn" and its variants.
-% \end{function}
%
% \begin{function}{\tlp_to_str_aux:w}
% Function used to implement "\tlp_to_str:N".
@@ -656,6 +677,8 @@
%
% We start by ensuring that the required packages are loaded.
% \begin{macrocode}
+%<package>\ProvidesExplPackage
+%<package> {\filename}{\filedate}{\fileversion}{\filedescription}
%<package&!check>\RequirePackage{l3basics}
%<package&check>\RequirePackage{l3chk}
% \end{macrocode}
@@ -670,6 +693,8 @@
%
%
%
+% \begin{macro}{\tlp_new:N}
+% \begin{macro}{\tlp_new:c}
% \begin{macro}{\tlp_new:Nn}
% \begin{macro}{\tlp_new:cn}
% \begin{macro}{\tlp_new:Nx}
@@ -698,10 +723,14 @@
%<check> \chk_var_or_const:N #1
\gdef:Npx #1{#2}
}
+\def_new:Npn \tlp_new:N #1{\tlp_new:Nn #1{}}
+\def_new:Npn \tlp_new:c #1{\tlp_new:cn {#1}{}}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
%
% \begin{macro}{\tlp_use:N}
@@ -728,6 +757,7 @@
%
% \begin{macro}{\tlp_set:Nn}
% \begin{macro}{\tlp_set:No}
+% \begin{macro}{\tlp_set:Nd}
% \begin{macro}{\tlp_set:Nf}
% \begin{macro}{\tlp_set:Nx}
% \begin{macro}{\tlp_set:cn}
@@ -735,6 +765,7 @@
% \begin{macro}{\tlp_set:cx}
% \begin{macro}{\tlp_gset:Nn}
% \begin{macro}{\tlp_gset:No}
+% \begin{macro}{\tlp_gset:Nd}
% \begin{macro}{\tlp_gset:Nx}
% \begin{macro}{\tlp_gset:cn}
% \begin{macro}{\tlp_gset:cx}
@@ -789,11 +820,13 @@
% expansion module.
% \begin{macrocode}
\def_new:Npn \tlp_set:No {\exp_args:NNo \tlp_set:Nn}
+\def_new:Npn \tlp_set:Nd {\exp_args:NNd \tlp_set:Nn}
\def_new:Npn \tlp_set:Nf {\exp_args:NNf \tlp_set:Nn}
\def_new:Npn \tlp_set:cn {\exp_args:Nc \tlp_set:Nn}
\def_new:Npn \tlp_set:co {\exp_args:Nco \tlp_set:Nn}
\def_new:Npn \tlp_set:cx {\exp_args:Nc \tlp_set:Nx}
\def_new:Npn \tlp_gset:No {\exp_args:NNo \tlp_gset:Nn}
+\def_new:Npn \tlp_gset:Nd {\exp_args:NNd \tlp_gset:Nn}
\def_new:Npn \tlp_gset:cn {\exp_args:Nc \tlp_gset:Nn}
\def_new:Npn \tlp_gset:cx {\exp_args:Nc \tlp_gset:Nx}
% \end{macrocode}
@@ -809,6 +842,8 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\tlp_set_eq:NN}
% \begin{macro}{\tlp_set_eq:Nc}
@@ -916,37 +951,62 @@
%
% \begin{macro}{\tlp_put_left:Nn}
% \begin{macro}{\tlp_put_left:No}
+% \begin{macro}{\tlp_put_left:Nx}
% \begin{macro}{\tlp_gput_left:Nn}
% \begin{macro}{\tlp_gput_left:No}
% \begin{macro}{\tlp_gput_left:Nx}
-% \begin{macro}{\tlp_put_left_aux:w}
-% We can add tokens to the left (either globally or locally).
-% \begin{macrocode}
-\def_new:Npn \tlp_put_left:Nn #1{
-% \end{macrocode}
-% We need expanding over a brace to ensure that if |#1| contains
-% just one token within braces the braces are preserved.
-% \begin{macrocode}
- \exp_args:No \tlp_put_left_aux:w {#1}#1}
-\def_new:Npn\tlp_put_left:No{\exp_args:NNo\tlp_put_left:Nn}
-\def_new:Npn \tlp_gput_left:Nn {
-%<*check>
- \pref_global_chk:
-%</check>
-%<-check> \pref_global:D
- \tlp_put_left:Nn
+% We can add tokens to the left (either globally or locally). It is
+% not quite as easy as we would like because we have to ensure the
+% assignments
+% \begin{verbatim}
+% \tlp_set:Nn \l_tmpa_tlp{##1abc##2def}
+% \tlp_set:Nn \l_tmpb_tlp{##1abc}
+% \tlp_put_right:Nn \l_tmpb_tlp {##2def}
+% \end{verbatim}
+% cause |\l_tmpa_tlp| and |\l_tmpb_tlp| to be identical. The old
+% code did not succeed in doing this (it gave an error) and so we
+% use a different technique where the item(s) to be added are first
+% stored in a temporary pointer and then added using an |x| type
+% expansion combined with the appropriate level of
+% non-expansion. Putting the tokens directly into one assignment
+% does not work unless we want full expansion. Note (according to
+% the warning earlier) \TeX\ does not allow us to treat |#|s the
+% same in all cases. Tough.
+% \begin{macrocode}
+\def_long_new:Npn \tlp_put_left:Nn #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_set:Nx #1{\exp_not:o{\l_exp_tlp}\exp_not:o{#1}}
+%<check> \chk_local_or_pref_global:N #1
}
-\def_new:Npn\tlp_gput_left:No{\exp_args:NNo\tlp_gput_left:Nn}
-\def_new:Npn\tlp_gput_left:Nx{\exp_args:NNx\tlp_gput_left:Nn}
-\def_long_new:Npn \tlp_put_left_aux:w #1#2#3{\tlp_set:Nn #2{#3#1}
-% \end{macrocode}
-% We check the type afterwards to avoid conflicts with the use of
-% |\pref_global:D|.
-% \begin{macrocode}
-%<*check>
- \chk_local_or_pref_global:N #2
-%</check>
+\def_long_new:Npn \tlp_put_left:No #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_set:Nx #1{\exp_not:d{\l_exp_tlp}\exp_not:o{#1}}
+%<check> \chk_local_or_pref_global:N #1
+}
+\def_long_new:Npn \tlp_put_left:Nx #1#2{
+ \tlp_set:Nx #1{#2\exp_not:o{#1}}
+%<check> \chk_local_or_pref_global:N #1
+}
+\def_long_new:Npn \tlp_gput_left:Nn #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_gset:Nx #1{\exp_not:o{\l_exp_tlp}\exp_not:o{#1}}
+%<check> \chk_local_or_pref_global:N #1
+}
+\def_long_new:Npn \tlp_gput_left:No #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_gset:Nx #1{\exp_not:d{\l_exp_tlp}\exp_not:o{#1}}
+%<check> \chk_local_or_pref_global:N #1
+}
+\def_long_new:Npn \tlp_gput_left:Nx #1#2{
+ \tlp_gset:Nx #1{#2\exp_not:o{#1}}
+%<check> \chk_local_or_pref_global:N #1
}
+\def_long_new:Npn \tlp_put_left:cn{\exp_args:Nc\tlp_put_left:Nn}
+\def_long_new:Npn \tlp_put_left:co{\exp_args:Nc\tlp_put_left:No}
+\def_long_new:Npn \tlp_put_left:cx{\exp_args:Nc\tlp_put_left:Nx}
+\def_long_new:Npn \tlp_gput_left:cn{\exp_args:Nc\tlp_gput_left:Nn}
+\def_long_new:Npn \tlp_gput_left:co{\exp_args:Nc\tlp_gput_left:No}
+\def_long_new:Npn \tlp_gput_left:cx{\exp_args:Nc\tlp_gput_left:Nx}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -967,15 +1027,37 @@
% These are variants of the functions above, but for adding tokens
% to the right.
% \begin{macrocode}
-\def_long_new:Npn \tlp_put_right:Nn #1#2{\tlp_set:No #1{#1#2}}
-\def_long_new:Npn \tlp_gput_right:Nn #1#2{\tlp_gset:No #1{#1#2}}
-\def_new:Npn \tlp_gput_right:No {\exp_args:NNo \tlp_gput_right:Nn}
-\def_new:Npn \tlp_gput_right:Nx {\exp_args:NNx \tlp_gput_right:Nn}
+\def_long_new:Npn \tlp_put_right:Nn #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_set:Nx #1{\exp_not:o{#1}\exp_not:o{\l_exp_tlp}}
+%<check> \chk_local_or_pref_global:N #1
+}
+\def_long_new:Npn \tlp_gput_right:Nn #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_gset:Nx #1{\exp_not:o{#1}\exp_not:o{\l_exp_tlp}}
+%<check> \chk_local_or_pref_global:N #1
+}
+\def_long_new:Npn \tlp_put_right:No #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_set:Nx #1{\exp_not:o{#1}\exp_not:d{\l_exp_tlp}}
+%<check> \chk_local_or_pref_global:N #1
+}
+\def_long_new:Npn \tlp_gput_right:No #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_gset:Nx #1{\exp_not:o{#1}\exp_not:d{\l_exp_tlp}}
+%<check> \chk_local_or_pref_global:N #1
+}
+\def_long:Npn \tlp_put_right:Nx #1#2{
+ \tlp_set:Nx #1{\exp_not:o{#1}#2}
+%<check> \chk_local_or_pref_global:N #1
+}
+\def_long:Npn \tlp_gput_right:Nx #1#2{
+ \tlp_gset:Nx #1{\exp_not:o{#1}#2}
+%<check> \chk_local_or_pref_global:N #1
+}
\def_new:Npn \tlp_gput_right:cn {\exp_args:Nc \tlp_gput_right:Nn}
-\def_new:Npn \tlp_gput_right:co {\exp_args:Nco \tlp_gput_right:Nn}
+\def_new:Npn \tlp_gput_right:co {\exp_args:Nc \tlp_gput_right:No}
\def_new:Npn \tlp_put_right:cc {\exp_args:Ncc \tlp_put_right:Nn}
-\def_new:Npn \tlp_put_right:No {\exp_args:NNo \tlp_put_right:Nn}
-\def_new:Npn \tlp_put_right:Nx {\exp_args:Nnx \tlp_put_right:Nn}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1297,14 +1379,14 @@
% marker will be read immediately and the loop terminated.
% \begin{macrocode}
\def_long_new:Npn \tlist_map_function:nN #1#2{
- \tlist_map_function_aux:Nn #2 #1 \q_nil \q_stop
+ \tlist_map_function_aux:Nn #2 #1 \q_recursion_tail \q_recursion_stop
}
\def_new:Npn \tlp_map_function:NN #1#2{
\exp_after:NN \tlist_map_function_aux:Nn
- \exp_after:NN #2 #1 \q_nil \q_stop
+ \exp_after:NN #2 #1 \q_recursion_tail \q_recursion_stop
}
\def_long_new:Npn \tlist_map_function_aux:Nn #1#2{
- \quark_if_nil:nT{#2} \tlist_map_break:w
+ \quark_if_recursion_tail_stop:n{#2}
#1{#2} \tlist_map_function_aux:Nn #1
}
\def_new:Npn\tlp_map_function:cN{\exp_args:Nc\tlp_map_function:NN}
@@ -1332,7 +1414,7 @@
##1{#2}
\exp_args:Nc \tlist_map_function_aux:Nn
{tlist_map_inline_ \num_use:N \l_tlp_inline_level_num :n}
- #1 \q_nil\q_stop
+ #1 \q_recursion_tail\q_recursion_stop
\num_decr:N \l_tlp_inline_level_num
}
\def_long_new:Npn \tlp_map_inline:Nn #1#2{
@@ -1341,7 +1423,7 @@
##1{#2}
\exp_args:NcE \tlist_map_function_aux:Nn
{tlist_map_inline_ \num_use:N \l_tlp_inline_level_num :n}
- #1 \q_nil\q_stop
+ #1 \q_recursion_tail\q_recursion_stop
\num_decr:N \l_tlp_inline_level_num
}
\def_new:Npn\tlp_map_inline:cN{\exp_args:Nc\tlp_map_inline:NN}
@@ -1361,7 +1443,7 @@
% \zz{temp} to each element and executes \zz{action}.
% \begin{macrocode}
\def_long_new:Npn \tlist_map_variable:nNn #1#2#3{
- \tlist_map_variable_aux:Nnn #2 {#3} #1 \q_nil \q_stop
+ \tlist_map_variable_aux:Nnn #2 {#3} #1 \q_recursion_tail \q_recursion_stop
}
\def_new:Npn \tlp_map_variable:NNn {\exp_args:No \tlist_map_variable:nNn}
\def_new:Npn \tlp_map_variable:cNn {\exp_args:Nc \tlp_map_variable:NNn}
@@ -1377,7 +1459,7 @@
% \begin{macrocode}
\def_long_new:Npn \tlist_map_variable_aux:Nnn #1#2#3{
\tlp_set:Nn #1{#3}
- \quark_if_nil:NT #1 \tlist_map_break:w
+ \quark_if_recursion_tail_stop:N #1
#2 \tlist_map_variable_aux:Nnn #1{#2}
}
% \end{macrocode}
@@ -1387,7 +1469,7 @@
% \begin{macro}{\tlp_map_break:w}
% The break statement.
% \begin{macrocode}
-\let_new:NN \tlist_map_break:w \use_none_delimit_by_q_stop:w
+\let_new:NN \tlist_map_break:w \use_none_delimit_by_q_recursion_stop:w
\let_new:NN \tlp_map_break:w \tlist_map_break:w
% \end{macrocode}
% \end{macro}
@@ -1459,7 +1541,7 @@
% \end{macrocode}
% However all of this only makes sense if we actually have that
% primitive. Therefore we disable it again if it is not there and
-% define \verb|\tlist_if_eq:NN| the old fashioned (and unexpandable)
+% define \verb|\tlist_if_eq:nn| the old fashioned (and unexpandable)
% way.
% \begin{macrocode}
\cs_if_really_free:cT{pdf_strcmp:D}{
@@ -1468,12 +1550,46 @@
\tlp_set:Nx \l_testb_tlp {\exp_not:n{#2}}
\if_meaning:NN\l_testa_tlp \l_testb_tlp
}
+ \def_long_test_function:npn{tlist_if_eq:no}#1#2{
+ \tlp_set:Nx \l_testa_tlp {\exp_not:n{#1}}
+ \tlp_set:Nx \l_testb_tlp {\exp_not:o{#2}}
+ \if_meaning:NN\l_testa_tlp \l_testb_tlp
+ }
+ \def_long_test_function:npn{tlist_if_eq:nx}#1#2{
+ \tlp_set:Nx \l_testa_tlp {\exp_not:n{#1}}
+ \tlp_set:Nx \l_testb_tlp {#2}
+ \if_meaning:NN\l_testa_tlp \l_testb_tlp
+ }
+ \def_long_test_function:npn{tlist_if_eq:on}#1#2{
+ \tlp_set:Nx \l_testa_tlp {\exp_not:o{#1}}
+ \tlp_set:Nx \l_testb_tlp {\exp_not:n{#2}}
+ \if_meaning:NN\l_testa_tlp \l_testb_tlp
+ }
\def_long_test_function:npn{tlist_if_eq:oo}#1#2{
\tlp_set:Nx \l_testa_tlp {\exp_not:o{#1}}
\tlp_set:Nx \l_testb_tlp {\exp_not:o{#2}}
\if_meaning:NN\l_testa_tlp \l_testb_tlp
}
- \def_long:Npn\tlist_compare:xx #1#2{\ERROR}
+ \def_long_test_function:npn{tlist_if_eq:ox}#1#2{
+ \tlp_set:Nx \l_testa_tlp {\exp_not:o{#1}}
+ \tlp_set:Nx \l_testb_tlp {#2}
+ \if_meaning:NN\l_testa_tlp \l_testb_tlp
+ }
+ \def_long_test_function:npn{tlist_if_eq:xn}#1#2{
+ \tlp_set:Nx \l_testa_tlp {#1}
+ \tlp_set:Nx \l_testb_tlp {\exp_not:n{#2}}
+ \if_meaning:NN\l_testa_tlp \l_testb_tlp
+ }
+ \def_long_test_function:npn{tlist_if_eq:xo}#1#2{
+ \tlp_set:Nx \l_testa_tlp {#1}
+ \tlp_set:Nx \l_testb_tlp {\exp_not:o{#2}}
+ \if_meaning:NN\l_testa_tlp \l_testb_tlp
+ }
+ \def_long_test_function:npn{tlist_if_eq:xx}#1#2{
+ \tlp_set:Nx \l_testa_tlp {#1}
+ \tlp_set:Nx \l_testb_tlp {#2}
+ \if_meaning:NN\l_testa_tlp \l_testb_tlp
+ }
}
% \end{macrocode}
% \end{macro}
@@ -1507,7 +1623,7 @@
\def_new:Npn \tlp_if_in:cnTF {\exp_args:Nc\tlp_if_in:NnTF}
\def_long:Npn \tlp_if_in:NnT #1#2{
\def_long:Npn\tmp:w ##1 #2 ##2\q_stop{
- \quark_if_no_value:nFT{##2}
+ \quark_if_no_value:nF{##2}
}
\exp_after:NN \tmp:w #1 #2 \q_no_value \q_stop
}
@@ -1565,14 +1681,14 @@
% again later on.
% \begin{macrocode}
\def_long_new:NNn \tlp_replace_in_aux:NNnn 4{
- \def:Npn \tmp:w ##1#3##2\q_stop{
+ \def_long:Npn \tmp:w ##1#3##2\q_stop{
\quark_if_no_value:nF{##2}
{
% \end{macrocode}
% At this point |##1| starts with a |\q_mark| so remove it.
% \begin{macrocode}
\tlp_set:Nx\l_tlp_replace_tlp{\exp_not:o{\use_none:n##1#4}}
- \def:Npn \tmp:w ####1#3\q_no_value{
+ \def_long:Npn \tmp:w ####1#3\q_no_value{
\tlp_put_right:Nx \l_tlp_replace_tlp {\exp_not:o{\use_none:n ####1}}
}
\tmp:w \q_mark ##2
@@ -1618,7 +1734,7 @@
% \begin{macrocode}
\def_long:NNn \tlp_replace_all_in_aux:NNnn 4{
\tlp_clear:N \l_tlp_replace_tlp
- \def:Npn \tmp:w ##1#3##2\q_stop{
+ \def_long:Npn \tmp:w ##1#3##2\q_stop{
\quark_if_no_value:nTF{##2}
{
\tlp_put_right:Nx \l_tlp_replace_tlp {\exp_not:o{\use_none:n##1}}
@@ -1812,11 +1928,10 @@
% 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_nil\q_stop
+ \tlist_reverse_aux:nN {} #1 \q_recursion_tail\q_stop
}
\def_long_new:Npn \tlist_reverse_aux:nN #1#2{
- \quark_if_nil:NT #2
- { \use_arg_i_delimit_by_q_stop:nw {#1} }
+ \quark_if_recursion_tail_stop_do:nn {#2}{ #1 }
\tlist_reverse_aux:nN {#2#1}
}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/expl3/l3token.dtx b/Master/texmf-dist/source/latex/expl3/l3token.dtx
index 43e8a4b5e81..1df1e08240d 100644
--- a/Master/texmf-dist/source/latex/expl3/l3token.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3token.dtx
@@ -31,26 +31,21 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-%<package>\RequirePackage{l3names}
-%<*dtx>
+%<*driver|package>
+\RequirePackage{l3names}
+%</driver|package>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-}
-%\iffalse
-%</dtx>
-%\fi
-\GetIdInfo$Id: l3token.dtx 578 2006-11-21 18:13:24Z morten $
+\GetIdInfo$Id: l3token.dtx 701 2007-11-27 14:21:05Z morten $
{L3 Experimental token investigation and manipulation}
-%
-% \iffalse
+%\iffalse
%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
-
\begin{document}
-\DocInput{l3token.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
% \fi
@@ -185,6 +180,28 @@
% \end{texnote}
% \end{function}
%
+% \begin{function}{
+% \char_set_mathcode:nn |
+% \char_set_mathcode:w |
+% \char_gset_mathcode:nn |
+% \char_gset_mathcode:w |
+% \char_value_mathcode:n |
+% \char_value_mathcode:w |
+% \char_show_value_mathcode:n |
+% \char_show_value_mathcode:w
+% }
+% \begin{syntax}
+% "\char_set_mathcode:nn" "{"<char>"}" "{"<number>"}"\\
+% "\char_set_mathcode:w" <char> = <number> \\
+% "\char_value_mathcode:n" "{"<char>"}"\\
+% "\char_show_value_mathcode:n" "{"<char>"}"
+% \end{syntax}
+% Set the math code for <char>.
+% \begin{texnote}
+% "\char_set_mathcode:w" is the \TeX\ primitive \tn{mathcode} renamed.
+% \end{texnote}
+% \end{function}
+%
%
% \subsection{Generic tokens}
%
@@ -739,6 +756,8 @@
% \subsection{Implementation}
% First a few required packages to get this going.
% \begin{macrocode}
+%<package>\ProvidesExplPackage
+%<package> {\filename}{\filedate}{\fileversion}{\filedescription}
%<package>\RequirePackage{l3prg}
%<package>\RequirePackage{l3int}
%<*initex|package>
@@ -770,6 +789,39 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\char_set_mathcode:w}
+% \begin{macro}{\char_set_mathcode:nn}
+% \begin{macro}{\char_gset_mathcode:w}
+% \begin{macro}{\char_gset_mathcode:nn}
+% \begin{macro}{\char_value_mathcode:w}
+% \begin{macro}{\char_value_mathcode:n}
+% \begin{macro}{\char_show_value_mathcode:w}
+% \begin{macro}{\char_show_value_mathcode:n}
+% Math codes.
+% \begin{macrocode}
+\let_new:NN \char_set_mathcode:w \tex_mathcode:D
+\def_new:Npn \char_set_mathcode:nn #1#2{
+ \char_set_mathcode:w #1 = \int_eval:n{#2}
+}
+\def_protected_new:Npn \char_gset_mathcode:w {\pref_global:D\tex_mathcode:D}
+\def_new:Npn \char_gset_mathcode:nn #1#2{
+ \char_gset_mathcode:w #1 = \int_eval:n{#2}
+}
+\def_new:Npn \char_value_mathcode:w {\int_use:N\tex_mathcode:D}
+\def_new:Npn \char_value_mathcode:n #1{\char_value_mathcode:w \int_eval:n{#1}}
+\def_new:Npn \char_show_value_mathcode:w {\tex_showthe:D\tex_mathcode:D}
+\def_new:Npn \char_show_value_mathcode:n #1{
+ \char_show_value_mathcode:w \int_eval:n{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{\char_set_lccode:w}
% \begin{macro}{\char_set_lccode:nn}
% \begin{macro}{\char_value_lccode:w}
@@ -1829,10 +1881,9 @@
% |\c_space_token|.
% \begin{macrocode}
\def_new:Npn \peek_execute_branches_charcode: {
- \prg_if_predicate:nTF {
- \prg_if_predicate_or_p:nn
- {\token_if_eq_catcode_p:NN \l_peek_token \c_group_begin_token}
- {\token_if_eq_meaning_p:NN \l_peek_token \c_space_token}
+ \predicate:nTF {
+ \token_if_eq_catcode_p:NN \l_peek_token \c_group_begin_token ||
+ \token_if_eq_meaning_p:NN \l_peek_token \c_space_token
}
{ \l_peek_false_tlp }
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/expl3/l3toks.dtx b/Master/texmf-dist/source/latex/expl3/l3toks.dtx
index fd37864c815..a5d78d7386c 100644
--- a/Master/texmf-dist/source/latex/expl3/l3toks.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3toks.dtx
@@ -32,26 +32,21 @@
%%
%% -----------------------------------------------------------------------
%
-%<package>\RequirePackage{l3names}
-%<*dtx>
+%<*driver|package>
+\RequirePackage{l3names}
+%</driver|package>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-}
-%\iffalse
-%</dtx>
-%\fi
-\GetIdInfo$Id: l3toks.dtx 580 2006-11-26 15:56:47Z morten $
+\GetIdInfo$Id: l3toks.dtx 728 2008-01-01 16:11:58Z morten $
{L3 Experimental Token Registers}
-%
-% \iffalse
+%\iffalse
%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
-
\begin{document}
-\DocInput{l3toks.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
% \fi
@@ -245,6 +240,8 @@
% We check for \texttt{l3expan} since this a basic package that is
% essential for use of any higher-level package.
% \begin{macrocode}
+%<package>\ProvidesExplPackage
+%<package> {\filename}{\filedate}{\fileversion}{\filedescription}
%<package&check>\RequirePackage{l3chk}\par
%<package>\RequirePackage{l3expan}\par
%<*initex|package>
@@ -576,6 +573,10 @@
% \begin{macro}{\toks_if_eq:ccTF}
% \begin{macro}{\toks_if_eq:ccT}
% \begin{macro}{\toks_if_eq:ccF}
+% \begin{macro}{\toks_if_eq_p:NN}
+% \begin{macro}{\toks_if_eq_p:cN}
+% \begin{macro}{\toks_if_eq_p:Nc}
+% \begin{macro}{\toks_if_eq_p:cc}
% This function test whether two token registers contain the same.
% \begin{macrocode}
\def_new:NNn \toks_if_eq:NNTF 2 {
@@ -596,6 +597,12 @@
\def_new:Npn \toks_if_eq:ccTF {\exp_args:Ncc \toks_if_eq:NNTF}
\def_new:Npn \toks_if_eq:ccT {\exp_args:Ncc \toks_if_eq:NNT}
\def_new:Npn \toks_if_eq:ccF {\exp_args:Ncc \toks_if_eq:NNF}
+\def_new:NNn \toks_if_eq_p:NN 2 {
+ \tlist_if_eq_p:xx {\toks_use:N #1} {\toks_use:N #2}
+}
+\def_new:Npn \toks_if_eq_p:cN {\exp_args:Nc \toks_if_eq_p:NN}
+\def_new:Npn \toks_if_eq_p:Nc {\exp_args:NNc \toks_if_eq_p:NN}
+\def_new:Npn \toks_if_eq_p:cc {\exp_args:Ncc \toks_if_eq_p:NN}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -609,6 +616,10 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\l_tmpa_toks}
% \begin{macro}{\l_tmpb_toks}
diff --git a/Master/texmf-dist/source/latex/expl3/l3vers.dtx b/Master/texmf-dist/source/latex/expl3/l3vers.dtx
index 06f9d44c694..748c99bde33 100644
--- a/Master/texmf-dist/source/latex/expl3/l3vers.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3vers.dtx
@@ -31,26 +31,21 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-%<package>\RequirePackage{l3names}
-%<*dtx>
+%<*driver|package>
+\RequirePackage{l3names}
+%</driver|package>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-}
-%\iffalse
-%</dtx>
-%\fi
-\GetIdInfo$Id: l3vers.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3vers.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental LaTeX format version}
-%
-% \iffalse
+%\iffalse
%<*driver>
+%\fi
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
+%\iffalse
\documentclass{l3doc}
-
\begin{document}
-\DocInput{l3vers.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
% \fi
@@ -68,7 +63,7 @@
% \begin{macrocode}
%<*initex>
\def:Npn\c_format_name{Experimental~ LaTeX3}
-\def:Npn\c_format_date{2005/12/25}
+\def:Npn\c_format_date{2007/09/01}
%^^A\def:Npx\c_format_version{--release--date--goes--here--}
% \end{macrocode}
% \end{macro}
@@ -90,7 +85,7 @@
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J
!~~You~are~attempting~to~make~an~experimental~LaTeX3~format~from^^J
!~~source~files~that~are~more~than~
- \num_use:N\num_eval:n{\c_fmt_too_old}~months~old.^^J
+ \num_value:w\num_eval:n{\c_fmt_too_old}~months~old.^^J
!^^J
!~~If~you~enter~<return>~to~scroll~past~this~message~then~the~format^^J
!~~will~be~built,~but~please~consider~obtaining~newer~source~files^^J
diff --git a/Master/texmf-dist/doc/latex/expl3/l3xref-test.tex b/Master/texmf-dist/source/latex/expl3/l3xref-test.tex
index 65d229b2d2a..cd58b6deb5f 100644
--- a/Master/texmf-dist/doc/latex/expl3/l3xref-test.tex
+++ b/Master/texmf-dist/source/latex/expl3/l3xref-test.tex
@@ -47,16 +47,14 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesFile{\jobname.tex}[#3/#4/#5 v#2 #8]%
-}
-\GetIdInfo$Id: l3xref.dtx 579 2006-11-25 23:38:03Z morten $
+\RequirePackage{l3names}
+\GetIdInfo$Id: l3xref.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental cross referencing}
+\ProvidesFile{\jobname.tex}
+ [\filedate\space v\fileversion\space\filedescription]
\documentclass{article}
\usepackage{l3xref}
-\CodeStart
+\ExplSyntaxOn
\def:Npn \startrecording {\iow_open:Nn \xref_write {\jobname.xref}}
\def:Npn \DefineCrossReferences {
\group_begin:
@@ -78,7 +76,7 @@
\let:NN \setlabel \xref_set_label:n
-\CodeStop
+\ExplSyntaxOff
\begin{document}
\pagenumbering{roman}
diff --git a/Master/texmf-dist/source/latex/expl3/l3xref.dtx b/Master/texmf-dist/source/latex/expl3/l3xref.dtx
index 2f03bf8b387..742def4b143 100644
--- a/Master/texmf-dist/source/latex/expl3/l3xref.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3xref.dtx
@@ -32,33 +32,30 @@
%%
%% -----------------------------------------------------------------------
%
-%<package>\RequirePackage{l3names}
-%<*dtx|testfile>
+%<*driver|package|testfile>
+\RequirePackage{l3names}
+%</driver|package|testfile>
%\fi
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
+\GetIdInfo$Id: l3xref.dtx 621 2007-09-01 20:14:19Z morten $
+ {L3 Experimental cross referencing}
%\iffalse
-%<dtx> \ProvidesFile{#1.dtx}[#3/#4/#5 v#2 #8]%
-%<-dtx> \ProvidesFile{\jobname.tex}[#3/#4/#5 v#2 #8]%
+%<*testfile>
+\ProvidesFile{\jobname.tex}
+ [\filedate\space v\fileversion\space\filedescription]
+%</testfile>
+%<*driver>
%\fi
-}
+\ProvidesFile{\filename.\filenameext}
+ [\filedate\space v\fileversion\space\filedescription]
%\iffalse
-%</dtx|testfile>
-%\fi
-\GetIdInfo$Id: l3xref.dtx 579 2006-11-25 23:38:03Z morten $
- {L3 Experimental cross referencing}
-%
-% \iffalse
-%<*driver>
\documentclass{l3doc}
-
\begin{document}
-\DocInput{l3xref.dtx}
+\DocInput{\filename.\filenameext}
\end{document}
%</driver>
% \fi
%
+%
% \title{The \textsf{l3xref} package\thanks{This file
% has version number \fileversion, last
% revised \filedate.}\\
@@ -117,6 +114,8 @@
% We start by ensuring that the required packages are loaded.
% \begin{macrocode}
%<*package>
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\RequirePackage{l3quark}
\RequirePackage{l3toks}
\RequirePackage{l3io}
@@ -310,7 +309,7 @@
%<*testfile>
\documentclass{article}
\usepackage{l3xref}
-\CodeStart
+\ExplSyntaxOn
\def:Npn \startrecording {\iow_open:Nn \xref_write {\jobname.xref}}
\def:Npn \DefineCrossReferences {
\group_begin:
@@ -332,7 +331,7 @@
\let:NN \setlabel \xref_set_label:n
-\CodeStop
+\ExplSyntaxOff
\begin{document}
\pagenumbering{roman}
diff --git a/Master/texmf-dist/doc/latex/expl3/source3.tex b/Master/texmf-dist/source/latex/expl3/source3.tex
index e16341f586e..1199dbf3209 100644
--- a/Master/texmf-dist/doc/latex/expl3/source3.tex
+++ b/Master/texmf-dist/source/latex/expl3/source3.tex
@@ -205,12 +205,14 @@ page_precedence "rnaA"
\DocInput{l3xref.dtx} %
+ \DocInput{l3calc.dtx} %
+
%% \DocInput{l3vers.dtx} % Current version date
\includeltpatch % Corrections distributed after the full release
% Stop here if ltxdoc.cfg says \AtEndOfClass{\OnlyDescription}
-\StopEventually{\end{document}}
+\StopEventually{\PrintIndex\end{document}}
\clearpage
\pagestyle{headings}
diff --git a/Master/texmf-dist/doc/latex/expl3/test1.tex b/Master/texmf-dist/source/latex/expl3/test1.tex
index d40189e37dc..d40189e37dc 100644
--- a/Master/texmf-dist/doc/latex/expl3/test1.tex
+++ b/Master/texmf-dist/source/latex/expl3/test1.tex
diff --git a/Master/texmf-dist/doc/latex/expl3/test2.tex b/Master/texmf-dist/source/latex/expl3/test2.tex
index 764ad74fc39..764ad74fc39 100644
--- a/Master/texmf-dist/doc/latex/expl3/test2.tex
+++ b/Master/texmf-dist/source/latex/expl3/test2.tex
diff --git a/Master/texmf-dist/doc/latex/expl3/test3.tex b/Master/texmf-dist/source/latex/expl3/test3.tex
index 3dd5f714d35..3dd5f714d35 100644
--- a/Master/texmf-dist/doc/latex/expl3/test3.tex
+++ b/Master/texmf-dist/source/latex/expl3/test3.tex
diff --git a/Master/texmf-dist/tex/latex/expl3/l3basics.sty b/Master/texmf-dist/tex/latex/expl3/l3basics.sty
index 161ac199227..d4e9c2abe9e 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3basics.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3basics.sty
@@ -48,8 +48,10 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3basics.dtx 583 2006-12-12 17:26:44Z morten $
+\GetIdInfo$Id: l3basics.dtx 702 2007-11-27 14:21:49Z morten $
{L3 Experimental basic definitions}
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\tex_let:D \let:NwN \tex_let:D
\let:NwN \if_true: \tex_iftrue:D
\let:NwN \if_false: \tex_iffalse:D
@@ -417,6 +419,8 @@
\def_long_new:Npn \def_test_function_aux:Nnnn #1#2#3#4{
#1 {#2TF} #3 {#4
\exp_after:NN\use_arg_i:nn\else:\exp_after:NN\use_arg_ii:nn\fi:}
+ #1 {#2FT} #3 {#4
+ \exp_after:NN\use_arg_ii:nn\else:\exp_after:NN\use_arg_i:nn\fi:}
#1 {#2T} #3 {#4
\else:\exp_after:NN\use_none:nn\fi:\use_arg_i:n}
#1 {#2F} #3 {#4
@@ -424,6 +428,8 @@
\def_long_new:Npn \def_test_function_aux:Nnnx #1#2#3#4{
#1 {#2TF} #3 {#4
\exp_not:n{\exp_after:NN\use_arg_i:nn\else:\exp_after:NN\use_arg_ii:nn\fi:}}
+ #1 {#2FT} #3 {#4
+ \exp_not:n{\exp_after:NN\use_arg_ii:nn\else:\exp_after:NN\use_arg_i:nn\fi:}}
#1 {#2T} #3 {#4
\exp_not:n{\else:\exp_after:NN\use_none:nn\fi:\use_arg_i:n}}
#1 {#2F} #3 {#4
@@ -473,7 +479,7 @@
\def_long_test_function_new:npn {cs_if_really_exist:c}#1{
\if_cs_exist:w #1\cs_end:}
\def_new:Npn \cs_gundefine:N #1{\glet:NN #1\c_undefined}
-\def_test_function_new:npn {engine_aleph:}{\if_cs_exist:N \aleph_textdir:D}
+\def_test_function_new:npn {engine_if_aleph:}{\if_cs_exist:N \aleph_textdir:D}
\def_new:Npn \use:c #1{\cs:w #1\cs_end:}
\def_new:Npn \cs_use:c #1 { \cs:w#1\cs_end: }
\def_new:Npn \use:cc #1#2
@@ -494,7 +500,8 @@
\def_long_new:Npn \use_arg_i_delimit_by_q_stop:nw #1#2\q_stop{#1}
\def_long_new:Npn \use_arg_i_after_fi:nw #1\fi:{\fi: #1}
\def_long_new:Npn \use_arg_i_after_else:nw #1\else:#2\fi:{\fi: #1}
-\def_long_new:Npn \use_arg_i_after_or:nw #1\or: #2\fi: {\or:\fi:#1}
+\def_long_new:Npn \use_arg_i_after_or:nw #1\or: #2\fi: {\fi:#1}
+\def_long_new:Npn \use_arg_i_after_orelse:nw #1 #2#3\fi: {\fi:#1}
\def_long_new:NNn \use_none:nn 2{}
\def_long_new:NNn \use_none:nnn 3{}
\def_long_new:NNn \use_none:nnnn 4{}
diff --git a/Master/texmf-dist/tex/latex/expl3/l3box.sty b/Master/texmf-dist/tex/latex/expl3/l3box.sty
index e155345519f..be463eacf81 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3box.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3box.sty
@@ -15,7 +15,7 @@
%% Do not distribute a modified version of this file.
%%
%%
-%% File: l3box.dtx Copyright (C) 2005-2006 LaTeX3 project
+%% File: l3box.dtx Copyright (C) 2005-2007 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
@@ -48,14 +48,19 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3box.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3box.dtx 718 2007-12-16 22:59:58Z morten $
{L3 Experimental Box module}
-\RequirePackage{l3prg}\par
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
+\RequirePackage{l3prg,l3token}\par
\let_new:NN \box_new:N \newbox
\def_new:Npn \box_new:c {\exp_args:Nc \box_new:N}
\let_new:NN \if_hbox:N \tex_ifhbox:D
\let_new:NN \if_vbox:N \tex_ifvbox:D
\let_new:NN \if_box_empty:N \tex_ifvoid:D
+\def_new:Npn \box_if_empty_p:N #1{
+ \if_box_empty:N #1 \c_true \else: \c_false \fi:}
+\def_new:Npn \box_if_empty_p:c {\exp_args:Nc \box_if_empty_p:N}
\def_test_function_new:npn {box_if_empty:N}#1{\if_box_empty:N #1}
\def_new:Npn \box_if_empty:cTF {\exp_args:Nc \box_if_empty:NTF}
\def_new:Npn \box_if_empty:cT {\exp_args:Nc \box_if_empty:NT}
@@ -68,11 +73,11 @@
\def_new:Npn \box_gset_eq:cN {\exp_args:Nc \box_gset_eq:NN}
\def_new:Npn \box_gset_eq:Nc {\exp_args:NNc \box_gset_eq:NN}
\def_new:Npn \box_gset_eq:cc {\exp_args:Ncc \box_gset_eq:NN}
-\let_new:NN \R_previous_box \tex_lastbox:D
-\def_new:Npn \box_set_to_previous:N #1{\tex_setbox:D#1\R_previous_box}
-\def_new:Npn \box_set_to_previous:c {\exp_args:Nc \box_set_to_previous:N}
-\def_new:Npn \box_gset_to_previous:N {\pref_global:D \box_set_to_previous:N}
-\def_new:Npn \box_gset_to_previous:c {\exp_args:Nc \box_gset_to_previous:N}
+\let_new:NN \R_last_box \tex_lastbox:D
+\def_new:Npn \box_set_to_last:N #1{\tex_setbox:D#1\R_last_box}
+\def_new:Npn \box_set_to_last:c {\exp_args:Nc \box_set_to_last:N}
+\def_new:Npn \box_gset_to_last:N {\pref_global:D \box_set_to_last:N}
+\def_new:Npn \box_gset_to_last:c {\exp_args:Nc \box_gset_to_last:N}
\def_long_new:Npn \box_move_left:nn #1#2{\tex_moveleft:D\dim_eval:n{#1}{#2}}
\def_long_new:Npn \box_move_right:nn #1#2{\tex_moveright:D\dim_eval:n{#1}{#2}}
\def_long_new:Npn \box_move_up:nn #1#2{\tex_raise:D\dim_eval:n{#1}{#2}}
@@ -134,9 +139,13 @@
\def_new:Npn \hbox_gset_to_wd:cnn{\exp_args:Nc \hbox_gset_to_wd:Nnn }
\def_new:Npn \hbox_set_inline_begin:N #1 {
\tex_setbox:D #1 \tex_hbox:D \c_group_begin_token }
+\def:Npn \hbox_set_inline_begin:c {\exp_args:Nc
+ \hbox_set_inline_begin:N}
\let_new:NN \hbox_set_inline_end: \c_group_end_token
\def_new:Npn \hbox_gset_inline_begin:N {
\pref_global:D \hbox_set_inline_begin:N }
+\def:Npn \hbox_gset_inline_begin:c {\exp_args:Nc
+ \hbox_gset_inline_begin:N }
\let_new:NN \hbox_gset_inline_end: \c_group_end_token
\def_long_new:Npn \hbox_to_wd:nn #1#2 {\tex_hbox:D to #1 {#2}}
\def_long_new:Npn \hbox_to_zero:n #1 {\tex_hbox:D to \c_zero_skip {#1}}
diff --git a/Master/texmf-dist/tex/latex/expl3/l3calc.sty b/Master/texmf-dist/tex/latex/expl3/l3calc.sty
index d3d2ef07937..6d6239ac0b6 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3calc.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3calc.sty
@@ -48,8 +48,10 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3calc.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3calc.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental calc module}
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\RequirePackage{l3int}
\RequirePackage{l3skip}
\RequirePackage{l3box}
@@ -69,86 +71,98 @@
\muskip_new:N \g_calc_A_muskip
\muskip_new:N \l_calc_B_muskip
\muskip_new:N \l_calc_C_muskip
-\def_long_new:Npn \calc_assign_generic:NNNNNn#1#2#3#4#5#6{
- \let:NN\g_calc_A_register#2\let:NN\l_calc_B_register#3
+\def_long_new:Npn \calc_assign_generic:NNNNnn#1#2#3#4#5#6{
+ \let:NN\g_calc_A_register#2
+ \let:NN\l_calc_B_register#3
\int_set:Nn \l_calc_current_type_int {#1}
- \tlp_set:Nx\l_calc_expression_tlp{#6}
- \exp_after:NN\calc_open:w\exp_after:NN(\l_calc_expression_tlp!
+ \group_begin:
+ \let:NN \real \calc_real:n
+ \let:NN \ratio\calc_ratio:nn
+ \tlp_set:Nx\l_calc_expression_tlp{#6}
+ \exp_after:NN
+ \group_end:
+ \exp_after:NN\calc_open:w\exp_after:NN(\l_calc_expression_tlp !
\pref_global:D\g_calc_A_register\l_calc_B_register
\group_end:
- #4#5\l_calc_B_register
+ #4{#5}\l_calc_B_register
}
\def_new:Npn\calc_int_set:Nn{
- \calc_assign_generic:NNNNNn\c_zero\g_calc_A_int\l_calc_B_int\int_set:Nn
+ \calc_assign_generic:NNNNnn\c_zero\g_calc_A_int\l_calc_B_int\int_set:Nn
}
\def_new:Npn\calc_int_gset:Nn{
- \calc_assign_generic:NNNNNn\c_zero\g_calc_A_int\l_calc_B_int\int_gset:Nn
+ \calc_assign_generic:NNNNnn\c_zero\g_calc_A_int\l_calc_B_int\int_gset:Nn
}
\def_new:Npn\calc_int_add:Nn{
- \calc_assign_generic:NNNNNn\c_zero\g_calc_A_int\l_calc_B_int\int_add:Nn
+ \calc_assign_generic:NNNNnn\c_zero\g_calc_A_int\l_calc_B_int\int_add:Nn
}
\def_new:Npn\calc_int_gadd:Nn{
- \calc_assign_generic:NNNNNn\c_zero\g_calc_A_int\l_calc_B_int\int_gadd:Nn
+ \calc_assign_generic:NNNNnn\c_zero\g_calc_A_int\l_calc_B_int\int_gadd:Nn
}
\def_new:Npn\calc_int_sub:Nn{
- \calc_assign_generic:NNNNNn\c_zero\g_calc_A_int\l_calc_B_int\int_sub:Nn
+ \calc_assign_generic:NNNNnn\c_zero\g_calc_A_int\l_calc_B_int\int_sub:Nn
}
\def_new:Npn\calc_int_gsub:Nn{
- \calc_assign_generic:NNNNNn\c_zero\g_calc_A_int\l_calc_B_int\int_gsub:Nn
+ \calc_assign_generic:NNNNnn\c_zero\g_calc_A_int\l_calc_B_int\int_gsub:Nn
}
\def_new:Npn\calc_dim_set:Nn{
- \calc_assign_generic:NNNNNn\c_one\g_calc_A_dim\l_calc_B_dim\dim_set:Nn
+ \calc_assign_generic:NNNNnn\c_one\g_calc_A_dim\l_calc_B_dim\dim_set:Nn
}
\def_new:Npn\calc_dim_gset:Nn{
- \calc_assign_generic:NNNNNn\c_one\g_calc_A_dim\l_calc_B_dim\dim_gset:Nn
+ \calc_assign_generic:NNNNnn\c_one\g_calc_A_dim\l_calc_B_dim\dim_gset:Nn
}
\def_new:Npn\calc_dim_add:Nn{
- \calc_assign_generic:NNNNNn\c_one\g_calc_A_dim\l_calc_B_dim\dim_add:Nn
+ \calc_assign_generic:NNNNnn\c_one\g_calc_A_dim\l_calc_B_dim\dim_add:Nn
}
\def_new:Npn\calc_dim_gadd:Nn{
- \calc_assign_generic:NNNNNn\c_one\g_calc_A_dim\l_calc_B_dim\dim_gadd:Nn
+ \calc_assign_generic:NNNNnn\c_one\g_calc_A_dim\l_calc_B_dim\dim_gadd:Nn
}
\def_new:Npn\calc_dim_sub:Nn{
- \calc_assign_generic:NNNNNn\c_one\g_calc_A_int\l_calc_B_int\dim_sub:Nn
+ \calc_assign_generic:NNNNnn\c_one\g_calc_A_int\l_calc_B_int\dim_sub:Nn
}
\def_new:Npn\calc_dim_gsub:Nn{
- \calc_assign_generic:NNNNNn\c_one\g_calc_A_int\l_calc_B_int\dim_gsub:Nn
+ \calc_assign_generic:NNNNnn\c_one\g_calc_A_int\l_calc_B_int\dim_gsub:Nn
}
\def_new:Npn\calc_skip_set:Nn{
- \calc_assign_generic:NNNNNn\c_two\g_calc_A_dim\l_calc_B_dim\skip_set:Nn
+ \calc_assign_generic:NNNNnn\c_two\g_calc_A_skip\l_calc_B_skip\skip_set:Nn
}
\def_new:Npn\calc_skip_gset:Nn{
- \calc_assign_generic:NNNNNn\c_two\g_calc_A_dim\l_calc_B_dim\skip_gset:Nn
+ \calc_assign_generic:NNNNnn\c_two\g_calc_A_skip\l_calc_B_skip\skip_gset:Nn
}
\def_new:Npn\calc_skip_add:Nn{
- \calc_assign_generic:NNNNNn\c_two\g_calc_A_dim\l_calc_B_dim\skip_add:Nn
+ \calc_assign_generic:NNNNnn\c_two\g_calc_A_skip\l_calc_B_skip\skip_add:Nn
}
\def_new:Npn\calc_skip_gadd:Nn{
- \calc_assign_generic:NNNNNn\c_two\g_calc_A_dim\l_calc_B_dim\skip_gadd:Nn
+ \calc_assign_generic:NNNNnn\c_two\g_calc_A_skip\l_calc_B_skip\skip_gadd:Nn
}
\def_new:Npn\calc_skip_sub:Nn{
- \calc_assign_generic:NNNNNn\c_two\g_calc_A_dim\l_calc_B_dim\skip_sub:Nn
+ \calc_assign_generic:NNNNnn\c_two\g_calc_A_skip\l_calc_B_skip\skip_sub:Nn
}
\def_new:Npn\calc_skip_gsub:Nn{
- \calc_assign_generic:NNNNNn\c_two\g_calc_A_dim\l_calc_B_dim\skip_gsub:Nn
+ \calc_assign_generic:NNNNnn\c_two\g_calc_A_skip\l_calc_B_skip\skip_gsub:Nn
}
\def_new:Npn\calc_muskip_set:Nn{
- \calc_assign_generic:NNNNNn\c_three\g_calc_A_dim\l_calc_B_dim\muskip_set:Nn
+ \calc_assign_generic:NNNNnn\c_three\g_calc_A_muskip\l_calc_B_muskip
+ \muskip_set:Nn
}
\def_new:Npn\calc_muskip_gset:Nn{
- \calc_assign_generic:NNNNNn\c_three\g_calc_A_dim\l_calc_B_dim\muskip_gset:Nn
+ \calc_assign_generic:NNNNnn\c_three\g_calc_A_muskip\l_calc_B_muskip
+ \muskip_gset:Nn
}
\def_new:Npn\calc_muskip_add:Nn{
- \calc_assign_generic:NNNNNn\c_three\g_calc_A_dim\l_calc_B_dim\muskip_add:Nn
+ \calc_assign_generic:NNNNnn\c_three\g_calc_A_muskip\l_calc_B_muskip
+ \muskip_add:Nn
}
\def_new:Npn\calc_muskip_gadd:Nn{
- \calc_assign_generic:NNNNNn\c_three\g_calc_A_dim\l_calc_B_dim\muskip_gadd:Nn
+ \calc_assign_generic:NNNNnn\c_three\g_calc_A_muskip\l_calc_B_muskip
+ \muskip_gadd:Nn
}
\def_new:Npn\calc_muskip_sub:Nn{
- \calc_assign_generic:NNNNNn\c_three\g_calc_A_dim\l_calc_B_dim\muskip_add:Nn
+ \calc_assign_generic:NNNNnn\c_three\g_calc_A_muskip\l_calc_B_muskip
+ \muskip_add:Nn
}
\def_new:Npn\calc_muskip_gsub:Nn{
- \calc_assign_generic:NNNNNn\c_three\g_calc_A_dim\l_calc_B_dim\muskip_gadd:Nn
+ \calc_assign_generic:NNNNnn\c_three\g_calc_A_muskip\l_calc_B_muskip
+ \muskip_gadd:Nn
}
\def_new:Npn \calc_pre_scan:N #1{
\if_meaning:NN(#1
@@ -184,8 +198,11 @@
\if_meaning:NN#1*\let:NN\calc_next:w\calc_multiply:N \else:
\if_meaning:NN#1/\let:NN\calc_next:w\calc_divide:N \else:
\if_meaning:NN#1)\let:NN\calc_next:w\calc_close: \else:
- \let:NN \calc_next:w \scan_stop:
- \calc_error:N#1
+ \if_meaning:NN#1\scan_stop:\let:NN\calc_next:w\calc_post_scan:N
+ \else:
+ \let:NN \calc_next:w \use_noop:
+ \calc_error:N#1
+ \fi:
\fi:
\fi:
\fi:
@@ -257,6 +274,7 @@
\group_begin:
\let:NN\g_calc_A_register\g_calc_A_int
\let:NN\l_calc_B_register\l_calc_B_int
+ \int_zero:N \l_calc_current_type_int
\group_execute_after:N#1\calc_pre_scan:N
}
\def_new:Npn\calc_multiply_B_by_A:{
@@ -288,17 +306,17 @@
\def:Npn \calc_calculate_box_size_aux:n#1{ + #1\l_tmpa_box}
\def_protected_long:Npn \calc_textsize:Nn#1#2{
\group_begin:
- \let:NN\widthof\box_wd:N
- \let:NN\heightof\box_ht:N
- \let:NN\depthof\box_dp:N
- \def:Npn\totalheightof{\box_ht:N\box_dp:N}
+ \let:NN\calc_widthof_aux:n\box_wd:N
+ \let:NN\calc_heightof_aux:n\box_ht:N
+ \let:NN\calc_depthof_aux:n\box_dp:N
+ \def:Npn\calc_totalheightof_aux:n{\box_ht:N\box_dp:N}
\exp_args:No\calc_calculate_box_size:nnn{#1}
{\dim_gset:Nn\g_calc_A_register}
{
- \let:NN \depthof\calc_depthof:n
- \let:NN \widthof\calc_widthof:n
- \let:NN \heightof\calc_heightof:n
- \let:NN \totalheightof\calc_totalheightof:n
+ \let:NN \calc_depthof_aux:n \calc_depthof_auxi:n
+ \let:NN \calc_widthof_aux:n \calc_widthof_auxi:n
+ \let:NN \calc_heightof_aux:n \calc_heightof_auxi:n
+ \let:NN \calc_totalheightof_aux:n \calc_totalheightof_auxi:n
#2
}
\group_end:
@@ -403,29 +421,84 @@
\def_long_new:Npn \calc_minof:nn#1#2{
\calc_maxmin_operation:Nnn < \exp_not:n{{#1}{#2}}
}
-\let_new:NN \maxof \calc_maxof:nn
-\let_new:NN \minof \calc_minof:nn
+\let:NN \maxof \calc_maxof:nn
+\let:NN \minof \calc_minof:nn
\def_long_new:Npn \calc_widthof:n#1{
- \calc_textsize:Nn \exp_not:N\widthof\exp_not:n{{#1}}
+ \calc_textsize:Nn \exp_not:N\calc_widthof_aux:n\exp_not:n{{#1}}
}
\def_long_new:Npn \calc_heightof:n#1{
- \calc_textsize:Nn \exp_not:N\heightof\exp_not:n{{#1}}
+ \calc_textsize:Nn \exp_not:N\calc_heightof_aux:n\exp_not:n{{#1}}
}
\def_long_new:Npn \calc_depthof:n#1{
- \calc_textsize:Nn \exp_not:N\depthof\exp_not:n{{#1}}
+ \calc_textsize:Nn \exp_not:N\calc_depthof_aux:n\exp_not:n{{#1}}
}
\def_long_new:Npn \calc_totalheightof:n#1{
- \calc_textsize:Nn \exp_not:N\totalheightof\exp_not:n{{#1}}
+ \calc_textsize:Nn \exp_not:N\calc_totalheightof_aux:n \exp_not:n{{#1}}
+}
+\def_long_new:Npn \calc_widthof_aux:n #1{
+ \exp_not:N\calc_widthof_aux:n\exp_not:n{{#1}}
+}
+\let_new:NN \calc_widthof_auxi:n \calc_widthof_aux:n
+\def_long_new:Npn \calc_depthof_aux:n #1{
+ \exp_not:N\calc_depthof_aux:n\exp_not:n{{#1}}
+}
+\let_new:NN \calc_depthof_auxi:n \calc_depthof_aux:n
+\def_long_new:Npn \calc_heightof_aux:n #1{
+ \exp_not:N\calc_heightof_aux:n\exp_not:n{{#1}}
}
+\let_new:NN \calc_heightof_auxi:n \calc_heightof_aux:n
+\def_long_new:Npn \calc_totalheightof_aux:n #1{
+ \exp_not:N\calc_totalheightof_aux:n\exp_not:n{{#1}}
+}
+\let_new:NN \calc_totalheightof_auxi:n \calc_totalheightof_aux:n
+\def_long_new:Npn \calc_ratio:nn#1#2{
+ \calc_ratio_multiply:nn\exp_not:n{{#1}{#2}}}
+\def_new:Npn \calc_real:n {\calc_real_evaluate:nn}
\let:NN \depthof\calc_depthof:n
\let:NN \widthof\calc_widthof:n
\let:NN \heightof\calc_heightof:n
\let:NN \totalheightof\calc_totalheightof:n
-\def_long_new:Npn \calc_ratio:nn#1#2{
- \calc_ratio_multiply:nn\exp_not:n{{#1}{#2}}}
-\let_new:NN \calc_real:n \calc_real_evaluate:nn
-\let_new:NN \ratio\calc_ratio:nn
-\let_new:NN \real\calc_real:n
+%%\let:NN \ratio\calc_ratio:nn
+%%\let:NN \real\calc_real:n
+\def_protected:Npn \setlength{\calc_skip_set:Nn}
+\def_protected:Npn \gsetlength{\calc_skip_gset:Nn}
+\def_protected:Npn \addtolength{\calc_skip_add:Nn}
+\def_protected:Npn \gaddtolength{\calc_skip_gadd:Nn}
+\newif\iffirstchoice@ \firstchoice@true
+\def_protected:Npn \calc_setcounter:nn#1#2{
+ \calc_chk_document_counter:nn{#1}{
+ \exp_args:Nc\calc_int_gset:Nn {c@#1}{#2}
+ }
+}
+\def_protected:Npn \calc_addtocounter:nn#1#2{
+ \iffirstchoice@
+ \calc_chk_document_counter:nn{#1}{
+ \exp_args:Nc\calc_int_gadd:Nn {c@#1}{#2}
+ }
+ \fi:
+}
+\def_protected:Npn \calc_stepcounter:n#1{
+ \iffirstchoice@
+ \calc_chk_document_counter:nn{#1}{
+ \int_gincr:c {c@#1}
+ \group_begin:
+ \let:NN \@elt\@stpelt \cs_use:c{cl@#1}
+ \group_end:
+ }
+ \fi:
+}
+\def_new:Npn \calc_chk_document_counter:nn#1{
+ \cs_if_free:cTF{c@#1}{\@nocounterr {#1}}
+}
+\let:NN \setcounter \calc_setcounter:nn
+\let:NN \addtocounter \calc_addtocounter:nn
+\let:NN \stepcounter \calc_stepcounter:n
+\AtBeginDocument{
+ \let:NN \setcounter \calc_setcounter:nn
+ \let:NN \addtocounter \calc_addtocounter:nn
+ \let:NN \stepcounter \calc_stepcounter:n
+}
+\def:cpn{ver@calc.sty}{2005/08/06}
%%
%%
%% End of file `l3calc.sty'.
diff --git a/Master/texmf-dist/tex/latex/expl3/l3chk.sty b/Master/texmf-dist/tex/latex/expl3/l3chk.sty
index 1c2a8319d85..7900e8409d0 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3chk.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3chk.sty
@@ -49,8 +49,10 @@
%% -----------------------------------------------------------------------
%%
\RequirePackage{l3names}
-\GetIdInfo$Id: l3chk.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3chk.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental check module}
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\RequirePackage{l3basics}
\RequirePackage{l3int,l3prg}
\def_new:Npn \chk_local:N #1{
diff --git a/Master/texmf-dist/tex/latex/expl3/l3clist.sty b/Master/texmf-dist/tex/latex/expl3/l3clist.sty
index 5d66009175a..313e4ab79c7 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3clist.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3clist.sty
@@ -48,8 +48,10 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3clist.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3clist.dtx 725 2007-12-22 21:25:00Z mittelba $
{L3 Experimental comma separated lists}
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{l3prg,l3quark}
\def_new:Npn \clist_new:N #1{\tlp_new:Nn #1{}}
@@ -110,7 +112,7 @@
\def_new:Npn \clist_put_right:No {\exp_args:Nno\clist_put_right:Nn}
\def_new:Npn \clist_put_right:Nx {\exp_args:Nnx\clist_put_right:Nn}
\def_new:Npn \clist_gput_right:Nn {
- \clist_put_aux:NNnnNn \tlp_set:Nn \tlp_put_right:Nn , {}
+ \clist_put_aux:NNnnNn \tlp_gset:Nn \tlp_gput_right:Nn , {}
}
\def_new:Npn \clist_gput_right:No {\exp_args:NNo \clist_gput_right:Nn}
\def_new:Npn \clist_gput_right:cn {\exp_args:Nc \clist_gput_right:Nn}
@@ -121,20 +123,20 @@
\clist_if_empty:NF #1
{
\exp_after:NN \clist_map_function_aux:Nw
- \exp_after:NN #2 #1 , \q_nil , \q_stop
+ \exp_after:NN #2 #1 , \q_recursion_tail , \q_recursion_stop
}
}
\def_new:Npn \clist_map_function:cN{\exp_args:Nc\clist_map_function:NN}
\def_new:Npn \clist_map_function:nN #1#2{
- \tlist_if_empty:nF {#1}
- { \clist_map_function_aux:Nw #2 #1 , \q_nil , \q_stop }
+ \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,{
- \quark_if_nil:nT{#2} \clist_map_break:w
+ \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_stop:w
+\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{
\clist_if_empty:NF #1
@@ -144,7 +146,7 @@
##1{#2}
\exp_args:NcE \clist_map_function_aux:Nw
{clist_map_inline_ \int_use:N \l_clist_inline_level_int :n}
- #1 , \q_nil , \q_stop
+ #1 , \q_recursion_tail , \q_recursion_stop
\int_decr:N \l_clist_inline_level_int
}
}
@@ -157,21 +159,22 @@
##1{#2}
\exp_args:Nc \clist_map_function_aux:Nw
{clist_map_inline_ \int_use:N \l_clist_inline_level_int :n}
- #1 , \q_nil , \q_stop
+ #1 , \q_recursion_tail , \q_recursion_stop
\int_decr:N \l_clist_inline_level_int
}
}
\def_new:Npn \clist_map_variable:nNn #1#2#3{
\tlist_if_empty:nF{#1}
{
- \clist_map_variable_aux:Nnw #2 {#3} #1 , \q_nil , \q_stop
+ \clist_map_variable_aux:Nnw #2 {#3} #1
+ , \q_recursion_tail , \q_recursion_stop
}
}
\def_new:Npn \clist_map_variable:NNn {\exp_args:No \clist_map_variable:nNn}
\def_new:Npn \clist_map_variable:cNn {\exp_args:Nc \clist_map_variable:NNn}
\def_new:Npn \clist_map_variable_aux:Nnw #1#2#3,{
\def:Npn #1{#3}
- \quark_if_nil:NT #1 \clist_map_break:w
+ \quark_if_recursion_tail_stop:N #1
#2 \clist_map_variable_aux:Nnw #1{#2}
}
\def_new:Npn \clist_concat_aux:NNNN #1#2#3#4{
diff --git a/Master/texmf-dist/tex/latex/expl3/l3doc.cls b/Master/texmf-dist/tex/latex/expl3/l3doc.cls
index ebe379a580a..59c7a7c971d 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3doc.cls
+++ b/Master/texmf-dist/tex/latex/expl3/l3doc.cls
@@ -37,7 +37,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{l3doc}
- [2006/01/17 v0.0h class for documenting experimental stuff]
+ [2007/09/08 v0.0j class for documenting experimental stuff]
%
\NeedsTeXFormat{LaTeX2e}
%</class>
@@ -53,7 +53,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\DeclareOption*{\PassOptionstoClass{\CurrentOption}{article}}
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
% \end{macrocode}
%
% \section{Option Processing}
@@ -77,6 +77,7 @@
% \end{macrocode}
%
% \begin{macrocode}
+\RequirePackage{l3names,trace}
\RequirePackage{doc}
\renewcommand\MakePrivateLetters{\makeatletter
\catcode`\_=11\relax
@@ -110,7 +111,7 @@
\catcode`\_=11
-
+\AtBeginDocument{\catcode`\_=11\relax}
% \end{macrocode}
%
% Make \verb+|+ and \verb+"+ be `short verb' characters, but not in
@@ -181,7 +182,7 @@
\let\patchdate=\@empty
\begingroup
%%\def\ProvidesFile#1\fmtversion#2{\date{#2}\endinput}
- \def\ProvidesFile#1[#2 #3]{\date{#2}\endinput}
+ \def\ProvidesFile#1[#2#3]{\date{#2}\endinput}
\input{l3vers.dtx}
\global\let\X@date=\@date
diff --git a/Master/texmf-dist/tex/latex/expl3/l3expan.sty b/Master/texmf-dist/tex/latex/expl3/l3expan.sty
index f6e65f0ade6..4e8ee86603e 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3expan.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3expan.sty
@@ -48,38 +48,50 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3expan.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3expan.dtx 735 2008-01-14 22:31:02Z morten $
{L3 Experimental Argument Expansion module}
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\RequirePackage{l3tlp}
\tlp_new:Nn\l_exp_tlp{}
-\def_new:Npn\exp_arg_next:nnn#1#2#3{
+\def_long_new:Npn\exp_arg_next:nnn#1#2#3{
#2\:::{#3#1}
}
-\def_new:Npn\::n#1\:::#2#3{
+\def_long_new:Npn\::n#1\:::#2#3{
#1\:::{#2{#3}}
}
-\def_new:Npn\::N#1\:::#2#3{
+\def_long_new:Npn\::N#1\:::#2#3{
#1\:::{#2#3}
}
-\def_new:Npn\::c#1\:::#2#3{
+\def_long_new:Npn\::c#1\:::#2#3{
\exp_after:NN\exp_arg_next:nnn\cs:w #3\cs_end:{#1}{#2}
}
-\def_new:Npn\::o#1\:::#2#3{
+\def_long_new:Npn\::o#1\:::#2#3{
\exp_after:NN\exp_arg_next:nnn\exp_after:NN{\exp_after:NN{#3}}{#1}{#2}
}
-\def_new:Npn\::f#1\:::#2#3{
+\def_long_new:Npn\::f#1\:::#2#3{
\exp_after:NN\exp_arg_next:nnn
\exp_after:NN{\exp_after:NN{\int_to_roman:w -`0 #3}}
{#1}{#2}
}
-\def_new:Npn\::x#1\:::#2#3{
- \tlp_set:Nx\l_exp_tlp{{{#3}}}
- \exp_after:NN\exp_arg_next:nnn\l_exp_tlp{#1}{#2}}
-\def_new:Npn\:::#1{#1}
-\def_new:Npn\::C#1\:::#2#3{
+\def_new:Npn \exp_stop_f: {~}
+\let_new:NN \exp_arg:x \expanded % Move eventually.
+\cs_if_free:NTF\exp_arg:x{
+ \def_long_new:Npn\::x#1\:::#2#3{
+ % \tlp_set:Nx\l_exp_tlp{{{#3}}}
+ \def:Npx \l_exp_tlp{{{#3}}}
+ \exp_after:NN\exp_arg_next:nnn\l_exp_tlp{#1}{#2}}
+}
+{
+ \def_long_new:Npn\::x#1\:::#2#3{
+ \exp_after:NN\exp_arg_next:nnn
+ \exp_after:NN{\exp_arg:x{{#3}}}{#1}{#2}
+ }
+}
+\def_long_new:Npn\:::#1{#1}
+\def_long_new:Npn\::C#1\:::#2#3{
\exp_after:NN\exp_C_aux:nnn\cs:w #3\cs_end:{#1}{#2}}
-\def_new:Npn\exp_C_aux:nnn #1
- {
+\def_long_new:Npn\exp_C_aux:nnn #1{
\exp_after:NN
\exp_arg_next:nnn
\exp_after:NN
@@ -87,14 +99,14 @@
\exp_after:NN
{#1}
}
- }
-\def:Npn\::E#1\:::#2#3{
+}
+\def_long_new:Npn\::E#1\:::#2#3{
\exp_after:NN\exp_arg_next:nnn \exp_after:NN{#3}{#1}{#2}
}
-\def:Npn\::e#1\:::#2#3{
+\def_long_new:Npn\::e#1\:::#2#3{
\exp_after:NN\exp_arg_next:nnn \exp_after:NN{#3}{#1}{#2}
}
-\def:Npn\::d#1\:::#2#3{
+\def_long_new:Npn\::d#1\:::#2#3{
\exp_after:NN\exp_after:NN\exp_after:NN\exp_arg_next:nnn
\exp_after:NN\exp_after:NN\exp_after:NN{
\exp_after:NN\exp_after:NN\exp_after:NN{#3}}{#1}{#2}
@@ -106,26 +118,31 @@
\def:Npn \exp_args:NcE #1#2{\exp_after:NN #1\cs:w #2\exp_after:NN\cs_end:}
\def:Npn \exp_args:Nd {\::d\:::}
\def:Npn \exp_args:NNd {\::N\::d\:::}
+
\def:Npn \exp_args:NC {\::C\:::}
-\def:Npn \exp_args:Ncx {\::c\::x\:::}
-\def:Npn \exp_args:Ncco {\::c\::c\::o\:::}
-\def:Npn \exp_args:Nccx {\::c\::c\::x\:::}
-\def:Npn \exp_args:Ncnx {\::c\::n\::x\:::}
+\def:Npn \exp_args:NNC {\::N\::C\:::}
+\def:Npn \exp_args:NNf {\::N\::f\:::}
+\def:Npn \exp_args:NNno {\::N\::n\::o\:::}
+\def:Npn \exp_args:NNnx {\::N\::n\::x\:::} % new
+\def:Npn \exp_args:NNoo {\::N\::o\::o\:::} % new
+\def:Npn \exp_args:NNox {\::N\::o\::x\:::} % new
+\def:Npn \exp_args:NNx {\::N\::x\:::}
\def:Npn \exp_args:NcNc {\::c\::N\::c\:::}
\def:Npn \exp_args:NcNo {\::c\::N\::o\:::}
\def:Npn \exp_args:Ncco {\::c\::c\::o\:::}
+\def:Npn \exp_args:Ncco {\::c\::c\::o\:::}
+\def:Npn \exp_args:Nccx {\::c\::c\::x\:::}
+\def:Npn \exp_args:Ncnx {\::c\::n\::x\:::}
+\def:Npn \exp_args:Ncx {\::c\::x\:::}
\def:Npn \exp_args:Nf {\::f\:::}
-\def:Npn \exp_args:NNf {\::N\::f\:::}
\def:Npn \exp_args:Nfo{\::f\::o\:::}
\def:Npn \exp_args:Nnf {\::n\::f\:::}
-\def:Npn \exp_args:NNno {\::N\::n\::o\:::}
-%% Strange one this next one...
-\def:Npn \exp_args:NnnN {\::n\::n\::N\:::}
+\def:Npn \exp_args:NnnN {\::n\::n\::N\:::} %% Strange one this one...
+\def:Npn \exp_args:Nnnc {\::n\::n\::c\:::}
\def:Npn \exp_args:Nnno {\::n\::n\::o\:::}
\def:Npn \exp_args:Nnnx {\::n\::n\::x\:::}
\def:Npn \exp_args:Nno {\::n\::o\:::}
\def:Npn \exp_args:Nnox {\::n\::o\::x\:::}
-\def:Npn \exp_args:NNx {\::N\::x\:::}
\def:Npn \exp_args:Nnx {\::n\::x\:::}
\def:Npn \exp_args:Noo {\::o\::o\:::}
\def:Npn \exp_args:Noox {\::o\::o\::x\:::}
@@ -133,35 +150,39 @@
\def:Npn \exp_args:Nx {\::x\:::}
\def:Npn \exp_args:Nxo {\::x\::o\:::}
\def:Npn \exp_args:Nxx {\::x\::x\:::}
-\def:Npn \exp_args:NNC {\::N\::C\:::}
-\def:Npn \exp_args:Nnnc {\::n\::n\::c\:::}
-\def_new:Npn\exp_not:o#1{\exp_not:n\exp_after:NN{#1}}
+\def_long_new:Npn\exp_not:o#1{\exp_not:n\exp_after:NN{#1}}
+\def_long_new:Npn\exp_not:d#1{
+ \exp_not:n\exp_after:NN\exp_after:NN\exp_after:NN{#1}
+}
+\def_long_new:Npn\exp_not:f#1{
+ \exp_not:n\exp_after:NN{\int_to_roman:w -`0 #1}
+}
\def_new:Npn\exp_not:E{\exp_after:NN\exp_not:N}
-\def_new:Npn\exp_not:c#1{\exp_after:NN\exp_not:N\cs:w#1\cs_end:}
-\def_new:Npn \exp_args:No #1#2{\exp_after:NN#1\exp_after:NN{#2}}
-\def_new:Npn \exp_args:NOo #1#2#3{\exp_after:NN\exp_args:No \exp_after:NN#1
+\def_long_new:Npn\exp_not:c#1{\exp_after:NN\exp_not:N\cs:w#1\cs_end:}
+\def_long_new:Npn \exp_args:No #1#2{\exp_after:NN#1\exp_after:NN{#2}}
+\def_long_new:Npn \exp_args:NOo #1#2#3{\exp_after:NN\exp_args:No \exp_after:NN#1
\exp_after:NN#2\exp_after:NN{#3}}
-\def_new:Npn \exp_args:NOOo #1#2#3#4{\exp_after:NN\exp_args:NOo
+\def_long_new:Npn \exp_args:NOOo #1#2#3#4{\exp_after:NN\exp_args:NOo
\exp_after:NN#1\exp_after:NN#2\exp_after:NN#3\exp_after:NN{#4}}
-\def_new:Npn \exp_args:NNo #1#2#3{\exp_after:NN#1\exp_after:NN#2
+\def_long_new:Npn \exp_args:NNo #1#2#3{\exp_after:NN#1\exp_after:NN#2
\exp_after:NN{#3}}
-\def_new:Npn \exp_args:NNO #1#2#3 {\exp_after:NN#1
+\def_long_new:Npn \exp_args:NNO #1#2#3 {\exp_after:NN#1
\exp_after:NN#2 #3}
-\def_new:Npn \exp_args:NNOo #1#2#3#4{\exp_after:NN\exp_args:NNo
+\def_long_new:Npn \exp_args:NNOo #1#2#3#4{\exp_after:NN\exp_args:NNo
\exp_after:NN#1\exp_after:NN#2\exp_after:NN#3\exp_after:NN{#4}}
-\def_new:Npn \exp_args:NNNo #1#2#3#4{\exp_after:NN#1\exp_after:NN#2
+\def_long_new:Npn \exp_args:NNNo #1#2#3#4{\exp_after:NN#1\exp_after:NN#2
\exp_after:NN#3\exp_after:NN{#4}}
-\def_new:Npn \exp_args:Nc #1#2{\exp_after:NN#1\cs:w#2\cs_end:}
-\def_new:Npn \exp_args:NNc #1#2#3{\exp_after:NN#1\exp_after:NN#2
+\def_long_new:Npn \exp_args:Nc #1#2{\exp_after:NN#1\cs:w#2\cs_end:}
+\def_long_new:Npn \exp_args:NNc #1#2#3{\exp_after:NN#1\exp_after:NN#2
\cs:w#3\cs_end:}
-\def_new:Npn \exp_args:NOc#1#2#3{\exp_after:NN\exp_args:No\exp_after:NN
+\def_long_new:Npn \exp_args:NOc#1#2#3{\exp_after:NN\exp_args:No\exp_after:NN
#1\exp_after:NN#2\cs:w#3\cs_end:}
-\def_new:Npn \exp_args:Ncc #1#2#3{\exp_after:NN#1
+\def_long_new:Npn \exp_args:Ncc #1#2#3{\exp_after:NN#1
\cs:w#2\exp_after:NN\cs_end:\cs:w#3\cs_end:}
-\def_new:Npn \exp_args:Nccc #1#2#3#4{\exp_after:NN#1
+\def_long_new:Npn \exp_args:Nccc #1#2#3#4{\exp_after:NN#1
\cs:w#2\exp_after:NN\cs_end:\cs:w#3\exp_after:NN
\cs_end:\cs:w #4\cs_end:}
-\def_new:Npn \exp_args:Nco #1#2#3{\exp_after:NN#1\cs:w#2\exp_after:NN
+\def_long_new:Npn \exp_args:Nco #1#2#3{\exp_after:NN#1\cs:w#2\exp_after:NN
\cs_end:\exp_after:NN{#3}}
\def:Npn\exp_def_form:nnn#1#2#3{
\exp_after:NN
diff --git a/Master/texmf-dist/tex/latex/expl3/l3int.sty b/Master/texmf-dist/tex/latex/expl3/l3int.sty
index cbbfa2e9590..b329688b3eb 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3int.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3int.sty
@@ -48,9 +48,11 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3int.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3int.dtx 702 2007-11-27 14:21:49Z morten $
{L3 Experimental Integer module}
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\RequirePackage{l3num}
\let_new:NN \int_to_roman:w \tex_romannumeral:D
\let_new:NN \int_to_number:w \tex_number:D
@@ -69,6 +71,10 @@
\def:Npn \int_decr:N #1{\int_add:Nn#1\c_minus_one}
\def:Npn \int_gincr:N #1{\int_gadd:Nn#1\c_one}
\def:Npn \int_gdecr:N #1{\int_gadd:Nn#1\c_minus_one}
+\def:Npn \int_incr:c {\exp_args:Nc\int_incr:N}
+\def:Npn \int_decr:c {\exp_args:Nc\int_decr:N}
+\def:Npn \int_gincr:c {\exp_args:Nc\int_gincr:N}
+\def:Npn \int_gdecr:c {\exp_args:Nc\int_gdecr:N}
\let:NN \int_new:N \newcount% allocation better nick the LaTeX one...
\def_new:Npn \int_new:c {\exp_args:Nc \int_new:N}
\def_new:Npn \int_set:Nn #1#2{#1 \int_eval:w #2\scan_stop:
@@ -95,10 +101,11 @@
\def_new:Npn \int_gsub:Nn {
\pref_global:D
\int_sub:Nn }
+\def_new:Npn \int_gadd:cn{\exp_args:Nc\int_gadd:Nn}
+\def_new:Npn \int_sub:cn{\exp_args:Nc\int_sub:Nn}
+\def_new:Npn \int_gsub:cn{\exp_args:Nc\int_gsub:Nn}
\let_new:NN \int_use:N \tex_the:D
\def_new:Npn \int_use:c #1{\int_use:N \cs:w#1\cs_end:}
-\def_new:Npn \int_gincr:c {\exp_args:Nc \int_gincr:N}
-\def_new:Npn \int_gdecr:c {\exp_args:Nc \int_gdecr:N}
\def_new:Npn \int_to_arabic:n #1{\int_to_number:w \int_eval:n{#1}}
\def_new:Npn \int_roman_lcuc_mapping:Nnn #1#2#3{
\def:cpn {int_to_lc_roman_#1:}{#2}
@@ -161,7 +168,7 @@
\int_Alph_default_conversion_rule:n
}
\def_new:Npn \int_to_symbol:n #1{
- \mode_math:TF
+ \mode_if_math:TF
{
\int_convert_number_with_rule:nnN {#1}{9}
\int_symbol_math_conversion_rule:n
@@ -214,7 +221,28 @@
\int_pre_eval_two_args:Nnn\int_div_truncate_raw:nn
}
\def_new:Npn \int_div_truncate_raw:nn #1#2 {
- \int_eval:n{ (2*#1 - #2) / (2* #2) }
+ \int_eval:w
+ \if_num:w \int_eval:w#1 = \c_zero
+ 0
+ \else:
+ (#1
+ \if_num:w \int_eval:w #1 < \c_zero
+ \if_num:w \int_eval:w#2 < \c_zero
+ -( #2 +
+ \else:
+ +( #2 -
+ \fi:
+ \else:
+ \if_num:w \int_eval:w #2 < \c_zero
+ +( #2 +
+ \else:
+ -( #2 -
+ \fi:
+ \fi:
+ 1)/2)
+ \fi:
+ /(#2)
+ \scan_stop:
}
\def_new:Npn \int_div_round:nn {
\int_pre_eval_two_args:Nnn\int_div_round_raw:nn
@@ -227,6 +255,9 @@
\let_new:NN \int_compare:nNnTF \num_compare:nNnTF
\let_new:NN \int_compare:nNnT \num_compare:nNnT
\let_new:NN \int_compare:nNnF \num_compare:nNnF
+\let_new:NN \int_max_of:nn \num_max_of:nn
+\let_new:NN \int_min_of:nn \num_min_of:nn
+\let_new:NN \int_abs:nn \num_abs:nn
\let_new:NN \int_compare_p:nNn \num_compare_p:nNn
\def_new:Npn \int_if_odd_p:n #1 {
\if_num_odd:w \int_eval:n{#1}
@@ -236,16 +267,16 @@
\fi:
}
\def_test_function_new:npn {int_if_odd:n}#1{\if_num_odd:w \int_eval:n{#1}}
-\def_new:Npn \int_whiledo:nNnT #1#2#3#4{
+\def_long_new:Npn \int_whiledo:nNnT #1#2#3#4{
\int_compare:nNnT {#1}#2{#3}{#4 \int_whiledo:nNnT {#1}#2{#3}{#4}}
}
-\def_new:Npn \int_whiledo:nNnF #1#2#3#4{
+\def_long_new:Npn \int_whiledo:nNnF #1#2#3#4{
\int_compare:nNnF {#1}#2{#3}{#4 \int_whiledo:nNnF {#1}#2{#3}{#4}}
}
-\def_new:Npn \int_dowhile:nNnT #1#2#3#4{
+\def_long_new:Npn \int_dowhile:nNnT #1#2#3#4{
#4 \int_compare:nNnT {#1}#2{#3}{\int_dowhile:nNnT {#1}#2{#3}{#4}}
}
-\def_new:Npn \int_dowhile:nNnF #1#2#3#4{
+\def_long_new:Npn \int_dowhile:nNnF #1#2#3#4{
#4 \int_compare:nNnF {#1}#2{#3}{\int_dowhile:nNnF {#1}#2{#3}{#4}}
}
\def_new:Npn \int_get_sign_and_digits:n #1{
diff --git a/Master/texmf-dist/tex/latex/expl3/l3io.sty b/Master/texmf-dist/tex/latex/expl3/l3io.sty
index d20b5d05f85..608c6b7c624 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3io.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3io.sty
@@ -48,8 +48,10 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3io.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3io.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental i/o module}
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\RequirePackage{l3toks}\par
\let:NN \iow_new:N \newwrite
\def_new:Npn \iow_new:c {\exp_args:Nc \iow_new:N}
diff --git a/Master/texmf-dist/tex/latex/expl3/l3keyval.sty b/Master/texmf-dist/tex/latex/expl3/l3keyval.sty
index d5612e7e120..683d121e3aa 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3keyval.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3keyval.sty
@@ -48,8 +48,10 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3keyval.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3keyval.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental keyval processing}
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\RequirePackage{l3quark}
\RequirePackage{l3toks}
\RequirePackage{l3int}
diff --git a/Master/texmf-dist/tex/latex/expl3/l3messages.sty b/Master/texmf-dist/tex/latex/expl3/l3messages.sty
index aead4018e11..eee8eab7c8b 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3messages.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3messages.sty
@@ -15,7 +15,7 @@
%% Do not distribute a modified version of this file.
%%
%%
-%% File: l3messages.dtx Copyright (C) 1990-2006 LaTeX3 project
+%% File: l3messages.dtx Copyright (C) 1990-2007 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
@@ -48,6 +48,10 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
+\GetIdInfo$Id: l3messages.dtx 673 2007-09-28 20:50:33Z mittelba $
+ {L3 Experimental LaTeX Messages module}
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\RequirePackage{l3basics}
\RequirePackage{l3tlp}
\RequirePackage{l3expan}
@@ -55,8 +59,7 @@
\RequirePackage{l3io}
\RequirePackage{l3int}
\RequirePackage{l3toks}
-\GetIdInfo$Id: l3messages.dtx 573 2006-08-21 20:59:37Z morten $
- {L3 Experimental LaTeX Messages module}
+\RequirePackage{l3token}
\tlp_new:Nn \g_file_curr_name_tlp {no~file}
\let_new:NN \err_message:x \tex_errmessage:D
\def_new:Npn \text_put_sp: {~}
@@ -83,16 +86,16 @@
\def_new:Npn \l_err_label_token {}
\int_set:Nn\tex_errorcontextlines:D\c_minus_one
\def_new:Npn \err_info:nn #1#2{
- \def:Npn\err_newline:{\iow_newline#2}
+ \def:Npn\err_newline:{\iow_newline:#2}
\io_put_log:x {#1~\io_show_file_lineno:}}
\def_new:Npn \err_warn:nn #1#2{
- \def:Npn\err_newline:{\iow_newline#2}
+ \def:Npn\err_newline:{\iow_newline:#2}
\io_put_term:x {#1~\io_show_file_lineno:}}
\def_new:Npn \err_info_noline:nn #1#2{
- \def:Npn\err_newline:{\iow_newline#2}
+ \def:Npn\err_newline:{\iow_newline:#2}
\io_put_log:x {#1}}
\def_new:Npn \err_warn_noline:nn #1#2{
- \def:Npn\err_newline:{\iow_newline#2}
+ \def:Npn\err_newline:{\iow_newline:#2}
\io_put_term:x {#1}}
\def_new:Npn \err_interrupt:NNw #1#2{\let:NwN \l_err_label_token #2
\group_begin:
@@ -102,12 +105,12 @@
%\clearshortrefmaps
\tex_input:D #1~\err_display_aux:w}
\def_new:Npn \err_fatal:nn #1#2{
- \def:Npn\err_newline:{\iow_newline#2}
+ \def:Npn\err_newline:{\iow_newline:#2}
\io_put_term:x {#1~\io_show_file_lineno:}
\tex_end:D
}
\def_new:Npn \err_fatal_noline:nn #1#2{
- \def:Npn\err_newline:{\iow_newline#2}
+ \def:Npn\err_newline:{\iow_newline:#2}
\io_put_term:x {#1}
\tex_end:D
}
@@ -126,9 +129,9 @@
{\err_latex_bug:x{You~closed~the~wrong~error~file~`#1'.~
Open~is~`\g_err_curr_fname'.}}
\iow_long_unexpanded:Nn \c_iow_err_stream {\err_latex_bug:x{Didn't~find~the~
- correct~error~message~to~show.\iow_newline
+ correct~error~message~to~show.\iow_newline:
Was~searching~for~a~function~
- with~the~following~meaning:\iow_newline
+ with~the~following~meaning:\iow_newline:
\token_to_string:N\token_to_meaning:N
\token_to_string:N\l_err_label_token}
\group_end:}
@@ -137,7 +140,7 @@
\tlp_gset_eq:NN\g_err_curr_fname\c_empty_tlp
}
\def_new:Npn \err_interrupt_new:NNNnnn #1{
- \group_begin: \tex_catcode:D`\#\c_other_char_code
+ \group_begin: \char_set_catcode:nn{`\#}{12}
\if_meaning:NN#1\g_err_curr_fname
\else:
\err_latex_bug:x{Error~text~goes~to~wrong~err~file:~
@@ -154,9 +157,9 @@
\cmd_declare:Nnn\err_display_aux:w [#2]{
\group_end:
\toks_gset:Nx\g_err_help_toks{#4}
- \io_put_term:x{LaTeX~error~\io_show_file_lineno:.\iow_newline
+ \io_put_term:x{LaTeX~error~\io_show_file_lineno:.\iow_newline:
\text_put_sp:\text_put_four_sp: \text_put_sp:
- See~LaTeX~manual~for~explanation.\iow_newline
+ See~LaTeX~manual~for~explanation.\iow_newline:
\text_put_sp:\text_put_four_sp: \text_put_sp:
Type~\text_put_sp: H~<return>~\text_put_sp: for~
immediate~help.}
@@ -198,9 +201,9 @@
}
\err_file_new:Nn \c_kernel_err_tlp {l3in2e.err}
\def:Npn\err_help_ignored: {
- Your~command~was~ignored.\iow_newline
+ Your~command~was~ignored.\iow_newline:
Type \text_put_sp: I~<command>~<return>
- \text_put_sp: to~replace~it~with~another~command,\iow_newline
+ \text_put_sp: to~replace~it~with~another~command,\iow_newline:
or~\text_put_sp: <return> \text_put_sp: to~continue~without~it.}
\def:Npn\err_help_textlost: {
@@ -208,7 +211,7 @@
\def:Npn\err_help_return_or_X: {
Try~typing\text_put_sp: <return>
- \text_put_sp: to~proceed.\iow_newline
+ \text_put_sp: to~proceed.\iow_newline:
If~that~doesn't~work,~type
\text_put_sp: X~<return>\text_put_sp: to~quit.}
@@ -219,10 +222,10 @@
\err_kernel_interrupt_new:NNnnn\cs_free_p:N{1}
{Command~name~`\tex_string:D#1'~already~used}
{You~tried~to~define~a~command~which~already~has~
- a~meaning.\iow_newline
+ a~meaning.\iow_newline:
If~you~really~want~to~redefine~it~try~
\token_to_string:N\cmd_declare:Nnn\text_put_sp:
- next~time.\iow_newline
+ next~time.\iow_newline:
For~this~run~I~will~ignore~your~definition.}
{}
@@ -235,7 +238,7 @@
\err_kernel_interrupt_new:NNnnn\newcnt{0}
{No~such~counter}
{The~counter~name~mentioned~in~the~operation~is~not~
- known~to~me.\iow_newline
+ known~to~me.\iow_newline:
Check~the~spelling.}
{}
diff --git a/Master/texmf-dist/tex/latex/expl3/l3names.sty b/Master/texmf-dist/tex/latex/expl3/l3names.sty
index e14b70f41cb..485ad03e134 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3names.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3names.sty
@@ -47,19 +47,38 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \def\fileversion{#2}%
- \def\filedate{#3/#4/#5}%
- \ProvidesPackage{#1}[#3/#4/#5 v#2 #8]%
+\begingroup
+\def\GetIdInfo$#1 #2.#3 #4 #5 #6 #7${%
+ \GetIdInfoAux #5\relax{#2}#5\relax{#4}%
}
-\GetIdInfo$Id: l3names.dtx 577 2006-11-21 18:10:26Z morten $
+\def\GetIdInfoAux #1#2#3#4#5#6\relax{%
+ \ifx#5/%
+ \expandafter\GetIdInfoAuxCVS
+ \else
+ \expandafter\GetIdInfoAuxSVN
+ \fi
+}
+\def\GetIdInfoAuxCVS #1#2\relax#3#4{%
+ \gdef\fileversion{#3}%
+ \gdef\filedate{#2}%
+ \gdef\filedescription{#4}%
+ \ProvidesPackage{#1}[#2 v#3 #4]%
+}
+\def\GetIdInfoAuxSVN #1#2-#3-#4\relax#5#6{%
+ \gdef\fileversion{#5}%
+ \gdef\filedate{#2/#3/#4}%
+ \gdef\filedescription{#6}%
+ \ProvidesPackage{#1}[#2/#3/#4 v#5 #6]
+}
+\GetIdInfo$Id: l3names.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental Naming Scheme for TeX Primitives}
-\catcode`\ =9\relax
-\catcode`\^^I=9\relax
-\catcode`\^^M=9\relax
-\catcode`\~=10\relax
-\catcode`\_=11\relax\catcode`\:=11\relax
-\catcode`\@=11\relax % as long as we use old LaTeX stuff.
+\endgroup
+\catcode126=10\relax % tilde is a space char.
+\catcode32=9\relax % space is ignored
+\catcode9=9\relax % tab also ignored
+\endlinechar=32\relax % endline is space
+\catcode95=11\relax % underscore letter
+\catcode58=11\relax % colon letter
\let\tex_let:D\let
\DeclareOption{removeoldnames}{
\long\def\name_undefine:N#1{
@@ -565,37 +584,96 @@
\name_primitive:NN \pdfsetrandomseed \pdf_setrandomseed:D
\name_primitive:NN \pdfnoligatures \pdf_noligatures:D
\name_primitive:NN \textdir \aleph_textdir:D
-\tex_def:D\CodeStart{%
- \tex_catcode:D `\ =9\tex_relax:D
- \tex_catcode:D `\^^M=9\tex_relax:D
- \tex_catcode:D `\^^I=9\tex_relax:D
- \tex_catcode:D `\~=10\tex_relax:D
- \tex_catcode:D `\@=11\tex_relax:D % For LaTeX2e
- \tex_catcode:D `\_=11\tex_relax:D
- \tex_catcode:D `\:=11\tex_relax:D}
-\tex_def:D\CodeStop{
- \tex_catcode:D `\ =10\tex_relax:D
- \tex_catcode:D `\^^M=5\tex_relax:D
- \tex_catcode:D `\^^I=10\tex_relax:D
- \tex_catcode:D `\~=13\tex_relax:D
- \tex_catcode:D `\@=12\tex_relax:D % For LaTeX2e
- \tex_catcode:D `\_=8\tex_relax:D
- \tex_catcode:D `\:=12\tex_relax:D}
+\tex_def:D\ExplSyntaxOn{
+ \tex_def:D\ExplSyntaxStatus{00}
+ \tex_catcode:D 126=10 \tex_relax:D % tilde is a space char.
+ \tex_catcode:D 32=9 \tex_relax:D % space is ignored
+ \tex_catcode:D 9=9 \tex_relax:D % tab also ignored
+ \tex_endlinechar:D =32 \tex_relax:D % endline is space
+ \tex_catcode:D 95=11 \tex_relax:D % underscore letter
+ \tex_catcode:D 58=11 \tex_relax:D % colon letter
+}
+\tex_def:D\ExplSyntaxOff{
+ \tex_def:D\ExplSyntaxStatus{01}
+ \tex_catcode:D 126=13 \tex_relax:D
+ \tex_catcode:D 32=10 \tex_relax:D
+ \tex_catcode:D 9=10 \tex_relax:D
+ \tex_endlinechar:D =13 \tex_relax:D
+ \tex_catcode:D 95=8 \tex_relax:D
+ \tex_catcode:D 58=12 \tex_relax:D
+}
+\tex_let:D \CodeStart \ExplSyntaxOn
+\tex_let:D \CodeStop \ExplSyntaxOff
\tex_def:D \NamesStart{
- \tex_catcode:D `\_=11\scan_stop:
- \tex_catcode:D `\:=11\scan_stop:
- }
+ \tex_catcode:D `\_=11\tex_relax:D
+ \tex_catcode:D `\:=11\tex_relax:D
+}
\tex_def:D \NamesStop{
- \tex_catcode:D `\_=8\scan_stop:
- \tex_catcode:D `\:=12\scan_stop:
- }
-\tex_def:D\GetIdInfo{\CodeStop\GetIdInfoAux}
-\tex_def:D\GetIdInfoAux$#1~#2.dtx~#3~#4-#5-#6~#7~#8$#9{%
- \tex_def:D \fileversion{#3}%
- \tex_def:D \filedate{#4/#5/#6}%
- \ProvidesPackage{#2}[#4/#5/#6~ v#3~ #9]%
- \CodeStart
+ \tex_catcode:D `\_=8\tex_relax:D
+ \tex_catcode:D `\:=12\tex_relax:D
+}
+\tex_def:D\GetIdInfo{
+ \tex_begingroup:D
+ \tex_catcode:D 32=10 \tex_relax:D % needed? Probably for now.
+ \GetIdInfoAuxi:w
+}
+\tex_def:D\GetIdInfoAuxi:w$#1~#2.#3~#4~#5~#6~#7~#8$#9{
+ \tex_endgroup:D
+ \tex_def:D\filename{#2}
+ \tex_def:D\fileversion{#4}
+ \tex_def:D\filedescription{#9}
+ \tex_def:D\fileauthor{#7}
+ \GetIdInfoAuxii:w #5\tex_relax:D
+ #3\tex_relax:D#5\tex_relax:D#6\tex_relax:D
}
+\tex_def:D\GetIdInfoAuxii:w #1#2#3#4#5#6\tex_relax:D{
+ \tex_ifx:D#5/
+ \tex_expandafter:D\GetIdInfoAuxCVS:w
+ \tex_else:D
+ \tex_expandafter:D\GetIdInfoAuxSVN:w
+ \tex_fi:D
+}
+\tex_def:D\GetIdInfoAuxCVS:w #1,v\tex_relax:D
+ #2\tex_relax:D#3\tex_relax:D{
+ \tex_def:D\filedate{#2}
+ \tex_def:D\filenameext{#1}
+ \tex_def:D\filetimestamp{#3}
+}
+\tex_def:D\GetIdInfoAuxSVN:w #1\tex_relax:D#2-#3-#4
+ \tex_relax:D#5Z\tex_relax:D{
+ \tex_def:D\filenameext{#1}
+ \tex_def:D\filedate{#2/#3/#4}
+ \tex_def:D\filetimestamp{#5}
+}
+\tex_def:D \ProvidesExplPackage#1#2#3#4{
+ \ProvidesPackage{#1}[#2~v#3~#4]
+ \ExplSyntaxOn
+}
+\tex_def:D \ProvidesExplClass#1#2#3#4{
+ \ProvidesClass{#1}[#2~v#3~#4]
+ \ExplSyntaxOn
+}
+\tex_let:D \org@onefilewithoptions\@onefilewithoptions
+\tex_def:D \@onefilewithoptions#1[#2][#3]#4{
+ \tex_edef:D \ExplSyntaxStack{ \ExplSyntaxStatus\ExplSyntaxStack }
+ \ExplSyntaxOff
+ \org@onefilewithoptions{#1}[{#2}][{#3}]{#4}
+ \tex_expandafter:D\ExplSyntaxPopStack\ExplSyntaxStack\tex_relax:D
+}
+\g@addto@macro\@popfilename{%
+ \tex_ifnum:D\tex_the:D\tex_catcode:D`\@=12\tex_relax:D
+ \ExplSyntaxOff
+ \tex_fi:D
+}
+\tex_def:D\ExplSyntaxPopStack#1#2#3\tex_relax:D{
+ \tex_def:D\ExplSyntaxStack{#3}
+ \tex_if:D#1#2
+ \ExplSyntaxOn
+ \tex_else:D
+ \ExplSyntaxOff
+ \tex_fi:D
+}
+\tex_def:D\ExplSyntaxStack{}
\tex_let:D\tex_input:D \@@input
\tex_let:D\tex_underline:D \@@underline
\tex_let:D\tex_end:D \@@end
@@ -605,15 +683,12 @@
\tex_let:D\tex_hyphen:D \@@hyph
\tex_let:D\par \tex_par:D
\tex_ifx:D\name_undefine:N\@gobble
+ \AtEndOfPackage{\ExplSyntaxOff}
\tex_def:D\name_pop_stack:w{}
- \g@addto@macro\@popfilename{%
- \tex_ifnum:D12=\tex_the:D\tex_catcode:D`@
- \CodeStop
- \tex_fi:D}
\tex_else:D
\tex_def:D\ProvidesPackage{
\tex_begingroup:D
- \CodeStop
+ \ExplSyntaxOff
\package_provides:w}
\tex_def:D\package_provides:w#1#2[#3]{
\tex_endgroup:D
@@ -621,7 +696,7 @@
\tex_expandafter:D\tex_xdef:D
\tex_csname:D ver@#1.sty\tex_endcsname:D{#1}}
\tex_def:D\name_pop_stack:w#1\relax{%
- \CodeStop
+ \ExplSyntaxOff
\tex_expandafter:D\@p@pfilename\@currnamestack\@nil
\tex_let:D\default@ds\@unknownoptionerror
\tex_global:D\tex_let:D\ds@\@empty
@@ -635,7 +710,7 @@
\tex_def:D\RequirePackage#1{
\tex_expandafter:D\tex_ifx:D
\tex_csname:D ver@#1.sty\tex_endcsname:D\tex_relax:D
- \CodeStart
+ \ExplSyntaxOn
\tex_input:D#1.sty\tex_relax:D
\tex_fi:D}
\tex_fi:D
diff --git a/Master/texmf-dist/tex/latex/expl3/l3num.sty b/Master/texmf-dist/tex/latex/expl3/l3num.sty
index 3392ecd86f2..89c12cdb625 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3num.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3num.sty
@@ -48,9 +48,13 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3num.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3num.dtx 702 2007-11-27 14:21:49Z morten $
{L3 Experimental token numbers}
+
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\RequirePackage{l3expan}\par
+\let_new:NN \num_value:w \tex_number:D
\let_new:NN \num_eval:w \etex_numexpr:D
\let_new:NN \if_num:w \tex_ifnum:D
\let_new:NN \if_num_odd:w \tex_ifodd:D
@@ -89,7 +93,9 @@
\def_new:Npn \num_gset_eq:Nc {\exp_args:NNc \num_gset_eq:NN}
\def_new:Npn \num_gset_eq:cc {\exp_args:Ncc \num_gset_eq:NN}
\def_new:Npn \num_add:Nn #1#2 {\num_set:Nn #1{#1+#2}}
+\def_new:Npn \num_add:cn {\exp_args:Nc\num_add:Nn}
\def_new:Npn \num_gadd:Nn {\pref_global:D \num_add:Nn}
+\def_new:Npn \num_gadd:cn {\exp_args:Nc\num_gadd:Nn}
\let_new:NN\num_use:N \use_arg_i:n
\let_new:NN\num_use:c \cs_use:c
\def_test_function_new:npn {num_compare:nNn}#1#2#3{
@@ -103,12 +109,17 @@
\c_false
\fi:
}
+\def_new:Npn \num_abs:n#1{
+ \if_num:w \num_eval:n{#1}<\c_zero \exp_after:NN -\fi: #1
+}
+\def_new:Npn \num_max_of:nn#1#2{\num_compare:nNnTF {#1}>{#2}{#1}{#2}}
+\def_new:Npn \num_min_of:nn#1#2{\num_compare:nNnTF {#1}<{#2}{#1}{#2}}
\num_new:N \l_tmpa_num
\num_new:N \l_tmpb_num
\num_new:N \l_tmpc_num
\num_new:N \g_tmpa_num
\num_new:N \g_tmpb_num
-\engine_aleph:TF
+\engine_if_aleph:TF
{
\let_new:NN \const_new_aux:Nw \tex_chardef:D
\const_new_aux:Nw \c_max_register_num = 65535 \scan_stop:
diff --git a/Master/texmf-dist/tex/latex/expl3/l3precom.sty b/Master/texmf-dist/tex/latex/expl3/l3precom.sty
index 9f67483781a..39bf566c3f8 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3precom.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3precom.sty
@@ -48,8 +48,10 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3precom.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3precom.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental precompilation module}
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\RequirePackage{l3num}
\RequirePackage{l3io}
\RequirePackage{l3seq}
diff --git a/Master/texmf-dist/tex/latex/expl3/l3prg.sty b/Master/texmf-dist/tex/latex/expl3/l3prg.sty
index fad727278da..ccb7657e076 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3prg.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3prg.sty
@@ -48,24 +48,27 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3prg.dtx 574 2006-08-21 23:30:10Z morten $
+\GetIdInfo$Id: l3prg.dtx 697 2007-11-27 14:14:54Z morten $
{L3 Experimental control structures}
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\RequirePackage{l3quark}
\RequirePackage{l3toks}
\RequirePackage{l3int}
-\def_new:Npn \mode_vertical_p: {
+\def_new:Npn \mode_if_vertical_p: {
\if_mode_vertical: \c_true \else: \c_false\fi:}
-\def_test_function_new:npn{mode_vertical:}{\if_mode_vertical:}
-\def_new:Npn \mode_horizontal_p: {
+\def_test_function_new:npn{mode_if_vertical:}{\if_mode_vertical:}
+\def_new:Npn \mode_if_horizontal_p: {
\if_mode_horizontal: \c_true \else: \c_false\fi:}
-\def_test_function_new:npn{mode_horizontal:}{\if_mode_horizontal:}
-\def_new:Npn \mode_inner_p: {
+\def_test_function_new:npn{mode_if_horizontal:}{\if_mode_horizontal:}
+\def_new:Npn \mode_if_inner_p: {
\if_mode_inner: \c_true \else: \c_false\fi:}
-\def_test_function_new:npn{mode_inner:}{\if_mode_inner:}
-\def_test_function_new:npn{mode_math:} {
+\def_test_function_new:npn{mode_if_inner:}{\if_mode_inner:}
+\def_test_function_new:npn{mode_if_math:} {
\scan_align_safe_stop: \if_mode_math: }
-\def_new:Npn \group_align_safe_begin: {\if_false:{\fi:\if_num:w0=`}\fi:}
-\def_new:Npn \group_align_safe_end: {\if_num:w0=`{\fi:\if_false:}\fi:}
+\def_new:Npn \group_align_safe_begin: {
+ \if_false:{\fi:\if_num:w`}=\c_zero\fi:}
+\def_new:Npn \group_align_safe_end: {\if_num:w`{=\c_zero}\fi:}
\def_new:Npn \scan_align_safe_stop: {
\num_compare:nNnT \etex_currentgrouptype:D = \c_six
{
@@ -190,15 +193,15 @@
}
}
\def_new:Npn \bool_new:N #1 { \let_new:NN #1 \c_false }
-\def_new:Npn \bool_new:c #1 { \let_new:cN #1 \c_false }
+\def_new:Npn \bool_new:c #1 { \let_new:cN {#1} \c_false }
\def_new:Npn \bool_set_true:N #1 { \let:NN #1 \c_true }
-\def_new:Npn \bool_set_true:c #1 { \let:cN #1 \c_true }
+\def_new:Npn \bool_set_true:c #1 { \let:cN {#1} \c_true }
\def_new:Npn \bool_set_false:N #1 { \let:NN #1 \c_false }
-\def_new:Npn \bool_set_false:c #1 { \let:cN #1 \c_false }
+\def_new:Npn \bool_set_false:c #1 { \let:cN {#1} \c_false }
\def_new:Npn \bool_gset_true:N #1 { \glet:NN #1 \c_true }
-\def_new:Npn \bool_gset_true:c #1 { \glet:cN #1 \c_true }
+\def_new:Npn \bool_gset_true:c #1 { \glet:cN {#1} \c_true }
\def_new:Npn \bool_gset_false:N #1 { \glet:NN #1 \c_false }
-\def_new:Npn \bool_gset_false:c #1 { \glet:cN #1 \c_false }
+\def_new:Npn \bool_gset_false:c #1 { \glet:cN {#1} \c_false }
\let_new:NN \bool_set_eq:NN \let:NN
\let_new:NN \bool_set_eq:Nc \let:Nc
\let_new:NN \bool_set_eq:cN \let:cN
@@ -261,55 +264,36 @@
\def_long_new:Npn \prg_dowhile:nF #1#2{
#2 #1 {\prg_dowhile:nF {#1}{#2}}
}
-\let_new:NN \prg_if_predicate:nTF \bool_if:NTF
-\let_new:NN \prg_if_predicate:nT \bool_if:NT
-\let_new:NN \prg_if_predicate:nF \bool_if:NF
-\def_new:Npn \prg_if_predicate_or_p:nn #1#2{
- \if_num:w #1#2<\c_hundred_one
- \c_true
- \else:
- \c_false
- \fi:
-}
-\def_new:Npn \prg_if_predicate_and_p:nn #1#2{
- \if_case:w #1#2 ~
- \c_true
- \else:
- \c_false
- \fi:
+\def_long_new:Npn \predicate_p:n #1{
+ \group_align_safe_begin:
+ \exp_after:NN \predicate_auxi:NN
+ \int_to_roman:w-`\q #1 02\scan_stop:
}
-\def_new:Npn \prg_if_predicate_not_p:n #1{
- \if_case:w #1 ~
- \c_false
- \or:
- \c_true
- \fi:
+\def_long_test_function_new:npn {predicate:n}#1{
+ \group_align_safe_begin:
+ \if:w \exp_after:NN \predicate_auxi:NN
+ \int_to_roman:w-`\q #1 02\scan_stop:
}
-\def_long_new:Npn \prg_if_predicate_ands_p:n #1{
- \exp_after:NN \prg_if_predicate_andor_aux:NNN \exp_after:NN \c_true
- \int_to_roman:w -`0 #1 \scan_stop: \scan_stop:
+\def_new:Npn \predicate_auxi:NN 0 #1{
+ \exp_after:NN \predicate_auxii:NNN \exp_after:NN #1
+ \int_to_roman:w-`\q
}
-\def_long_new:Npn \prg_if_predicate_ors_p:n #1{
- \exp_after:NN \prg_if_predicate_andor_aux:NNN \exp_after:NN \c_false
- \int_to_roman:w -`0 #1 \scan_stop: \scan_stop:
+\def_new:Npn \predicate_auxii:NNN #1#2#3{
+ \cs_use:c{predicate_#2#3_#1:w} }
+\def_new:cpn{predicate_&&_0:w}{
+ \exp_after:NN \predicate_auxi:NN\int_to_roman:w-`\q
}
-\def_new:Npn \prg_if_predicate_andor_aux:NNN #1#2#3{
- \token_if_eq_meaning:NNTF \scan_stop: #2
- { #1 }
- {
- \int_compare:nNnTF #3 = #1
- { \exp_after:NN \prg_if_predicate_andor_aux:NNN }
- { \exp_after:NN \prg_if_predicate_andor_break:NNN }
- \exp_after:NN #1 \int_to_roman:w -`0
- }
+\def_long_new:cpn{predicate_&&_1:w} #1 02\scan_stop:{
+ \group_align_safe_end: 01}
+\def_long_new:cpn{predicate_||_0:w} #1 02\scan_stop:{
+ \group_align_safe_end: 00}
+\def_new:cpn{predicate_||_1:w}{
+ \exp_after:NN \predicate_auxi:NN\int_to_roman:w-`\q
}
-\def_new:Npn \prg_if_predicate_andor_break:NNN #1#2#3{
- \token_if_eq_meaning:NNTF \scan_stop: #2
- { \if:w #1\c_false\else:\c_true\fi: }
- {
- \exp_after:NN \prg_if_predicate_andor_break:NNN \exp_after:NN #1
- \int_to_roman:w -`0
- }
+\def_new:cpn{predicate_02_0:w}\scan_stop:{ \group_align_safe_end: 00 }
+\def_new:cpn{predicate_02_1:w}\scan_stop:{ \group_align_safe_end: 01 }
+\def_long_new:Npn \predicate_not_p:n #1{
+ \if:w \predicate_p:n{#1} \c_false \else: \c_true \fi:
}
\def_new:NNn \prg_define_quicksort:nnn 3 {
\def_long:cNx{#1_quicksort:n}1{
diff --git a/Master/texmf-dist/tex/latex/expl3/l3prop.sty b/Master/texmf-dist/tex/latex/expl3/l3prop.sty
index fe956efcdab..67c2efc2d3a 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3prop.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3prop.sty
@@ -48,86 +48,98 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3prop.dtx 581 2006-12-12 12:28:27Z morten $
+\GetIdInfo$Id: l3prop.dtx 668 2007-09-27 15:54:23Z mittelba $
{L3 Experimental Property Lists}
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\RequirePackage{l3toks}\par
+\RequirePackage{l3quark}\par
+\quark_new:N\q_prop
+
\def_new:Npn \prop_new:N #1{\toks_new:N #1}
\def_new:Npn \prop_new:c {\exp_args:Nc \prop_new:N}
\let_new:NN \prop_clear:N \toks_clear:N
\def_new:Npn \prop_clear:c {\exp_args:Nc\prop_clear:N}
\let_new:NN \prop_gclear:N \toks_gclear:N
\def_new:Npn \prop_gclear:c {\exp_args:Nc\prop_gclear:N}
-\let_new:NN \prop_use:N \toks_use:N
-\def_long_new:Npn \prop_split_aux:NNn #1#2#3{
- \def:Npn \tmp:w ##1#2##2##3\q_stop {#3{##1}{##2}{##3}}
- \exp_after:NN\tmp:w \prop_use:N#1#2\q_no_value \q_stop}
-\def_long_new:NNn \prop_get:NNN 2{
- \prop_split_aux:NNn #1#2\prop_get_aux:w}
-\def_long_new:NNn \prop_get_aux:w 4{\toks_set:Nn#4{#2}}
-\def_new:Npn \prop_get:cNN { \exp_args:Nc \prop_get:NNN }
-\def_long_new:NNn \prop_gget:NNN 2{
- \prop_split_aux:NNn #1#2\prop_gget_aux:w}
-\def_new:Npn \prop_gget:NcN {\exp_args:NNc \prop_gget:NNN}
-\def_new:Npn \prop_gget:cNN {\exp_args:Nc \prop_gget:NNN}
-\def_long_new:NNn \prop_gget_aux:w 4{\toks_gset:Nn#4{#2}}
-\def_long_new:NNn \prop_get_gdel:NNN 3{
- \prop_split_aux:NNn #1#2{\prop_get_del_aux:w #3{\toks_gset:Nn #1}#2}}
+\def_long_new:Npn \prop_split_aux:Nnn #1#2#3{
+ \def:Npn \tmp:w ##1\q_prop#2\q_prop##2##3\q_stop {#3{##1}{##2}{##3}}
+ \exp_after:NN\tmp:w \toks_use:N#1\q_prop#2\q_prop\q_no_value \q_stop
+}
+\def_long_new:NNn \prop_get:NnN 2{
+ \prop_split_aux:Nnn #1{#2}\prop_get_aux:w}
+\def_long_new:NNn \prop_get_aux:w 4{\tlp_set:Nx#4{\exp_not:n{#2}}}
+\def_new:Npn \prop_get:cnN { \exp_args:Nc \prop_get:NnN }
+\def_long_new:NNn \prop_gget:NnN 2{
+ \prop_split_aux:Nnn #1{#2}\prop_gget_aux:w}
+\def_new:Npn \prop_gget:NcN {\exp_args:NNc \prop_gget:NnN}
+\def_new:Npn \prop_gget:cnN {\exp_args:Nc \prop_gget:NnN}
+\def_long_new:NNn \prop_gget_aux:w 4{\tlp_gset:Nx#4{\exp_not:n{#2}}}
+\def_long_new:NNn \prop_get_gdel:NnN 3{
+ \prop_split_aux:Nnn #1{#2}{\prop_get_del_aux:w #3{\toks_gset:Nn #1}{#2}}}
\def_long_new:NNn \prop_get_del_aux:w 6{
- \quark_if_no_value:nF{#5} {
- \def:Npn \tmp:w ##1#3\q_no_value {#2{#4##1}}
+ \tlp_set:Nx #1{\exp_not:n{#5}}
+ \quark_if_no_value:NF #1 {
+ \def:Npn \tmp:w ##1\q_prop#3\q_prop\q_no_value {#2{#4##1}}
\tmp:w #6}
}
-\def_long_new:NNn \prop_put:NNn 2{
- \prop_split_aux:NNn #1#2{
- \toks_clear:N #1
- \prop_put_aux:w {\toks_put_right:Nn #1}#2}
+\def_long_new:NNn \prop_put:Nnn 2{
+ \prop_split_aux:Nnn #1{#2}{
+ \prop_clear:N #1
+ \prop_put_aux:w {\toks_put_right:Nn #1}{#2}}
}
-\def_new:Npn \prop_put:ccn {\exp_args:Ncc \prop_put:NNn }
-\def_long_new:NNn \prop_gput:NNn 2{
- \prop_split_aux:NNn #1#2{
- \toks_gclear:N #1
- \prop_put_aux:w {\toks_gput_right:Nn #1}#2}
+\def_new:Npn \prop_put:ccn {\exp_args:Ncc \prop_put:Nnn }
+
+\def_long_new:NNn \prop_gput:Nnn 2{
+ \prop_split_aux:Nnn #1{#2}{
+ \prop_gclear:N #1
+ \prop_put_aux:w {\toks_gput_right:Nn #1}{#2}}
}
-\def_new:Npn \prop_gput:NNo {\exp_args:NNNo \prop_gput:NNn}
-\def_new:Npn \prop_gput:NNx {\exp_args:Nnnx \prop_gput:NNn}
-\def_new:Npn \prop_gput:NOx {\exp_args:Nnox \prop_gput:NNn}
-\def_new:Npn \prop_gput:NOo {\exp_args:NNOo \prop_gput:NNn}
-\def_new:Npn \prop_gput:Ncn {\exp_args:NNc \prop_gput:NNn }
-\def_new:Npn \prop_gput:OOo {\exp_args:NOOo \prop_gput:NNn}
-\def_new:Npn \prop_gput:cNn {\exp_args:Nc \prop_gput:NNn}
-\def_new:Npn \prop_gput:ccn {\exp_args:Ncc \prop_gput:NNn}
-\def_new:Npn \prop_gput:cco {\exp_args:Ncco \prop_gput:NNn}
-\def_new:Npn \prop_gput:ccx {\exp_args:Nccx \prop_gput:NNn}
+
\def_long_new:NNn \prop_put_aux:w 6{
- #1{#2{#6}#3}
- \quark_if_no_value:nF {#4}
+ #1{\q_prop#2\q_prop{#6}#3}
+ \tlist_if_empty:nF{#5}
{
- \def:Npn \tmp:w ##1#2\q_no_value {#1{##1}}
+ \def:Npn \tmp:w ##1\q_prop#2\q_prop\q_no_value {#1{##1}}
\tmp:w #5
}
}
-\def_long_new:NNn \prop_del:NN 2{
- \prop_split_aux:NNn #1#2{\prop_del_aux:w {\toks_set:Nn #1}#2}}
-\def_long_new:NNn \prop_gdel:NN 2{
- \prop_split_aux:NNn #1#2{\prop_del_aux:w {\toks_gset:Nn #1}#2}}
-\def_long_new:NNn \prop_del_aux:w 5{\quark_if_no_value:nF {#4}
- {\def:Npn \tmp:w ##1#2\q_no_value {#1{#3##1}}\tmp:w #5}}
-\def_new:NNn \prop_if_in:NNTF 2{
- \prop_split_aux:NNn #1#2\prop_if_in_aux:w}
-\def_new:Npn \prop_if_in:NOTF {\exp_args:Nno \prop_if_in:NNTF}
-\def_new:Npn \prop_if_in:ccTF {\exp_args:Ncc \prop_if_in:NNTF}
+\def_new:Npn \prop_gput:Nno {\exp_args:NNno \prop_gput:Nnn}
+\def_new:Npn \prop_gput:Nnx {\exp_args:NNnx \prop_gput:Nnn}
+\def_new:Npn \prop_gput:Nox {\exp_args:NNox \prop_gput:Nnn}
+\def_new:Npn \prop_gput:Noo {\exp_args:NNoo \prop_gput:Nnn}
+\def_new:Npn \prop_gput:Ncn {\exp_args:NNc \prop_gput:Nnn}
+\def_new:Npn \prop_gput:Ooo {\exp_args:NOoo \prop_gput:Nnn}
+\def_new:Npn \prop_gput:cnn {\exp_args:Nc \prop_gput:Nnn}
+\def_new:Npn \prop_gput:ccn {\exp_args:Ncc \prop_gput:Nnn}
+\def_new:Npn \prop_gput:cco {\exp_args:Ncco \prop_gput:Nnn}
+\def_new:Npn \prop_gput:ccx {\exp_args:Nccx \prop_gput:Nnn}
+\def_long_new:NNn \prop_del:Nn 2{
+ \prop_split_aux:Nnn #1{#2}{\prop_del_aux:w {\toks_set:Nn #1}{#2}}}
+\def_long_new:NNn \prop_gdel:Nn 2{
+ \prop_split_aux:Nnn #1{#2}{\prop_del_aux:w {\toks_gset:Nn #1}{#2}}}
+\def_long_new:NNn \prop_del_aux:w 5{
+ \def:Npn \tmp:w {#4}
+ \quark_if_no_value:NF \tmp:w
+ {\def:Npn \tmp:w ##1\q_prop#2\q_prop\q_no_value {#1{#3##1}}
+ \tmp:w #5}}
+\def_new:NNn \prop_if_in:NnTF 2{
+ \prop_split_aux:Nnn #1{#2}\prop_if_in_aux:w}
\def_new:NNn \prop_if_in_aux:w 3{\quark_if_no_value:nFT {#2}}
-\def_long_new:NNn \prop_gput_if_new:NNn 2{
- \prop_split_aux:NNn #1#2{\prop_put_if_new_aux:w #1#2}}
+
+\def_new:Npn \prop_if_in:NoTF {\exp_args:NNo \prop_if_in:NnTF}
+\def_new:Npn \prop_if_in:ccTF {\exp_args:Ncc \prop_if_in:NnTF}
+\def_long_new:NNn \prop_gput_if_new:Nnn 2{
+ \prop_split_aux:Nnn #1{#2}{\prop_put_if_new_aux:w #1{#2}}}
\def_long_new:NNn \prop_put_if_new_aux:w 6{
- \quark_if_no_value:nT {#4}{#1{#2{#6}#3}}}
+ \tlist_if_empty:nT {#5}{#1{\q_prop#2\q_prop{#6}#3}}}
\let_new:NN \prop_set_eq:NN \toks_set_eq:NN
-\let_new:NN \prop_set_eq:Nc \toks_set_eq:Nc
+\let_new:NN \prop_set_eq:Nc \toks_set_eq:Nc
\let_new:NN \prop_set_eq:cN \toks_set_eq:cN
-\let_new:NN \prop_set_eq:cc \toks_set_eq:cc
-\let_new:NN \prop_gset_eq:NN \toks_gset_eq:NN
+\let_new:NN \prop_set_eq:cc \toks_set_eq:cc
+\let_new:NN \prop_gset_eq:NN \toks_gset_eq:NN
\let_new:NN \prop_gset_eq:Nc \toks_gset_eq:Nc
-\let_new:NN \prop_gset_eq:cN \toks_gset_eq:cN
+\let_new:NN \prop_gset_eq:cN \toks_gset_eq:cN
\let_new:NN \prop_gset_eq:cc \toks_gset_eq:cc
\let_new:NN \prop_if_empty_p:N \toks_if_empty_p:N
\let_new:NN \prop_if_empty_p:c \toks_if_empty_p:c
@@ -138,13 +150,13 @@
\let_new:NN \prop_if_empty:cT \toks_if_empty:cTF
\let_new:NN \prop_if_empty:cF \toks_if_empty:cF
\def_new:NNn \prop_if_eq:NNTF 2 {
- \tlist_if_eq:xxTF{\prop_use:N #1}{\prop_use:N #2}
+ \tlist_if_eq:xxTF{\toks_use:N #1}{\toks_use:N #2}
}
\def_new:NNn \prop_if_eq:NNT 2 {
- \tlist_if_eq:xxT{\prop_use:N #1}{\prop_use:N #2}
+ \tlist_if_eq:xxT{\toks_use:N #1}{\toks_use:N #2}
}
\def_new:NNn \prop_if_eq:NNF 2 {
- \tlist_if_eq:xxF{\prop_use:N #1}{\prop_use:N #2}
+ \tlist_if_eq:xxF{\toks_use:N #1}{\toks_use:N #2}
}
\def_new:Npn \prop_if_eq:NcTF {\exp_args:NNc \prop_if_eq:NNTF}
\def_new:Npn \prop_if_eq:NcT {\exp_args:NNc \prop_if_eq:NNT}
@@ -156,32 +168,82 @@
\def_new:Npn \prop_if_eq:ccT {\exp_args:Ncc \prop_if_eq:NNT}
\def_new:Npn \prop_if_eq:ccF {\exp_args:Ncc \prop_if_eq:NNF}
\def_new:Npn \prop_map_function:NN #1#2{
- \exp_after:NN \prop_map_function_aux:NNn
- \exp_after:NN #2 \prop_use:N #1 \q_nil \q_no_value \q_stop
+ \exp_after:NN \prop_map_function_aux:w
+ \exp_after:NN #2 \toks_use:N #1 \q_prop{}\q_prop \q_no_value \q_stop
+}
+\def_new:Npn \prop_map_function_aux:w #1\q_prop#2\q_prop#3{
+ \if:w \tlist_if_empty_p:n{#2}
+ \exp_after:NN \prop_map_break:w
+ \fi:
+ #1{#2}{#3}
+ \prop_map_function_aux:w #1
}
-\def_new:Npn \prop_map_function_aux:NNn #1#2#3{
- \if_meaning:NN \q_nil #1
+
+\def:Npn \prop_map_function:NN #1#2{
+ \exp_after:NN \prop_map_function_aux:w
+ \exp_after:NN #2 \toks_use:N #1 \q_prop \q_no_value \q_prop \q_no_value
+}
+\def:Npn \prop_map_function_aux:w #1\q_prop#2\q_prop#3{
+ \quark_if_no_value:nF{#2}
+ {
+ #1{#2}{#3}
+ \prop_map_function_aux:w #1
+ }
+}
+
+\def:Npn \prop_map_function:NN #1#2{
+ \exp_after:NN \prop_map_function_aux:w
+ \exp_after:NN #2 \toks_use:N #1 \q_prop \q_nil \q_prop \q_no_value \q_stop
+}
+\def:Npn \prop_map_function_aux:w #1\q_prop#2\q_prop#3{
+ \if_meaning:NN \q_nil #2
\exp_after:NN \prop_map_break:w
\fi:
- #1#2{#3}
- \prop_map_function_aux:NNn #1
+ #1{#2}{#3}
+ \prop_map_function_aux:w #1
}
+
+
\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
\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}
##1##2{#2}
- \exp_args:NcE \prop_map_function:N
+ \prop_map_function:Nc #1
{prop_map_inline_ \num_use:N \l_prop_inline_level_num :n}
- \prop_use:N #1
- \q_nil \q_no_value \q_stop
\num_decr:N \l_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
+\def:Npn \prop_put:NNn {\typeout{Warning:~name~
+ changed~ to~ \string\prop_put:Nnn}\prop_put:Nnn}
+\def:Npn \prop_gput:NNn {\typeout{Warning:~name~
+ changed~ to~ \string\prop_gput:Nnn }\prop_gput:Nnn }
+\def:Npn \prop_gput:NNo {\typeout{Warning:~name~
+ changed~ to~ \string\prop_gput:Nno }\prop_gput:Nno }
+\def:Npn \prop_gput:cNn {\typeout{Warning:~name~
+ changed~ to~ \string\prop_gput:cnn }\prop_gput:cnn }
+\def:Npn \prop_gput_if_new:NNn {\typeout{Warning:~name~
+ changed~ to~ \string\prop_gput_if_new:Nnn }\prop_gput_if_new:Nnn }
+\def:Npn \prop_get:NNN {\typeout{Warning:~name~
+ changed~ to~ \string\prop_get:NnN }\prop_get:NnN }
+\def:Npn \prop_get:cNN {\typeout{Warning:~name~
+ changed~ to~ \string\prop_get:cnN }\prop_get:cnN }
+\def:Npn \prop_gget:NNN {\typeout{Warning:~name~
+ changed~ to~ \string\prop_gget:NnN }\prop_gget:NnN }
+\def:Npn \prop_gget:cNN {\typeout{Warning:~name~
+ changed~ to~ \string\prop_gget:cnN }\prop_gget:cnN }
+\def:Npn \prop_get_gdel:NNN {\typeout{Warning:~name~
+ changed~ to~ \string\prop_get_gdel:NnN }\prop_get_gdel:NnN }
+\def:Npn \prop_del:NN {\typeout{Warning:~name~
+ changed~ to~ \string\prop_del:Nn }\prop_del:Nn }
+\def:Npn \prop_gdel:NN {\typeout{Warning:~name~
+ changed~ to~ \string\prop_gdel:Nn }\prop_gdel:Nn }
+\def:Npn \prop_if_in:NNTF {\typeout{Warning:~name~
+ changed~ to~ \string\prop_if_in:NnTF }\prop_if_in:NnTF }
%%
%%
%% End of file `l3prop.sty'.
diff --git a/Master/texmf-dist/tex/latex/expl3/l3quark.sty b/Master/texmf-dist/tex/latex/expl3/l3quark.sty
index fd88bfa9cfa..c766400bcbb 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3quark.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3quark.sty
@@ -48,8 +48,10 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3quark.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3quark.dtx 705 2007-12-02 22:14:25Z morten $
{L3 Experimental Quark Commands}
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\RequirePackage{l3expan}\par
\def_new:Npn \quark_new:N #1{\tlp_new:Nn #1{#1}}
\quark_new:N \q_stop
@@ -57,6 +59,48 @@
\quark_new:N \q_nil
\quark_new:N\q_error
\quark_new:N\q_mark
+\quark_new:N\q_recursion_tail
+\quark_new:N\q_recursion_stop
+\def_long_new:Npn \quark_if_recursion_tail_stop:n #1 {
+ \exp_after:NN\if_meaning:NN
+ \quark_if_recursion_tail_aux:w #1?\q_nil\q_recursion_tail\q_recursion_tail
+ \exp_after:NN \use_none_delimit_by_q_recursion_stop:w
+ \fi:
+}
+\def_long_new:Npn \quark_if_recursion_tail_stop:N #1 {
+ \if_meaning:NN#1\q_recursion_tail
+ \exp_after:NN \use_none_delimit_by_q_recursion_stop:w
+ \fi:
+}
+\def_new:Npn \quark_if_recursion_tail_stop:o{
+ \exp_args:No\quark_if_recursion_tail_stop:n
+}
+\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
+ \exp_after:NN \use_arg_i_delimit_by_q_recursion_stop:nw
+ \else:
+ \exp_after:NN\use_none:n
+ \fi:
+ {#2}
+}
+\def_long_new:Npn \quark_if_recursion_tail_stop_do:Nn #1#2 {
+ \if_meaning:NN #1\q_recursion_tail
+ \exp_after:NN \use_arg_i_delimit_by_q_recursion_stop:nw
+ \else:
+ \exp_after:NN\use_none:n
+ \fi:
+ {#2}
+}
+\def_new:Npn \quark_if_recursion_tail_stop_do:on{
+ \exp_args:No\quark_if_recursion_tail_stop_do:nn
+}
+\def_long_new:Npn \quark_if_recursion_tail_aux:w
+ #1#2\q_nil\q_recursion_tail{#1}
+\def_long_new:Npn\use_none_delimit_by_q_recursion_stop:w
+ #1\q_recursion_stop {}
+\def_long_new:Npn\use_arg_i_delimit_by_q_recursion_stop:nw
+ #1#2\q_recursion_stop {#1}
\def_long_test_function_new:npn {quark_if_no_value:N} #1 {
\if_meaning:NN\q_no_value#1}
\def_long_new:Npn \quark_if_no_value_p:N #1{
diff --git a/Master/texmf-dist/tex/latex/expl3/l3seq.sty b/Master/texmf-dist/tex/latex/expl3/l3seq.sty
index 096b825697f..c4ebb497c03 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3seq.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3seq.sty
@@ -48,8 +48,10 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3seq.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3seq.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental sequences and stacks}
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\RequirePackage{l3quark}
\RequirePackage{l3tlp}
\RequirePackage{l3expan}
diff --git a/Master/texmf-dist/tex/latex/expl3/l3skip.sty b/Master/texmf-dist/tex/latex/expl3/l3skip.sty
index 8e24a01271b..588bcb9f88b 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3skip.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3skip.sty
@@ -15,7 +15,7 @@
%% Do not distribute a modified version of this file.
%%
%%
-%% File: l3skip.dtx Copyright (C) 2005-2006 Frank Mittelbach, LaTeX3 project
+%% File: l3skip.dtx Copyright (C) 2005-2007 Frank Mittelbach, 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
@@ -48,8 +48,10 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3skip.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3skip.dtx 666 2007-09-27 15:53:26Z mittelba $
{L3 Experimental skip registers}
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\RequirePackage{l3int}
\RequirePackage{l3prg}
\let:NN \skip_new:N \newskip
@@ -100,10 +102,9 @@
\let:NN \c_zero_skip \z@
\let:NN \c_max_skip \maxdimen
\def_new:Npn \skip_infinite_glue:nTF #1{
- \prg_logic_test:nTF {
- \prg_logic_or_p:nn
- { \int_compare_p:nNn {\etex_gluestretchorder:D #1 } > \c_zero }
- { \int_compare_p:nNn {\etex_glueshrinkorder:D #1 } > \c_zero }
+ \predicate:nTF {
+ \int_compare_p:nNn {\etex_gluestretchorder:D #1 } > \c_zero ||
+ \int_compare_p:nNn {\etex_glueshrinkorder:D #1 } > \c_zero
}
}
\def_new:Npn \skip_split_finite_else_action:nnNN #1#2#3#4{
@@ -137,10 +138,12 @@
\def_new:Npn\dim_add:cn{\exp_args:Nc\dim_add:Nn}
\def_new:Npn\dim_add:Nc{\exp_args:NNc\dim_add:Nn}
\def_new:Npn \dim_gadd:Nn { \pref_global:D \dim_add:Nn }
+\def_new:Npn\dim_gadd:cn{\exp_args:Nc\dim_gadd:Nn}
\def_new:Npn \dim_sub:Nn #1#2{\tex_advance:D#1-#2\scan_stop:}
\def_new:Npn\dim_sub:cn{\exp_args:Nc\dim_sub:Nn}
\def_new:Npn\dim_sub:Nc{\exp_args:NNc\dim_sub:Nn}
\def_new:Npn \dim_gsub:Nn {\pref_global:D \dim_sub:Nn }
+\def_new:Npn\dim_gsub:cn{\exp_args:Nc\dim_gsub:Nn}
\let_new:NN \dim_use:N \tex_the:D
\def_new:Npn \dim_use:c {\exp_args:Nc\dim_use:N}
\dim_new:N \l_tmpa_dim
diff --git a/Master/texmf-dist/tex/latex/expl3/l3tlp.sty b/Master/texmf-dist/tex/latex/expl3/l3tlp.sty
index e80ea876717..2b911f20523 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3tlp.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3tlp.sty
@@ -15,7 +15,7 @@
%% Do not distribute a modified version of this file.
%%
%%
-%% File: l3tlp.dtx Copyright (C) 1990-2006 LaTeX3 project
+%% File: l3tlp.dtx Copyright (C) 1990-2007 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
@@ -48,8 +48,10 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3tlp.dtx 581 2006-12-12 12:28:27Z morten $
+\GetIdInfo$Id: l3tlp.dtx 735 2008-01-14 22:31:02Z morten $
{L3 Experimental Token List Pointers}
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\RequirePackage{l3basics}
\def_long_new:Npn \tlp_new:Nn #1#2{
\chk_new_cs:N #1
@@ -60,6 +62,8 @@
\chk_new_cs:N #1
\gdef:Npx #1{#2}
}
+\def_new:Npn \tlp_new:N #1{\tlp_new:Nn #1{}}
+\def_new:Npn \tlp_new:c #1{\tlp_new:cn {#1}{}}
\def_new:Npn \tlp_use:N #1 {
\if_meaning:NN #1 \scan_stop:
\err_latex_bug:x {Token~list~pointer~ `\token_to_string:N #1'~
@@ -74,11 +78,13 @@
\def_long_new:Npn\tlp_gset:Nn#1#2{\gdef:Npn#1{#2}}
\def_long_new:Npn\tlp_gset:Nx#1#2{\gdef:Npx#1{#2}}
\def_new:Npn \tlp_set:No {\exp_args:NNo \tlp_set:Nn}
+\def_new:Npn \tlp_set:Nd {\exp_args:NNd \tlp_set:Nn}
\def_new:Npn \tlp_set:Nf {\exp_args:NNf \tlp_set:Nn}
\def_new:Npn \tlp_set:cn {\exp_args:Nc \tlp_set:Nn}
\def_new:Npn \tlp_set:co {\exp_args:Nco \tlp_set:Nn}
\def_new:Npn \tlp_set:cx {\exp_args:Nc \tlp_set:Nx}
\def_new:Npn \tlp_gset:No {\exp_args:NNo \tlp_gset:Nn}
+\def_new:Npn \tlp_gset:Nd {\exp_args:NNd \tlp_gset:Nn}
\def_new:Npn \tlp_gset:cn {\exp_args:Nc \tlp_gset:Nn}
\def_new:Npn \tlp_gset:cx {\exp_args:Nc \tlp_gset:Nx}
\let_new:NN \tlp_set_eq:NN \let:NN
@@ -97,26 +103,59 @@
\def_new:Npn \tlp_clear_new:c {\exp_args:Nc \tlp_clear_new:N}
\let_new:NN \tlp_gclear_new:N \tlp_gclear:N
\def_new:Npn \tlp_gclear_new:c {\exp_args:Nc \tlp_gclear_new:N}
-\def_new:Npn \tlp_put_left:Nn #1{
- \exp_args:No \tlp_put_left_aux:w {#1}#1}
-\def_new:Npn\tlp_put_left:No{\exp_args:NNo\tlp_put_left:Nn}
-\def_new:Npn \tlp_gput_left:Nn {
- \pref_global:D
- \tlp_put_left:Nn
+\def_long_new:Npn \tlp_put_left:Nn #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_set:Nx #1{\exp_not:o{\l_exp_tlp}\exp_not:o{#1}}
+}
+\def_long_new:Npn \tlp_put_left:No #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_set:Nx #1{\exp_not:d{\l_exp_tlp}\exp_not:o{#1}}
+}
+\def_long_new:Npn \tlp_put_left:Nx #1#2{
+ \tlp_set:Nx #1{#2\exp_not:o{#1}}
+}
+\def_long_new:Npn \tlp_gput_left:Nn #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_gset:Nx #1{\exp_not:o{\l_exp_tlp}\exp_not:o{#1}}
+}
+\def_long_new:Npn \tlp_gput_left:No #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_gset:Nx #1{\exp_not:d{\l_exp_tlp}\exp_not:o{#1}}
+}
+\def_long_new:Npn \tlp_gput_left:Nx #1#2{
+ \tlp_gset:Nx #1{#2\exp_not:o{#1}}
+}
+\def_long_new:Npn \tlp_put_left:cn{\exp_args:Nc\tlp_put_left:Nn}
+\def_long_new:Npn \tlp_put_left:co{\exp_args:Nc\tlp_put_left:No}
+\def_long_new:Npn \tlp_put_left:cx{\exp_args:Nc\tlp_put_left:Nx}
+\def_long_new:Npn \tlp_gput_left:cn{\exp_args:Nc\tlp_gput_left:Nn}
+\def_long_new:Npn \tlp_gput_left:co{\exp_args:Nc\tlp_gput_left:No}
+\def_long_new:Npn \tlp_gput_left:cx{\exp_args:Nc\tlp_gput_left:Nx}
+\def_long_new:Npn \tlp_put_right:Nn #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_set:Nx #1{\exp_not:o{#1}\exp_not:o{\l_exp_tlp}}
+}
+\def_long_new:Npn \tlp_gput_right:Nn #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_gset:Nx #1{\exp_not:o{#1}\exp_not:o{\l_exp_tlp}}
+}
+\def_long_new:Npn \tlp_put_right:No #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_set:Nx #1{\exp_not:o{#1}\exp_not:d{\l_exp_tlp}}
}
-\def_new:Npn\tlp_gput_left:No{\exp_args:NNo\tlp_gput_left:Nn}
-\def_new:Npn\tlp_gput_left:Nx{\exp_args:NNx\tlp_gput_left:Nn}
-\def_long_new:Npn \tlp_put_left_aux:w #1#2#3{\tlp_set:Nn #2{#3#1}
+\def_long_new:Npn \tlp_gput_right:No #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_gset:Nx #1{\exp_not:o{#1}\exp_not:d{\l_exp_tlp}}
+}
+\def_long:Npn \tlp_put_right:Nx #1#2{
+ \tlp_set:Nx #1{\exp_not:o{#1}#2}
+}
+\def_long:Npn \tlp_gput_right:Nx #1#2{
+ \tlp_gset:Nx #1{\exp_not:o{#1}#2}
}
-\def_long_new:Npn \tlp_put_right:Nn #1#2{\tlp_set:No #1{#1#2}}
-\def_long_new:Npn \tlp_gput_right:Nn #1#2{\tlp_gset:No #1{#1#2}}
-\def_new:Npn \tlp_gput_right:No {\exp_args:NNo \tlp_gput_right:Nn}
-\def_new:Npn \tlp_gput_right:Nx {\exp_args:NNx \tlp_gput_right:Nn}
\def_new:Npn \tlp_gput_right:cn {\exp_args:Nc \tlp_gput_right:Nn}
-\def_new:Npn \tlp_gput_right:co {\exp_args:Nco \tlp_gput_right:Nn}
+\def_new:Npn \tlp_gput_right:co {\exp_args:Nc \tlp_gput_right:No}
\def_new:Npn \tlp_put_right:cc {\exp_args:Ncc \tlp_put_right:Nn}
-\def_new:Npn \tlp_put_right:No {\exp_args:NNo \tlp_put_right:Nn}
-\def_new:Npn \tlp_put_right:Nx {\exp_args:Nnx \tlp_put_right:Nn}
\def_new:Npn \tlp_gset:Nc {
\pref_global:D
\tlp_set:Nc}
@@ -184,14 +223,14 @@
\let_new:NN \tlist_to_uppercase:n \tex_uppercase:D
\let_new:NN \tlist_to_str:n \etex_detokenize:D
\def_long_new:Npn \tlist_map_function:nN #1#2{
- \tlist_map_function_aux:Nn #2 #1 \q_nil \q_stop
+ \tlist_map_function_aux:Nn #2 #1 \q_recursion_tail \q_recursion_stop
}
\def_new:Npn \tlp_map_function:NN #1#2{
\exp_after:NN \tlist_map_function_aux:Nn
- \exp_after:NN #2 #1 \q_nil \q_stop
+ \exp_after:NN #2 #1 \q_recursion_tail \q_recursion_stop
}
\def_long_new:Npn \tlist_map_function_aux:Nn #1#2{
- \quark_if_nil:nT{#2} \tlist_map_break:w
+ \quark_if_recursion_tail_stop:n{#2}
#1{#2} \tlist_map_function_aux:Nn #1
}
\def_new:Npn\tlp_map_function:cN{\exp_args:Nc\tlp_map_function:NN}
@@ -201,7 +240,7 @@
##1{#2}
\exp_args:Nc \tlist_map_function_aux:Nn
{tlist_map_inline_ \num_use:N \l_tlp_inline_level_num :n}
- #1 \q_nil\q_stop
+ #1 \q_recursion_tail\q_recursion_stop
\num_decr:N \l_tlp_inline_level_num
}
\def_long_new:Npn \tlp_map_inline:Nn #1#2{
@@ -210,22 +249,22 @@
##1{#2}
\exp_args:NcE \tlist_map_function_aux:Nn
{tlist_map_inline_ \num_use:N \l_tlp_inline_level_num :n}
- #1 \q_nil\q_stop
+ #1 \q_recursion_tail\q_recursion_stop
\num_decr:N \l_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}
\def_long_new:Npn \tlist_map_variable:nNn #1#2#3{
- \tlist_map_variable_aux:Nnn #2 {#3} #1 \q_nil \q_stop
+ \tlist_map_variable_aux:Nnn #2 {#3} #1 \q_recursion_tail \q_recursion_stop
}
\def_new:Npn \tlp_map_variable:NNn {\exp_args:No \tlist_map_variable:nNn}
\def_new:Npn \tlp_map_variable:cNn {\exp_args:Nc \tlp_map_variable:NNn}
\def_long_new:Npn \tlist_map_variable_aux:Nnn #1#2#3{
\tlp_set:Nn #1{#3}
- \quark_if_nil:NT #1 \tlist_map_break:w
+ \quark_if_recursion_tail_stop:N #1
#2 \tlist_map_variable_aux:Nnn #1{#2}
}
-\let_new:NN \tlist_map_break:w \use_none_delimit_by_q_stop:w
+\let_new:NN \tlist_map_break:w \use_none_delimit_by_q_recursion_stop:w
\let_new:NN \tlp_map_break:w \tlist_map_break:w
\let_new:NN \tlist_compare:xx \pdfstrcmp
\def_long_new:NNn \tlist_compare:nn 2{
@@ -272,12 +311,46 @@
\tlp_set:Nx \l_testb_tlp {\exp_not:n{#2}}
\if_meaning:NN\l_testa_tlp \l_testb_tlp
}
+ \def_long_test_function:npn{tlist_if_eq:no}#1#2{
+ \tlp_set:Nx \l_testa_tlp {\exp_not:n{#1}}
+ \tlp_set:Nx \l_testb_tlp {\exp_not:o{#2}}
+ \if_meaning:NN\l_testa_tlp \l_testb_tlp
+ }
+ \def_long_test_function:npn{tlist_if_eq:nx}#1#2{
+ \tlp_set:Nx \l_testa_tlp {\exp_not:n{#1}}
+ \tlp_set:Nx \l_testb_tlp {#2}
+ \if_meaning:NN\l_testa_tlp \l_testb_tlp
+ }
+ \def_long_test_function:npn{tlist_if_eq:on}#1#2{
+ \tlp_set:Nx \l_testa_tlp {\exp_not:o{#1}}
+ \tlp_set:Nx \l_testb_tlp {\exp_not:n{#2}}
+ \if_meaning:NN\l_testa_tlp \l_testb_tlp
+ }
\def_long_test_function:npn{tlist_if_eq:oo}#1#2{
\tlp_set:Nx \l_testa_tlp {\exp_not:o{#1}}
\tlp_set:Nx \l_testb_tlp {\exp_not:o{#2}}
\if_meaning:NN\l_testa_tlp \l_testb_tlp
}
- \def_long:Npn\tlist_compare:xx #1#2{\ERROR}
+ \def_long_test_function:npn{tlist_if_eq:ox}#1#2{
+ \tlp_set:Nx \l_testa_tlp {\exp_not:o{#1}}
+ \tlp_set:Nx \l_testb_tlp {#2}
+ \if_meaning:NN\l_testa_tlp \l_testb_tlp
+ }
+ \def_long_test_function:npn{tlist_if_eq:xn}#1#2{
+ \tlp_set:Nx \l_testa_tlp {#1}
+ \tlp_set:Nx \l_testb_tlp {\exp_not:n{#2}}
+ \if_meaning:NN\l_testa_tlp \l_testb_tlp
+ }
+ \def_long_test_function:npn{tlist_if_eq:xo}#1#2{
+ \tlp_set:Nx \l_testa_tlp {#1}
+ \tlp_set:Nx \l_testb_tlp {\exp_not:o{#2}}
+ \if_meaning:NN\l_testa_tlp \l_testb_tlp
+ }
+ \def_long_test_function:npn{tlist_if_eq:xx}#1#2{
+ \tlp_set:Nx \l_testa_tlp {#1}
+ \tlp_set:Nx \l_testb_tlp {#2}
+ \if_meaning:NN\l_testa_tlp \l_testb_tlp
+ }
}
\def_long:Npn \tlp_if_in:NnTF #1#2{
\def_long:Npn\tmp:w ##1 #2 ##2\q_stop{
@@ -288,7 +361,7 @@
\def_new:Npn \tlp_if_in:cnTF {\exp_args:Nc\tlp_if_in:NnTF}
\def_long:Npn \tlp_if_in:NnT #1#2{
\def_long:Npn\tmp:w ##1 #2 ##2\q_stop{
- \quark_if_no_value:nFT{##2}
+ \quark_if_no_value:nF{##2}
}
\exp_after:NN \tmp:w #1 #2 \q_no_value \q_stop
}
@@ -309,11 +382,11 @@
\def_new:Npn \tlist_if_in:onTF {\exp_args:No\tlist_if_in:nnTF}
\tlp_new:Nn\l_tlp_replace_tlp{}
\def_long_new:NNn \tlp_replace_in_aux:NNnn 4{
- \def:Npn \tmp:w ##1#3##2\q_stop{
+ \def_long:Npn \tmp:w ##1#3##2\q_stop{
\quark_if_no_value:nF{##2}
{
\tlp_set:Nx\l_tlp_replace_tlp{\exp_not:o{\use_none:n##1#4}}
- \def:Npn \tmp:w ####1#3\q_no_value{
+ \def_long:Npn \tmp:w ####1#3\q_no_value{
\tlp_put_right:Nx \l_tlp_replace_tlp {\exp_not:o{\use_none:n ####1}}
}
\tmp:w \q_mark ##2
@@ -329,7 +402,7 @@
\def_new:Npn \tlp_greplace_in:cnn{\exp_args:Nc\tlp_greplace_in:Nnn}
\def_long:NNn \tlp_replace_all_in_aux:NNnn 4{
\tlp_clear:N \l_tlp_replace_tlp
- \def:Npn \tmp:w ##1#3##2\q_stop{
+ \def_long:Npn \tmp:w ##1#3##2\q_stop{
\quark_if_no_value:nTF{##2}
{
\tlp_put_right:Nx \l_tlp_replace_tlp {\exp_not:o{\use_none:n##1}}
@@ -409,11 +482,10 @@
\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_nil\q_stop
+ \tlist_reverse_aux:nN {} #1 \q_recursion_tail\q_stop
}
\def_long_new:Npn \tlist_reverse_aux:nN #1#2{
- \quark_if_nil:NT #2
- { \use_arg_i_delimit_by_q_stop:nw {#1} }
+ \quark_if_recursion_tail_stop_do:nn {#2}{ #1 }
\tlist_reverse_aux:nN {#2#1}
}
\RequirePackage{l3expan}
diff --git a/Master/texmf-dist/tex/latex/expl3/l3token.sty b/Master/texmf-dist/tex/latex/expl3/l3token.sty
index ffdfc4caae9..b9f43418038 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3token.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3token.sty
@@ -48,8 +48,10 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3token.dtx 578 2006-11-21 18:13:24Z morten $
+\GetIdInfo$Id: l3token.dtx 701 2007-11-27 14:21:05Z morten $
{L3 Experimental token investigation and manipulation}
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\RequirePackage{l3prg}
\RequirePackage{l3int}
\let_new:NN \char_set_catcode:w \tex_catcode:D
@@ -61,6 +63,19 @@
\def_new:Npn \char_show_value_catcode:w {\tex_showthe:D\tex_catcode:D}
\def_new:Npn \char_show_value_catcode:n #1{
\char_show_value_catcode:w \int_eval:n{#1}}
+\let_new:NN \char_set_mathcode:w \tex_mathcode:D
+\def_new:Npn \char_set_mathcode:nn #1#2{
+ \char_set_mathcode:w #1 = \int_eval:n{#2}
+}
+\def_protected_new:Npn \char_gset_mathcode:w {\pref_global:D\tex_mathcode:D}
+\def_new:Npn \char_gset_mathcode:nn #1#2{
+ \char_gset_mathcode:w #1 = \int_eval:n{#2}
+}
+\def_new:Npn \char_value_mathcode:w {\int_use:N\tex_mathcode:D}
+\def_new:Npn \char_value_mathcode:n #1{\char_value_mathcode:w \int_eval:n{#1}}
+\def_new:Npn \char_show_value_mathcode:w {\tex_showthe:D\tex_mathcode:D}
+\def_new:Npn \char_show_value_mathcode:n #1{
+ \char_show_value_mathcode:w \int_eval:n{#1}}
\let_new:NN \char_set_lccode:w \tex_lccode:D
\def_new:Npn \char_set_lccode:nn #1#2{
\char_set_lccode:w #1 = \int_eval:n{#2}
@@ -478,10 +493,9 @@
\fi:
}
\def_new:Npn \peek_execute_branches_charcode: {
- \prg_if_predicate:nTF {
- \prg_if_predicate_or_p:nn
- {\token_if_eq_catcode_p:NN \l_peek_token \c_group_begin_token}
- {\token_if_eq_meaning_p:NN \l_peek_token \c_space_token}
+ \predicate:nTF {
+ \token_if_eq_catcode_p:NN \l_peek_token \c_group_begin_token ||
+ \token_if_eq_meaning_p:NN \l_peek_token \c_space_token
}
{ \l_peek_false_tlp }
{ \exp_after:NN \peek_execute_branches_charcode_aux:NN \l_peek_search_tlp }
diff --git a/Master/texmf-dist/tex/latex/expl3/l3toks.sty b/Master/texmf-dist/tex/latex/expl3/l3toks.sty
index d950644fa85..ea18f851ee0 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3toks.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3toks.sty
@@ -48,8 +48,10 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3toks.dtx 580 2006-11-26 15:56:47Z morten $
+\GetIdInfo$Id: l3toks.dtx 728 2008-01-01 16:11:58Z morten $
{L3 Experimental Token Registers}
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\RequirePackage{l3expan}\par
\let:NN \toks_new:N \newtoks % nick from LaTeX for the moment
\def_new:Npn \toks_new:c {\exp_args:Nc\toks_new:N}
@@ -149,6 +151,12 @@
\def_new:Npn \toks_if_eq:ccTF {\exp_args:Ncc \toks_if_eq:NNTF}
\def_new:Npn \toks_if_eq:ccT {\exp_args:Ncc \toks_if_eq:NNT}
\def_new:Npn \toks_if_eq:ccF {\exp_args:Ncc \toks_if_eq:NNF}
+\def_new:NNn \toks_if_eq_p:NN 2 {
+ \tlist_if_eq_p:xx {\toks_use:N #1} {\toks_use:N #2}
+}
+\def_new:Npn \toks_if_eq_p:cN {\exp_args:Nc \toks_if_eq_p:NN}
+\def_new:Npn \toks_if_eq_p:Nc {\exp_args:NNc \toks_if_eq_p:NN}
+\def_new:Npn \toks_if_eq_p:cc {\exp_args:Ncc \toks_if_eq_p:NN}
\tex_toksdef:D \l_tmpa_toks = 255
\toks_new:N \l_tmpb_toks
\toks_new:N \l_tmpc_toks
diff --git a/Master/texmf-dist/tex/latex/expl3/l3xref.sty b/Master/texmf-dist/tex/latex/expl3/l3xref.sty
index a99ac7bf196..4635b63f382 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3xref.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3xref.sty
@@ -48,8 +48,10 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3xref.dtx 579 2006-11-25 23:38:03Z morten $
+\GetIdInfo$Id: l3xref.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental cross referencing}
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\RequirePackage{l3quark}
\RequirePackage{l3toks}
\RequirePackage{l3io}
diff --git a/Master/texmf-dist/doc/latex/expl3/lbase.ini b/Master/texmf-dist/tex/latex/expl3/lbase.ini
index 9d21274ebb4..9d21274ebb4 100644
--- a/Master/texmf-dist/doc/latex/expl3/lbase.ini
+++ b/Master/texmf-dist/tex/latex/expl3/lbase.ini
diff --git a/Master/texmf-dist/tex/latex/expl3/lbase.ltx b/Master/texmf-dist/tex/latex/expl3/lbase.ltx
index 3029de6c78f..a1e6967f6f5 100644
--- a/Master/texmf-dist/tex/latex/expl3/lbase.ltx
+++ b/Master/texmf-dist/tex/latex/expl3/lbase.ltx
@@ -74,22 +74,35 @@
\catcode`\#=6 % hash mark is macro parameter character
\catcode`\^=7 %
\catcode`\^^I=10 % ascii tab is a blank space
-\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
- \immediate\write-1{#1; v#2, #3/#4/#5; #8}%
+\def\GetIdInfo$#1 #2.#3 #4 #5 #6 #7${%
+ \GetIdInfoAux #5\relax{#2}#5\relax{#4}%
}
-\GetIdInfo$Id: l3names.dtx 577 2006-11-21 18:10:26Z morten $
+\def\GetIdInfoAux #1#2#3#4#5#6\relax{%
+ \ifx#5/%
+ \expandafter\GetIdInfoAuxCVS
+ \else
+ \expandafter\GetIdInfoAuxSVN
+ \fi
+}
+\def\GetIdInfoAuxCVS #1#2\relax#3#4{%
+ \immediate\write-1{#1; v#2, #3; #4}%
+}
+\def\GetIdInfoAuxSVN #1#2-#3-#4\relax#5#6{%
+ \immediate\write-1{#1; #2/#3/#4 v#5 #6}%
+}
+\GetIdInfo$Id: l3names.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental Naming Scheme for TeX Primitives}
\catcode`\{=1 % left brace is begin-group character
\catcode`\}=2 % right brace is end-group character
\catcode`\#=6 % hash mark is macro parameter character
\catcode`\^=7 %
\catcode`\^^I=10 % ascii tab is a blank space
-\catcode`\ =9\relax
-\catcode`\^^I=9\relax
-\catcode`\^^M=9\relax
-\catcode`\~=10\relax
-\catcode`\_=11\relax\catcode`\:=11\relax
-\catcode`\@=11\relax % as long as we use old LaTeX stuff.
+\catcode126=10\relax % tilde is a space char.
+\catcode32=9\relax % space is ignored
+\catcode9=9\relax % tab also ignored
+\endlinechar=32\relax % endline is space
+\catcode95=11\relax % underscore letter
+\catcode58=11\relax % colon letter
\let\tex_let:D\let
\long\def\name_undefine:N#1{
\tex_let:D#1\c_undefined}
@@ -590,32 +603,70 @@
\name_primitive:NN \pdfsetrandomseed \pdf_setrandomseed:D
\name_primitive:NN \pdfnoligatures \pdf_noligatures:D
\name_primitive:NN \textdir \aleph_textdir:D
-\tex_def:D\CodeStart{%
- \tex_catcode:D `\ =9\tex_relax:D
- \tex_catcode:D `\^^M=9\tex_relax:D
- \tex_catcode:D `\^^I=9\tex_relax:D
- \tex_catcode:D `\~=10\tex_relax:D
- \tex_catcode:D `\_=11\tex_relax:D
- \tex_catcode:D `\:=11\tex_relax:D}
-\tex_def:D\CodeStop{
- \tex_catcode:D `\ =10\tex_relax:D
- \tex_catcode:D `\^^M=5\tex_relax:D
- \tex_catcode:D `\^^I=10\tex_relax:D
- \tex_catcode:D `\~=13\tex_relax:D
- \tex_catcode:D `\_=8\tex_relax:D
- \tex_catcode:D `\:=12\tex_relax:D}
+\tex_def:D\ExplSyntaxOn{
+ \tex_def:D\ExplSyntaxStatus{00}
+ \tex_catcode:D 126=10 \tex_relax:D % tilde is a space char.
+ \tex_catcode:D 32=9 \tex_relax:D % space is ignored
+ \tex_catcode:D 9=9 \tex_relax:D % tab also ignored
+ \tex_endlinechar:D =32 \tex_relax:D % endline is space
+ \tex_catcode:D 95=11 \tex_relax:D % underscore letter
+ \tex_catcode:D 58=11 \tex_relax:D % colon letter
+}
+\tex_def:D\ExplSyntaxOff{
+ \tex_def:D\ExplSyntaxStatus{01}
+ \tex_catcode:D 126=13 \tex_relax:D
+ \tex_catcode:D 32=10 \tex_relax:D
+ \tex_catcode:D 9=10 \tex_relax:D
+ \tex_endlinechar:D =13 \tex_relax:D
+ \tex_catcode:D 95=8 \tex_relax:D
+ \tex_catcode:D 58=12 \tex_relax:D
+}
+\tex_let:D \CodeStart \ExplSyntaxOn
+\tex_let:D \CodeStop \ExplSyntaxOff
\tex_def:D \NamesStart{
- \tex_catcode:D `\_=11\scan_stop:
- \tex_catcode:D `\:=11\scan_stop:
- }
+ \tex_catcode:D `\_=11\tex_relax:D
+ \tex_catcode:D `\:=11\tex_relax:D
+}
\tex_def:D \NamesStop{
- \tex_catcode:D `\_=8\scan_stop:
- \tex_catcode:D `\:=12\scan_stop:
- }
-\tex_def:D\GetIdInfo{\CodeStop\GetIdInfoAux}
-\tex_def:D\GetIdInfoAux$#1~#2.dtx~#3~#4-#5-#6~#7~#8$#9{%
- \tex_immediate:D\tex_write:D-1{#2;~v#3,~#4/#5/#6;~#9}%
- \CodeStart
+ \tex_catcode:D `\_=8\tex_relax:D
+ \tex_catcode:D `\:=12\tex_relax:D
+}
+\tex_def:D\GetIdInfo{
+ \tex_begingroup:D
+ \tex_catcode:D 32=10 \tex_relax:D % needed? Probably for now.
+ \GetIdInfoAuxi:w
+}
+\tex_def:D\GetIdInfoAuxi:w$#1~#2.#3~#4~#5~#6~#7~#8$#9{
+ \tex_endgroup:D
+ \tex_def:D\filename{#2}
+ \tex_def:D\fileversion{#4}
+ \tex_def:D\filedescription{#9}
+ \tex_def:D\fileauthor{#7}
+ \GetIdInfoAuxii:w #5\tex_relax:D
+ #3\tex_relax:D#5\tex_relax:D#6\tex_relax:D
+}
+\tex_def:D\GetIdInfoAuxii:w #1#2#3#4#5#6\tex_relax:D{
+ \tex_ifx:D#5/
+ \tex_expandafter:D\GetIdInfoAuxCVS:w
+ \tex_else:D
+ \tex_expandafter:D\GetIdInfoAuxSVN:w
+ \tex_fi:D
+}
+\tex_def:D\GetIdInfoAuxCVS:w #1,v\tex_relax:D
+ #2\tex_relax:D#3\tex_relax:D{
+ \tex_def:D\filedate{#2}
+ \tex_def:D\filenameext{#1}
+ \tex_def:D\filetimestamp{#3}
+\tex_immediate:D\tex_write:D-1
+ {\filename;~ v\fileversion,~\filedate;~\filedescription}
+}
+\tex_def:D\GetIdInfoAuxSVN:w #1\tex_relax:D#2-#3-#4
+ \tex_relax:D#5Z\tex_relax:D{
+ \tex_def:D\filenameext{#1}
+ \tex_def:D\filedate{#2/#3/#4}
+ \tex_def:D\filetimestamp{#5}
+\tex_immediate:D\tex_write:D-1
+ {\filename;~ v\fileversion,~\filedate;~\filedescription}
}
%% File: l3basics.dtx Copyright (C) 1990-2006 LaTeX3 project
%%
@@ -649,7 +700,7 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3basics.dtx 583 2006-12-12 17:26:44Z morten $
+\GetIdInfo$Id: l3basics.dtx 702 2007-11-27 14:21:49Z morten $
{L3 Experimental basic definitions}
\tex_let:D \let:NwN \tex_let:D
\let:NwN \if_true: \tex_iftrue:D
@@ -1015,6 +1066,8 @@
\def_long_new:Npn \def_test_function_aux:Nnnn #1#2#3#4{
#1 {#2TF} #3 {#4
\exp_after:NN\use_arg_i:nn\else:\exp_after:NN\use_arg_ii:nn\fi:}
+ #1 {#2FT} #3 {#4
+ \exp_after:NN\use_arg_ii:nn\else:\exp_after:NN\use_arg_i:nn\fi:}
#1 {#2T} #3 {#4
\else:\exp_after:NN\use_none:nn\fi:\use_arg_i:n}
#1 {#2F} #3 {#4
@@ -1022,6 +1075,8 @@
\def_long_new:Npn \def_test_function_aux:Nnnx #1#2#3#4{
#1 {#2TF} #3 {#4
\exp_not:n{\exp_after:NN\use_arg_i:nn\else:\exp_after:NN\use_arg_ii:nn\fi:}}
+ #1 {#2FT} #3 {#4
+ \exp_not:n{\exp_after:NN\use_arg_ii:nn\else:\exp_after:NN\use_arg_i:nn\fi:}}
#1 {#2T} #3 {#4
\exp_not:n{\else:\exp_after:NN\use_none:nn\fi:\use_arg_i:n}}
#1 {#2F} #3 {#4
@@ -1071,7 +1126,7 @@
\def_long_test_function_new:npn {cs_if_really_exist:c}#1{
\if_cs_exist:w #1\cs_end:}
\def_new:Npn \cs_gundefine:N #1{\glet:NN #1\c_undefined}
-\def_test_function_new:npn {engine_aleph:}{\if_cs_exist:N \aleph_textdir:D}
+\def_test_function_new:npn {engine_if_aleph:}{\if_cs_exist:N \aleph_textdir:D}
\def_new:Npn \use:c #1{\cs:w #1\cs_end:}
\def_new:Npn \cs_use:c #1 { \cs:w#1\cs_end: }
\def_new:Npn \use:cc #1#2
@@ -1092,7 +1147,8 @@
\def_long_new:Npn \use_arg_i_delimit_by_q_stop:nw #1#2\q_stop{#1}
\def_long_new:Npn \use_arg_i_after_fi:nw #1\fi:{\fi: #1}
\def_long_new:Npn \use_arg_i_after_else:nw #1\else:#2\fi:{\fi: #1}
-\def_long_new:Npn \use_arg_i_after_or:nw #1\or: #2\fi: {\or:\fi:#1}
+\def_long_new:Npn \use_arg_i_after_or:nw #1\or: #2\fi: {\fi:#1}
+\def_long_new:Npn \use_arg_i_after_orelse:nw #1 #2#3\fi: {\fi:#1}
\def_long_new:NNn \use_none:nn 2{}
\def_long_new:NNn \use_none:nnn 3{}
\def_long_new:NNn \use_none:nnnn 4{}
@@ -1149,7 +1205,7 @@
%%
%% -----------------------------------------------------------------------
%%
-\GetIdInfo$Id: l3chk.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3chk.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental check module}
\def_new:Npn \chk_local:N #1{
\exp_after:NN \chk_local_aux:w \token_to_string:N#1\q_stop}
@@ -1242,7 +1298,7 @@
}
\let_new:NN\traceon\use_none:n
\let_new:NN\traceoff\use_none:n
-%% File: l3tlp.dtx Copyright (C) 1990-2006 LaTeX3 project
+%% File: l3tlp.dtx Copyright (C) 1990-2007 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
@@ -1274,7 +1330,7 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3tlp.dtx 581 2006-12-12 12:28:27Z morten $
+\GetIdInfo$Id: l3tlp.dtx 735 2008-01-14 22:31:02Z morten $
{L3 Experimental Token List Pointers}
\def_long_new:Npn \tlp_new:Nn #1#2{
\chk_new_cs:N #1
@@ -1285,6 +1341,8 @@
\chk_new_cs:N #1
\gdef:Npx #1{#2}
}
+\def_new:Npn \tlp_new:N #1{\tlp_new:Nn #1{}}
+\def_new:Npn \tlp_new:c #1{\tlp_new:cn {#1}{}}
\def_new:Npn \tlp_use:N #1 {
\if_meaning:NN #1 \scan_stop:
\err_latex_bug:x {Token~list~pointer~ `\token_to_string:N #1'~
@@ -1299,11 +1357,13 @@
\def_long_new:Npn\tlp_gset:Nn#1#2{\gdef:Npn#1{#2}}
\def_long_new:Npn\tlp_gset:Nx#1#2{\gdef:Npx#1{#2}}
\def_new:Npn \tlp_set:No {\exp_args:NNo \tlp_set:Nn}
+\def_new:Npn \tlp_set:Nd {\exp_args:NNd \tlp_set:Nn}
\def_new:Npn \tlp_set:Nf {\exp_args:NNf \tlp_set:Nn}
\def_new:Npn \tlp_set:cn {\exp_args:Nc \tlp_set:Nn}
\def_new:Npn \tlp_set:co {\exp_args:Nco \tlp_set:Nn}
\def_new:Npn \tlp_set:cx {\exp_args:Nc \tlp_set:Nx}
\def_new:Npn \tlp_gset:No {\exp_args:NNo \tlp_gset:Nn}
+\def_new:Npn \tlp_gset:Nd {\exp_args:NNd \tlp_gset:Nn}
\def_new:Npn \tlp_gset:cn {\exp_args:Nc \tlp_gset:Nn}
\def_new:Npn \tlp_gset:cx {\exp_args:Nc \tlp_gset:Nx}
\let_new:NN \tlp_set_eq:NN \let:NN
@@ -1322,26 +1382,59 @@
\def_new:Npn \tlp_clear_new:c {\exp_args:Nc \tlp_clear_new:N}
\let_new:NN \tlp_gclear_new:N \tlp_gclear:N
\def_new:Npn \tlp_gclear_new:c {\exp_args:Nc \tlp_gclear_new:N}
-\def_new:Npn \tlp_put_left:Nn #1{
- \exp_args:No \tlp_put_left_aux:w {#1}#1}
-\def_new:Npn\tlp_put_left:No{\exp_args:NNo\tlp_put_left:Nn}
-\def_new:Npn \tlp_gput_left:Nn {
- \pref_global:D
- \tlp_put_left:Nn
+\def_long_new:Npn \tlp_put_left:Nn #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_set:Nx #1{\exp_not:o{\l_exp_tlp}\exp_not:o{#1}}
+}
+\def_long_new:Npn \tlp_put_left:No #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_set:Nx #1{\exp_not:d{\l_exp_tlp}\exp_not:o{#1}}
+}
+\def_long_new:Npn \tlp_put_left:Nx #1#2{
+ \tlp_set:Nx #1{#2\exp_not:o{#1}}
}
-\def_new:Npn\tlp_gput_left:No{\exp_args:NNo\tlp_gput_left:Nn}
-\def_new:Npn\tlp_gput_left:Nx{\exp_args:NNx\tlp_gput_left:Nn}
-\def_long_new:Npn \tlp_put_left_aux:w #1#2#3{\tlp_set:Nn #2{#3#1}
+\def_long_new:Npn \tlp_gput_left:Nn #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_gset:Nx #1{\exp_not:o{\l_exp_tlp}\exp_not:o{#1}}
+}
+\def_long_new:Npn \tlp_gput_left:No #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_gset:Nx #1{\exp_not:d{\l_exp_tlp}\exp_not:o{#1}}
+}
+\def_long_new:Npn \tlp_gput_left:Nx #1#2{
+ \tlp_gset:Nx #1{#2\exp_not:o{#1}}
+}
+\def_long_new:Npn \tlp_put_left:cn{\exp_args:Nc\tlp_put_left:Nn}
+\def_long_new:Npn \tlp_put_left:co{\exp_args:Nc\tlp_put_left:No}
+\def_long_new:Npn \tlp_put_left:cx{\exp_args:Nc\tlp_put_left:Nx}
+\def_long_new:Npn \tlp_gput_left:cn{\exp_args:Nc\tlp_gput_left:Nn}
+\def_long_new:Npn \tlp_gput_left:co{\exp_args:Nc\tlp_gput_left:No}
+\def_long_new:Npn \tlp_gput_left:cx{\exp_args:Nc\tlp_gput_left:Nx}
+\def_long_new:Npn \tlp_put_right:Nn #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_set:Nx #1{\exp_not:o{#1}\exp_not:o{\l_exp_tlp}}
+}
+\def_long_new:Npn \tlp_gput_right:Nn #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_gset:Nx #1{\exp_not:o{#1}\exp_not:o{\l_exp_tlp}}
+}
+\def_long_new:Npn \tlp_put_right:No #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_set:Nx #1{\exp_not:o{#1}\exp_not:d{\l_exp_tlp}}
+}
+\def_long_new:Npn \tlp_gput_right:No #1#2{
+ \tlp_set:Nn \l_exp_tlp{#2}
+ \tlp_gset:Nx #1{\exp_not:o{#1}\exp_not:d{\l_exp_tlp}}
+}
+\def_long:Npn \tlp_put_right:Nx #1#2{
+ \tlp_set:Nx #1{\exp_not:o{#1}#2}
+}
+\def_long:Npn \tlp_gput_right:Nx #1#2{
+ \tlp_gset:Nx #1{\exp_not:o{#1}#2}
}
-\def_long_new:Npn \tlp_put_right:Nn #1#2{\tlp_set:No #1{#1#2}}
-\def_long_new:Npn \tlp_gput_right:Nn #1#2{\tlp_gset:No #1{#1#2}}
-\def_new:Npn \tlp_gput_right:No {\exp_args:NNo \tlp_gput_right:Nn}
-\def_new:Npn \tlp_gput_right:Nx {\exp_args:NNx \tlp_gput_right:Nn}
\def_new:Npn \tlp_gput_right:cn {\exp_args:Nc \tlp_gput_right:Nn}
-\def_new:Npn \tlp_gput_right:co {\exp_args:Nco \tlp_gput_right:Nn}
+\def_new:Npn \tlp_gput_right:co {\exp_args:Nc \tlp_gput_right:No}
\def_new:Npn \tlp_put_right:cc {\exp_args:Ncc \tlp_put_right:Nn}
-\def_new:Npn \tlp_put_right:No {\exp_args:NNo \tlp_put_right:Nn}
-\def_new:Npn \tlp_put_right:Nx {\exp_args:Nnx \tlp_put_right:Nn}
\def_new:Npn \tlp_gset:Nc {
\pref_global:D
\tlp_set:Nc}
@@ -1409,14 +1502,14 @@
\let_new:NN \tlist_to_uppercase:n \tex_uppercase:D
\let_new:NN \tlist_to_str:n \etex_detokenize:D
\def_long_new:Npn \tlist_map_function:nN #1#2{
- \tlist_map_function_aux:Nn #2 #1 \q_nil \q_stop
+ \tlist_map_function_aux:Nn #2 #1 \q_recursion_tail \q_recursion_stop
}
\def_new:Npn \tlp_map_function:NN #1#2{
\exp_after:NN \tlist_map_function_aux:Nn
- \exp_after:NN #2 #1 \q_nil \q_stop
+ \exp_after:NN #2 #1 \q_recursion_tail \q_recursion_stop
}
\def_long_new:Npn \tlist_map_function_aux:Nn #1#2{
- \quark_if_nil:nT{#2} \tlist_map_break:w
+ \quark_if_recursion_tail_stop:n{#2}
#1{#2} \tlist_map_function_aux:Nn #1
}
\def_new:Npn\tlp_map_function:cN{\exp_args:Nc\tlp_map_function:NN}
@@ -1426,7 +1519,7 @@
##1{#2}
\exp_args:Nc \tlist_map_function_aux:Nn
{tlist_map_inline_ \num_use:N \l_tlp_inline_level_num :n}
- #1 \q_nil\q_stop
+ #1 \q_recursion_tail\q_recursion_stop
\num_decr:N \l_tlp_inline_level_num
}
\def_long_new:Npn \tlp_map_inline:Nn #1#2{
@@ -1435,22 +1528,22 @@
##1{#2}
\exp_args:NcE \tlist_map_function_aux:Nn
{tlist_map_inline_ \num_use:N \l_tlp_inline_level_num :n}
- #1 \q_nil\q_stop
+ #1 \q_recursion_tail\q_recursion_stop
\num_decr:N \l_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}
\def_long_new:Npn \tlist_map_variable:nNn #1#2#3{
- \tlist_map_variable_aux:Nnn #2 {#3} #1 \q_nil \q_stop
+ \tlist_map_variable_aux:Nnn #2 {#3} #1 \q_recursion_tail \q_recursion_stop
}
\def_new:Npn \tlp_map_variable:NNn {\exp_args:No \tlist_map_variable:nNn}
\def_new:Npn \tlp_map_variable:cNn {\exp_args:Nc \tlp_map_variable:NNn}
\def_long_new:Npn \tlist_map_variable_aux:Nnn #1#2#3{
\tlp_set:Nn #1{#3}
- \quark_if_nil:NT #1 \tlist_map_break:w
+ \quark_if_recursion_tail_stop:N #1
#2 \tlist_map_variable_aux:Nnn #1{#2}
}
-\let_new:NN \tlist_map_break:w \use_none_delimit_by_q_stop:w
+\let_new:NN \tlist_map_break:w \use_none_delimit_by_q_recursion_stop:w
\let_new:NN \tlp_map_break:w \tlist_map_break:w
\let_new:NN \tlist_compare:xx \pdfstrcmp
\def_long_new:NNn \tlist_compare:nn 2{
@@ -1497,12 +1590,46 @@
\tlp_set:Nx \l_testb_tlp {\exp_not:n{#2}}
\if_meaning:NN\l_testa_tlp \l_testb_tlp
}
+ \def_long_test_function:npn{tlist_if_eq:no}#1#2{
+ \tlp_set:Nx \l_testa_tlp {\exp_not:n{#1}}
+ \tlp_set:Nx \l_testb_tlp {\exp_not:o{#2}}
+ \if_meaning:NN\l_testa_tlp \l_testb_tlp
+ }
+ \def_long_test_function:npn{tlist_if_eq:nx}#1#2{
+ \tlp_set:Nx \l_testa_tlp {\exp_not:n{#1}}
+ \tlp_set:Nx \l_testb_tlp {#2}
+ \if_meaning:NN\l_testa_tlp \l_testb_tlp
+ }
+ \def_long_test_function:npn{tlist_if_eq:on}#1#2{
+ \tlp_set:Nx \l_testa_tlp {\exp_not:o{#1}}
+ \tlp_set:Nx \l_testb_tlp {\exp_not:n{#2}}
+ \if_meaning:NN\l_testa_tlp \l_testb_tlp
+ }
\def_long_test_function:npn{tlist_if_eq:oo}#1#2{
\tlp_set:Nx \l_testa_tlp {\exp_not:o{#1}}
\tlp_set:Nx \l_testb_tlp {\exp_not:o{#2}}
\if_meaning:NN\l_testa_tlp \l_testb_tlp
}
- \def_long:Npn\tlist_compare:xx #1#2{\ERROR}
+ \def_long_test_function:npn{tlist_if_eq:ox}#1#2{
+ \tlp_set:Nx \l_testa_tlp {\exp_not:o{#1}}
+ \tlp_set:Nx \l_testb_tlp {#2}
+ \if_meaning:NN\l_testa_tlp \l_testb_tlp
+ }
+ \def_long_test_function:npn{tlist_if_eq:xn}#1#2{
+ \tlp_set:Nx \l_testa_tlp {#1}
+ \tlp_set:Nx \l_testb_tlp {\exp_not:n{#2}}
+ \if_meaning:NN\l_testa_tlp \l_testb_tlp
+ }
+ \def_long_test_function:npn{tlist_if_eq:xo}#1#2{
+ \tlp_set:Nx \l_testa_tlp {#1}
+ \tlp_set:Nx \l_testb_tlp {\exp_not:o{#2}}
+ \if_meaning:NN\l_testa_tlp \l_testb_tlp
+ }
+ \def_long_test_function:npn{tlist_if_eq:xx}#1#2{
+ \tlp_set:Nx \l_testa_tlp {#1}
+ \tlp_set:Nx \l_testb_tlp {#2}
+ \if_meaning:NN\l_testa_tlp \l_testb_tlp
+ }
}
\def_long:Npn \tlp_if_in:NnTF #1#2{
\def_long:Npn\tmp:w ##1 #2 ##2\q_stop{
@@ -1513,7 +1640,7 @@
\def_new:Npn \tlp_if_in:cnTF {\exp_args:Nc\tlp_if_in:NnTF}
\def_long:Npn \tlp_if_in:NnT #1#2{
\def_long:Npn\tmp:w ##1 #2 ##2\q_stop{
- \quark_if_no_value:nFT{##2}
+ \quark_if_no_value:nF{##2}
}
\exp_after:NN \tmp:w #1 #2 \q_no_value \q_stop
}
@@ -1534,11 +1661,11 @@
\def_new:Npn \tlist_if_in:onTF {\exp_args:No\tlist_if_in:nnTF}
\tlp_new:Nn\l_tlp_replace_tlp{}
\def_long_new:NNn \tlp_replace_in_aux:NNnn 4{
- \def:Npn \tmp:w ##1#3##2\q_stop{
+ \def_long:Npn \tmp:w ##1#3##2\q_stop{
\quark_if_no_value:nF{##2}
{
\tlp_set:Nx\l_tlp_replace_tlp{\exp_not:o{\use_none:n##1#4}}
- \def:Npn \tmp:w ####1#3\q_no_value{
+ \def_long:Npn \tmp:w ####1#3\q_no_value{
\tlp_put_right:Nx \l_tlp_replace_tlp {\exp_not:o{\use_none:n ####1}}
}
\tmp:w \q_mark ##2
@@ -1554,7 +1681,7 @@
\def_new:Npn \tlp_greplace_in:cnn{\exp_args:Nc\tlp_greplace_in:Nnn}
\def_long:NNn \tlp_replace_all_in_aux:NNnn 4{
\tlp_clear:N \l_tlp_replace_tlp
- \def:Npn \tmp:w ##1#3##2\q_stop{
+ \def_long:Npn \tmp:w ##1#3##2\q_stop{
\quark_if_no_value:nTF{##2}
{
\tlp_put_right:Nx \l_tlp_replace_tlp {\exp_not:o{\use_none:n##1}}
@@ -1634,11 +1761,10 @@
\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_nil\q_stop
+ \tlist_reverse_aux:nN {} #1 \q_recursion_tail\q_stop
}
\def_long_new:Npn \tlist_reverse_aux:nN #1#2{
- \quark_if_nil:NT #2
- { \use_arg_i_delimit_by_q_stop:nw {#1} }
+ \quark_if_recursion_tail_stop_do:nn {#2}{ #1 }
\tlist_reverse_aux:nN {#2#1}
}
%% File: l3expan.dtx Copyright (C) 1990-2006 LaTeX3 project
@@ -1673,37 +1799,47 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3expan.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3expan.dtx 735 2008-01-14 22:31:02Z morten $
{L3 Experimental Argument Expansion module}
\tlp_new:Nn\l_exp_tlp{}
-\def_new:Npn\exp_arg_next:nnn#1#2#3{
+\def_long_new:Npn\exp_arg_next:nnn#1#2#3{
#2\:::{#3#1}
}
-\def_new:Npn\::n#1\:::#2#3{
+\def_long_new:Npn\::n#1\:::#2#3{
#1\:::{#2{#3}}
}
-\def_new:Npn\::N#1\:::#2#3{
+\def_long_new:Npn\::N#1\:::#2#3{
#1\:::{#2#3}
}
-\def_new:Npn\::c#1\:::#2#3{
+\def_long_new:Npn\::c#1\:::#2#3{
\exp_after:NN\exp_arg_next:nnn\cs:w #3\cs_end:{#1}{#2}
}
-\def_new:Npn\::o#1\:::#2#3{
+\def_long_new:Npn\::o#1\:::#2#3{
\exp_after:NN\exp_arg_next:nnn\exp_after:NN{\exp_after:NN{#3}}{#1}{#2}
}
-\def_new:Npn\::f#1\:::#2#3{
+\def_long_new:Npn\::f#1\:::#2#3{
\exp_after:NN\exp_arg_next:nnn
\exp_after:NN{\exp_after:NN{\int_to_roman:w -`0 #3}}
{#1}{#2}
}
-\def_new:Npn\::x#1\:::#2#3{
- \tlp_set:Nx\l_exp_tlp{{{#3}}}
- \exp_after:NN\exp_arg_next:nnn\l_exp_tlp{#1}{#2}}
-\def_new:Npn\:::#1{#1}
-\def_new:Npn\::C#1\:::#2#3{
+\def_new:Npn \exp_stop_f: {~}
+\let_new:NN \exp_arg:x \expanded % Move eventually.
+\cs_if_free:NTF\exp_arg:x{
+ \def_long_new:Npn\::x#1\:::#2#3{
+ % \tlp_set:Nx\l_exp_tlp{{{#3}}}
+ \def:Npx \l_exp_tlp{{{#3}}}
+ \exp_after:NN\exp_arg_next:nnn\l_exp_tlp{#1}{#2}}
+}
+{
+ \def_long_new:Npn\::x#1\:::#2#3{
+ \exp_after:NN\exp_arg_next:nnn
+ \exp_after:NN{\exp_arg:x{{#3}}}{#1}{#2}
+ }
+}
+\def_long_new:Npn\:::#1{#1}
+\def_long_new:Npn\::C#1\:::#2#3{
\exp_after:NN\exp_C_aux:nnn\cs:w #3\cs_end:{#1}{#2}}
-\def_new:Npn\exp_C_aux:nnn #1
- {
+\def_long_new:Npn\exp_C_aux:nnn #1{
\exp_after:NN
\exp_arg_next:nnn
\exp_after:NN
@@ -1711,14 +1847,14 @@
\exp_after:NN
{#1}
}
- }
-\def:Npn\::E#1\:::#2#3{
+}
+\def_long_new:Npn\::E#1\:::#2#3{
\exp_after:NN\exp_arg_next:nnn \exp_after:NN{#3}{#1}{#2}
}
-\def:Npn\::e#1\:::#2#3{
+\def_long_new:Npn\::e#1\:::#2#3{
\exp_after:NN\exp_arg_next:nnn \exp_after:NN{#3}{#1}{#2}
}
-\def:Npn\::d#1\:::#2#3{
+\def_long_new:Npn\::d#1\:::#2#3{
\exp_after:NN\exp_after:NN\exp_after:NN\exp_arg_next:nnn
\exp_after:NN\exp_after:NN\exp_after:NN{
\exp_after:NN\exp_after:NN\exp_after:NN{#3}}{#1}{#2}
@@ -1730,26 +1866,31 @@
\def:Npn \exp_args:NcE #1#2{\exp_after:NN #1\cs:w #2\exp_after:NN\cs_end:}
\def:Npn \exp_args:Nd {\::d\:::}
\def:Npn \exp_args:NNd {\::N\::d\:::}
+
\def:Npn \exp_args:NC {\::C\:::}
-\def:Npn \exp_args:Ncx {\::c\::x\:::}
-\def:Npn \exp_args:Ncco {\::c\::c\::o\:::}
-\def:Npn \exp_args:Nccx {\::c\::c\::x\:::}
-\def:Npn \exp_args:Ncnx {\::c\::n\::x\:::}
+\def:Npn \exp_args:NNC {\::N\::C\:::}
+\def:Npn \exp_args:NNf {\::N\::f\:::}
+\def:Npn \exp_args:NNno {\::N\::n\::o\:::}
+\def:Npn \exp_args:NNnx {\::N\::n\::x\:::} % new
+\def:Npn \exp_args:NNoo {\::N\::o\::o\:::} % new
+\def:Npn \exp_args:NNox {\::N\::o\::x\:::} % new
+\def:Npn \exp_args:NNx {\::N\::x\:::}
\def:Npn \exp_args:NcNc {\::c\::N\::c\:::}
\def:Npn \exp_args:NcNo {\::c\::N\::o\:::}
\def:Npn \exp_args:Ncco {\::c\::c\::o\:::}
+\def:Npn \exp_args:Ncco {\::c\::c\::o\:::}
+\def:Npn \exp_args:Nccx {\::c\::c\::x\:::}
+\def:Npn \exp_args:Ncnx {\::c\::n\::x\:::}
+\def:Npn \exp_args:Ncx {\::c\::x\:::}
\def:Npn \exp_args:Nf {\::f\:::}
-\def:Npn \exp_args:NNf {\::N\::f\:::}
\def:Npn \exp_args:Nfo{\::f\::o\:::}
\def:Npn \exp_args:Nnf {\::n\::f\:::}
-\def:Npn \exp_args:NNno {\::N\::n\::o\:::}
-%% Strange one this next one...
-\def:Npn \exp_args:NnnN {\::n\::n\::N\:::}
+\def:Npn \exp_args:NnnN {\::n\::n\::N\:::} %% Strange one this one...
+\def:Npn \exp_args:Nnnc {\::n\::n\::c\:::}
\def:Npn \exp_args:Nnno {\::n\::n\::o\:::}
\def:Npn \exp_args:Nnnx {\::n\::n\::x\:::}
\def:Npn \exp_args:Nno {\::n\::o\:::}
\def:Npn \exp_args:Nnox {\::n\::o\::x\:::}
-\def:Npn \exp_args:NNx {\::N\::x\:::}
\def:Npn \exp_args:Nnx {\::n\::x\:::}
\def:Npn \exp_args:Noo {\::o\::o\:::}
\def:Npn \exp_args:Noox {\::o\::o\::x\:::}
@@ -1757,35 +1898,39 @@
\def:Npn \exp_args:Nx {\::x\:::}
\def:Npn \exp_args:Nxo {\::x\::o\:::}
\def:Npn \exp_args:Nxx {\::x\::x\:::}
-\def:Npn \exp_args:NNC {\::N\::C\:::}
-\def:Npn \exp_args:Nnnc {\::n\::n\::c\:::}
-\def_new:Npn\exp_not:o#1{\exp_not:n\exp_after:NN{#1}}
+\def_long_new:Npn\exp_not:o#1{\exp_not:n\exp_after:NN{#1}}
+\def_long_new:Npn\exp_not:d#1{
+ \exp_not:n\exp_after:NN\exp_after:NN\exp_after:NN{#1}
+}
+\def_long_new:Npn\exp_not:f#1{
+ \exp_not:n\exp_after:NN{\int_to_roman:w -`0 #1}
+}
\def_new:Npn\exp_not:E{\exp_after:NN\exp_not:N}
-\def_new:Npn\exp_not:c#1{\exp_after:NN\exp_not:N\cs:w#1\cs_end:}
-\def_new:Npn \exp_args:No #1#2{\exp_after:NN#1\exp_after:NN{#2}}
-\def_new:Npn \exp_args:NOo #1#2#3{\exp_after:NN\exp_args:No \exp_after:NN#1
+\def_long_new:Npn\exp_not:c#1{\exp_after:NN\exp_not:N\cs:w#1\cs_end:}
+\def_long_new:Npn \exp_args:No #1#2{\exp_after:NN#1\exp_after:NN{#2}}
+\def_long_new:Npn \exp_args:NOo #1#2#3{\exp_after:NN\exp_args:No \exp_after:NN#1
\exp_after:NN#2\exp_after:NN{#3}}
-\def_new:Npn \exp_args:NOOo #1#2#3#4{\exp_after:NN\exp_args:NOo
+\def_long_new:Npn \exp_args:NOOo #1#2#3#4{\exp_after:NN\exp_args:NOo
\exp_after:NN#1\exp_after:NN#2\exp_after:NN#3\exp_after:NN{#4}}
-\def_new:Npn \exp_args:NNo #1#2#3{\exp_after:NN#1\exp_after:NN#2
+\def_long_new:Npn \exp_args:NNo #1#2#3{\exp_after:NN#1\exp_after:NN#2
\exp_after:NN{#3}}
-\def_new:Npn \exp_args:NNO #1#2#3 {\exp_after:NN#1
+\def_long_new:Npn \exp_args:NNO #1#2#3 {\exp_after:NN#1
\exp_after:NN#2 #3}
-\def_new:Npn \exp_args:NNOo #1#2#3#4{\exp_after:NN\exp_args:NNo
+\def_long_new:Npn \exp_args:NNOo #1#2#3#4{\exp_after:NN\exp_args:NNo
\exp_after:NN#1\exp_after:NN#2\exp_after:NN#3\exp_after:NN{#4}}
-\def_new:Npn \exp_args:NNNo #1#2#3#4{\exp_after:NN#1\exp_after:NN#2
+\def_long_new:Npn \exp_args:NNNo #1#2#3#4{\exp_after:NN#1\exp_after:NN#2
\exp_after:NN#3\exp_after:NN{#4}}
-\def_new:Npn \exp_args:Nc #1#2{\exp_after:NN#1\cs:w#2\cs_end:}
-\def_new:Npn \exp_args:NNc #1#2#3{\exp_after:NN#1\exp_after:NN#2
+\def_long_new:Npn \exp_args:Nc #1#2{\exp_after:NN#1\cs:w#2\cs_end:}
+\def_long_new:Npn \exp_args:NNc #1#2#3{\exp_after:NN#1\exp_after:NN#2
\cs:w#3\cs_end:}
-\def_new:Npn \exp_args:NOc#1#2#3{\exp_after:NN\exp_args:No\exp_after:NN
+\def_long_new:Npn \exp_args:NOc#1#2#3{\exp_after:NN\exp_args:No\exp_after:NN
#1\exp_after:NN#2\cs:w#3\cs_end:}
-\def_new:Npn \exp_args:Ncc #1#2#3{\exp_after:NN#1
+\def_long_new:Npn \exp_args:Ncc #1#2#3{\exp_after:NN#1
\cs:w#2\exp_after:NN\cs_end:\cs:w#3\cs_end:}
-\def_new:Npn \exp_args:Nccc #1#2#3#4{\exp_after:NN#1
+\def_long_new:Npn \exp_args:Nccc #1#2#3#4{\exp_after:NN#1
\cs:w#2\exp_after:NN\cs_end:\cs:w#3\exp_after:NN
\cs_end:\cs:w #4\cs_end:}
-\def_new:Npn \exp_args:Nco #1#2#3{\exp_after:NN#1\cs:w#2\exp_after:NN
+\def_long_new:Npn \exp_args:Nco #1#2#3{\exp_after:NN#1\cs:w#2\exp_after:NN
\cs_end:\exp_after:NN{#3}}
\def:Npn\exp_def_form:nnn#1#2#3{
\exp_after:NN
@@ -1848,7 +1993,7 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3quark.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3quark.dtx 705 2007-12-02 22:14:25Z morten $
{L3 Experimental Quark Commands}
\def_new:Npn \quark_new:N #1{\tlp_new:Nn #1{#1}}
\quark_new:N \q_stop
@@ -1856,6 +2001,48 @@
\quark_new:N \q_nil
\quark_new:N\q_error
\quark_new:N\q_mark
+\quark_new:N\q_recursion_tail
+\quark_new:N\q_recursion_stop
+\def_long_new:Npn \quark_if_recursion_tail_stop:n #1 {
+ \exp_after:NN\if_meaning:NN
+ \quark_if_recursion_tail_aux:w #1?\q_nil\q_recursion_tail\q_recursion_tail
+ \exp_after:NN \use_none_delimit_by_q_recursion_stop:w
+ \fi:
+}
+\def_long_new:Npn \quark_if_recursion_tail_stop:N #1 {
+ \if_meaning:NN#1\q_recursion_tail
+ \exp_after:NN \use_none_delimit_by_q_recursion_stop:w
+ \fi:
+}
+\def_new:Npn \quark_if_recursion_tail_stop:o{
+ \exp_args:No\quark_if_recursion_tail_stop:n
+}
+\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
+ \exp_after:NN \use_arg_i_delimit_by_q_recursion_stop:nw
+ \else:
+ \exp_after:NN\use_none:n
+ \fi:
+ {#2}
+}
+\def_long_new:Npn \quark_if_recursion_tail_stop_do:Nn #1#2 {
+ \if_meaning:NN #1\q_recursion_tail
+ \exp_after:NN \use_arg_i_delimit_by_q_recursion_stop:nw
+ \else:
+ \exp_after:NN\use_none:n
+ \fi:
+ {#2}
+}
+\def_new:Npn \quark_if_recursion_tail_stop_do:on{
+ \exp_args:No\quark_if_recursion_tail_stop_do:nn
+}
+\def_long_new:Npn \quark_if_recursion_tail_aux:w
+ #1#2\q_nil\q_recursion_tail{#1}
+\def_long_new:Npn\use_none_delimit_by_q_recursion_stop:w
+ #1\q_recursion_stop {}
+\def_long_new:Npn\use_arg_i_delimit_by_q_recursion_stop:nw
+ #1#2\q_recursion_stop {#1}
\def_long_test_function_new:npn {quark_if_no_value:N} #1 {
\if_meaning:NN\q_no_value#1}
\def_long_new:Npn \quark_if_no_value_p:N #1{
@@ -1951,8 +2138,10 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3num.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3num.dtx 702 2007-11-27 14:21:49Z morten $
{L3 Experimental token numbers}
+
+\let_new:NN \num_value:w \tex_number:D
\let_new:NN \num_eval:w \etex_numexpr:D
\let_new:NN \if_num:w \tex_ifnum:D
\let_new:NN \if_num_odd:w \tex_ifodd:D
@@ -1991,7 +2180,9 @@
\def_new:Npn \num_gset_eq:Nc {\exp_args:NNc \num_gset_eq:NN}
\def_new:Npn \num_gset_eq:cc {\exp_args:Ncc \num_gset_eq:NN}
\def_new:Npn \num_add:Nn #1#2 {\num_set:Nn #1{#1+#2}}
+\def_new:Npn \num_add:cn {\exp_args:Nc\num_add:Nn}
\def_new:Npn \num_gadd:Nn {\pref_global:D \num_add:Nn}
+\def_new:Npn \num_gadd:cn {\exp_args:Nc\num_gadd:Nn}
\let_new:NN\num_use:N \use_arg_i:n
\let_new:NN\num_use:c \cs_use:c
\def_test_function_new:npn {num_compare:nNn}#1#2#3{
@@ -2005,12 +2196,17 @@
\c_false
\fi:
}
+\def_new:Npn \num_abs:n#1{
+ \if_num:w \num_eval:n{#1}<\c_zero \exp_after:NN -\fi: #1
+}
+\def_new:Npn \num_max_of:nn#1#2{\num_compare:nNnTF {#1}>{#2}{#1}{#2}}
+\def_new:Npn \num_min_of:nn#1#2{\num_compare:nNnTF {#1}<{#2}{#1}{#2}}
\num_new:N \l_tmpa_num
\num_new:N \l_tmpb_num
\num_new:N \l_tmpc_num
\num_new:N \g_tmpa_num
\num_new:N \g_tmpb_num
-\engine_aleph:TF
+\engine_if_aleph:TF
{
\let_new:NN \const_new_aux:Nw \tex_chardef:D
\const_new_aux:Nw \c_max_register_num = 65535 \scan_stop:
@@ -2084,7 +2280,7 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3seq.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3seq.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental sequences and stacks}
\let_new:NN \seq_elt:w \ERROR
\let_new:NN \seq_elt_end: \ERROR
@@ -2233,7 +2429,7 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3alloc.dtx 581 2006-12-12 12:28:27Z morten $
+\GetIdInfo$Id: l3alloc.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental register allocation}%
\def_new:Npn \alloc_setup_type:nnn #1 #2 #3{
\num_new:c {g_ #1 _allocation_num}
@@ -2309,7 +2505,7 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3io.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3io.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental i/o module}
\alloc_setup_type:nnn {iow} \c_zero \c_sixteen
\def_new:Npn \iow_new:N #1 {\alloc_reg:NnNN g {iow} \tex_chardef:D #1}
@@ -2393,7 +2589,7 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3int.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3int.dtx 702 2007-11-27 14:21:49Z morten $
{L3 Experimental Integer module}
\let_new:NN \int_to_roman:w \tex_romannumeral:D
@@ -2413,6 +2609,10 @@
\def:Npn \int_decr:N #1{\int_add:Nn#1\c_minus_one}
\def:Npn \int_gincr:N #1{\int_gadd:Nn#1\c_one}
\def:Npn \int_gdecr:N #1{\int_gadd:Nn#1\c_minus_one}
+\def:Npn \int_incr:c {\exp_args:Nc\int_incr:N}
+\def:Npn \int_decr:c {\exp_args:Nc\int_decr:N}
+\def:Npn \int_gincr:c {\exp_args:Nc\int_gincr:N}
+\def:Npn \int_gdecr:c {\exp_args:Nc\int_gdecr:N}
\alloc_setup_type:nnn {int} \c_eleven \c_max_register_num
\def_new:Npn \int_new:N #1 {\alloc_reg:NnNN g {int} \tex_countdef:D#1}
\def_new:Npn \int_new_l:N #1 {\alloc_reg:NnNN l {int} \tex_countdef:D#1}
@@ -2441,10 +2641,11 @@
\def_new:Npn \int_gsub:Nn {
\pref_global:D
\int_sub:Nn }
+\def_new:Npn \int_gadd:cn{\exp_args:Nc\int_gadd:Nn}
+\def_new:Npn \int_sub:cn{\exp_args:Nc\int_sub:Nn}
+\def_new:Npn \int_gsub:cn{\exp_args:Nc\int_gsub:Nn}
\let_new:NN \int_use:N \tex_the:D
\def_new:Npn \int_use:c #1{\int_use:N \cs:w#1\cs_end:}
-\def_new:Npn \int_gincr:c {\exp_args:Nc \int_gincr:N}
-\def_new:Npn \int_gdecr:c {\exp_args:Nc \int_gdecr:N}
\def_new:Npn \int_to_arabic:n #1{\int_to_number:w \int_eval:n{#1}}
\def_new:Npn \int_roman_lcuc_mapping:Nnn #1#2#3{
\def:cpn {int_to_lc_roman_#1:}{#2}
@@ -2507,7 +2708,7 @@
\int_Alph_default_conversion_rule:n
}
\def_new:Npn \int_to_symbol:n #1{
- \mode_math:TF
+ \mode_if_math:TF
{
\int_convert_number_with_rule:nnN {#1}{9}
\int_symbol_math_conversion_rule:n
@@ -2560,7 +2761,28 @@
\int_pre_eval_two_args:Nnn\int_div_truncate_raw:nn
}
\def_new:Npn \int_div_truncate_raw:nn #1#2 {
- \int_eval:n{ (2*#1 - #2) / (2* #2) }
+ \int_eval:w
+ \if_num:w \int_eval:w#1 = \c_zero
+ 0
+ \else:
+ (#1
+ \if_num:w \int_eval:w #1 < \c_zero
+ \if_num:w \int_eval:w#2 < \c_zero
+ -( #2 +
+ \else:
+ +( #2 -
+ \fi:
+ \else:
+ \if_num:w \int_eval:w #2 < \c_zero
+ +( #2 +
+ \else:
+ -( #2 -
+ \fi:
+ \fi:
+ 1)/2)
+ \fi:
+ /(#2)
+ \scan_stop:
}
\def_new:Npn \int_div_round:nn {
\int_pre_eval_two_args:Nnn\int_div_round_raw:nn
@@ -2573,6 +2795,9 @@
\let_new:NN \int_compare:nNnTF \num_compare:nNnTF
\let_new:NN \int_compare:nNnT \num_compare:nNnT
\let_new:NN \int_compare:nNnF \num_compare:nNnF
+\let_new:NN \int_max_of:nn \num_max_of:nn
+\let_new:NN \int_min_of:nn \num_min_of:nn
+\let_new:NN \int_abs:nn \num_abs:nn
\let_new:NN \int_compare_p:nNn \num_compare_p:nNn
\def_new:Npn \int_if_odd_p:n #1 {
\if_num_odd:w \int_eval:n{#1}
@@ -2582,16 +2807,16 @@
\fi:
}
\def_test_function_new:npn {int_if_odd:n}#1{\if_num_odd:w \int_eval:n{#1}}
-\def_new:Npn \int_whiledo:nNnT #1#2#3#4{
+\def_long_new:Npn \int_whiledo:nNnT #1#2#3#4{
\int_compare:nNnT {#1}#2{#3}{#4 \int_whiledo:nNnT {#1}#2{#3}{#4}}
}
-\def_new:Npn \int_whiledo:nNnF #1#2#3#4{
+\def_long_new:Npn \int_whiledo:nNnF #1#2#3#4{
\int_compare:nNnF {#1}#2{#3}{#4 \int_whiledo:nNnF {#1}#2{#3}{#4}}
}
-\def_new:Npn \int_dowhile:nNnT #1#2#3#4{
+\def_long_new:Npn \int_dowhile:nNnT #1#2#3#4{
#4 \int_compare:nNnT {#1}#2{#3}{\int_dowhile:nNnT {#1}#2{#3}{#4}}
}
-\def_new:Npn \int_dowhile:nNnF #1#2#3#4{
+\def_long_new:Npn \int_dowhile:nNnF #1#2#3#4{
#4 \int_compare:nNnF {#1}#2{#3}{\int_dowhile:nNnF {#1}#2{#3}{#4}}
}
\def_new:Npn \int_get_sign_and_digits:n #1{
@@ -2727,7 +2952,7 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3clist.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3clist.dtx 725 2007-12-22 21:25:00Z mittelba $
{L3 Experimental comma separated lists}
\def_new:Npn \clist_new:N #1{\tlp_new:Nn #1{}}
\def_new:Npn \clist_new:c {\exp_args:Nc \clist_new:N}
@@ -2787,7 +3012,7 @@
\def_new:Npn \clist_put_right:No {\exp_args:Nno\clist_put_right:Nn}
\def_new:Npn \clist_put_right:Nx {\exp_args:Nnx\clist_put_right:Nn}
\def_new:Npn \clist_gput_right:Nn {
- \clist_put_aux:NNnnNn \tlp_set:Nn \tlp_put_right:Nn , {}
+ \clist_put_aux:NNnnNn \tlp_gset:Nn \tlp_gput_right:Nn , {}
}
\def_new:Npn \clist_gput_right:No {\exp_args:NNo \clist_gput_right:Nn}
\def_new:Npn \clist_gput_right:cn {\exp_args:Nc \clist_gput_right:Nn}
@@ -2798,20 +3023,20 @@
\clist_if_empty:NF #1
{
\exp_after:NN \clist_map_function_aux:Nw
- \exp_after:NN #2 #1 , \q_nil , \q_stop
+ \exp_after:NN #2 #1 , \q_recursion_tail , \q_recursion_stop
}
}
\def_new:Npn \clist_map_function:cN{\exp_args:Nc\clist_map_function:NN}
\def_new:Npn \clist_map_function:nN #1#2{
- \tlist_if_empty:nF {#1}
- { \clist_map_function_aux:Nw #2 #1 , \q_nil , \q_stop }
+ \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,{
- \quark_if_nil:nT{#2} \clist_map_break:w
+ \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_stop:w
+\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{
\clist_if_empty:NF #1
@@ -2821,7 +3046,7 @@
##1{#2}
\exp_args:NcE \clist_map_function_aux:Nw
{clist_map_inline_ \int_use:N \l_clist_inline_level_int :n}
- #1 , \q_nil , \q_stop
+ #1 , \q_recursion_tail , \q_recursion_stop
\int_decr:N \l_clist_inline_level_int
}
}
@@ -2834,21 +3059,22 @@
##1{#2}
\exp_args:Nc \clist_map_function_aux:Nw
{clist_map_inline_ \int_use:N \l_clist_inline_level_int :n}
- #1 , \q_nil , \q_stop
+ #1 , \q_recursion_tail , \q_recursion_stop
\int_decr:N \l_clist_inline_level_int
}
}
\def_new:Npn \clist_map_variable:nNn #1#2#3{
\tlist_if_empty:nF{#1}
{
- \clist_map_variable_aux:Nnw #2 {#3} #1 , \q_nil , \q_stop
+ \clist_map_variable_aux:Nnw #2 {#3} #1
+ , \q_recursion_tail , \q_recursion_stop
}
}
\def_new:Npn \clist_map_variable:NNn {\exp_args:No \clist_map_variable:nNn}
\def_new:Npn \clist_map_variable:cNn {\exp_args:Nc \clist_map_variable:NNn}
\def_new:Npn \clist_map_variable_aux:Nnw #1#2#3,{
\def:Npn #1{#3}
- \quark_if_nil:NT #1 \clist_map_break:w
+ \quark_if_recursion_tail_stop:N #1
#2 \clist_map_variable_aux:Nnw #1{#2}
}
\def_new:Npn \clist_concat_aux:NNNN #1#2#3#4{
@@ -2947,85 +3173,94 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3prop.dtx 581 2006-12-12 12:28:27Z morten $
+\GetIdInfo$Id: l3prop.dtx 668 2007-09-27 15:54:23Z mittelba $
{L3 Experimental Property Lists}
+\quark_new:N\q_prop
+
\def_new:Npn \prop_new:N #1{\toks_new:N #1}
\def_new:Npn \prop_new:c {\exp_args:Nc \prop_new:N}
\let_new:NN \prop_clear:N \toks_clear:N
\def_new:Npn \prop_clear:c {\exp_args:Nc\prop_clear:N}
\let_new:NN \prop_gclear:N \toks_gclear:N
\def_new:Npn \prop_gclear:c {\exp_args:Nc\prop_gclear:N}
-\let_new:NN \prop_use:N \toks_use:N
-\def_long_new:Npn \prop_split_aux:NNn #1#2#3{
- \def:Npn \tmp:w ##1#2##2##3\q_stop {#3{##1}{##2}{##3}}
- \exp_after:NN\tmp:w \prop_use:N#1#2\q_no_value \q_stop}
-\def_long_new:NNn \prop_get:NNN 2{
- \prop_split_aux:NNn #1#2\prop_get_aux:w}
-\def_long_new:NNn \prop_get_aux:w 4{\toks_set:Nn#4{#2}}
-\def_new:Npn \prop_get:cNN { \exp_args:Nc \prop_get:NNN }
-\def_long_new:NNn \prop_gget:NNN 2{
- \prop_split_aux:NNn #1#2\prop_gget_aux:w}
-\def_new:Npn \prop_gget:NcN {\exp_args:NNc \prop_gget:NNN}
-\def_new:Npn \prop_gget:cNN {\exp_args:Nc \prop_gget:NNN}
-\def_long_new:NNn \prop_gget_aux:w 4{\toks_gset:Nn#4{#2}}
-\def_long_new:NNn \prop_get_gdel:NNN 3{
- \prop_split_aux:NNn #1#2{\prop_get_del_aux:w #3{\toks_gset:Nn #1}#2}}
+\def_long_new:Npn \prop_split_aux:Nnn #1#2#3{
+ \def:Npn \tmp:w ##1\q_prop#2\q_prop##2##3\q_stop {#3{##1}{##2}{##3}}
+ \exp_after:NN\tmp:w \toks_use:N#1\q_prop#2\q_prop\q_no_value \q_stop
+}
+\def_long_new:NNn \prop_get:NnN 2{
+ \prop_split_aux:Nnn #1{#2}\prop_get_aux:w}
+\def_long_new:NNn \prop_get_aux:w 4{\tlp_set:Nx#4{\exp_not:n{#2}}}
+\def_new:Npn \prop_get:cnN { \exp_args:Nc \prop_get:NnN }
+\def_long_new:NNn \prop_gget:NnN 2{
+ \prop_split_aux:Nnn #1{#2}\prop_gget_aux:w}
+\def_new:Npn \prop_gget:NcN {\exp_args:NNc \prop_gget:NnN}
+\def_new:Npn \prop_gget:cnN {\exp_args:Nc \prop_gget:NnN}
+\def_long_new:NNn \prop_gget_aux:w 4{\tlp_gset:Nx#4{\exp_not:n{#2}}}
+\def_long_new:NNn \prop_get_gdel:NnN 3{
+ \prop_split_aux:Nnn #1{#2}{\prop_get_del_aux:w #3{\toks_gset:Nn #1}{#2}}}
\def_long_new:NNn \prop_get_del_aux:w 6{
- \quark_if_no_value:nF{#5} {
- \def:Npn \tmp:w ##1#3\q_no_value {#2{#4##1}}
+ \tlp_set:Nx #1{\exp_not:n{#5}}
+ \quark_if_no_value:NF #1 {
+ \def:Npn \tmp:w ##1\q_prop#3\q_prop\q_no_value {#2{#4##1}}
\tmp:w #6}
}
-\def_long_new:NNn \prop_put:NNn 2{
- \prop_split_aux:NNn #1#2{
- \toks_clear:N #1
- \prop_put_aux:w {\toks_put_right:Nn #1}#2}
-}
-\def_new:Npn \prop_put:ccn {\exp_args:Ncc \prop_put:NNn }
-\def_long_new:NNn \prop_gput:NNn 2{
- \prop_split_aux:NNn #1#2{
- \toks_gclear:N #1
- \prop_put_aux:w {\toks_gput_right:Nn #1}#2}
-}
-\def_new:Npn \prop_gput:NNo {\exp_args:NNNo \prop_gput:NNn}
-\def_new:Npn \prop_gput:NNx {\exp_args:Nnnx \prop_gput:NNn}
-\def_new:Npn \prop_gput:NOx {\exp_args:Nnox \prop_gput:NNn}
-\def_new:Npn \prop_gput:NOo {\exp_args:NNOo \prop_gput:NNn}
-\def_new:Npn \prop_gput:Ncn {\exp_args:NNc \prop_gput:NNn }
-\def_new:Npn \prop_gput:OOo {\exp_args:NOOo \prop_gput:NNn}
-\def_new:Npn \prop_gput:cNn {\exp_args:Nc \prop_gput:NNn}
-\def_new:Npn \prop_gput:ccn {\exp_args:Ncc \prop_gput:NNn}
-\def_new:Npn \prop_gput:cco {\exp_args:Ncco \prop_gput:NNn}
-\def_new:Npn \prop_gput:ccx {\exp_args:Nccx \prop_gput:NNn}
+\def_long_new:NNn \prop_put:Nnn 2{
+ \prop_split_aux:Nnn #1{#2}{
+ \prop_clear:N #1
+ \prop_put_aux:w {\toks_put_right:Nn #1}{#2}}
+}
+\def_new:Npn \prop_put:ccn {\exp_args:Ncc \prop_put:Nnn }
+
+\def_long_new:NNn \prop_gput:Nnn 2{
+ \prop_split_aux:Nnn #1{#2}{
+ \prop_gclear:N #1
+ \prop_put_aux:w {\toks_gput_right:Nn #1}{#2}}
+}
+
\def_long_new:NNn \prop_put_aux:w 6{
- #1{#2{#6}#3}
- \quark_if_no_value:nF {#4}
+ #1{\q_prop#2\q_prop{#6}#3}
+ \tlist_if_empty:nF{#5}
{
- \def:Npn \tmp:w ##1#2\q_no_value {#1{##1}}
+ \def:Npn \tmp:w ##1\q_prop#2\q_prop\q_no_value {#1{##1}}
\tmp:w #5
}
}
-\def_long_new:NNn \prop_del:NN 2{
- \prop_split_aux:NNn #1#2{\prop_del_aux:w {\toks_set:Nn #1}#2}}
-\def_long_new:NNn \prop_gdel:NN 2{
- \prop_split_aux:NNn #1#2{\prop_del_aux:w {\toks_gset:Nn #1}#2}}
-\def_long_new:NNn \prop_del_aux:w 5{\quark_if_no_value:nF {#4}
- {\def:Npn \tmp:w ##1#2\q_no_value {#1{#3##1}}\tmp:w #5}}
-\def_new:NNn \prop_if_in:NNTF 2{
- \prop_split_aux:NNn #1#2\prop_if_in_aux:w}
-\def_new:Npn \prop_if_in:NOTF {\exp_args:Nno \prop_if_in:NNTF}
-\def_new:Npn \prop_if_in:ccTF {\exp_args:Ncc \prop_if_in:NNTF}
+\def_new:Npn \prop_gput:Nno {\exp_args:NNno \prop_gput:Nnn}
+\def_new:Npn \prop_gput:Nnx {\exp_args:NNnx \prop_gput:Nnn}
+\def_new:Npn \prop_gput:Nox {\exp_args:NNox \prop_gput:Nnn}
+\def_new:Npn \prop_gput:Noo {\exp_args:NNoo \prop_gput:Nnn}
+\def_new:Npn \prop_gput:Ncn {\exp_args:NNc \prop_gput:Nnn}
+\def_new:Npn \prop_gput:Ooo {\exp_args:NOoo \prop_gput:Nnn}
+\def_new:Npn \prop_gput:cnn {\exp_args:Nc \prop_gput:Nnn}
+\def_new:Npn \prop_gput:ccn {\exp_args:Ncc \prop_gput:Nnn}
+\def_new:Npn \prop_gput:cco {\exp_args:Ncco \prop_gput:Nnn}
+\def_new:Npn \prop_gput:ccx {\exp_args:Nccx \prop_gput:Nnn}
+\def_long_new:NNn \prop_del:Nn 2{
+ \prop_split_aux:Nnn #1{#2}{\prop_del_aux:w {\toks_set:Nn #1}{#2}}}
+\def_long_new:NNn \prop_gdel:Nn 2{
+ \prop_split_aux:Nnn #1{#2}{\prop_del_aux:w {\toks_gset:Nn #1}{#2}}}
+\def_long_new:NNn \prop_del_aux:w 5{
+ \def:Npn \tmp:w {#4}
+ \quark_if_no_value:NF \tmp:w
+ {\def:Npn \tmp:w ##1\q_prop#2\q_prop\q_no_value {#1{#3##1}}
+ \tmp:w #5}}
+\def_new:NNn \prop_if_in:NnTF 2{
+ \prop_split_aux:Nnn #1{#2}\prop_if_in_aux:w}
\def_new:NNn \prop_if_in_aux:w 3{\quark_if_no_value:nFT {#2}}
-\def_long_new:NNn \prop_gput_if_new:NNn 2{
- \prop_split_aux:NNn #1#2{\prop_put_if_new_aux:w #1#2}}
+
+\def_new:Npn \prop_if_in:NoTF {\exp_args:NNo \prop_if_in:NnTF}
+\def_new:Npn \prop_if_in:ccTF {\exp_args:Ncc \prop_if_in:NnTF}
+\def_long_new:NNn \prop_gput_if_new:Nnn 2{
+ \prop_split_aux:Nnn #1{#2}{\prop_put_if_new_aux:w #1{#2}}}
\def_long_new:NNn \prop_put_if_new_aux:w 6{
- \quark_if_no_value:nT {#4}{#1{#2{#6}#3}}}
+ \tlist_if_empty:nT {#5}{#1{\q_prop#2\q_prop{#6}#3}}}
\let_new:NN \prop_set_eq:NN \toks_set_eq:NN
-\let_new:NN \prop_set_eq:Nc \toks_set_eq:Nc
+\let_new:NN \prop_set_eq:Nc \toks_set_eq:Nc
\let_new:NN \prop_set_eq:cN \toks_set_eq:cN
-\let_new:NN \prop_set_eq:cc \toks_set_eq:cc
-\let_new:NN \prop_gset_eq:NN \toks_gset_eq:NN
+\let_new:NN \prop_set_eq:cc \toks_set_eq:cc
+\let_new:NN \prop_gset_eq:NN \toks_gset_eq:NN
\let_new:NN \prop_gset_eq:Nc \toks_gset_eq:Nc
-\let_new:NN \prop_gset_eq:cN \toks_gset_eq:cN
+\let_new:NN \prop_gset_eq:cN \toks_gset_eq:cN
\let_new:NN \prop_gset_eq:cc \toks_gset_eq:cc
\let_new:NN \prop_if_empty_p:N \toks_if_empty_p:N
\let_new:NN \prop_if_empty_p:c \toks_if_empty_p:c
@@ -3036,13 +3271,13 @@
\let_new:NN \prop_if_empty:cT \toks_if_empty:cTF
\let_new:NN \prop_if_empty:cF \toks_if_empty:cF
\def_new:NNn \prop_if_eq:NNTF 2 {
- \tlist_if_eq:xxTF{\prop_use:N #1}{\prop_use:N #2}
+ \tlist_if_eq:xxTF{\toks_use:N #1}{\toks_use:N #2}
}
\def_new:NNn \prop_if_eq:NNT 2 {
- \tlist_if_eq:xxT{\prop_use:N #1}{\prop_use:N #2}
+ \tlist_if_eq:xxT{\toks_use:N #1}{\toks_use:N #2}
}
\def_new:NNn \prop_if_eq:NNF 2 {
- \tlist_if_eq:xxF{\prop_use:N #1}{\prop_use:N #2}
+ \tlist_if_eq:xxF{\toks_use:N #1}{\toks_use:N #2}
}
\def_new:Npn \prop_if_eq:NcTF {\exp_args:NNc \prop_if_eq:NNTF}
\def_new:Npn \prop_if_eq:NcT {\exp_args:NNc \prop_if_eq:NNT}
@@ -3054,32 +3289,82 @@
\def_new:Npn \prop_if_eq:ccT {\exp_args:Ncc \prop_if_eq:NNT}
\def_new:Npn \prop_if_eq:ccF {\exp_args:Ncc \prop_if_eq:NNF}
\def_new:Npn \prop_map_function:NN #1#2{
- \exp_after:NN \prop_map_function_aux:NNn
- \exp_after:NN #2 \prop_use:N #1 \q_nil \q_no_value \q_stop
+ \exp_after:NN \prop_map_function_aux:w
+ \exp_after:NN #2 \toks_use:N #1 \q_prop{}\q_prop \q_no_value \q_stop
}
-\def_new:Npn \prop_map_function_aux:NNn #1#2#3{
- \if_meaning:NN \q_nil #1
+\def_new:Npn \prop_map_function_aux:w #1\q_prop#2\q_prop#3{
+ \if:w \tlist_if_empty_p:n{#2}
\exp_after:NN \prop_map_break:w
\fi:
- #1#2{#3}
- \prop_map_function_aux:NNn #1
+ #1{#2}{#3}
+ \prop_map_function_aux:w #1
+}
+
+\def:Npn \prop_map_function:NN #1#2{
+ \exp_after:NN \prop_map_function_aux:w
+ \exp_after:NN #2 \toks_use:N #1 \q_prop \q_no_value \q_prop \q_no_value
}
+\def:Npn \prop_map_function_aux:w #1\q_prop#2\q_prop#3{
+ \quark_if_no_value:nF{#2}
+ {
+ #1{#2}{#3}
+ \prop_map_function_aux:w #1
+ }
+}
+
+\def:Npn \prop_map_function:NN #1#2{
+ \exp_after:NN \prop_map_function_aux:w
+ \exp_after:NN #2 \toks_use:N #1 \q_prop \q_nil \q_prop \q_no_value \q_stop
+}
+\def:Npn \prop_map_function_aux:w #1\q_prop#2\q_prop#3{
+ \if_meaning:NN \q_nil #2
+ \exp_after:NN \prop_map_break:w
+ \fi:
+ #1{#2}{#3}
+ \prop_map_function_aux:w #1
+}
+
+
\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
\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}
##1##2{#2}
- \exp_args:NcE \prop_map_function:N
+ \prop_map_function:Nc #1
{prop_map_inline_ \num_use:N \l_prop_inline_level_num :n}
- \prop_use:N #1
- \q_nil \q_no_value \q_stop
\num_decr:N \l_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
+\def:Npn \prop_put:NNn {\typeout{Warning:~name~
+ changed~ to~ \string\prop_put:Nnn}\prop_put:Nnn}
+\def:Npn \prop_gput:NNn {\typeout{Warning:~name~
+ changed~ to~ \string\prop_gput:Nnn }\prop_gput:Nnn }
+\def:Npn \prop_gput:NNo {\typeout{Warning:~name~
+ changed~ to~ \string\prop_gput:Nno }\prop_gput:Nno }
+\def:Npn \prop_gput:cNn {\typeout{Warning:~name~
+ changed~ to~ \string\prop_gput:cnn }\prop_gput:cnn }
+\def:Npn \prop_gput_if_new:NNn {\typeout{Warning:~name~
+ changed~ to~ \string\prop_gput_if_new:Nnn }\prop_gput_if_new:Nnn }
+\def:Npn \prop_get:NNN {\typeout{Warning:~name~
+ changed~ to~ \string\prop_get:NnN }\prop_get:NnN }
+\def:Npn \prop_get:cNN {\typeout{Warning:~name~
+ changed~ to~ \string\prop_get:cnN }\prop_get:cnN }
+\def:Npn \prop_gget:NNN {\typeout{Warning:~name~
+ changed~ to~ \string\prop_gget:NnN }\prop_gget:NnN }
+\def:Npn \prop_gget:cNN {\typeout{Warning:~name~
+ changed~ to~ \string\prop_gget:cnN }\prop_gget:cnN }
+\def:Npn \prop_get_gdel:NNN {\typeout{Warning:~name~
+ changed~ to~ \string\prop_get_gdel:NnN }\prop_get_gdel:NnN }
+\def:Npn \prop_del:NN {\typeout{Warning:~name~
+ changed~ to~ \string\prop_del:Nn }\prop_del:Nn }
+\def:Npn \prop_gdel:NN {\typeout{Warning:~name~
+ changed~ to~ \string\prop_gdel:Nn }\prop_gdel:Nn }
+\def:Npn \prop_if_in:NNTF {\typeout{Warning:~name~
+ changed~ to~ \string\prop_if_in:NnTF }\prop_if_in:NnTF }
%% File: l3token.dtx Copyright (C) 2005-2006 LaTeX3 project
%%
%% It may be distributed and/or modified under the conditions of the
@@ -3112,7 +3397,7 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3token.dtx 578 2006-11-21 18:13:24Z morten $
+\GetIdInfo$Id: l3token.dtx 701 2007-11-27 14:21:05Z morten $
{L3 Experimental token investigation and manipulation}
\let_new:NN \char_set_catcode:w \tex_catcode:D
\def_new:Npn \char_set_catcode:nn #1#2{
@@ -3123,6 +3408,19 @@
\def_new:Npn \char_show_value_catcode:w {\tex_showthe:D\tex_catcode:D}
\def_new:Npn \char_show_value_catcode:n #1{
\char_show_value_catcode:w \int_eval:n{#1}}
+\let_new:NN \char_set_mathcode:w \tex_mathcode:D
+\def_new:Npn \char_set_mathcode:nn #1#2{
+ \char_set_mathcode:w #1 = \int_eval:n{#2}
+}
+\def_protected_new:Npn \char_gset_mathcode:w {\pref_global:D\tex_mathcode:D}
+\def_new:Npn \char_gset_mathcode:nn #1#2{
+ \char_gset_mathcode:w #1 = \int_eval:n{#2}
+}
+\def_new:Npn \char_value_mathcode:w {\int_use:N\tex_mathcode:D}
+\def_new:Npn \char_value_mathcode:n #1{\char_value_mathcode:w \int_eval:n{#1}}
+\def_new:Npn \char_show_value_mathcode:w {\tex_showthe:D\tex_mathcode:D}
+\def_new:Npn \char_show_value_mathcode:n #1{
+ \char_show_value_mathcode:w \int_eval:n{#1}}
\let_new:NN \char_set_lccode:w \tex_lccode:D
\def_new:Npn \char_set_lccode:nn #1#2{
\char_set_lccode:w #1 = \int_eval:n{#2}
@@ -3540,10 +3838,9 @@
\fi:
}
\def_new:Npn \peek_execute_branches_charcode: {
- \prg_if_predicate:nTF {
- \prg_if_predicate_or_p:nn
- {\token_if_eq_catcode_p:NN \l_peek_token \c_group_begin_token}
- {\token_if_eq_meaning_p:NN \l_peek_token \c_space_token}
+ \predicate:nTF {
+ \token_if_eq_catcode_p:NN \l_peek_token \c_group_begin_token ||
+ \token_if_eq_meaning_p:NN \l_peek_token \c_space_token
}
{ \l_peek_false_tlp }
{ \exp_after:NN \peek_execute_branches_charcode_aux:NN \l_peek_search_tlp }
@@ -3641,10 +3938,10 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3vers.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3vers.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental LaTeX format version}
\def:Npn\c_format_name{Experimental~ LaTeX3}
-\def:Npn\c_format_date{2005/12/25}
+\def:Npn\c_format_date{2007/09/01}
\const_new:Nn \c_fmt_too_old{12}
\def:Npn\chk_format_age:w #1/#2/#3\q_stop{
\num_compare:nNnT{(\tex_year:D-#1)*12+\tex_month:D-#2}>\c_fmt_too_old
@@ -3652,7 +3949,7 @@
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J
!~~You~are~attempting~to~make~an~experimental~LaTeX3~format~from^^J
!~~source~files~that~are~more~than~
- \num_use:N\num_eval:n{\c_fmt_too_old}~months~old.^^J
+ \num_value:w\num_eval:n{\c_fmt_too_old}~months~old.^^J
!^^J
!~~If~you~enter~<return>~to~scroll~past~this~message~then~the~format^^J
!~~will~be~built,~but~please~consider~obtaining~newer~source~files^^J
@@ -3670,7 +3967,7 @@
\cs_gundefine:N \chk_format_age:w
\tex_everyjob:D{\io_put_term:x{\c_format_name,~<\c_format_date>}}
\io_put_term:x{\c_format_name,~<\c_format_date>}
-%% File: l3skip.dtx Copyright (C) 2005-2006 Frank Mittelbach, LaTeX3 project
+%% File: l3skip.dtx Copyright (C) 2005-2007 Frank Mittelbach, 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
@@ -3702,7 +3999,7 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3skip.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3skip.dtx 666 2007-09-27 15:53:26Z mittelba $
{L3 Experimental skip registers}
\alloc_setup_type:nnn {skip} \c_zero \c_max_register_num
\def_new:Npn\skip_new:N #1 {\alloc_reg:NnNN g {skip} \tex_skipdef:D #1 }
@@ -3756,10 +4053,9 @@
\skip_new:N \c_max_skip
\skip_set:Nn \c_max_skip {16383.99999pt}
\def_new:Npn \skip_infinite_glue:nTF #1{
- \prg_logic_test:nTF {
- \prg_logic_or_p:nn
- { \int_compare_p:nNn {\etex_gluestretchorder:D #1 } > \c_zero }
- { \int_compare_p:nNn {\etex_glueshrinkorder:D #1 } > \c_zero }
+ \predicate:nTF {
+ \int_compare_p:nNn {\etex_gluestretchorder:D #1 } > \c_zero ||
+ \int_compare_p:nNn {\etex_glueshrinkorder:D #1 } > \c_zero
}
}
\def_new:Npn \skip_split_finite_else_action:nnNN #1#2#3#4{
@@ -3795,10 +4091,12 @@
\def_new:Npn\dim_add:cn{\exp_args:Nc\dim_add:Nn}
\def_new:Npn\dim_add:Nc{\exp_args:NNc\dim_add:Nn}
\def_new:Npn \dim_gadd:Nn { \pref_global:D \dim_add:Nn }
+\def_new:Npn\dim_gadd:cn{\exp_args:Nc\dim_gadd:Nn}
\def_new:Npn \dim_sub:Nn #1#2{\tex_advance:D#1-#2\scan_stop:}
\def_new:Npn\dim_sub:cn{\exp_args:Nc\dim_sub:Nn}
\def_new:Npn\dim_sub:Nc{\exp_args:NNc\dim_sub:Nn}
\def_new:Npn \dim_gsub:Nn {\pref_global:D \dim_sub:Nn }
+\def_new:Npn\dim_gsub:cn{\exp_args:Nc\dim_gsub:Nn}
\let_new:NN \dim_use:N \tex_the:D
\def_new:Npn \dim_use:c {\exp_args:Nc\dim_use:N}
\dim_new:N \l_tmpa_dim
@@ -3891,7 +4189,7 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3toks.dtx 580 2006-11-26 15:56:47Z morten $
+\GetIdInfo$Id: l3toks.dtx 728 2008-01-01 16:11:58Z morten $
{L3 Experimental Token Registers}
\alloc_setup_type:nnn {toks} \c_zero \c_max_register_num
\def_new:Npn \toks_new:N #1{\alloc_reg:NnNN g {toks} \tex_toksdef:D #1}
@@ -3993,6 +4291,12 @@
\def_new:Npn \toks_if_eq:ccTF {\exp_args:Ncc \toks_if_eq:NNTF}
\def_new:Npn \toks_if_eq:ccT {\exp_args:Ncc \toks_if_eq:NNT}
\def_new:Npn \toks_if_eq:ccF {\exp_args:Ncc \toks_if_eq:NNF}
+\def_new:NNn \toks_if_eq_p:NN 2 {
+ \tlist_if_eq_p:xx {\toks_use:N #1} {\toks_use:N #2}
+}
+\def_new:Npn \toks_if_eq_p:cN {\exp_args:Nc \toks_if_eq_p:NN}
+\def_new:Npn \toks_if_eq_p:Nc {\exp_args:NNc \toks_if_eq_p:NN}
+\def_new:Npn \toks_if_eq_p:cc {\exp_args:Ncc \toks_if_eq_p:NN}
\tex_toksdef:D \l_tmpa_toks = 255
\seq_put_right:Nn \g_toks_allocation_seq {255}
\toks_new:N \l_tmpb_toks
@@ -4007,7 +4311,7 @@
\toks_use:N#1\q_nil
}
\def_long_new:Npn\toks_remove_extra_brace_group_aux:NNw #1#2#3\q_nil{#1#2{#3}}
-%% File: l3messages.dtx Copyright (C) 1990-2006 LaTeX3 project
+%% File: l3messages.dtx Copyright (C) 1990-2007 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
@@ -4039,7 +4343,7 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3messages.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3messages.dtx 673 2007-09-28 20:50:33Z mittelba $
{L3 Experimental LaTeX Messages module}
\tlp_new:Nn \g_file_curr_name_tlp {no~file}
\let_new:NN \err_message:x \tex_errmessage:D
@@ -4067,16 +4371,16 @@
\def_new:Npn \l_err_label_token {}
\int_set:Nn\tex_errorcontextlines:D\c_minus_one
\def_new:Npn \err_info:nn #1#2{
- \def:Npn\err_newline:{\iow_newline#2}
+ \def:Npn\err_newline:{\iow_newline:#2}
\io_put_log:x {#1~\io_show_file_lineno:}}
\def_new:Npn \err_warn:nn #1#2{
- \def:Npn\err_newline:{\iow_newline#2}
+ \def:Npn\err_newline:{\iow_newline:#2}
\io_put_term:x {#1~\io_show_file_lineno:}}
\def_new:Npn \err_info_noline:nn #1#2{
- \def:Npn\err_newline:{\iow_newline#2}
+ \def:Npn\err_newline:{\iow_newline:#2}
\io_put_log:x {#1}}
\def_new:Npn \err_warn_noline:nn #1#2{
- \def:Npn\err_newline:{\iow_newline#2}
+ \def:Npn\err_newline:{\iow_newline:#2}
\io_put_term:x {#1}}
\def_new:Npn \err_interrupt:NNw #1#2{\let:NwN \l_err_label_token #2
\group_begin:
@@ -4086,12 +4390,12 @@
%\clearshortrefmaps
\tex_input:D #1~\err_display_aux:w}
\def_new:Npn \err_fatal:nn #1#2{
- \def:Npn\err_newline:{\iow_newline#2}
+ \def:Npn\err_newline:{\iow_newline:#2}
\io_put_term:x {#1~\io_show_file_lineno:}
\tex_end:D
}
\def_new:Npn \err_fatal_noline:nn #1#2{
- \def:Npn\err_newline:{\iow_newline#2}
+ \def:Npn\err_newline:{\iow_newline:#2}
\io_put_term:x {#1}
\tex_end:D
}
@@ -4110,9 +4414,9 @@
{\err_latex_bug:x{You~closed~the~wrong~error~file~`#1'.~
Open~is~`\g_err_curr_fname'.}}
\iow_long_unexpanded:Nn \c_iow_err_stream {\err_latex_bug:x{Didn't~find~the~
- correct~error~message~to~show.\iow_newline
+ correct~error~message~to~show.\iow_newline:
Was~searching~for~a~function~
- with~the~following~meaning:\iow_newline
+ with~the~following~meaning:\iow_newline:
\token_to_string:N\token_to_meaning:N
\token_to_string:N\l_err_label_token}
\group_end:}
@@ -4121,7 +4425,7 @@
\tlp_gset_eq:NN\g_err_curr_fname\c_empty_tlp
}
\def_new:Npn \err_interrupt_new:NNNnnn #1{
- \group_begin: \tex_catcode:D`\#\c_other_char_code
+ \group_begin: \char_set_catcode:nn{`\#}{12}
\if_meaning:NN#1\g_err_curr_fname
\else:
\err_latex_bug:x{Error~text~goes~to~wrong~err~file:~
@@ -4138,9 +4442,9 @@
\cmd_declare:Nnn\err_display_aux:w [#2]{
\group_end:
\toks_gset:Nx\g_err_help_toks{#4}
- \io_put_term:x{LaTeX~error~\io_show_file_lineno:.\iow_newline
+ \io_put_term:x{LaTeX~error~\io_show_file_lineno:.\iow_newline:
\text_put_sp:\text_put_four_sp: \text_put_sp:
- See~LaTeX~manual~for~explanation.\iow_newline
+ See~LaTeX~manual~for~explanation.\iow_newline:
\text_put_sp:\text_put_four_sp: \text_put_sp:
Type~\text_put_sp: H~<return>~\text_put_sp: for~
immediate~help.}
@@ -4181,7 +4485,7 @@
\text_put_four_sp:\text_put_four_sp:\text_put_four_sp:}
}
\err_file_new:Nn \c_kernel_err_tlp {ltxkernel.err}
-%% File: l3box.dtx Copyright (C) 2005-2006 LaTeX3 project
+%% File: l3box.dtx Copyright (C) 2005-2007 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
@@ -4213,7 +4517,7 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3box.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3box.dtx 718 2007-12-16 22:59:58Z morten $
{L3 Experimental Box module}
\alloc_setup_type:nnn {box} \c_zero \c_max_register_num
\seq_put_right:Nn \g_box_allocation_seq {255}
@@ -4223,6 +4527,9 @@
\let_new:NN \if_hbox:N \tex_ifhbox:D
\let_new:NN \if_vbox:N \tex_ifvbox:D
\let_new:NN \if_box_empty:N \tex_ifvoid:D
+\def_new:Npn \box_if_empty_p:N #1{
+ \if_box_empty:N #1 \c_true \else: \c_false \fi:}
+\def_new:Npn \box_if_empty_p:c {\exp_args:Nc \box_if_empty_p:N}
\def_test_function_new:npn {box_if_empty:N}#1{\if_box_empty:N #1}
\def_new:Npn \box_if_empty:cTF {\exp_args:Nc \box_if_empty:NTF}
\def_new:Npn \box_if_empty:cT {\exp_args:Nc \box_if_empty:NT}
@@ -4235,11 +4542,11 @@
\def_new:Npn \box_gset_eq:cN {\exp_args:Nc \box_gset_eq:NN}
\def_new:Npn \box_gset_eq:Nc {\exp_args:NNc \box_gset_eq:NN}
\def_new:Npn \box_gset_eq:cc {\exp_args:Ncc \box_gset_eq:NN}
-\let_new:NN \R_previous_box \tex_lastbox:D
-\def_new:Npn \box_set_to_previous:N #1{\tex_setbox:D#1\R_previous_box}
-\def_new:Npn \box_set_to_previous:c {\exp_args:Nc \box_set_to_previous:N}
-\def_new:Npn \box_gset_to_previous:N {\pref_global:D \box_set_to_previous:N}
-\def_new:Npn \box_gset_to_previous:c {\exp_args:Nc \box_gset_to_previous:N}
+\let_new:NN \R_last_box \tex_lastbox:D
+\def_new:Npn \box_set_to_last:N #1{\tex_setbox:D#1\R_last_box}
+\def_new:Npn \box_set_to_last:c {\exp_args:Nc \box_set_to_last:N}
+\def_new:Npn \box_gset_to_last:N {\pref_global:D \box_set_to_last:N}
+\def_new:Npn \box_gset_to_last:c {\exp_args:Nc \box_gset_to_last:N}
\def_long_new:Npn \box_move_left:nn #1#2{\tex_moveleft:D\dim_eval:n{#1}{#2}}
\def_long_new:Npn \box_move_right:nn #1#2{\tex_moveright:D\dim_eval:n{#1}{#2}}
\def_long_new:Npn \box_move_up:nn #1#2{\tex_raise:D\dim_eval:n{#1}{#2}}
@@ -4301,9 +4608,13 @@
\def_new:Npn \hbox_gset_to_wd:cnn{\exp_args:Nc \hbox_gset_to_wd:Nnn }
\def_new:Npn \hbox_set_inline_begin:N #1 {
\tex_setbox:D #1 \tex_hbox:D \c_group_begin_token }
+\def:Npn \hbox_set_inline_begin:c {\exp_args:Nc
+ \hbox_set_inline_begin:N}
\let_new:NN \hbox_set_inline_end: \c_group_end_token
\def_new:Npn \hbox_gset_inline_begin:N {
\pref_global:D \hbox_set_inline_begin:N }
+\def:Npn \hbox_gset_inline_begin:c {\exp_args:Nc
+ \hbox_gset_inline_begin:N }
\let_new:NN \hbox_gset_inline_end: \c_group_end_token
\def_long_new:Npn \hbox_to_wd:nn #1#2 {\tex_hbox:D to #1 {#2}}
\def_long_new:Npn \hbox_to_zero:n #1 {\tex_hbox:D to \c_zero_skip {#1}}
@@ -4343,7 +4654,7 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3precom.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3precom.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental precompilation module}
\iow_new:N\c_cs_dump_stream
\tlp_new:Nn\g_cs_dump_name_tlp{}
@@ -4428,21 +4739,22 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3prg.dtx 574 2006-08-21 23:30:10Z morten $
+\GetIdInfo$Id: l3prg.dtx 697 2007-11-27 14:14:54Z morten $
{L3 Experimental control structures}
-\def_new:Npn \mode_vertical_p: {
+\def_new:Npn \mode_if_vertical_p: {
\if_mode_vertical: \c_true \else: \c_false\fi:}
-\def_test_function_new:npn{mode_vertical:}{\if_mode_vertical:}
-\def_new:Npn \mode_horizontal_p: {
+\def_test_function_new:npn{mode_if_vertical:}{\if_mode_vertical:}
+\def_new:Npn \mode_if_horizontal_p: {
\if_mode_horizontal: \c_true \else: \c_false\fi:}
-\def_test_function_new:npn{mode_horizontal:}{\if_mode_horizontal:}
-\def_new:Npn \mode_inner_p: {
+\def_test_function_new:npn{mode_if_horizontal:}{\if_mode_horizontal:}
+\def_new:Npn \mode_if_inner_p: {
\if_mode_inner: \c_true \else: \c_false\fi:}
-\def_test_function_new:npn{mode_inner:}{\if_mode_inner:}
-\def_test_function_new:npn{mode_math:} {
+\def_test_function_new:npn{mode_if_inner:}{\if_mode_inner:}
+\def_test_function_new:npn{mode_if_math:} {
\scan_align_safe_stop: \if_mode_math: }
-\def_new:Npn \group_align_safe_begin: {\if_false:{\fi:\if_num:w0=`}\fi:}
-\def_new:Npn \group_align_safe_end: {\if_num:w0=`{\fi:\if_false:}\fi:}
+\def_new:Npn \group_align_safe_begin: {
+ \if_false:{\fi:\if_num:w`}=\c_zero\fi:}
+\def_new:Npn \group_align_safe_end: {\if_num:w`{=\c_zero}\fi:}
\def_new:Npn \scan_align_safe_stop: {
\num_compare:nNnT \etex_currentgrouptype:D = \c_six
{
@@ -4567,15 +4879,15 @@
}
}
\def_new:Npn \bool_new:N #1 { \let_new:NN #1 \c_false }
-\def_new:Npn \bool_new:c #1 { \let_new:cN #1 \c_false }
+\def_new:Npn \bool_new:c #1 { \let_new:cN {#1} \c_false }
\def_new:Npn \bool_set_true:N #1 { \let:NN #1 \c_true }
-\def_new:Npn \bool_set_true:c #1 { \let:cN #1 \c_true }
+\def_new:Npn \bool_set_true:c #1 { \let:cN {#1} \c_true }
\def_new:Npn \bool_set_false:N #1 { \let:NN #1 \c_false }
-\def_new:Npn \bool_set_false:c #1 { \let:cN #1 \c_false }
+\def_new:Npn \bool_set_false:c #1 { \let:cN {#1} \c_false }
\def_new:Npn \bool_gset_true:N #1 { \glet:NN #1 \c_true }
-\def_new:Npn \bool_gset_true:c #1 { \glet:cN #1 \c_true }
+\def_new:Npn \bool_gset_true:c #1 { \glet:cN {#1} \c_true }
\def_new:Npn \bool_gset_false:N #1 { \glet:NN #1 \c_false }
-\def_new:Npn \bool_gset_false:c #1 { \glet:cN #1 \c_false }
+\def_new:Npn \bool_gset_false:c #1 { \glet:cN {#1} \c_false }
\let_new:NN \bool_set_eq:NN \let:NN
\let_new:NN \bool_set_eq:Nc \let:Nc
\let_new:NN \bool_set_eq:cN \let:cN
@@ -4638,55 +4950,36 @@
\def_long_new:Npn \prg_dowhile:nF #1#2{
#2 #1 {\prg_dowhile:nF {#1}{#2}}
}
-\let_new:NN \prg_if_predicate:nTF \bool_if:NTF
-\let_new:NN \prg_if_predicate:nT \bool_if:NT
-\let_new:NN \prg_if_predicate:nF \bool_if:NF
-\def_new:Npn \prg_if_predicate_or_p:nn #1#2{
- \if_num:w #1#2<\c_hundred_one
- \c_true
- \else:
- \c_false
- \fi:
-}
-\def_new:Npn \prg_if_predicate_and_p:nn #1#2{
- \if_case:w #1#2 ~
- \c_true
- \else:
- \c_false
- \fi:
-}
-\def_new:Npn \prg_if_predicate_not_p:n #1{
- \if_case:w #1 ~
- \c_false
- \or:
- \c_true
- \fi:
-}
-\def_long_new:Npn \prg_if_predicate_ands_p:n #1{
- \exp_after:NN \prg_if_predicate_andor_aux:NNN \exp_after:NN \c_true
- \int_to_roman:w -`0 #1 \scan_stop: \scan_stop:
-}
-\def_long_new:Npn \prg_if_predicate_ors_p:n #1{
- \exp_after:NN \prg_if_predicate_andor_aux:NNN \exp_after:NN \c_false
- \int_to_roman:w -`0 #1 \scan_stop: \scan_stop:
-}
-\def_new:Npn \prg_if_predicate_andor_aux:NNN #1#2#3{
- \token_if_eq_meaning:NNTF \scan_stop: #2
- { #1 }
- {
- \int_compare:nNnTF #3 = #1
- { \exp_after:NN \prg_if_predicate_andor_aux:NNN }
- { \exp_after:NN \prg_if_predicate_andor_break:NNN }
- \exp_after:NN #1 \int_to_roman:w -`0
- }
+\def_long_new:Npn \predicate_p:n #1{
+ \group_align_safe_begin:
+ \exp_after:NN \predicate_auxi:NN
+ \int_to_roman:w-`\q #1 02\scan_stop:
}
-\def_new:Npn \prg_if_predicate_andor_break:NNN #1#2#3{
- \token_if_eq_meaning:NNTF \scan_stop: #2
- { \if:w #1\c_false\else:\c_true\fi: }
- {
- \exp_after:NN \prg_if_predicate_andor_break:NNN \exp_after:NN #1
- \int_to_roman:w -`0
- }
+\def_long_test_function_new:npn {predicate:n}#1{
+ \group_align_safe_begin:
+ \if:w \exp_after:NN \predicate_auxi:NN
+ \int_to_roman:w-`\q #1 02\scan_stop:
+}
+\def_new:Npn \predicate_auxi:NN 0 #1{
+ \exp_after:NN \predicate_auxii:NNN \exp_after:NN #1
+ \int_to_roman:w-`\q
+}
+\def_new:Npn \predicate_auxii:NNN #1#2#3{
+ \cs_use:c{predicate_#2#3_#1:w} }
+\def_new:cpn{predicate_&&_0:w}{
+ \exp_after:NN \predicate_auxi:NN\int_to_roman:w-`\q
+}
+\def_long_new:cpn{predicate_&&_1:w} #1 02\scan_stop:{
+ \group_align_safe_end: 01}
+\def_long_new:cpn{predicate_||_0:w} #1 02\scan_stop:{
+ \group_align_safe_end: 00}
+\def_new:cpn{predicate_||_1:w}{
+ \exp_after:NN \predicate_auxi:NN\int_to_roman:w-`\q
+}
+\def_new:cpn{predicate_02_0:w}\scan_stop:{ \group_align_safe_end: 00 }
+\def_new:cpn{predicate_02_1:w}\scan_stop:{ \group_align_safe_end: 01 }
+\def_long_new:Npn \predicate_not_p:n #1{
+ \if:w \predicate_p:n{#1} \c_false \else: \c_true \fi:
}
\def_new:NNn \prg_define_quicksort:nnn 3 {
\def_long:cNx{#1_quicksort:n}1{
@@ -4798,7 +5091,7 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3xref.dtx 579 2006-11-25 23:38:03Z morten $
+\GetIdInfo$Id: l3xref.dtx 621 2007-09-01 20:14:19Z morten $
{L3 Experimental cross referencing}
\prop_new:N \g_xref_all_curr_immediate_fields_plist
\prop_new:N \g_xref_all_curr_deferred_fields_plist
@@ -4882,8 +5175,6 @@
%% prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
-\GetIdInfo$Id: l3final.dtx 573 2006-08-21 20:59:37Z morten $
- {L3 Experimental final module}
\err_file_close:N\c_kernel_err_tlp
\tex_dump:D
%%