summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-01-26 23:21:07 +0000
committerKarl Berry <karl@freefriends.org>2011-01-26 23:21:07 +0000
commit60e55e3300d53b2692b076e1eed63de0d390f50d (patch)
tree6d53c921426d4ec5dd3b18e0e656d82df2e003e6 /Master
parentb47db3c140fe93b5deb16f3a7ad16be2134e81e7 (diff)
expl3 2138 (26jan11)
git-svn-id: svn://tug.org/texlive/trunk@21185 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/expl3/expl3.pdfbin512728 -> 512725 bytes
-rw-r--r--Master/texmf-dist/doc/latex/expl3/l3calc.pdfbin377232 -> 461759 bytes
-rw-r--r--Master/texmf-dist/doc/latex/expl3/source3.pdfbin1568303 -> 2213356 bytes
-rw-r--r--Master/texmf-dist/source/latex/expl3/interface3.tex (renamed from Master/texmf-dist/doc/latex/expl3/interface3.tex)0
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3.ins120
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3candidates.dtx156
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3format.ins83
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3fp.dtx2
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3tl.dtx12
-rw-r--r--Master/texmf-dist/source/latex/expl3/source3.tex (renamed from Master/texmf-dist/doc/latex/expl3/source3.tex)0
-rw-r--r--Master/texmf-dist/source/latex/expl3/source3body.tex (renamed from Master/texmf-dist/doc/latex/expl3/source3body.tex)0
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3fp.sty2
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3tl.sty12
13 files changed, 299 insertions, 88 deletions
diff --git a/Master/texmf-dist/doc/latex/expl3/expl3.pdf b/Master/texmf-dist/doc/latex/expl3/expl3.pdf
index 6fb8cadd754..1c079761cf7 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/l3calc.pdf b/Master/texmf-dist/doc/latex/expl3/l3calc.pdf
index 477a2f0412f..49e994124a6 100644
--- a/Master/texmf-dist/doc/latex/expl3/l3calc.pdf
+++ b/Master/texmf-dist/doc/latex/expl3/l3calc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/expl3/source3.pdf b/Master/texmf-dist/doc/latex/expl3/source3.pdf
index f644a02e66e..5f95838412d 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/interface3.tex b/Master/texmf-dist/source/latex/expl3/interface3.tex
index cb2d3d88335..cb2d3d88335 100644
--- a/Master/texmf-dist/doc/latex/expl3/interface3.tex
+++ b/Master/texmf-dist/source/latex/expl3/interface3.tex
diff --git a/Master/texmf-dist/source/latex/expl3/l3.ins b/Master/texmf-dist/source/latex/expl3/l3.ins
new file mode 100644
index 00000000000..91288ab8004
--- /dev/null
+++ b/Master/texmf-dist/source/latex/expl3/l3.ins
@@ -0,0 +1,120 @@
+
+\input docstrip.tex
+\askforoverwritefalse
+
+\preamble
+
+
+EXPERIMENTAL CODE
+
+Do not distribute this file without also distributing the
+source files specified above.
+
+Do not distribute a modified version of this file.
+
+
+\endpreamble
+% stop docstrip adding \endinput
+\postamble
+\endpostamble
+
+\keepsilent
+
+% wrapper package for the expl3 bundle
+\generate{\file{expl3.sty}{\from{expl3.dtx}{package}}}
+
+
+% l3names.sty sets up the naming scheme for TeX primitives.
+\generate{\file{l3names.sty}{\from{l3names.dtx}{package}}}
+
+
+
+% Define some basic commands to get us started with the new
+% programming style.
+\generate{\file{l3basics.sty}{\from{l3basics.dtx}{package,trace}}}
+
+
+% Define some basic commands that check various conditions
+% related to defining commands eg defined/undefined global/local
+% Not sure how much of this really makes sense as a package, but...
+\generate{\file{l3chk.sty}{\from{l3chk.dtx}{package,trace}}}
+
+
+%% toks register handling (can be compiled with check module)
+\generate{\file{l3toks.sty}{\from{l3toks.dtx}{package,trace}}}
+
+
+%% token lists
+\generate{\file{l3tl.sty}{\from{l3tl.dtx}{package,trace}}}
+
+
+%% LaTeX3 expansion module
+\generate{\file{l3expan.sty}{\from{l3expan.dtx}{package,trace}}}
+
+
+%% LaTeX3 quarks.
+\generate{\file{l3quark.sty}{\from{l3quark.dtx}{package,trace}}}
+
+
+%% LaTeX3 sequences.
+\generate{\file{l3seq.sty}{\from{l3seq.dtx}{package,trace}}}
+
+
+%% LaTeX3 clists.
+\generate{\file{l3clist.sty}{\from{l3clist.dtx}{package,trace}}}
+
+
+%% LaTeX3 property lists.
+\generate{\file{l3prop.sty}{\from{l3prop.dtx}{package,trace}}}
+
+
+%% LaTeX3 fake integer macros. --- this is still needed in places such as xor !!!
+\generate{\file{l3num.sty}{\from{l3num.dtx}{package,trace}}}
+
+%% LaTeX3 integer registers. (can be compiled with check module)
+\generate{\file{l3int.sty}{\from{l3int.dtx}{package,trace}}}
+
+%% LaTeX3 skip registers.
+\generate{\file{l3skip.sty}{\from{l3skip.dtx}{package,trace}}}
+
+
+%% LaTeX3 precompilation
+\generate{\file{l3precom.sty}{\from{l3precom.dtx}{package,precompile,trace}}}
+
+%% LaTeX3 I/O module.
+\generate{\file{l3io.sty}{\from{l3io.dtx}{package,trace}}}
+
+%% LaTeX3 program control structures (loops, booleans, ...)
+\generate{\file{l3prg.sty}{\from{l3prg.dtx}{package}}}
+
+%% LaTeX3 box module
+\generate{\file{l3box.sty}{\from{l3box.dtx}{package}}}
+
+%% LaTeX3 messages
+\generate{\file{l3msg.sty}{\from{l3msg.dtx}{package}}}
+
+%% LaTeX3 tokens
+\generate{\file{l3token.sty}{\from{l3token.dtx}{package}}}
+
+%% LaTeX3 cross references
+\generate{\file{l3xref.sty}{\from{l3xref.dtx}{package}}}
+%%\generate{\file{l3xref-test.tex}{\from{l3xref.dtx}{testfile}}}
+
+%% LaTeX3 calc module
+\generate{\file{l3calc.sty}{\from{l3calc.dtx}{package}}}
+
+%% LaTeX3 keyval modules
+\generate{\file{l3keyval.sty}{\from{l3keyval.dtx}{package}}}
+\generate{\file{l3keys.sty}{\from{l3keys.dtx}{package}}}
+
+%% LaTeX3 file loading
+\generate{\file{l3file.sty}{\from{l3file.dtx}{package}}}
+
+%% LaTeX3 floating point unit
+\generate{\file{l3fp.sty}{\from{l3fp.dtx}{package}}}
+
+%% LaTeX3 LuaTeX support
+\generate{\file{l3luatex.sty}{\from{l3luatex.dtx}{package}}}
+
+
+\endbatchfile
diff --git a/Master/texmf-dist/source/latex/expl3/l3candidates.dtx b/Master/texmf-dist/source/latex/expl3/l3candidates.dtx
index 98b6fdd6aff..4062f8828c6 100644
--- a/Master/texmf-dist/source/latex/expl3/l3candidates.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3candidates.dtx
@@ -37,7 +37,7 @@
%</driver|package>
%\fi
\errorcontextlines=999
-\GetIdInfo$Id: l3candidates.dtx 2063 2010-10-03 08:26:49Z mittelba $
+\GetIdInfo$Id: l3candidates.dtx 2137 2011-01-23 23:13:58Z will $
{L3 Experimental 'extras' module}
%\iffalse
%<*driver>
@@ -116,35 +116,6 @@
% \end{function}
%
%
-% \begin{function}{\tl_transform:nn|\char_transform:NN}
-% \begin{syntax}
-% |\tl_transform:nn| \Arg{tranformation rules} \Arg{token list}
-% "\char_transform:NN" <char.\ token1> <char.\ token2>
-% \end{syntax}
-% Tokenises and evaluates <token list> according to the transformation rules
-% given in the first argument.
-% These transformation rules may be function/variable
-% redefinitions, catcode changes (see "\char_make_other:N" and so on), or
-% token transformations given by "\char_transform:NN".
-%
-% "\char_transform:NN" declares that within the <token list> argument,
-% any occurences of <token1> are interpreted as if they were <token2> albeit
-% with the same catcode as <token1>.
-%
-% Note 1: Everything evaluated by this function occurs within a group;
-% global definitions will be necessary to make changes outside of it.
-%
-% Note 2: Because this function must be invoked before its arguments are
-% tokenised, it cannot be evaluated within another macro (unless clever use
-% of "\tl_rescan:nn" is employed).
-% \begin{texnote}
-% This is a wrapper around \TeX's "\lowercase" primitive and only the ASCII
-% uppercase letters are protected from being transformed themselves.
-% If you are using Xe\TeX\ or Lua\TeX, be careful of unicode letters that will
-% be affected by this process.
-% \end{texnote}
-% \end{function}
-%
% \section{Functions for sequences}
%
%
@@ -221,6 +192,27 @@
%
%
%
+% \begin{function}{\clist_length:N / (EXP)|\clist_length:n / (EXP)}
+% \begin{syntax}
+% "\clist_length:N" <clist>
+% \end{syntax}
+% Expands to the number of elements in the <clist>.
+% \end{function}
+%
+% \begin{function}{\clist_element:Nn / (EXP)|\clist_element:nn / (EXP)}
+% \begin{syntax}
+% "\clist_element:Nn" <clist> \Arg{i}
+% "\clist_element:nn" |{| <c0>|,| <c1>|,|\dots|,| <c$_{n-\1}$>|,| <c$_n$> |}| \Arg{i}
+% "\clist_element:nn" |{| <c$_{-n-\1}$>|,| <c$_{-n}$>|,|\dots|,| <c$_{-\2}$>|,| <c$_{-\1}$> |}| \Arg{i}
+% \end{syntax}
+% Expands to <c$_i$>, the <i>-th element of the <clist>.
+% The indexing counts from zero, and negative indices count from the end.
+% (Negative indexing is slightly less efficent since the length of the list
+% must first be calculated.)
+% \end{function}
+%
+%
+%
% \end{documentation}
%
% \begin{implementation}
@@ -288,48 +280,6 @@
%
%
%
-% \begin{macro}{\tl_transform:nn,\char_transform:NN}
-% \begin{macrocode}
-\cs_new:Npn \tl_transform:nn #1
- {
- \group_begin:
- \tl_map_function:nN
- { \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z }
- \char_protect_uppercase:N
- \cs_set_eq:NN \char_transform:NN \char_transform_hidden:NN
- #1
- \tl_transform_aux:n
- }
-% \end{macrocode}
-% Allow for catcode changes:
-% \begin{macrocode}
-\cs_new:Npn \tl_transform_aux:n #1
- {
- \tl_to_lowercase:n { \group_end: #1 }
- }
-\cs_set:Npn \char_protect_uppercase:N #1
- {
- \char_set_lccode:nn {`#1} {`#1}
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\cs_new:Npn \char_transform_hidden:NN #1#2
- {
- \char_set_lccode:nn {`#1} {`#2}
- }
-\cs_new:Npn \char_transform:NN
- {
- \msg_error:nn {l3prg} {naked-char-transform}
- }
-\msg_new:nnn {l3prg} {naked-char-transform}
- {
- This command can only appear within the first\\
- argument of \string\tl_transform:nn.
- }
-% \end{macrocode}
-% \end{macro}
-%
%
% \begin{macro}{\seq_mapthread_function:NNN}
% \begin{macrocode}
@@ -444,6 +394,68 @@
% \end{macro}
%
%
+%
+% \begin{macro}{\clist_length:N,\clist_length:n}
+% \begin{macrocode}
+\cs_new:Npn \clist_length:N {
+ \exp_args:No \clist_length:n
+}
+\cs_new:Npn \clist_length:n #1 {
+ \int_eval:n {
+ 0 \clist_map_function:nN {#1} \tl_elt_count_aux:n
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\clist_element:Nn,\clist_element:nn}
+% \begin{macrocode}
+\cs_new:Npn \clist_element:Nn #1 {
+ \exp_args:No \clist_element:nn #1
+}
+\cs_new:Npn \clist_element:nn #1#2 {
+% \end{macrocode}
+% When negative indexing is used, calculate the length and subtract.
+% This incurs a minor performance penalty, of course, but it's nothing to
+% worry about.
+% \begin{macrocode}
+ \int_compare:nNnTF {#2} < {0}
+ {
+ \exp_args:Nf \clist_element_aux:nw
+ {\clist_length:n {#1}+#2} #1 , \q_recursion_tail , \q_recursion_stop
+ }
+ {
+ \clist_element_aux:nw {#2} #1 , \q_recursion_tail , \q_recursion_stop
+ }
+% \end{macrocode}
+% Shorter but less readable version of the code block above:
+% \begin{verbatim}
+% \exp_args:Nf \clist_element_aux:nnw
+% { #2 \int_compare:nNnT {#2} < {0} { +\clist_length:n {#1} } }
+% #1 , \q_recursion_tail , \q_recursion_stop
+% \end{verbatim}
+% Note in both cases I've used |\exp_args:Nf| directly, since I'm starting
+% to think that adding too many control sequences is bad for \TeX's
+% performance.
+% \begin{macrocode}
+}
+\cs_new:Npn \clist_element_aux:nw #1#2, {
+ \quark_if_recursion_tail_stop:n {#2}
+ \int_compare:nNnTF {#1} = {0}
+ {
+ \use_i_delimit_by_q_recursion_stop:nw {#2}
+ }
+ {
+ \clist_element_aux:nw {#1-1}
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/expl3/l3format.ins b/Master/texmf-dist/source/latex/expl3/l3format.ins
new file mode 100644
index 00000000000..5fb4d549050
--- /dev/null
+++ b/Master/texmf-dist/source/latex/expl3/l3format.ins
@@ -0,0 +1,83 @@
+
+\input docstrip.tex
+\askforoverwritefalse
+
+\preamble
+
+
+EXPERIMENTAL CODE
+
+Do not distribute this file without also distributing the
+source files specified above.
+
+Do not distribute a modified version of this file.
+
+
+\endpreamble
+% stop docstrip adding \endinput
+\postamble
+\endpostamble
+
+\keepsilent
+
+% generate the format file
+\generate{%
+ \file{latex3.ltx}{%
+ \from{l3names.dtx}{initex} % The naming conventions
+ \from{l3basics.dtx}{initex} % Initialisations
+ \from{l3expan.dtx}{initex} % Controlling expansion of arguments
+ \from{l3tl.dtx}{initex} % token list variables
+ \from{l3intexpr.dtx}{initex} %
+ \from{l3quark.dtx}{initex} % quarks
+ \from{l3seq.dtx}{initex} % Sequences and stacks
+%
+ \from{l3alloc.dtx}{initex} % Register allocations
+%
+ \from{l3toks.dtx}{initex} % dealing with token registers
+ \from{l3int.dtx}{initex} % dealing with integer registers
+ \from{l3prg.dtx}{initex} % Program control structures
+ \from{l3clist.dtx}{initex} % Comma separated lists
+ \from{l3token.dtx}{initex} % token investigation
+ \from{l3prop.dtx}{initex} % property lists
+ \from{l3msg.dtx}{initex} % setting up for user communication
+ \from{l3io.dtx}{initex} % dealing with I/O
+ \from{l3skip.dtx}{initex} % dealing with skip registers
+ \from{l3box.dtx}{initex} % dealing with box registers
+ \from{l3keyval.dtx}{initex} %
+ \from{l3keys.dtx}{initex} %
+ \from{l3fp.dtx}{initex} %
+ \from{l3luatex.dtx}{initex} %
+%
+% \from{l3precom.dtx}{initex,precompile} %
+%
+ \from{l3calc.dtx}{initex} %
+ \from{l3xref.dtx}{initex} % Cross references
+ \from{l3file.dtx}{initex} % file loading
+%
+ \from{l3vers.dtx}{initex} % Version information
+%
+%
+% \from{l3chk.dtx}{initex} % Checking functions
+%
+ \from{l3final.dtx}{initex} % Final wrap-up
+ }
+}
+
+% generate higher-level material
+\generate{%
+ \file{xparse.ltx}{\from{xparse.dtx}{initex}}
+ \file{xtemplate.ltx}{\from{xtemplate.dtx}{initex}}
+}
+
+\Msg{}
+\Msg{*************************************}
+\Msg{*}
+\Msg{* Now run (PDF)INITEX on lbase.ltx}
+\Msg{*}
+\Msg{* On an up to date system, run }
+\Msg{* pdftex -ini -etex *latex3.ltx }
+\Msg{*}
+\Msg{*************************************}
+\Msg{}
+
+\endbatchfile
diff --git a/Master/texmf-dist/source/latex/expl3/l3fp.dtx b/Master/texmf-dist/source/latex/expl3/l3fp.dtx
index 7251d1af935..a6fb183db8c 100644
--- a/Master/texmf-dist/source/latex/expl3/l3fp.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3fp.dtx
@@ -35,7 +35,7 @@
\RequirePackage{l3names}
%</driver|package>
%\fi
-\GetIdInfo$Id: l3fp.dtx 2128 2011-01-10 22:44:33Z joseph $
+\GetIdInfo$Id: l3fp.dtx 2129 2011-01-10 22:58:48Z joseph $
{L3 Experimental floating-point operations}
%\iffalse
%<*driver>
diff --git a/Master/texmf-dist/source/latex/expl3/l3tl.dtx b/Master/texmf-dist/source/latex/expl3/l3tl.dtx
index b436be36ab5..00ab46f152d 100644
--- a/Master/texmf-dist/source/latex/expl3/l3tl.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3tl.dtx
@@ -36,7 +36,7 @@
\RequirePackage{l3names}
%</driver|package>
%\fi
-\GetIdInfo$Id: l3tl.dtx 2103 2010-12-18 07:40:03Z joseph $
+\GetIdInfo$Id: l3tl.dtx 2138 2011-01-26 08:15:27Z joseph $
{L3 Experimental Token Lists}
%\iffalse
%<*driver>
@@ -1475,13 +1475,11 @@
% \begin{macrocode}
\prg_new_conditional:Nnn \tl_if_single:N {p,TF,T,F} {
\tl_if_empty:NTF #1
- {\prg_return_false:}
+ { \prg_return_false: }
{
- \exp_after:wN \tl_if_blank:nTF #1
- {\prg_return_true:}
- {
- \exp_after:wN \_tl_if_single_aux:w #1 \q_stop
- }
+ \tl_if_blank:oTF {#1}
+ { \prg_return_true: }
+ { \exp_after:wN \_tl_if_single_aux:w #1 \q_stop }
}
}
% \end{macrocode}
diff --git a/Master/texmf-dist/doc/latex/expl3/source3.tex b/Master/texmf-dist/source/latex/expl3/source3.tex
index 74199936ca1..74199936ca1 100644
--- a/Master/texmf-dist/doc/latex/expl3/source3.tex
+++ b/Master/texmf-dist/source/latex/expl3/source3.tex
diff --git a/Master/texmf-dist/doc/latex/expl3/source3body.tex b/Master/texmf-dist/source/latex/expl3/source3body.tex
index 017efe6530c..017efe6530c 100644
--- a/Master/texmf-dist/doc/latex/expl3/source3body.tex
+++ b/Master/texmf-dist/source/latex/expl3/source3body.tex
diff --git a/Master/texmf-dist/tex/latex/expl3/l3fp.sty b/Master/texmf-dist/tex/latex/expl3/l3fp.sty
index 73dac125835..6ac5741afb0 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3fp.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3fp.sty
@@ -48,7 +48,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3fp.dtx 2128 2011-01-10 22:44:33Z joseph $
+\GetIdInfo$Id: l3fp.dtx 2129 2011-01-10 22:58:48Z joseph $
{L3 Experimental floating-point operations}
\ProvidesExplPackage
{\filename}{\filedate}{\fileversion}{\filedescription}
diff --git a/Master/texmf-dist/tex/latex/expl3/l3tl.sty b/Master/texmf-dist/tex/latex/expl3/l3tl.sty
index cd8125b8d1b..e334d246130 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3tl.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3tl.sty
@@ -48,7 +48,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3tl.dtx 2103 2010-12-18 07:40:03Z joseph $
+\GetIdInfo$Id: l3tl.dtx 2138 2011-01-26 08:15:27Z joseph $
{L3 Experimental Token Lists}
\ProvidesExplPackage
{\filename}{\filedate}{\fileversion}{\filedescription}
@@ -282,13 +282,11 @@
}
\prg_new_conditional:Nnn \tl_if_single:N {p,TF,T,F} {
\tl_if_empty:NTF #1
- {\prg_return_false:}
+ { \prg_return_false: }
{
- \exp_after:wN \tl_if_blank:nTF #1
- {\prg_return_true:}
- {
- \exp_after:wN \_tl_if_single_aux:w #1 \q_stop
- }
+ \tl_if_blank:oTF {#1}
+ { \prg_return_true: }
+ { \exp_after:wN \_tl_if_single_aux:w #1 \q_stop }
}
}
\cs_new:Npn \_tl_if_single_aux:w #1#2 \q_stop {