summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-08-02 23:18:13 +0000
committerKarl Berry <karl@freefriends.org>2008-08-02 23:18:13 +0000
commit81dde574dee7e20779753c076ece922cdcba0fb0 (patch)
tree6fd6b740c2e6e9fd836ecef99b265445eb8dfae0 /Master/texmf-dist/source
parent1a1b8177153694d230e0fcc3f541b242330aa067 (diff)
expl3 update (2aug08)
git-svn-id: svn://tug.org/texlive/trunk@10021 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3int.dtx19
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3num.dtx52
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3prop.dtx4
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3tlp.dtx37
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3vers.dtx6
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3xref-test.tex105
6 files changed, 78 insertions, 145 deletions
diff --git a/Master/texmf-dist/source/latex/expl3/l3int.dtx b/Master/texmf-dist/source/latex/expl3/l3int.dtx
index ccc30e7dd83..5b13df9cec4 100644
--- a/Master/texmf-dist/source/latex/expl3/l3int.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3int.dtx
@@ -1,5 +1,5 @@
% \iffalse
-%% File: l3int.dtx Copyright (C) 1990-2006 LaTeX3 project
+%% File: l3int.dtx Copyright (C) 1990-2008 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
@@ -36,7 +36,7 @@
\RequirePackage{l3names}
%</driver|package>
%\fi
-\GetIdInfo$Id: l3int.dtx 702 2007-11-27 14:21:49Z morten $
+\GetIdInfo$Id: l3int.dtx 738 2008-08-01 13:21:42Z morten $
{L3 Experimental Integer module}
%\iffalse
%<*driver>
@@ -551,7 +551,7 @@
% Setting counters is again something that I would like to make
% uniform at the moment to get a better overview.
% \begin{macrocode}
-\def_new:Npn \int_set:Nn #1#2{#1 \int_eval:w #2\scan_stop:
+\def_new:Npn \int_set:Nn #1#2{#1 \int_eval:w #2\int_eval_end:
%<*check>
\chk_local_or_pref_global:N #1
%</check>
@@ -603,14 +603,14 @@
% accessed by its number, e.g., |\count23|. Not that it should
% ever happen but\dots
% \begin{macrocode}
- \int_advance:w #1 by \int_eval:w #2\scan_stop:
+ \int_advance:w #1 by \int_eval:w #2\int_eval_end:
%<*check>
\chk_local_or_pref_global:N #1
%</check>
}
\def_new:Npn\int_add:cn{\exp_args:Nc\int_add:Nn}
\def_new:Npn \int_sub:Nn #1#2{
- \int_advance:w #1-\int_eval:w #2\scan_stop:
+ \int_advance:w #1-\int_eval:w #2\int_eval_end:
%<*check>
\chk_local_or_pref_global:N #1
%</check>
@@ -887,15 +887,18 @@
%
% \begin{macro}{\int_eval:n}
% \begin{macro}{\int_eval:w}
+% \begin{macro}{\int_eval_end:}
% Evaluating a calc expression using normal operators. Many of these
% are exactly the same as the ones in the \textsf{num} module so we
% just use them.
% \begin{macrocode}
-\let_new:NN \int_eval:n \num_eval:n
-\let_new:NN \int_eval:w \num_eval:w
+\let_new:NN \int_eval:n \num_eval:n
+\let_new:NN \int_eval:w \num_eval:w
+\let_new:NN \int_eval_end: \num_eval_end:
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\c_max_int}
% The largest number allowed is $2^{31}-1$
@@ -960,7 +963,7 @@
1)/2)
\fi:
/(#2)
- \scan_stop:
+ \int_eval_end:
}
% \end{macrocode}
% For the sake of completeness:
diff --git a/Master/texmf-dist/source/latex/expl3/l3num.dtx b/Master/texmf-dist/source/latex/expl3/l3num.dtx
index 624cd7668e5..325eef2e131 100644
--- a/Master/texmf-dist/source/latex/expl3/l3num.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3num.dtx
@@ -1,5 +1,5 @@
% \iffalse
-%% File: l3num.dtx Copyright (C) 2005-2006 Frank Mittelbach, LaTeX3 project
+%% File: l3num.dtx Copyright (C) 2005-2008 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
@@ -36,7 +36,7 @@
\RequirePackage{l3names}
%</driver|package>
%\fi
-\GetIdInfo$Id: l3num.dtx 702 2007-11-27 14:21:49Z morten $
+\GetIdInfo$Id: l3num.dtx 741 2008-08-01 13:37:16Z morten $
{L3 Experimental token numbers}
%\iffalse
%<*driver>
@@ -237,7 +237,16 @@
% \end{syntax}
% Return the numerical value of a \m{num} expression.
% \end{function}
-
+%
+% \begin{function}{%
+% \num_elt_count:n |
+% }
+% \begin{syntax}
+% "\num_elt_count:n" "{"<balanced text>"}"
+% \end{syntax}
+% Discards \m{balanced text} and puts a "+1" in the input stream. Used
+% to count elements in a token list.
+% \end{function}
%
% \subsection{Formatting a counter value}
%
@@ -316,11 +325,11 @@
% \num_eval:w |
% }
% \begin{syntax}
-% "\num_eval:w" <integer expression> "\scan_stop:"
+% "\num_eval:w" <integer expression> "\num_eval_end:"
% \end{syntax}
% Evaluates <integer expression>. The evaluation stops when an
% unexpandable token of catcode other than 12 is reached or
-% "\scan_stop:" is read. The latter is gobbled by the scanner
+% "\num_eval_end:" is read. The latter is gobbled by the scanner
% mechanism.
% \begin{texnote}
% This is the \eTeX{} primitive \tn{numexpr}.
@@ -384,6 +393,7 @@
%
% \begin{macro}{\num_value:w}
% \begin{macro}{\num_eval:w}
+% \begin{macro}{\num_eval_end:}
% \begin{macro}{\if_num:w}
% \begin{macro}{\if_num_odd:w}
% \begin{macro}{\if_case:w}
@@ -393,6 +403,7 @@
% \begin{macrocode}
\let_new:NN \num_value:w \tex_number:D
\let_new:NN \num_eval:w \etex_numexpr:D
+\let_new:NN \num_eval_end: \scan_stop:
\let_new:NN \if_num:w \tex_ifnum:D
\let_new:NN \if_num_odd:w \tex_ifodd:D
\let_new:NN \if_case:w \tex_ifcase:D
@@ -404,25 +415,6 @@
% \end{macro}
% \end{macro}
% \end{macro}
-%
-% \begin{macro}{\use_arg_after_or:w}
-% \begin{macro}{\use_arg_after_else:w}
-% \begin{macro}{\use_arg_after_fi:w}
-% When you're using the |\if_case:w| primitive it is not as easy as
-% usual to get the code to be executed past the |\or:|, |\else:| and
-% |\fi:|. If you know that there is only one token, then prefix it
-% with |\exp_after:NN|, else you can use these functions. Be sure to
-% hide any |\if| functions in the skipped text!
-%
-% All other conditionals are two way switches for which you can just
-% use the safe methods provided by the TF type functions.
-% \begin{macrocode}
-\def_long_new:Npn \use_arg_after_or:w #1\or: #2\fi:{\fi: #1}
-\def_long_new:Npn \use_arg_after_else:w #1\else: #2\fi:{\fi: #1}
-\def_long_new:Npn \use_arg_after_fi:w #1\fi:{\fi: #1}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
% \end{macro}
%
% Functions that support \LaTeX's user accessible counters should be
@@ -494,7 +486,7 @@
% This function enables us to do all the operations without the aid of
% an \m{int} register.
% \begin{macrocode}
-\def_new:Npn \num_eval:n #1{\num_eval:w #1\scan_stop:}
+\def_new:Npn \num_eval:n #1{\num_eval:w #1\num_eval_end:}
% \end{macrocode}
% \end{macro}
%
@@ -619,6 +611,16 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\num_elt_count:n}
+% \begin{macro}{\num_elt_count_prop:Nn}
+% Helper function for counting elements in a list.
+% \begin{macrocode}
+\def_long_new:Npn \num_elt_count:n #1 { + 1 }
+\def_long_new:Npn \num_elt_count_prop:Nn #1#2 { + 1 }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{\l_tmpa_num}
% \begin{macro}{\l_tmpb_num}
% \begin{macro}{\l_tmpc_num}
diff --git a/Master/texmf-dist/source/latex/expl3/l3prop.dtx b/Master/texmf-dist/source/latex/expl3/l3prop.dtx
index 22d7a7ecaeb..08aa9b4a075 100644
--- a/Master/texmf-dist/source/latex/expl3/l3prop.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3prop.dtx
@@ -1,5 +1,5 @@
% \iffalse
-%% File: l3prop.dtx Copyright (C) 1990-2006 LaTeX3 project
+%% File: l3prop.dtx Copyright (C) 1990-2008 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
@@ -36,7 +36,7 @@
\RequirePackage{l3names}
%</driver|package>
%\fi
-\GetIdInfo$Id: l3prop.dtx 668 2007-09-27 15:54:23Z mittelba $
+\GetIdInfo$Id: l3prop.dtx 742 2008-08-01 13:37:45Z morten $
{L3 Experimental Property Lists}
%\iffalse
%<*driver>
diff --git a/Master/texmf-dist/source/latex/expl3/l3tlp.dtx b/Master/texmf-dist/source/latex/expl3/l3tlp.dtx
index 8cf7b54eb5f..ae3e72abe60 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-2007 LaTeX3 project
+%% File: l3tlp.dtx Copyright (C) 1990-2008 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
@@ -36,7 +36,7 @@
\RequirePackage{l3names}
%</driver|package>
%\fi
-\GetIdInfo$Id: l3tlp.dtx 735 2008-01-14 22:31:02Z morten $
+\GetIdInfo$Id: l3tlp.dtx 740 2008-08-01 13:25:38Z morten $
{L3 Experimental Token List Pointers}
%\iffalse
%<*driver>
@@ -437,6 +437,18 @@
% token list are gobbled in the process.
% \end{function}
%
+% \begin{function}{%
+% \tlist_elt_count:n |
+% \tlp_elt_count:N |
+% }
+% \begin{syntax}
+% "\tlist_elt_count:n" "{"<token list>"}" \\
+% "\tlp_elt_count:N" <tlp>
+% \end{syntax}
+% Returns the number of elements in the token list. Brace groups
+% encountered count as one element. Note that spaces in this
+% token list are gobbled in the process.
+% \end{function}
%
%
% \subsubsection{Internal functions}
@@ -1476,6 +1488,27 @@
% \end{macro}
%
%
+% \begin{macro}{\tlist_elt_count:n}
+% \begin{macro}{\tlp_elt_count:n}
+% Count number of elements within a token list or token list
+% pointer. Brace groups within the list are read as a single
+% element.
+% "\num_elt_count:n" grabs the element and replaces it by "+1". The
+% "0" to ensure it works on an empty list.
+% \begin{macrocode}
+\def_long_new:Npn \tlist_elt_count:n #1{
+ \num_value:w \num_eval:w 0
+ \tlist_map_function:nN {#1}\num_elt_count:n
+ \num_eval_end:
+}
+\def_new:Npn \tlp_elt_count:N #1{
+ \num_value:w \num_eval:w 0
+ \tlp_map_function:NN #1 \num_elt_count:n
+ \num_eval_end:
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
%
%
%
diff --git a/Master/texmf-dist/source/latex/expl3/l3vers.dtx b/Master/texmf-dist/source/latex/expl3/l3vers.dtx
index 748c99bde33..1bd308c2970 100644
--- a/Master/texmf-dist/source/latex/expl3/l3vers.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3vers.dtx
@@ -1,5 +1,5 @@
% \iffalse
-%% File: l3vers.dtx Copyright (C) 1990-2005 LaTeX3 project
+%% File: l3vers.dtx Copyright (C) 1990-2008 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
@@ -35,7 +35,7 @@
\RequirePackage{l3names}
%</driver|package>
%\fi
-\GetIdInfo$Id: l3vers.dtx 621 2007-09-01 20:14:19Z morten $
+\GetIdInfo$Id: l3vers.dtx 743 2008-08-01 14:02:18Z morten $
{L3 Experimental LaTeX format version}
%\iffalse
%<*driver>
@@ -63,7 +63,7 @@
% \begin{macrocode}
%<*initex>
\def:Npn\c_format_name{Experimental~ LaTeX3}
-\def:Npn\c_format_date{2007/09/01}
+\def:Npn\c_format_date{2008/08/01}
%^^A\def:Npx\c_format_version{--release--date--goes--here--}
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/expl3/l3xref-test.tex b/Master/texmf-dist/source/latex/expl3/l3xref-test.tex
deleted file mode 100644
index cd58b6deb5f..00000000000
--- a/Master/texmf-dist/source/latex/expl3/l3xref-test.tex
+++ /dev/null
@@ -1,105 +0,0 @@
-%%
-%% This is file `l3xref-test.tex',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% l3xref.dtx (with options: `testfile')
-%%
-%%
-%% EXPERIMENTAL CODE
-%%
-%% Do not distribute this file without also distributing the
-%% source files specified above.
-%%
-%% Do not distribute a modified version of this file.
-%%
-%%
-%% File: l3xref.dtx Copyright (C) 2006 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
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the ``expl3 bundle'' (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/cgi-bin/cvsweb.cgi/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX Project Team.
-%%
-%% -----------------------------------------------------------------------
-\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}
-\ExplSyntaxOn
-\def:Npn \startrecording {\iow_open:Nn \xref_write {\jobname.xref}}
-\def:Npn \DefineCrossReferences {
- \group_begin:
- \NamesStart
- \InputIfFileExists{\jobname.xref}{}{}
- \group_end:
-}
-\AtBeginDocument{\DefineCrossReferences\startrecording}
-
-\xref_new:nn {name}{}
-\def:Npn \setname{\tlp_set:Nn\l_xref_curr_name_tlp}
-\def:Npn \getname{\xref_get_value:nn{name}}
-
-\xref_deferred_new:nn {page}{\thepage}
-\def:Npn \getpage{\xref_get_value:nn{page}}
-
-\xref_deferred_new:nn {valuepage}{\number\value{page}}
-\def:Npn \getvaluepage{\xref_get_value:nn{valuepage}}
-
-\let:NN \setlabel \xref_set_label:n
-
-\ExplSyntaxOff
-\begin{document}
-\pagenumbering{roman}
-
-Text\setname{This is a name}\setlabel{testlabel1}. More
-text\setname{This is another name}\setlabel{testlabel2}. \clearpage
-
-Text\setname{This is a third name}\setlabel{testlabel3}. More
-text\setname{Hello World!}\setlabel{testlabel4}. \clearpage
-
-\pagenumbering{arabic}
-
-Text\setname{Name 5}\setlabel{testlabel5}. More text\setname{Name
- 6}\setlabel{testlabel6}. \clearpage
-
-Text\setname{Name 7}\setlabel{testlabel 7}. More text\setname{Name
- 8}\setlabel{testlabel8}. \clearpage
-
-Now let's extract some values. \getname{testlabel1} on page
-\getpage{testlabel1} with value \getvaluepage{testlabel1}.
-
-Now let's extract some values. \getname{testlabel 7} on page
-\getpage{testlabel 7} with value \getvaluepage{testlabel 7}.
-\end{document}
-%%
-%%
-%% End of file `l3xref-test.tex'.