summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/expl3
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-05-22 17:46:23 +0000
committerKarl Berry <karl@freefriends.org>2007-05-22 17:46:23 +0000
commitf4eb27d3314d15838f674a3872000159d029f88b (patch)
tree6e9ab33c5a2d702912b4a969ade4e4e2ac586d62 /Master/texmf-dist/doc/latex/expl3
parent14af3f447439750920f754792b89f113d019076a (diff)
update expl3
git-svn-id: svn://tug.org/texlive/trunk@4335 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/expl3')
-rw-r--r--Master/texmf-dist/doc/latex/expl3/ChangeLog.fmi13
l---------Master/texmf-dist/doc/latex/expl3/README1
-rw-r--r--Master/texmf-dist/doc/latex/expl3/expl3.dvibin37848 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/expl3/expl3.pdfbin0 -> 161313 bytes
-rw-r--r--Master/texmf-dist/doc/latex/expl3/expl3.tex5
-rw-r--r--Master/texmf-dist/doc/latex/expl3/l32eproc.pdfbin0 -> 112902 bytes
-rw-r--r--Master/texmf-dist/doc/latex/expl3/l32eproc.tex523
-rw-r--r--Master/texmf-dist/doc/latex/expl3/l3xref-test.tex107
-rw-r--r--Master/texmf-dist/doc/latex/expl3/lbase.ini65
-rw-r--r--Master/texmf-dist/doc/latex/expl3/lbase.ltx4891
-rw-r--r--Master/texmf-dist/doc/latex/expl3/readme.txt330
-rw-r--r--Master/texmf-dist/doc/latex/expl3/source3.pdfbin0 -> 439909 bytes
-rw-r--r--Master/texmf-dist/doc/latex/expl3/source3.tex397
-rw-r--r--Master/texmf-dist/doc/latex/expl3/test1.dvibin308 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/expl3/test1.tex44
-rw-r--r--Master/texmf-dist/doc/latex/expl3/test2.tex42
-rw-r--r--Master/texmf-dist/doc/latex/expl3/test3.dvibin308 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/expl3/test3.tex35
18 files changed, 6449 insertions, 4 deletions
diff --git a/Master/texmf-dist/doc/latex/expl3/ChangeLog.fmi b/Master/texmf-dist/doc/latex/expl3/ChangeLog.fmi
new file mode 100644
index 00000000000..5257f0f1092
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/expl3/ChangeLog.fmi
@@ -0,0 +1,13 @@
+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/README b/Master/texmf-dist/doc/latex/expl3/README
new file mode 120000
index 00000000000..0d79d56d9fb
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/expl3/README
@@ -0,0 +1 @@
+readme.txt \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/expl3/expl3.dvi b/Master/texmf-dist/doc/latex/expl3/expl3.dvi
deleted file mode 100644
index 955569b3d36..00000000000
--- a/Master/texmf-dist/doc/latex/expl3/expl3.dvi
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/expl3/expl3.pdf b/Master/texmf-dist/doc/latex/expl3/expl3.pdf
new file mode 100644
index 00000000000..f1724b88d1e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/expl3/expl3.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/expl3/expl3.tex b/Master/texmf-dist/doc/latex/expl3/expl3.tex
index 2dda01b6c3d..8d9e1880667 100644
--- a/Master/texmf-dist/doc/latex/expl3/expl3.tex
+++ b/Master/texmf-dist/doc/latex/expl3/expl3.tex
@@ -2,9 +2,8 @@
% based on version for the TUGboat proceedings
% Copyright 1997--98 David Carlisle, Chris Rowley, Frank Mittelbach
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% $Id: expl3.tex 246 2004-11-11 08:20:37Z mittelba $
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\usepackage{shortvrb}
diff --git a/Master/texmf-dist/doc/latex/expl3/l32eproc.pdf b/Master/texmf-dist/doc/latex/expl3/l32eproc.pdf
new file mode 100644
index 00000000000..ea0168b10a3
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/expl3/l32eproc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/expl3/l32eproc.tex b/Master/texmf-dist/doc/latex/expl3/l32eproc.tex
new file mode 100644
index 00000000000..d560c0c2338
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/expl3/l32eproc.tex
@@ -0,0 +1,523 @@
+\documentclass
+ {ltugproc}
+% {ltxguide}
+
+\usepackage{shortvrb}
+\MakeShortVerb{\|}
+\setlength\hfuzz{10pt}
+
+% A couple of \provide.. so document runs with
+% both ltugproc and ltxguide classes
+%
+\providecommand\m[1]{$\langle$\textit{#1}$\rangle$}
+\providecommand\netaddress{\date}
+\providecommand\acro[1]{\textsc{\MakeLowercase{#1}}}
+
+\begin{document}
+\title{The \LaTeX3 Programming Language\\
+A syntax proposal for \TeX\ macro programming}
+
+
+\author{The \LaTeX3 Project}
+\netaddress{latex-l@urz.uni-heidelberg.de}
+
+
+
+\begin{abstract}
+This paper proposes a new set of programming conventions suitable for
+implementing large scale \TeX\ programming projects such as \LaTeX.
+(This syntax is not suitable for either document
+markup, or as a style specification language.)
+
+The main features include a systematic naming scheme for all commands,
+and a systematic mechanism for controlling the expansion of arguments
+to functions.
+
+The syntax is under consideration as a basis for programming within
+the \LaTeX3 project.
+
+This paper is based on a talk given by David
+Carlisle but describes the work of several people, principally:
+ Frank Mittelbach,
+ Denys Duchier,
+ Rainer Sch\"opf,
+ Chris Rowley,
+ Michael Downes,
+ Johannes Braams,
+ David Carlisle and
+ Alan Jeffrey.
+\end{abstract}
+
+\maketitle
+
+
+\section{Introduction}
+This paper describes a \TeX\ based language which is intended to
+provide a more consistent and rational programming environment for the
+construction of large scale \TeX\ macro projects such as \LaTeX.
+
+Variants of this language have been in use within the \LaTeX3 project
+since around 1990 but the syntax specification to be outlined here
+should \emph{not} be considered final. This is an experimental
+language, and the syntax and command names may (and probably will)
+change as more experience is gained with using the language in
+practice.
+
+\section{Programming Interface levels for \LaTeX}
+
+One may identify several distinct languages that one might want to see
+in a \TeX\ based system. This paper will \emph{only} be concerned with
+the last of these three.
+
+\begin{description}
+\item[Document Markup] This language consists of the commands that are
+ to be embedded in the document instance. It is generally accepted
+ that such a language should be essentially \emph{declarative}.
+ One might consider a traditional \TeX\ based markup such as the
+ \LaTeX2 markup as described in \cite{A-W:LLa94}, or alternatively one
+ might consider an \acro{SGML} based markup.
+
+ One problem with more traditional \TeX\ coding conventions is that
+ the command names and syntax of the \TeX\ primitives are designed to
+ have a `natural' syntax when used directly by the author as document
+ markup. In fact one almost never uses the primitives in this
+ way, rather they are just used to define higher level commands.
+
+\item[Designer's Interface] In order to easily translate a (human)
+ designer's design specification into a program that accepts the
+ document instance one would ideally like to have a declarative
+ language that allows the relationships and spacing rules of the
+ various document elements to be easily expressed. As this language
+ is not embedded within the document text, it may take a rather
+ different form to the markup language described above. For
+ \acro{SGML} based systems one may consider the \acro{DSSSL} language
+ as playing this role. For \LaTeX2, then this level was essentially
+ missing in \LaTeX2.09. \LaTeXe\ made some improvements in this area
+ but it is still the case that implementing a design specification in
+ \LaTeX\ requires more `low level' coding than would be desired.
+\item[Programmer's Interface]
+ This language, the subject of this paper, is the implementation
+ language in which the basic typesetting functionality is
+ implemented, building upon the primitives supplied by \TeX\ (or a
+ successor program). It may also be used to implement the previous
+ two languages `within' \TeX, as in the current \LaTeX\ system.
+\end{description}
+
+
+\section{Programming language: Main Features}
+
+The language outlined in this paper aims to provide a suitable
+base for coding large (and small) scale projects in \TeX.
+Its main distinguishing features are the following.
+\begin{itemize}
+\item Consistent naming scheme for all functions, including \TeX\
+ primitives.
+\item Standard mechanisms for controlling argument expansion.
+\item Provision of sufficiently rich set of core functions for
+ handling programming constructs such as:
+ sequences, sets, stacks, property lists, etc.
+\item White space ignored.
+\end{itemize}
+
+\section{Naming Scheme}
+
+The name space is divided between \emph{Functions} and
+\emph{Parameters}. Functions (normally) take arguments and are
+executed, Parameters are usually passed as arguments to functions.
+They are not directly executed, but accessed though accessor functions.
+
+Functions and parameters associated with a similar function (for
+example accessing counters, or manipulating lists, etc.) are arranged
+into \emph{modules}. Before giving the details of the form of the
+command names, we give a few examples.
+
+|\l_tmpa_box| is a local parameter (hence the |l_| prefix)
+corresponding to a box register.
+
+|\g_tmpa_box| is a global parameter (hence the |g_| prefix)
+corresponding to a box register.
+
+|\c_one| is the constant (|c_|) parameter with value one.
+
+|\cnt_add:Nn| is the function which adds the value specified by
+its second argument to the count register specified by its first
+argument. The different natures of the two arguments are indicated by
+the |:Nn| suffix. The first argument must be a single token specifying
+the name of the count parameter. Such single token arguments are
+denoted |N|. The second argument is a normal \TeX\ `non-delimited
+argument' which may either be a single token, or a brace delimited
+token list containing an expression for the value to be added.
+The |n| denotes such `normal' argument forms.
+
+|\cnt_add:cn| is similar to the above, but in this case the the
+counter is specified in the first argument by a list of tokens that
+expands to the \emph{name} of the count parameter.
+
+These examples should give the basic flavour of the scheme. Parameters
+are classified into local, global or constant (there are further more
+technical cases in addition to these three) and this access type is
+shown by |\l_|, |\g_| or |\c_|. Functions are arranged by
+\emph{module} (The |cnt| module in these cases) with a descriptive
+name followed by an indication of the type of argument to be passed.
+
+In more detail the specification of the names is as follows.
+
+Functions have the following general syntax:
+ \begin{quote}
+ |\|\m{module}|_|\m{description}|:|\m{arg-spec}
+ \end{quote}
+ The programmer can chose an arbitrary \m{module} name (consisting
+ of letters only) a group of functions with related functionality are
+ then all given names prefixed by this module name. The \m{description}
+ is a description of the functionality of the function, and should
+ consist of letters, and possibly |_| characters. \m{arg-spec}
+ describes the type of arguments as will be described below.
+
+The syntax of parameters is as follows:
+ \begin{quote}
+ |\|\m{access}|_|\m{module}|_|\m{description}|_|\m{type}
+ \end{quote}
+ \m{access} describes how the parameter can be accessed. The
+ principal access types are \emph{constant}, \emph{local} or
+ \emph{global}. As described below, some special access types relate
+ to \TeX\ primitive parameters. The meanings of \m{module} and
+ \m{description} in the parameter syntax is the same as that for
+ functions. Finally \m{type} should denote the type of parameter,
+ such as |cnt| for count registers, etc.
+
+
+
+Typical \m{module} names in the kernel include |cnt| for integer count
+related functions, |seq| for functions relating to sequences, |box|,
+etc. Normally additional packages adding new functionality would add
+new modules as needed.
+
+The \m{description} is an arbitrary name for the function or
+parameter, consisting of letters, or the |_| character.
+
+Function names always end with an \m{arg-spec} after a final colon.
+This gives an indication of the types of argument that a function
+takes, and provides a convenient method of naming similar functions
+that just differ by their argument forms, as will be explained below.
+
+The \m{arg-spec} consists of a (possibly empty) list of characters
+each denoting one argument that the function takes. It is important to
+note that `argument' here refers to the conceptual argument of the
+function.
+The top level \TeX\ macro that has this name typically has no
+arguments. This is similar to the existing \LaTeX\ convention where one
+says that |\section| has an optional argument and a mandatory
+argument, whereas the \TeX\ macro |\section| actually takes no
+parameters at the \TeX\ level, it merely calls some standard \LaTeX\
+internal functions which look ahead for star forms and optional
+arguments. The list of possible argument specifiers includes:
+\begin{description}
+\item[n] Unexpanded token (or token-list if in braces). In other words
+ this is a standard \TeX\ undelimited macro argument.
+\item[o] One time expanded token or token-list. In the case of a token
+ list then only the first token in the list is expanded.
+\item[x] Fully expanded token or token-list. Typically this means that
+ the argument is expanded in the style of |\edef| (|\def:Npx|) before
+ being passed to the function.
+\item[c] A character string used (after expansion) as a command name.
+ The argument (a token or braced token list) should expand to a
+ sequence of characters which is then used to construct a command
+ name (via |\csname|, |\cs:w|). This command token is passed as the
+ argument to the function.
+ \item[N] A single token. (Unlike |n|, this argument must not be
+ surrounded by braces). A typical example of a command taking an N
+ argument is |\def|, in which the command being defined must be
+ unbraced.
+ \item[O] Single unbraced token that is expanded once and passed (as a
+ braced token list) to the function.
+ \item[X] Single unbraced token that is fully expanded and passed (as a
+ braced token list) to the function.
+ \item[C] A character string used as for |c| arguments but the
+ resulting command token is then expanded (as for |O|) and the
+ result passed as a braced token list to the function.
+ \item[p] A primitive \TeX\ parameter specification. This can be
+ something simple like |#1#2#3| but may be arbitrary delimited
+ argument syntax, such as |#1,#2\q_stop#3|.
+ \item[T, F] These are special cases of |n| arguments, used as the
+ true and false cases in conditional tests.
+ \item[D] `Do not use'. This special case is used for \TeX\ primitives
+ that are only used while bootstrapping the \LaTeX\ kernel. If the
+ \TeX\ primitive needs to be used in other contexts it will be given
+ an alternative name with a more appropriate argument specification.
+ \item[w] `weird' syntax. Used for arguments that take non standard
+ forms, usually delimited arguments that are needed internally to
+ implement certain modules, and also the boolean tests of many of the
+ primitive |\if|\ldots\ tests.
+\end{description}
+
+
+For parameters, the \m{type} should be from the list of available
+data types (which include the primitive \TeX\ registers, but also
+data types built within the system).
+
+Possible values for \m{type} include:
+\begin{description}
+\item[cnt] Integer valued counter.
+\item[toks] Token register.
+\item[box] Box register.
+\item[fcnt] `Fake' count register. A data type supplied by the kernel
+ to avoid problems with the limited number of available count
+ registers in (standard) \TeX.
+\end{description}
+
+The \m{access} codes that are used in parameter names include
+\begin{description}
+\item[c] Constants.
+\item[l] Parameters that should only be set locally.
+\item[g] Parameters that should only be set globally.
+\end{description}
+
+\section{Checking Parameter assignments}
+One of the advantages of having a consistent scheme is that the system
+can provide more extensive error checking and debugging facilities.
+For example a function that makes a global assignment can check that
+it is not passed a local parameter as argument by checking that the
+name of the command to be assigned starts with |\g_|. Such checking is
+probably too slow for production runs, but the kernel has hooks built
+in to allow a format to be made in which all functions perform this
+kind of check. A typical section of code might look like
+\begin{verbatim}
+%<*check>
+\def_new:Npn \toks_gset:Nn #1 {
+ \chk_global:N #1
+ \pref_global:D #1
+}
+%</check>
+%<*!check>
+\let_new:NN
+ \toks_gset:Nn \pref_global:D
+%</!check>
+\end{verbatim}
+The function |\toks_gset:Nn| takes a single token (|N|) specifying a
+token register, and globally sets it to the value passed in the second
+argument. So typical use would be
+\begin{verbatim}
+\toks_gset \g_xxx_toks {some value}
+\end{verbatim}
+In the normal definition, |\toks_gset| can be defined just to be |\let|
+to |\global|, as the primitive token register does not require any
+explicit assignment function. This is the |%<*!check>| code above.
+However the alternative definition first checks that the argument
+passed as |#1| is a global parameter and raises an error if it is not.
+It does this by taking apart the command name passed as |#1| and
+checking that it starts |\g_|.
+
+\section{Consistent use of accessor functions}
+The primitive \TeX\ syntax for register assignments has a very minimal
+syntax, and apart from box functions there are no explicit functions
+for assignment or use of the registers. This makes it very difficult
+to implement alternative data types with a syntax that is at all
+similar to the syntax for the primitives, and also encourages a coding
+style that is very error prone.
+
+As noted in the example given above, The \LaTeX\ data types are
+provided with explicit functions for setting and using the parameters
+even when these have essentially empty definitions. This allows for
+better error checking as described above, and also allows the
+construction of alternative data types with a similar interface.
+For example the `fake counter' data type mentioned previously works at
+the user level just like the data type based on primitive count
+registers, internally it does not use count registers though.
+Typical functions in the |fcnt| module include:
+
+
+\verb|\fcnt_new:N \l_tempa_fcnt|\\
+Declare the local parameter |\l_tempa_fcnt| as a fake counter.
+
+\verb|\fcnt_add:Nn \l_tempa_fcnt \c_thirty_two|\\
+Increment the counter by 32.
+
+\section{Expansion Control}
+Anyone who programs in \TeX\ is used to the problem of arranging that
+arguments to functions are suitably expanded before the function is
+called. A couple of real examples copied from \texttt{latex.ltx}:
+\begin{verbatim}
+\global
+ \expandafter\expandafter\expandafter
+ \let
+ \expandafter
+ \reserved@a
+ \csname\curr@fontshape\endcsname
+
+\expandafter
+ \in@
+ \csname sym#3\expandafter\endcsname
+ \expandafter{\group@list}%
+\end{verbatim}
+The first piece of code is a global |\let|. The token to be defined
+is obtained by expanding \verb|\reserved@a| one level. The command
+that it is to be let too is obtained by fully expanding
+\verb|\curr@fontshape| and then using the tokens produced by that
+expansion to construct a command name. This results in the mess
+of interwoven \verb|\expandafter| and \verb|\csname| beloved of all
+\TeX\ programmers, and code that is essentially unreadable.
+
+A similar construction using the conventions outlined here would be
+\begin{verbatim}
+\glet:Oc
+ \reserved_a: \l_current_font_shape_tlp
+\end{verbatim}
+The command \verb|\glet:Oc| is a global |\let| that expands its
+argument once, and generates a command name out of its second
+argument, before making the definition. This produces coe that
+is far more readable.
+
+Similarly the second piece of code above produces a token list by
+expanding \verb|\group@list| once, and then creates a command name out
+of `\verb|sym#3|' (this is inside the definition of another fumction).
+The function |\in@| is called which tests if its first argument occurs
+in the token list of its second argument.
+
+Again it would be much clearer, if the above function \verb|\in@| was
+called (say) \verb|\test_if_in:nn| (a function taking two normal
+`\texttt{n}' arguments) and then a variant function was defined with
+the appropriate argument types and simply called as follows:
+\begin{verbatim}
+\test_if_in:co {sym#3} \group_list:
+\end{verbatim}
+Note that apart from the lack of \verb|\expandafter| the space after
+\verb|}| will be silently ignored.
+
+
+For many common functions the kernel will provide functions with a
+range of argument forms, and similarly it is expected that extension
+packages providing new functions will make then available in the more
+common forms. However There will be occasions where it is necessary
+to construct such a variant form.
+
+A consistent mechanism is provided by the kernel to produce functions
+with any argument type, starting from a function that takes `normal'
+\TeX\ delimited arguments. Suppose you have a function \verb|\cmd:nnn|
+that takes two arguments, and you need to construct \verb|\cmd:cnx|
+a variant form in which the first argument is passed as a \emph{name}
+of a command, and the third argument must be fully expanded before
+being passed to \verb|\cmd:nnn|.
+
+One simply defines \verb|\cmd:cx| as follows:
+\begin{verbatim}
+\def:Nn \cmd:cnx {\exp_args:Ncnx \cmd:nnn}
+\end{verbatim}
+The function \verb|\exp_args:Ncnx| takes as its first (\texttt{N})
+argument the `base' function, and then grabs the next three arguments
+from the token stream, acts on the first with \verb|\csname|, and the
+last with \verb|\edef| and then constructs a call to the base function
+with suitably transformed arguments. So
+\begin{verbatim}
+\cmd:cnx {abc}{pq}{\rst\xyz}
+\end{verbatim}
+is equivalent, but emminently more readable, to
+\begin{verbatim}
+\edef\temp{\rst\xyz}
+\expandafter\cmd:nnn
+ \csname abc\expandafter\endcsname
+ \expandafter{%
+ \expandafter p\expandafter q%
+ \expandafter}%
+ \expandafter{\temp}
+\end{verbatim}
+
+A large range of argument processing functions are provided in
+addition to \verb|\exp_args:Ncnx|. If you need a particular argument
+combination for which a function is not provided, one may be
+constructed in a simple way. For example you need to construct
+\verb|\exp_args:Nxcxcxc| a function that fully expands arguments
+1,~3 and~5 of a given function, and produces commands to pass as
+arguments 2,~4 and~6 using \verb|\csname|. The definition is simply
+\begin{verbatim}
+\def:Npn \exp_args:Nxcxcxc
+ {\::x\::c\::x\::c\::x\::c\:::}
+\end{verbatim}
+Similar functions, |::o| etc exist for all the other argument types,
+and they may be strung together in any order, terminated by
+\verb|\:::| to create a function which processes arguments in the
+desired way.
+
+As hopefully demonstrated, the use of variant forms greatly improves
+the readability of the code, and experience shows that the longer
+command names which result from the new syntax do not realy make the
+process of \emph{writing} the code any harder.
+
+\section{The Current Experimental Distribution}
+The initial implementations of a \TeX\ format using this kind of
+syntax were made with an unreleased (and non functional) format
+(which pre-dates \LaTeXe!) The current distribution consists of a
+subset of the functionality of that format, converted to run as
+packages on top of \LaTeXe.
+
+The intention is to allow experienced \TeX\ programmers to experiment
+on the system and to comment on the interface. This means that
+\textbf{\itshape the interface will change}. No part of this system,
+including the names of any commands should be relied upon as being
+available in a later release. Please do \emph{experiment} with these
+packages, but do not use them for documents that you expect to keep
+unchanged over a long period.
+
+In view of the proposed experimental use for this distribution, we
+currently have only converted a few modules for use with \LaTeXe.
+These set up the basic conventions, and then implement a few basic
+programming constructs such as lists and sequences. These are really
+to give a flavour of the code, and to indicate that the intention is
+that the kernel provide a sufficiently rich set of programming
+constructs so that packages may use them and thus more efficiently
+share code, unlike the situation in the current \LaTeX\ where every
+large package implements its own version of lists, stacks etc.
+
+The current packages are:
+\begin{description}
+\item[l3names]
+Sets up the basic naming scheme, including naming the \TeX\
+primitives. If used with the option \texttt{[removeoldnames]}
+then the old primitive names such as \verb|\box| are \emph{undefined}
+and thus made available for user definitions. Use of this option might
+possibly break existing \TeX\ code!
+
+\item [l3basics]
+Some basic definitions that are used by the other packages.
+
+\item[l3chk]
+Functions to check (and make) definitions (comparable to the existing
+\verb|\newcommand| or \verb|\renewcommand|).
+
+\item[l3tlp]
+Token List Pointers. A basic \LaTeX3 data type for storing token lists.
+(These are essentially macros with no arguments.)
+
+
+\item[l3expan]
+The argument expansion module discussed in the previous section.
+
+
+\item[l3quarq]
+
+A `quark' is a command that is defined to expand to itself. So it may
+not be directly used (it would generate an infinite loop) but has many
+uses as special markers within \LaTeX\ code.
+
+
+\item[l3seq]
+A module implementing the basic list and stack data types.
+
+\item[l3prop]
+Property lists are the data type for handling key/value assignments.
+\end{description}
+
+The distribution also contains the \TeX\ source for this document, a
+docstrip install file and two small test files.
+
+\begin{thebibliography}{1}
+
+\bibitem{A-W:LLa94}
+Leslie Lamport.
+\newblock {\em {\LaTeX:} A Document Preparation System}.
+\newblock Addison-Wesley, Reading, Massachusetts, second edition, 1994.
+
+\end{thebibliography}
+
+\end{document}
+
+
diff --git a/Master/texmf-dist/doc/latex/expl3/l3xref-test.tex b/Master/texmf-dist/doc/latex/expl3/l3xref-test.tex
new file mode 100644
index 00000000000..65d229b2d2a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/expl3/l3xref-test.tex
@@ -0,0 +1,107 @@
+%%
+%% 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.
+%%
+%% -----------------------------------------------------------------------
+\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 $
+ {L3 Experimental cross referencing}
+\documentclass{article}
+\usepackage{l3xref}
+\CodeStart
+\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
+
+\CodeStop
+\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'.
diff --git a/Master/texmf-dist/doc/latex/expl3/lbase.ini b/Master/texmf-dist/doc/latex/expl3/lbase.ini
new file mode 100644
index 00000000000..9d21274ebb4
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/expl3/lbase.ini
@@ -0,0 +1,65 @@
+%%
+%% This is file `lbase.ini',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% l3final.dtx (with options: `ini')
+%%
+%%
+%% 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: l3final.dtx Copyright (C) 1990-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.
+%%
+%% -----------------------------------------------------------------------
+%% Derived from a file by Thomas Esser
+
+\ifx\pdfoutput\undefined \else
+ \ifx\pdfoutput\relax \else
+ % We're building the latex format with the pdfetex engine (started 2004).
+ % See this file for details.
+ \input pdftex-dvi.tex
+ \fi
+\fi
+
+%% the usual format initialization.
+%%\scrollmode
+\input lbase.ltx
+%%
+%%
+%% End of file `lbase.ini'.
diff --git a/Master/texmf-dist/doc/latex/expl3/lbase.ltx b/Master/texmf-dist/doc/latex/expl3/lbase.ltx
new file mode 100644
index 00000000000..3029de6c78f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/expl3/lbase.ltx
@@ -0,0 +1,4891 @@
+%%
+%% This is file `lbase.ltx',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% l3names.dtx (with options: `initex')
+%% l3basics.dtx (with options: `initex')
+%% l3chk.dtx (with options: `initex')
+%% l3tlp.dtx (with options: `initex')
+%% l3expan.dtx (with options: `initex')
+%% l3quark.dtx (with options: `initex')
+%% l3num.dtx (with options: `initex')
+%% l3seq.dtx (with options: `initex')
+%% l3alloc.dtx (with options: `initex')
+%% l3io.dtx (with options: `initex')
+%% l3int.dtx (with options: `initex')
+%% l3clist.dtx (with options: `initex')
+%% l3prop.dtx (with options: `initex')
+%% l3token.dtx (with options: `initex')
+%% l3vers.dtx (with options: `initex')
+%% l3skip.dtx (with options: `initex')
+%% l3toks.dtx (with options: `initex')
+%% l3messages.dtx (with options: `initex')
+%% l3box.dtx (with options: `initex')
+%% l3precom.dtx (with options: `initex,precompile')
+%% l3prg.dtx (with options: `initex')
+%% l3xref.dtx (with options: `initex')
+%% l3final.dtx (with options: `initex')
+%%
+%%
+%% 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: l3names.dtx Copyright (C) 1990-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.
+%%
+%% -----------------------------------------------------------------------
+\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
+\def\GetIdInfo$Id: #1.dtx #2 #3-#4-#5 #6 #7$#8{%
+ \immediate\write-1{#1; v#2, #3/#4/#5; #8}%
+}
+\GetIdInfo$Id: l3names.dtx 577 2006-11-21 18:10:26Z 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.
+\let\tex_let:D\let
+\long\def\name_undefine:N#1{
+ \tex_let:D#1\c_undefined}
+\long\def\name_primitive:NN#1#2{
+ \tex_let:D #2 #1
+ \name_undefine:N #1
+ }
+\name_primitive:NN \ \tex_space:D
+\name_primitive:NN \/ \tex_italiccor:D
+\name_primitive:NN \- \tex_hyphen:D
+\name_primitive:NN \let \tex_let:D
+\name_primitive:NN \def \tex_def:D
+\name_primitive:NN \edef \tex_edef:D
+\name_primitive:NN \gdef \tex_gdef:D
+\name_primitive:NN \xdef \tex_xdef:D
+\name_primitive:NN \chardef \tex_chardef:D
+\name_primitive:NN \countdef \tex_countdef:D
+\name_primitive:NN \dimendef \tex_dimendef:D
+\name_primitive:NN \skipdef \tex_skipdef:D
+\name_primitive:NN \muskipdef \tex_muskipdef:D
+\name_primitive:NN \mathchardef \tex_mathchardef:D
+\name_primitive:NN \toksdef \tex_toksdef:D
+\name_primitive:NN \futurelet \tex_futurelet:D
+\name_primitive:NN \advance \tex_advance:D
+\name_primitive:NN \divide \tex_divide:D
+\name_primitive:NN \multiply \tex_multiply:D
+\name_primitive:NN \font \tex_font:D
+\name_primitive:NN \fam \tex_fam:D
+\name_primitive:NN \global \tex_global:D
+\name_primitive:NN \long \tex_long:D
+\name_primitive:NN \outer \tex_outer:D
+\name_primitive:NN \setlanguage \tex_setlanguage:D
+\name_primitive:NN \globaldefs \tex_globaldefs:D
+\name_primitive:NN \afterassignment \tex_afterassignment:D
+\name_primitive:NN \aftergroup \tex_aftergroup:D
+\name_primitive:NN \expandafter \tex_expandafter:D
+\name_primitive:NN \noexpand \tex_noexpand:D
+\name_primitive:NN \begingroup \tex_begingroup:D
+\name_primitive:NN \endgroup \tex_endgroup:D
+\name_primitive:NN \halign \tex_halign:D
+\name_primitive:NN \valign \tex_valign:D
+\name_primitive:NN \cr \tex_cr:D
+\name_primitive:NN \crcr \tex_crcr:D
+\name_primitive:NN \noalign \tex_noalign:D
+\name_primitive:NN \omit \tex_omit:D
+\name_primitive:NN \span \tex_span:D
+\name_primitive:NN \tabskip \tex_tabskip:D
+\name_primitive:NN \everycr \tex_everycr:D
+\name_primitive:NN \if \tex_if:D
+\name_primitive:NN \ifcase \tex_ifcase:D
+\name_primitive:NN \ifcat \tex_ifcat:D
+\name_primitive:NN \ifnum \tex_ifnum:D
+\name_primitive:NN \ifodd \tex_ifodd:D
+\name_primitive:NN \ifdim \tex_ifdim:D
+\name_primitive:NN \ifeof \tex_ifeof:D
+\name_primitive:NN \ifhbox \tex_ifhbox:D
+\name_primitive:NN \ifvbox \tex_ifvbox:D
+\name_primitive:NN \ifvoid \tex_ifvoid:D
+\name_primitive:NN \ifx \tex_ifx:D
+\name_primitive:NN \iffalse \tex_iffalse:D
+\name_primitive:NN \iftrue \tex_iftrue:D
+\name_primitive:NN \ifhmode \tex_ifhmode:D
+\name_primitive:NN \ifmmode \tex_ifmmode:D
+\name_primitive:NN \ifvmode \tex_ifvmode:D
+\name_primitive:NN \ifinner \tex_ifinner:D
+\name_primitive:NN \else \tex_else:D
+\name_primitive:NN \fi \tex_fi:D
+\name_primitive:NN \or \tex_or:D
+\name_primitive:NN \immediate \tex_immediate:D
+\name_primitive:NN \closeout \tex_closeout:D
+\name_primitive:NN \openin \tex_openin:D
+\name_primitive:NN \openout \tex_openout:D
+\name_primitive:NN \read \tex_read:D
+\name_primitive:NN \write \tex_write:D
+\name_primitive:NN \closein \tex_closein:D
+\name_primitive:NN \newlinechar \tex_newlinechar:D
+\name_primitive:NN \input \tex_input:D
+\name_primitive:NN \endinput \tex_endinput:D
+\name_primitive:NN \inputlineno \tex_inputlineno:D
+\name_primitive:NN \errmessage \tex_errmessage:D
+\name_primitive:NN \message \tex_message:D
+\name_primitive:NN \show \tex_show:D
+\name_primitive:NN \showthe \tex_showthe:D
+\name_primitive:NN \showbox \tex_showbox:D
+\name_primitive:NN \showlists \tex_showlists:D
+\name_primitive:NN \errhelp \tex_errhelp:D
+\name_primitive:NN \errorcontextlines \tex_errorcontextlines:D
+\name_primitive:NN \tracingcommands \tex_tracingcommands:D
+\name_primitive:NN \tracinglostchars \tex_tracinglostchars:D
+\name_primitive:NN \tracingmacros \tex_tracingmacros:D
+\name_primitive:NN \tracingonline \tex_tracingonline:D
+\name_primitive:NN \tracingoutput \tex_tracingoutput:D
+\name_primitive:NN \tracingpages \tex_tracingpages:D
+\name_primitive:NN \tracingparagraphs \tex_tracingparagraphs:D
+\name_primitive:NN \tracingrestores \tex_tracingrestores:D
+\name_primitive:NN \tracingstats \tex_tracingstats:D
+\name_primitive:NN \pausing \tex_pausing:D
+\name_primitive:NN \showboxbreadth \tex_showboxbreadth:D
+\name_primitive:NN \showboxdepth \tex_showboxdepth:D
+\name_primitive:NN \batchmode \tex_batchmode:D
+\name_primitive:NN \errorstopmode \tex_errorstopmode:D
+\name_primitive:NN \nonstopmode \tex_nonstopmode:D
+\name_primitive:NN \scrollmode \tex_scrollmode:D
+\name_primitive:NN \end \tex_end:D
+\name_primitive:NN \csname \tex_csname:D
+\name_primitive:NN \endcsname \tex_endcsname:D
+\name_primitive:NN \ignorespaces \tex_ignorespaces:D
+\name_primitive:NN \relax \tex_relax:D
+\name_primitive:NN \the \tex_the:D
+\name_primitive:NN \mag \tex_mag:D
+\name_primitive:NN \language \tex_language:D
+\name_primitive:NN \mark \tex_mark:D
+\name_primitive:NN \topmark \tex_topmark:D
+\name_primitive:NN \firstmark \tex_firstmark:D
+\name_primitive:NN \botmark \tex_botmark:D
+\name_primitive:NN \splitfirstmark \tex_splitfirstmark:D
+\name_primitive:NN \splitbotmark \tex_splitbotmark:D
+\name_primitive:NN \fontname \tex_fontname:D
+\name_primitive:NN \escapechar \tex_escapechar:D
+\name_primitive:NN \endlinechar \tex_endlinechar:D
+\name_primitive:NN \mathchoice \tex_mathchoice:D
+\name_primitive:NN \delimiter \tex_delimiter:D
+\name_primitive:NN \mathaccent \tex_mathaccent:D
+\name_primitive:NN \mathchar \tex_mathchar:D
+\name_primitive:NN \mskip \tex_mskip:D
+\name_primitive:NN \radical \tex_radical:D
+\name_primitive:NN \vcenter \tex_vcenter:D
+\name_primitive:NN \mkern \tex_mkern:D
+\name_primitive:NN \above \tex_above:D
+\name_primitive:NN \abovewithdelims \tex_abovewithdelims:D
+\name_primitive:NN \atop \tex_atop:D
+\name_primitive:NN \atopwithdelims \tex_atopwithdelims:D
+\name_primitive:NN \over \tex_over:D
+\name_primitive:NN \overwithdelims \tex_overwithdelims:D
+\name_primitive:NN \displaystyle \tex_displaystyle:D
+\name_primitive:NN \textstyle \tex_textstyle:D
+\name_primitive:NN \scriptstyle \tex_scriptstyle:D
+\name_primitive:NN \scriptscriptstyle \tex_scriptscriptstyle:D
+\name_primitive:NN \nonscript \tex_nonscript:D
+\name_primitive:NN \eqno \tex_eqno:D
+\name_primitive:NN \leqno \tex_leqno:D
+\name_primitive:NN \abovedisplayshortskip \tex_abovedisplayshortskip:D
+\name_primitive:NN \abovedisplayskip \tex_abovedisplayskip:D
+\name_primitive:NN \belowdisplayshortskip \tex_belowdisplayshortskip:D
+\name_primitive:NN \belowdisplayskip \tex_belowdisplayskip:D
+\name_primitive:NN \displaywidowpenalty \tex_displaywidowpenalty:D
+\name_primitive:NN \displayindent \tex_displayindent:D
+\name_primitive:NN \displaywidth \tex_displaywidth:D
+\name_primitive:NN \everydisplay \tex_everydisplay:D
+\name_primitive:NN \predisplaysize \tex_predisplaysize:D
+\name_primitive:NN \predisplaypenalty \tex_predisplaypenalty:D
+\name_primitive:NN \postdisplaypenalty \tex_postdisplaypenalty:D
+\name_primitive:NN \mathbin \tex_mathbin:D
+\name_primitive:NN \mathclose \tex_mathclose:D
+\name_primitive:NN \mathinner \tex_mathinner:D
+\name_primitive:NN \mathop \tex_mathop:D
+\name_primitive:NN \displaylimits \tex_displaylimits:D
+\name_primitive:NN \limits \tex_limits:D
+\name_primitive:NN \nolimits \tex_nolimits:D
+\name_primitive:NN \mathopen \tex_mathopen:D
+\name_primitive:NN \mathord \tex_mathord:D
+\name_primitive:NN \mathpunct \tex_mathpunct:D
+\name_primitive:NN \mathrel \tex_mathrel:D
+\name_primitive:NN \overline \tex_overline:D
+\name_primitive:NN \underline \tex_underline:D
+\name_primitive:NN \left \tex_left:D
+\name_primitive:NN \right \tex_right:D
+\name_primitive:NN \binoppenalty \tex_binoppenalty:D
+\name_primitive:NN \relpenalty \tex_relpenalty:D
+\name_primitive:NN \delimitershortfall \tex_delimitershortfall:D
+\name_primitive:NN \delimiterfactor \tex_delimiterfactor:D
+\name_primitive:NN \nulldelimiterspace \tex_nulldelimiterspace:D
+\name_primitive:NN \everymath \tex_everymath:D
+\name_primitive:NN \mathsurround \tex_mathsurround:D
+\name_primitive:NN \medmuskip \tex_medmuskip:D
+\name_primitive:NN \thinmuskip \tex_thinmuskip:D
+\name_primitive:NN \thickmuskip \tex_thickmuskip:D
+\name_primitive:NN \scriptspace \tex_scriptspace:D
+\name_primitive:NN \noboundary \tex_noboundary:D
+\name_primitive:NN \accent \tex_accent:D
+\name_primitive:NN \char \tex_char:D
+\name_primitive:NN \discretionary \tex_discretionary:D
+\name_primitive:NN \hfil \tex_hfil:D
+\name_primitive:NN \hfilneg \tex_hfilneg:D
+\name_primitive:NN \hfill \tex_hfill:D
+\name_primitive:NN \hskip \tex_hskip:D
+\name_primitive:NN \hss \tex_hss:D
+\name_primitive:NN \vfil \tex_vfil:D
+\name_primitive:NN \vfilneg \tex_vfilneg:D
+\name_primitive:NN \vfill \tex_vfill:D
+\name_primitive:NN \vskip \tex_vskip:D
+\name_primitive:NN \vss \tex_vss:D
+\name_primitive:NN \unskip \tex_unskip:D
+\name_primitive:NN \kern \tex_kern:D
+\name_primitive:NN \unkern \tex_unkern:D
+\name_primitive:NN \hrule \tex_hrule:D
+\name_primitive:NN \vrule \tex_vrule:D
+\name_primitive:NN \leaders \tex_leaders:D
+\name_primitive:NN \cleaders \tex_cleaders:D
+\name_primitive:NN \xleaders \tex_xleaders:D
+\name_primitive:NN \lastkern \tex_lastkern:D
+\name_primitive:NN \lastskip \tex_lastskip:D
+\name_primitive:NN \indent \tex_indent:D
+\name_primitive:NN \par \tex_par:D
+\name_primitive:NN \noindent \tex_noindent:D
+\name_primitive:NN \vadjust \tex_vadjust:D
+\name_primitive:NN \baselineskip \tex_baselineskip:D
+\name_primitive:NN \lineskip \tex_lineskip:D
+\name_primitive:NN \lineskiplimit \tex_lineskiplimit:D
+\name_primitive:NN \clubpenalty \tex_clubpenalty:D
+\name_primitive:NN \widowpenalty \tex_widowpenalty:D
+\name_primitive:NN \exhyphenpenalty \tex_exhyphenpenalty:D
+\name_primitive:NN \hyphenpenalty \tex_hyphenpenalty:D
+\name_primitive:NN \linepenalty \tex_linepenalty:D
+\name_primitive:NN \doublehyphendemerits \tex_doublehyphendemerits:D
+\name_primitive:NN \finalhyphendemerits \tex_finalhyphendemerits:D
+\name_primitive:NN \adjdemerits \tex_adjdemerits:D
+\name_primitive:NN \hangafter \tex_hangafter:D
+\name_primitive:NN \hangindent \tex_hangindent:D
+\name_primitive:NN \parshape \tex_parshape:D
+\name_primitive:NN \hsize \tex_hsize:D
+\name_primitive:NN \lefthyphenmin \tex_lefthyphenmin:D
+\name_primitive:NN \righthyphenmin \tex_righthyphenmin:D
+\name_primitive:NN \leftskip \tex_leftskip:D
+\name_primitive:NN \rightskip \tex_rightskip:D
+\name_primitive:NN \looseness \tex_looseness:D
+\name_primitive:NN \parskip \tex_parskip:D
+\name_primitive:NN \parindent \tex_parindent:D
+\name_primitive:NN \uchyph \tex_uchyph:D
+\name_primitive:NN \emergencystretch \tex_emergencystretch:D
+\name_primitive:NN \pretolerance \tex_pretolerance:D
+\name_primitive:NN \tolerance \tex_tolerance:D
+\name_primitive:NN \spaceskip \tex_spaceskip:D
+\name_primitive:NN \xspaceskip \tex_xspaceskip:D
+\name_primitive:NN \parfillskip \tex_parfillskip:D
+\name_primitive:NN \everypar \tex_everypar:D
+\name_primitive:NN \prevgraf \tex_prevgraf:D
+\name_primitive:NN \spacefactor \tex_spacefactor:D
+\name_primitive:NN \shipout \tex_shipout:D
+\name_primitive:NN \vsize \tex_vsize:D
+\name_primitive:NN \interlinepenalty \tex_interlinepenalty:D
+\name_primitive:NN \brokenpenalty \tex_brokenpenalty:D
+\name_primitive:NN \topskip \tex_topskip:D
+\name_primitive:NN \maxdeadcycles \tex_maxdeadcycles:D
+\name_primitive:NN \maxdepth \tex_maxdepth:D
+\name_primitive:NN \output \tex_output:D
+\name_primitive:NN \deadcycles \tex_deadcycles:D
+\name_primitive:NN \pagedepth \tex_pagedepth:D
+\name_primitive:NN \pagestretch \tex_pagestretch:D
+\name_primitive:NN \pagefilstretch \tex_pagefilstretch:D
+\name_primitive:NN \pagefillstretch \tex_pagefillstretch:D
+\name_primitive:NN \pagefilllstretch \tex_pagefilllstretch:D
+\name_primitive:NN \pageshrink \tex_pageshrink:D
+\name_primitive:NN \pagegoal \tex_pagegoal:D
+\name_primitive:NN \pagetotal \tex_pagetotal:D
+\name_primitive:NN \outputpenalty \tex_outputpenalty:D
+\name_primitive:NN \hoffset \tex_hoffset:D
+\name_primitive:NN \voffset \tex_voffset:D
+\name_primitive:NN \insert \tex_insert:D
+\name_primitive:NN \holdinginserts \tex_holdinginserts:D
+\name_primitive:NN \floatingpenalty \tex_floatingpenalty:D
+\name_primitive:NN \insertpenalties \tex_insertpenalties:D
+\name_primitive:NN \lower \tex_lower:D
+\name_primitive:NN \moveleft \tex_moveleft:D
+\name_primitive:NN \moveright \tex_moveright:D
+\name_primitive:NN \raise \tex_raise:D
+\name_primitive:NN \copy \tex_copy:D
+\name_primitive:NN \lastbox \tex_lastbox:D
+\name_primitive:NN \vsplit \tex_vsplit:D
+\name_primitive:NN \unhbox \tex_unhbox:D
+\name_primitive:NN \unhcopy \tex_unhcopy:D
+\name_primitive:NN \unvbox \tex_unvbox:D
+\name_primitive:NN \unvcopy \tex_unvcopy:D
+\name_primitive:NN \setbox \tex_setbox:D
+\name_primitive:NN \hbox \tex_hbox:D
+\name_primitive:NN \vbox \tex_vbox:D
+\name_primitive:NN \vtop \tex_vtop:D
+\name_primitive:NN \prevdepth \tex_prevdepth:D
+\name_primitive:NN \badness \tex_badness:D
+\name_primitive:NN \hbadness \tex_hbadness:D
+\name_primitive:NN \vbadness \tex_vbadness:D
+\name_primitive:NN \hfuzz \tex_hfuzz:D
+\name_primitive:NN \vfuzz \tex_vfuzz:D
+\name_primitive:NN \overfullrule \tex_overfullrule:D
+\name_primitive:NN \boxmaxdepth \tex_boxmaxdepth:D
+\name_primitive:NN \splitmaxdepth \tex_splitmaxdepth:D
+\name_primitive:NN \splittopskip \tex_splittopskip:D
+\name_primitive:NN \everyhbox \tex_everyhbox:D
+\name_primitive:NN \everyvbox \tex_everyvbox:D
+\name_primitive:NN \nullfont \tex_nullfont:D
+\name_primitive:NN \textfont \tex_textfont:D
+\name_primitive:NN \scriptfont \tex_scriptfont:D
+\name_primitive:NN \scriptscriptfont \tex_scriptscriptfont:D
+\name_primitive:NN \fontdimen \tex_fontdimen:D
+\name_primitive:NN \hyphenchar \tex_hyphenchar:D
+\name_primitive:NN \skewchar \tex_skewchar:D
+\name_primitive:NN \defaulthyphenchar \tex_defaulthyphenchar:D
+\name_primitive:NN \defaultskewchar \tex_defaultskewchar:D
+\name_primitive:NN \number \tex_number:D
+\name_primitive:NN \romannumeral \tex_romannumeral:D
+\name_primitive:NN \string \tex_string:D
+\name_primitive:NN \lowercase \tex_lowercase:D
+\name_primitive:NN \uppercase \tex_uppercase:D
+\name_primitive:NN \meaning \tex_meaning:D
+\name_primitive:NN \penalty \tex_penalty:D
+\name_primitive:NN \unpenalty \tex_unpenalty:D
+\name_primitive:NN \lastpenalty \tex_lastpenalty:D
+\name_primitive:NN \special \tex_special:D
+\name_primitive:NN \dump \tex_dump:D
+\name_primitive:NN \patterns \tex_patterns:D
+\name_primitive:NN \hyphenation \tex_hyphenation:D
+\name_primitive:NN \time \tex_time:D
+\name_primitive:NN \day \tex_day:D
+\name_primitive:NN \month \tex_month:D
+\name_primitive:NN \year \tex_year:D
+\name_primitive:NN \jobname \tex_jobname:D
+\name_primitive:NN \everyjob \tex_everyjob:D
+\name_primitive:NN \count \tex_count:D
+\name_primitive:NN \dimen \tex_dimen:D
+\name_primitive:NN \skip \tex_skip:D
+\name_primitive:NN \toks \tex_toks:D
+\name_primitive:NN \muskip \tex_muskip:D
+\name_primitive:NN \box \tex_box:D
+\name_primitive:NN \wd \tex_wd:D
+\name_primitive:NN \ht \tex_ht:D
+\name_primitive:NN \dp \tex_dp:D
+\name_primitive:NN \catcode \tex_catcode:D
+\name_primitive:NN \delcode \tex_delcode:D
+\name_primitive:NN \sfcode \tex_sfcode:D
+\name_primitive:NN \lccode \tex_lccode:D
+\name_primitive:NN \uccode \tex_uccode:D
+\name_primitive:NN \mathcode \tex_mathcode:D
+\name_primitive:NN \ifdefined \etex_ifdefined:D
+\name_primitive:NN \ifcsname \etex_ifcsname:D
+\name_primitive:NN \unless \etex_unless:D
+\name_primitive:NN \eTeXversion \etex_eTeXversion:D
+\name_primitive:NN \eTeXrevision \etex_eTeXrevision:D
+\name_primitive:NN \marks \etex_marks:D
+\name_primitive:NN \topmarks \etex_topmarks:D
+\name_primitive:NN \firstmarks \etex_firstmarks:D
+\name_primitive:NN \botmarks \etex_botmarks:D
+\name_primitive:NN \splitfirstmarks \etex_splitfirstmarks:D
+\name_primitive:NN \splitbotmarks \etex_splitbotmarks:D
+\name_primitive:NN \unexpanded \etex_unexpanded:D
+\name_primitive:NN \detokenize \etex_detokenize:D
+\name_primitive:NN \scantokens \etex_scantokens:D
+\name_primitive:NN \showtokens \etex_showtokens:D
+\name_primitive:NN \readline \etex_readline:D
+\name_primitive:NN \tracingassigns \etex_tracingassigns:D
+\name_primitive:NN \tracingscantokens \etex_tracingscantokens:D
+\name_primitive:NN \tracingnesting \etex_tracingnesting:D
+\name_primitive:NN \tracingifs \etex_tracingifs:D
+\name_primitive:NN \currentiflevel \etex_currentiflevel:D
+\name_primitive:NN \currentifbranch \etex_currentifbranch:D
+\name_primitive:NN \currentiftype \etex_currentiftype:D
+\name_primitive:NN \tracinggroups \etex_tracinggroups:D
+\name_primitive:NN \currentgrouplevel \etex_currentgrouplevel:D
+\name_primitive:NN \currentgrouptype \etex_currentgrouptype:D
+\name_primitive:NN \showgroups \etex_showgroups:D
+\name_primitive:NN \showifs \etex_showifs:D
+\name_primitive:NN \interactionmode \etex_interactionmode:D
+\name_primitive:NN \lastnodetype \etex_lastnodetype:D
+\name_primitive:NN \iffontchar \etex_iffontchar:D
+\name_primitive:NN \fontcharht \etex_fontcharht:D
+\name_primitive:NN \fontchardp \etex_fontchardp:D
+\name_primitive:NN \fontcharwd \etex_fontcharwd:D
+\name_primitive:NN \fontcharic \etex_fontcharic:D
+\name_primitive:NN \parshapeindent \etex_parshapeindent:D
+\name_primitive:NN \parshapelength \etex_parshapelength:D
+\name_primitive:NN \parshapedimen \etex_parshapedimen:D
+\name_primitive:NN \numexpr \etex_numexpr:D
+\name_primitive:NN \dimexpr \etex_dimexpr:D
+\name_primitive:NN \glueexpr \etex_glueexpr:D
+\name_primitive:NN \muexpr \etex_muexpr:D
+\name_primitive:NN \gluestretch \etex_gluestretch:D
+\name_primitive:NN \glueshrink \etex_glueshrink:D
+\name_primitive:NN \gluestretchorder \etex_gluestretchorder:D
+\name_primitive:NN \glueshrinkorder \etex_glueshrinkorder:D
+\name_primitive:NN \gluetomu \etex_gluetomu:D
+\name_primitive:NN \mutoglue \etex_mutoglue:D
+\name_primitive:NN \lastlinefit \etex_lastlinefit:D
+\name_primitive:NN \interlinepenalties \etex_interlinepenalties:D
+\name_primitive:NN \clubpenalties \etex_clubpenalties:D
+\name_primitive:NN \widowpenalties \etex_widowpenalties:D
+\name_primitive:NN \displaywidowpenalties \etex_displaywidowpenalties:D
+\name_primitive:NN \middle \etex_middle:D
+\name_primitive:NN \savinghyphcodes \etex_savinghyphcodes:D
+\name_primitive:NN \savingvdiscards \etex_savingvdiscards:D
+\name_primitive:NN \pagediscards \etex_pagediscards:D
+\name_primitive:NN \splitdiscards \etex_splitdiscards:D
+\name_primitive:NN \TeXXETstate \etex_TeXXETstate:D
+\name_primitive:NN \beginL \etex_beginL:D
+\name_primitive:NN \endL \etex_endL:D
+\name_primitive:NN \beginR \etex_beginR:D
+\name_primitive:NN \endR \etex_endR:D
+\name_primitive:NN \predisplaydirection \etex_predisplaydirection:D
+\name_primitive:NN \everyeof \etex_everyeof:D
+\name_primitive:NN \protected \etex_protected:D
+%% integer registers:
+\name_primitive:NN \pdfoutput \pdf_output:D
+\name_primitive:NN \pdfminorversion \pdf_minorversion:D
+\name_primitive:NN \pdfcompresslevel \pdf_compresslevel:D
+\name_primitive:NN \pdfdecimaldigits \pdf_decimaldigits:D
+\name_primitive:NN \pdfimageresolution \pdf_imageresolution:D
+\name_primitive:NN \pdfpkresolution \pdf_pkresolution:D
+\name_primitive:NN \pdftracingfonts \pdf_tracingfonts:D
+\name_primitive:NN \pdfuniqueresname \pdf_uniqueresname:D
+\name_primitive:NN \pdfadjustspacing \pdf_adjustspacing:D
+\name_primitive:NN \pdfprotrudechars \pdf_protrudechars:D
+\name_primitive:NN \efcode \pdf_efcode:D
+\name_primitive:NN \lpcode \pdf_lpcode:D
+\name_primitive:NN \rpcode \pdf_rpcode:D
+\name_primitive:NN \pdfforcepagebox \pdf_forcepagebox:D
+\name_primitive:NN \pdfoptionalwaysusepdfpagebox \pdf_optionalwaysusepdfpagebox:D
+\name_primitive:NN \pdfinclusionerrorlevel\pdf_inclusionerrorlevel:D
+\name_primitive:NN \pdfoptionpdfinclusionerrorlevel \pdf_optionpdfinclusionerrorlevel:D
+\name_primitive:NN \pdfimagehicolor \pdf_imagehicolor:D
+\name_primitive:NN \pdfimageapplygamma \pdf_imageapplygamma:D
+\name_primitive:NN \pdfgamma \pdf_gamma:D
+\name_primitive:NN \pdfimagegamma \pdf_imagegamma:D
+%% dimen registers:
+\name_primitive:NN \pdfhorigin \pdf_horigin:D
+\name_primitive:NN \pdfvorigin \pdf_vorigin:D
+\name_primitive:NN \pdfpagewidth \pdf_pagewidth:D
+\name_primitive:NN \pdfpageheight \pdf_pageheight:D
+\name_primitive:NN \pdflinkmargin \pdf_linkmargin:D
+\name_primitive:NN \pdfdestmargin \pdf_destmargin:D
+\name_primitive:NN \pdfthreadmargin \pdf_threadmargin:D
+%% token registers:
+\name_primitive:NN \pdfpagesattr \pdf_pagesattr:D
+\name_primitive:NN \pdfpageattr \pdf_pageattr:D
+\name_primitive:NN \pdfpageresources \pdf_pageresources:D
+\name_primitive:NN \pdfpkmode \pdf_pkmode:D
+%% expandable commands:
+\name_primitive:NN \pdftexrevision \pdf_texrevision:D
+\name_primitive:NN \pdftexbanner \pdf_texbanner:D
+\name_primitive:NN \pdfcreationdate \pdf_creationdate:D
+\name_primitive:NN \pdfpageref \pdf_pageref:D
+\name_primitive:NN \pdfxformname \pdf_xformname:D
+\name_primitive:NN \pdffontname \pdf_fontname:D
+\name_primitive:NN \pdffontobjnum \pdf_fontobjnum:D
+\name_primitive:NN \pdffontsize \pdf_fontsize:D
+\name_primitive:NN \pdfincludechars \pdf_includechars:D
+\name_primitive:NN \leftmarginkern \pdf_leftmarginkern:D
+\name_primitive:NN \rightmarginkern \pdf_rightmarginkern:D
+\name_primitive:NN \pdfescapestring \pdf_escapestring:D
+\name_primitive:NN \pdfescapename \pdf_escapename:D
+\name_primitive:NN \pdfescapehex \pdf_escapehex:D
+\name_primitive:NN \pdfunescapehex \pdf_unescapehex:D
+\name_primitive:NN \pdfstrcmp \pdf_strcmp:D
+\name_primitive:NN \pdfuniformdeviate \pdf_uniformdeviate:D
+\name_primitive:NN \pdfnormaldeviate \pdf_normaldeviate:D
+\name_primitive:NN \pdfmdfivesum \pdf_mdfivesum:D
+\name_primitive:NN \pdffilemoddate \pdf_filemoddate:D
+\name_primitive:NN \pdffilesize \pdf_filesize:D
+\name_primitive:NN \pdffiledump \pdf_filedump:D
+%% read-only integers:
+\name_primitive:NN \pdftexversion \pdf_texversion:D
+\name_primitive:NN \pdflastobj \pdf_lastobj:D
+\name_primitive:NN \pdflastxform \pdf_lastxform:D
+\name_primitive:NN \pdflastximage \pdf_lastximage:D
+\name_primitive:NN \pdflastximagepages \pdf_lastximagepages:D
+\name_primitive:NN \pdflastannot \pdf_lastannot:D
+\name_primitive:NN \pdflastxpos \pdf_lastxpos:D
+\name_primitive:NN \pdflastypos \pdf_lastypos:D
+\name_primitive:NN \pdflastdemerits \pdf_lastdemerits:D
+\name_primitive:NN \pdfelapsedtime \pdf_elapsedtime:D
+\name_primitive:NN \pdfrandomseed \pdf_randomseed:D
+\name_primitive:NN \pdfshellescape \pdf_shellescape:D
+%% general commands:
+\name_primitive:NN \pdfobj \pdf_obj:D
+\name_primitive:NN \pdfrefobj \pdf_refobj:D
+\name_primitive:NN \pdfxform \pdf_xform:D
+\name_primitive:NN \pdfrefxform \pdf_refxform:D
+\name_primitive:NN \pdfximage \pdf_ximage:D
+\name_primitive:NN \pdfrefximage \pdf_refximage:D
+\name_primitive:NN \pdfannot \pdf_annot:D
+\name_primitive:NN \pdfstartlink \pdf_startlink:D
+\name_primitive:NN \pdfendlink \pdf_endlink:D
+\name_primitive:NN \pdfoutline \pdf_outline:D
+\name_primitive:NN \pdfdest \pdf_dest:D
+\name_primitive:NN \pdfthread \pdf_thread:D
+\name_primitive:NN \pdfstartthread \pdf_startthread:D
+\name_primitive:NN \pdfendthread \pdf_endthread:D
+\name_primitive:NN \pdfsavepos \pdf_savepos:D
+\name_primitive:NN \pdfinfo \pdf_info:D
+\name_primitive:NN \pdfcatalog \pdf_catalog:D
+\name_primitive:NN \pdfnames \pdf_names:D
+\name_primitive:NN \pdfmapfile \pdf_mapfile:D
+\name_primitive:NN \pdfmapline \pdf_mapline:D
+\name_primitive:NN \pdffontattr \pdf_fontattr:D
+\name_primitive:NN \pdftrailer \pdf_trailer:D
+\name_primitive:NN \pdffontexpand \pdf_fontexpand:D
+%%\name_primitive:NN \vadjust [<pre spec>] <filler> { <vertical mode material> } (h, m)
+\name_primitive:NN \pdfliteral \pdf_literal:D
+%%\name_primitive:NN \special <pdfspecial spec>
+\name_primitive:NN \pdfresettimer \pdf_resettimer:D
+\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 \NamesStart{
+ \tex_catcode:D `\_=11\scan_stop:
+ \tex_catcode:D `\:=11\scan_stop:
+ }
+\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
+}
+%% File: l3basics.dtx Copyright (C) 1990-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.
+%%
+%% -----------------------------------------------------------------------
+\GetIdInfo$Id: l3basics.dtx 583 2006-12-12 17:26:44Z morten $
+ {L3 Experimental basic definitions}
+\tex_let:D \let:NwN \tex_let:D
+\let:NwN \if_true: \tex_iftrue:D
+\let:NwN \if_false: \tex_iffalse:D
+\let:NwN \else: \tex_else:D
+\let:NwN \fi: \tex_fi:D
+\let:NwN \reverse_if:N \etex_unless:D
+\let:NwN \if:w \tex_if:D
+\let:NwN \if_charcode:w \tex_if:D
+\let:NwN \if_catcode:w \tex_ifcat:D
+\let:NwN \if_meaning:NN \tex_ifx:D
+\let:NwN \if_token_eq:NN \tex_ifx:D
+\let:NwN \if_cs_meaning_eq:NN\tex_ifx:D
+\let:NwN \if_mode_math: \tex_ifmmode:D
+\let:NwN \if_mode_horizontal:\tex_ifhmode:D
+\let:NwN \if_mode_vertical: \tex_ifvmode:D
+\let:NwN \if_mode_inner: \tex_ifinner:D
+\let:NwN \if_cs_exist:N \etex_ifdefined:D
+\let:NwN \if_cs_exist:w \etex_ifcsname:D
+\let:NwN \exp_after:NN \tex_expandafter:D
+\let:NwN \exp_not:N \tex_noexpand:D
+\let:NwN \exp_not:n \etex_unexpanded:D
+\let:NwN \io_put_deferred:Nx \tex_write:D
+\let:NwN \token_to_meaning:N \tex_meaning:D
+\let:NwN \token_to_string:N \tex_string:D
+\let:NwN \cs:w \tex_csname:D
+\let:NwN \cs_end: \tex_endcsname:D
+\let:NwN \cs_meaning:N \tex_meaning:D
+\tex_def:D \cs_meaning:c #1{\exp_after:NN\cs_meaning:N\cs:w #1\cs_end:}
+\let:NwN \cs_show:N \tex_show:D
+\tex_def:D \cs_show:c #1{\exp_after:NN\cs_show:N\cs:w #1\cs_end:}
+\let:NwN \scan_stop: \tex_relax:D
+\let:NwN \group_begin: \tex_begingroup:D
+\let:NwN \group_end: \tex_endgroup:D
+\let:NwN \group_execute_after:N \tex_aftergroup:D
+\let:NwN \the_internal:D \tex_the:D
+\let:NwN \pref_global:D \tex_global:D
+\let:NwN \pref_long:D \tex_long:D
+\let:NwN \pref_protected:D \etex_protected:D
+\let:NwN \def:Npn \tex_def:D
+\let:NwN \def:Npx \tex_edef:D
+\pref_protected:D \def:Npn \def_long:Npn {\pref_long:D \def:Npn}
+\pref_protected:D \def:Npn \def_long:Npx {\pref_long:D \def:Npx}
+\pref_protected:D \def:Npn \def_protected:Npn {\pref_protected:D \def:Npn}
+\pref_protected:D \def:Npn \def_protected:Npx {\pref_protected:D \def:Npx}
+\def_protected:Npn \def_protected_long:Npn {
+ \pref_protected:D \pref_long:D \def:Npn
+}
+\def_protected:Npn \def_protected_long:Npx {
+ \pref_protected:D \pref_long:D \def:Npx
+}
+\let:NwN \gdef:Npn \tex_gdef:D
+\let:NwN \gdef:Npx \tex_xdef:D
+\def_protected:Npn \gdef_long:Npn {\pref_long:D \gdef:Npn}
+\def_protected:Npn \gdef_long:Npx {\pref_long:D \gdef:Npx}
+\def_protected:Npn \gdef_protected:Npn {\pref_protected:D \gdef:Npn}
+\def_protected:Npn \gdef_protected:Npx {\pref_protected:D \gdef:Npx}
+\def_protected:Npn \gdef_protected_long:Npn {
+ \pref_protected:D \pref_long:D \gdef:Npn
+}
+\def_protected:Npn \gdef_protected_long:Npx {
+ \pref_protected:D \pref_long:D \gdef:Npx
+}
+\def:Npn \c_true {00}
+\def:Npn \c_false {01}
+\tex_countdef:D \c_minus_one = 10 \scan_stop:
+\c_minus_one = -1 \scan_stop:
+\tex_chardef:D \c_sixteen = 16\scan_stop:
+\def:Npn \io_put_log:x{
+ \tex_immediate:D\io_put_deferred:Nx \c_minus_one }
+\def:Npn \io_put_term:x{
+ \tex_immediate:D\io_put_deferred:Nx \c_sixteen }
+\def:Npn\err_latex_bug:x#1{
+ \io_put_term:x{This~is~a~LaTeX~bug!~Check~coding!}\tex_errmessage:D{#1}}
+\def_long:Npn \use_none:n #1{}
+\def_long:Npn \use_arg_i:n #1{#1}
+\def:Npn \chk_new_cs:N #1{
+ \if:w \cs_if_free_p:N #1
+ \exp_after:NN \use_none:n
+ \else:
+ \exp_after:NN \use_arg_i:n
+ \fi:
+ {
+ \err_latex_bug:x {Command~name~`\token_to_string:N #1'~
+ already~defined!~
+ Current~meaning:~\token_to_meaning:N #1
+ }
+ }
+}
+\def:Npn \cs_if_exist_p:N #1{
+ \if:w \cs_if_free_p:N #1
+ \c_false
+ \else:
+ \c_true \fi:}
+\def:Npn \chk_if_exist_cs:N #1 {
+ \if:w \cs_if_exist_p:N #1
+ \else:
+ \err_latex_bug:x{Command~ `\token_to_string:N #1'~
+ not~ yet~ defined!}
+ \fi:}
+\def:Npn \chk_if_exist_cs:c #1 {
+ \exp_after:NN \chk_if_exist_cs:N \cs:w #1\cs_end: }
+\def:Npn \cs_if_free_p:N #1{
+ \if_cs_exist:N #1
+ \if_meaning:NN#1\scan_stop:
+ \if:w\cs_if_eq_name_p:NN #1\scan_stop:
+ \c_false \else: \c_true \fi:
+ \else:
+ \c_false
+ \fi:
+ \else:
+ \if:w \cs_if_eq_name_p:NN #1\c_undefined
+ \c_false \else: \c_true \fi:
+ \fi:
+}
+\let:NwN \cs_free_p:N \cs_if_free_p:N
+\def:Npn \str_if_eq_p:nn #1#2{
+ \str_if_eq_p_aux:w #1\scan_stop:\\#2\scan_stop:\\
+}
+\def:Npn \str_if_eq_p_aux:w #1#2\\#3#4\\{
+ \if_meaning:NN#1#3
+ \if_meaning:NN#1\scan_stop:\c_true \else:
+ \if_meaning:NN#3\scan_stop:\c_false \else:
+ \str_if_eq_p_aux:w #2\\#4\\\fi:\fi:
+ \else:\c_false \fi:}
+\def_long:Npn \cs_if_eq_name_p:NN #1#2{
+ \exp_after:NN\exp_after:NN
+ \exp_after:NN\str_if_eq_p_aux:w
+ \exp_after:NN\token_to_string:N
+ \exp_after:NN#1
+ \exp_after:NN\scan_stop:
+ \exp_after:NN\\
+ \token_to_string:N#2\scan_stop:\\}
+\def:Npn \str_if_eq_var_p:nf#1{
+ \if:w \tex_number:D\str_if_eq_var_start:nnN{}{}#1\scan_stop:
+}
+\def:Npn\str_if_eq_var_start:nnN#1#2#3{
+ \if:w#3\scan_stop:\exp_after:NN\str_if_eq_var_stop:w\fi:
+ \str_if_eq_var_start:nnN{\if:w#3#1}{#2\fi:}
+}
+\def:Npn\str_if_eq_var_stop:w\str_if_eq_var_start:nnN#1#2#3{
+ #1#3\scan_stop:'#213~\c_true\else:\c_false\fi:
+}
+\def_protected:Npn \def_new:Npn #1{\chk_new_cs:N #1
+ \def:Npn #1}
+\def_protected:Npn \def_new:Npx #1{\chk_new_cs:N #1
+ \def:Npx #1}
+\def_protected:Npn \def_long_new:Npn #1{\chk_new_cs:N #1
+ \def_long:Npn #1}
+\def_protected:Npn \def_long_new:Npx #1{\chk_new_cs:N #1
+ \def_long:Npx #1}
+\def_protected:Npn \def_protected_new:Npn #1{\chk_new_cs:N #1
+ \def_protected:Npn #1}
+\def_protected:Npn \def_protected_new:Npx #1{\chk_new_cs:N #1
+ \def_protected:Npx #1}
+\def_protected:Npn \def_protected_long_new:Npn #1{\chk_new_cs:N #1
+ \def_protected_long:Npn #1}
+\def_protected:Npn \def_protected_long_new:Npx #1{\chk_new_cs:N #1
+ \def_protected_long:Npx #1}
+\def_protected_new:Npn \gdef_new:Npn #1{\chk_new_cs:N #1
+ \gdef:Npn #1}
+\def_protected_new:Npn \gdef_new:Npx #1{\chk_new_cs:N #1
+ \gdef:Npx #1}
+\def_protected_new:Npn \gdef_long_new:Npn #1{\chk_new_cs:N #1
+ \gdef_long:Npn #1}
+\def_protected_new:Npn \gdef_long_new:Npx #1{\chk_new_cs:N #1
+ \gdef_long:Npx #1}
+\def_protected_new:Npn \gdef_protected_new:Npn #1{\chk_new_cs:N #1
+ \gdef_protected:Npn #1}
+\def_protected_new:Npn \gdef_protected_new:Npx #1{\chk_new_cs:N #1
+ \gdef_protected:Npx #1}
+\def_protected_new:Npn \gdef_protected_long_new:Npn #1{\chk_new_cs:N #1
+ \gdef_protected_long:Npn #1}
+\def_protected_new:Npn \gdef_protected_long_new:Npx #1{\chk_new_cs:N #1
+ \gdef_protected_long:Npx #1}
+\def_new:Npn \def:cpn #1{\exp_after:NN \def:Npn \cs:w #1\cs_end:}
+\def_new:Npn \def:cpx #1{\exp_after:NN \def:Npx \cs:w #1\cs_end:}
+\def_new:Npn \gdef:cpn #1{\exp_after:NN \gdef:Npn \cs:w #1\cs_end:}
+\def_new:Npn \gdef:cpx #1{\exp_after:NN \gdef:Npx \cs:w #1\cs_end:}
+\def_new:Npn \def_new:cpn #1{\exp_after:NN \def_new:Npn \cs:w #1\cs_end:}
+\def_new:Npn \def_new:cpx #1{\exp_after:NN \def_new:Npx \cs:w #1\cs_end:}
+\def_new:Npn \gdef_new:cpn #1{\exp_after:NN \gdef_new:Npn \cs:w #1\cs_end:}
+\def_new:Npn \gdef_new:cpx #1{\exp_after:NN \gdef_new:Npx \cs:w #1\cs_end:}
+\def_new:Npn \def_long:cpn #1{\exp_after:NN \def_long:Npn \cs:w #1\cs_end:}
+\def_new:Npn \def_long:cpx #1{
+ \exp_after:NN\def_long:Npx\cs:w #1\cs_end:}
+\def_new:Npn \gdef_long:cpn #1{
+ \exp_after:NN \gdef_long:Npn \cs:w #1\cs_end:}
+\def_new:Npn \gdef_long:cpx #1{
+ \exp_after:NN\gdef_long:Npx\cs:w #1\cs_end:}
+\def_new:Npn \def_long_new:cpn #1{
+ \exp_after:NN \def_long_new:Npn \cs:w #1\cs_end:}
+\def_new:Npn \def_long_new:cpx #1{
+ \exp_after:NN \def_long_new:Npx \cs:w #1\cs_end:}
+\def_new:Npn \gdef_long_new:cpn #1{
+ \exp_after:NN \gdef_long_new:Npn \cs:w #1\cs_end:}
+\def_new:Npn \gdef_long_new:cpx #1{
+ \exp_after:NN \gdef_long_new:Npx \cs:w #1\cs_end:}
+\def_new:Npn \def_protected:cpn #1{
+ \exp_after:NN \def_protected:Npn \cs:w #1\cs_end:}
+\def_new:Npn \def_protected:cpx #1{
+ \exp_after:NN\def_protected:Npx\cs:w #1\cs_end:}
+\def_new:Npn \gdef_protected:cpn #1{
+ \exp_after:NN \gdef_protected:Npn \cs:w #1\cs_end:}
+\def_new:Npn \gdef_protected:cpx #1{
+ \exp_after:NN\gdef_protected:Npx\cs:w #1\cs_end:}
+\def_new:Npn \def_protected_new:cpn #1{
+ \exp_after:NN \def_protected_new:Npn \cs:w #1\cs_end:}
+\def_new:Npn \def_protected_new:cpx #1{
+ \exp_after:NN \def_protected_new:Npx \cs:w #1\cs_end:}
+\def_new:Npn \gdef_protected_new:cpn #1{
+ \exp_after:NN \gdef_protected_new:Npn \cs:w #1\cs_end:}
+\def_new:Npn \gdef_protected_new:cpx #1{
+ \exp_after:NN \gdef_protected_new:Npx \cs:w #1\cs_end:}
+\def_new:Npn \def_protected_long:cpn #1{
+ \exp_after:NN \def_protected_long:Npn \cs:w #1\cs_end:}
+\def_new:Npn \def_protected_long:cpx #1{
+ \exp_after:NN\def_protected_long:Npx\cs:w #1\cs_end:}
+\def_new:Npn \gdef_protected_long:cpn #1{
+ \exp_after:NN \gdef_protected_long:Npn \cs:w #1\cs_end:}
+\def_new:Npn \gdef_protected_long:cpx #1{
+ \exp_after:NN\gdef_protected_long:Npx\cs:w #1\cs_end:}
+\def_new:Npn \def_protected_long_new:cpn #1{
+ \exp_after:NN \def_protected_long_new:Npn \cs:w #1\cs_end:}
+\def_new:Npn \def_protected_long_new:cpx #1{
+ \exp_after:NN \def_protected_long_new:Npx \cs:w #1\cs_end:}
+\def_new:Npn \gdef_protected_long_new:cpn #1{
+ \exp_after:NN \gdef_protected_long_new:Npn \cs:w #1\cs_end:}
+\def_new:Npn \gdef_protected_long_new:cpx #1{
+ \exp_after:NN \gdef_protected_long_new:Npx \cs:w #1\cs_end:}
+\def_new:cpn {def_aux_0:NNn} #1#2 {#1 #2 }
+\def_new:cpn {def_aux_1:NNn} #1#2 {#1 #2 ##1 }
+\def_new:cpn {def_aux_2:NNn} #1#2 {#1 #2 ##1##2 }
+\def_new:cpn {def_aux_3:NNn} #1#2 {#1 #2 ##1##2##3 }
+\def_new:cpn {def_aux_4:NNn} #1#2 {#1 #2 ##1##2##3##4 }
+\def_new:cpn {def_aux_5:NNn} #1#2 {#1 #2 ##1##2##3##4##5 }
+\def_new:cpn {def_aux_6:NNn} #1#2 {#1 #2 ##1##2##3##4##5##6 }
+\def_new:cpn {def_aux_7:NNn} #1#2 {#1 #2 ##1##2##3##4##5##6##7 }
+\def_new:cpn {def_aux_8:NNn} #1#2 {#1 #2 ##1##2##3##4##5##6##7##8 }
+\def_new:cpn {def_aux_9:NNn} #1#2 {#1 #2 ##1##2##3##4##5##6##7##8##9 }
+\def_protected_long_new:Npn \def_aux:NNnn #1#2#3#4 {
+ \cs_if_really_exist:cTF {def_aux_\tex_the:D\etex_numexpr:D #3 :NNn}
+ {
+ \cs_use:c {def_aux_\tex_the:D\etex_numexpr:D #3 :NNn} #1 #2 {#4}
+ }
+ { \def_arg_number_error_msg:Nn #2{#3} }
+}
+\def_new:Npn \def_aux:Ncnn #1#2{
+ \exp_after:NN \def_aux:NNnn \exp_after:NN #1 \cs:w #2\cs_end:}
+\def_new:Npn \def_arg_number_error_msg:Nn #1#2 {
+ \err_latex_bug:x{
+ You're~ trying~ to~ define~ the~ command~ `\token_to_string:N #1'~
+ with~ \use_arg_i:n{\tex_the:D\etex_numexpr:D #2\scan_stop:} ~
+ arguments~ but~ I~ only~ allow~ 0-9~ arguments.~ I~ can~ probably~
+ not~ help~ you~ here
+ }
+}
+\def:cpn{def_aux_use_0_parameter:}{}
+\def:cpn{def_aux_use_1_parameter:}{{##1}}
+\def:cpn{def_aux_use_2_parameter:}{{##1}{##2}}
+\def:cpn{def_aux_use_3_parameter:}{{##1}{##2}{##3}}
+\def:cpn{def_aux_use_4_parameter:}{{##1}{##2}{##3}{##4}}
+\def:cpn{def_aux_use_5_parameter:}{{##1}{##2}{##3}{##4}{##5}}
+\def:cpn{def_aux_use_6_parameter:}{{##1}{##2}{##3}{##4}{##5}{##6}}
+\def:cpn{def_aux_use_7_parameter:}{{##1}{##2}{##3}{##4}{##5}{##6}{##7}}
+\def:cpn{def_aux_use_8_parameter:}{
+ {##1}{##2}{##3}{##4}{##5}{##6}{##7}{##8}}
+\def:cpn{def_aux_use_9_parameter:}{
+ {##1}{##2}{##3}{##4}{##5}{##6}{##7}{##8}{##9}}
+\def_new:Npn \def:NNn { \def_aux:NNnn \def:Npn }
+\def_new:Npn \def:NNx { \def_aux:NNnn \def:Npx }
+\def_new:Npn \def:cNn { \def_aux:Ncnn \def:Npn }
+\def_new:Npn \def:cNx { \def_aux:Ncnn \def:Npx }
+\def_new:Npn \gdef:NNn { \def_aux:NNnn \gdef:Npn }
+\def_new:Npn \gdef:NNx { \def_aux:NNnn \gdef:Npx }
+\def_new:Npn \gdef:cNn { \def_aux:Ncnn \gdef:Npn }
+\def_new:Npn \gdef:cNx { \def_aux:Ncnn \gdef:Npx }
+\def_new:Npn \def_new:NNn { \def_aux:NNnn \def_new:Npn }
+\def_new:Npn \def_new:NNx { \def_aux:NNnn \def_new:Npx }
+\def_new:Npn \def_new:cNn { \def_aux:Ncnn \def_new:Npn }
+\def_new:Npn \def_new:cNx { \def_aux:Ncnn \def_new:Npx }
+\def_new:Npn \gdef_new:NNn { \def_aux:NNnn \gdef_new:Npn }
+\def_new:Npn \gdef_new:NNx { \def_aux:NNnn \gdef_new:Npx }
+\def_new:Npn \gdef_new:cNn { \def_aux:Ncnn \gdef_new:Npn }
+\def_new:Npn \gdef_new:cNx { \def_aux:Ncnn \gdef_new:Npx }
+\def_new:Npn \def_long:NNn { \def_aux:NNnn \def_long:Npn }
+\def_new:Npn \def_long:NNx { \def_aux:NNnn \def_long:Npx }
+\def_new:Npn \def_long:cNn { \def_aux:Ncnn \def_long:Npn }
+\def_new:Npn \def_long:cNx { \def_aux:Ncnn \def_long:Npx }
+\def_new:Npn \gdef_long:NNn { \def_aux:NNnn \gdef_long:Npn }
+\def_new:Npn \gdef_long:NNx { \def_aux:NNnn \gdef_long:Npx }
+\def_new:Npn \gdef_long:cNn { \def_aux:Ncnn \gdef_long:Npn }
+\def_new:Npn \gdef_long:cNx { \def_aux:Ncnn \gdef_long:Npx }
+\def_new:Npn \def_long_new:NNn { \def_aux:NNnn \def_long_new:Npn }
+\def_new:Npn \def_long_new:NNx { \def_aux:NNnn \def_long_new:Npx }
+\def_new:Npn \def_long_new:cNn { \def_aux:Ncnn \def_long_new:Npn }
+\def_new:Npn \def_long_new:cNx { \def_aux:Ncnn \def_long_new:Npx }
+\def_new:Npn \gdef_long_new:NNn { \def_aux:NNnn \gdef_long_new:Npn }
+\def_new:Npn \gdef_long_new:NNx { \def_aux:NNnn \gdef_long_new:Npx }
+\def_new:Npn \gdef_long_new:cNn { \def_aux:Ncnn \gdef_long_new:Npn }
+\def_new:Npn \gdef_long_new:cNx { \def_aux:Ncnn \gdef_long_new:Npx }
+\def_new:Npn \def_protected:NNn { \def_aux:NNnn \def_protected:Npn }
+\def_new:Npn \def_protected:NNx { \def_aux:NNnn \def_protected:Npx }
+\def_new:Npn \def_protected:cNn { \def_aux:Ncnn \def_protected:Npn }
+\def_new:Npn \def_protected:cNx { \def_aux:Ncnn \def_protected:Npx }
+\def_new:Npn \gdef_protected:NNn { \def_aux:NNnn \gdef_protected:Npn }
+\def_new:Npn \gdef_protected:NNx { \def_aux:NNnn \gdef_protected:Npx }
+\def_new:Npn \gdef_protected:cNn { \def_aux:Ncnn \gdef_protected:Npn }
+\def_new:Npn \gdef_protected:cNx { \def_aux:Ncnn \gdef_protected:Npx }
+\def_new:Npn \def_protected_new:NNn { \def_aux:NNnn \def_protected_new:Npn }
+\def_new:Npn \def_protected_new:NNx { \def_aux:NNnn \def_protected_new:Npx }
+\def_new:Npn \def_protected_new:cNn { \def_aux:Ncnn \def_protected_new:Npn }
+\def_new:Npn \def_protected_new:cNx { \def_aux:Ncnn \def_protected_new:Npx }
+\def_new:Npn \gdef_protected_new:NNn { \def_aux:NNnn \gdef_protected_new:Npn }
+\def_new:Npn \gdef_protected_new:NNx { \def_aux:NNnn \gdef_protected_new:Npx }
+\def_new:Npn \gdef_protected_new:cNn { \def_aux:Ncnn \gdef_protected_new:Npn }
+\def_new:Npn \gdef_protected_new:cNx { \def_aux:Ncnn \gdef_protected_new:Npx }
+\def_new:Npn \def_protected_long:NNn { \def_aux:NNnn \def_protected_long:Npn }
+\def_new:Npn \def_protected_long:NNx { \def_aux:NNnn \def_protected_long:Npx }
+\def_new:Npn \def_protected_long:cNn { \def_aux:Ncnn \def_protected_long:Npn }
+\def_new:Npn \def_protected_long:cNx { \def_aux:Ncnn \def_protected_long:Npx }
+\def_new:Npn \gdef_protected_long:NNn { \def_aux:NNnn \gdef_protected_long:Npn }
+\def_new:Npn \gdef_protected_long:NNx { \def_aux:NNnn \gdef_protected_long:Npx }
+\def_new:Npn \gdef_protected_long:cNn { \def_aux:Ncnn \gdef_protected_long:Npn }
+\def_new:Npn \gdef_protected_long:cNx { \def_aux:Ncnn \gdef_protected_long:Npx }
+\def_new:Npn \def_protected_long_new:NNn {
+ \def_aux:NNnn \def_protected_long_new:Npn }
+\def_new:Npn \def_protected_long_new:NNx {
+ \def_aux:NNnn \def_protected_long_new:Npx }
+\def_new:Npn \def_protected_long_new:cNn {
+ \def_aux:Ncnn \def_protected_long_new:Npn }
+\def_new:Npn \def_protected_long_new:cNx {
+ \def_aux:Ncnn \def_protected_long_new:Npx }
+\def_new:Npn \gdef_protected_long_new:NNn {
+ \def_aux:NNnn \gdef_protected_long_new:Npn }
+\def_new:Npn \gdef_protected_long_new:NNx {
+ \def_aux:NNnn \gdef_protected_long_new:Npx }
+\def_new:Npn \gdef_protected_long_new:cNn {
+ \def_aux:Ncnn \gdef_protected_long_new:Npn }
+\def_new:Npn \gdef_protected_long_new:cNx {
+ \def_aux:Ncnn \gdef_protected_long_new:Npx }
+\def_protected_long_new:Npn \let:NN #1{
+ \let:NwN #1=~}
+\def_new:Npn\let:cN #1 {\exp_after:NN\let:NN\cs:w#1\cs_end:}
+\def_new:Npn\let:Nc{\exp_args:NNc\let:NN}
+\def_new:Npn\let:cc{\exp_args:Ncc\let:NN}
+\def_new:Npn \let_new:NN #1{\chk_new_cs:N #1
+ \let:NN #1}
+\def_new:Npn \let_new:cN {\exp_args:Nc \let_new:NN}
+\def_new:Npn \let_new:Nc {\exp_args:NNc \let_new:NN}
+\def_new:Npn \let_new:cc {\exp_args:Ncc \let_new:NN}
+\def_protected_new:Npn \glet:NN {\pref_global:D \let:NN}
+\def_protected_new:Npn \glet:Nc {\exp_args:NNc \glet:NN}
+\def_protected_new:Npn \glet:cN {\exp_args:Nc \glet:NN}
+\def_new:Npn \glet:cc {\exp_args:Ncc \glet:NN}
+\def_new:Npn \glet_new:NN #1{\chk_new_cs:N #1
+ \tex_global:D\let:NN #1}
+\def_new:Npn \glet_new:cN {\exp_args:Nc \glet_new:NN}
+\def_new:Npn \glet_new:Nc {\exp_args:NNc \glet_new:NN}
+\def_new:Npn \glet_new:cc {\exp_args:Ncc \glet_new:NN}
+\def_new:Npn \def:No{\exp_args:NNo\def:Npn}
+\def_new:Npn \gdef:No {\exp_args:NNo\gdef:Npn}
+\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 {#2T} #3 {#4
+ \else:\exp_after:NN\use_none:nn\fi:\use_arg_i:n}
+ #1 {#2F} #3 {#4
+ \exp_after:NN\use_none:nn\fi:\use_arg_i:n}}
+\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 {#2T} #3 {#4
+ \exp_not:n{\else:\exp_after:NN\use_none:nn\fi:\use_arg_i:n}}
+ #1 {#2F} #3 {#4
+ \exp_not:n{\exp_after:NN\use_none:nn\fi:\use_arg_i:n}}}
+\def_long_new:Npn \def_test_function:npn #1#2#{
+ \def_test_function_aux:Nnnn \def:cpn {#1}{#2}
+}
+\def_long_new:Npn \def_test_function:npx #1#2#{
+ \def_test_function_aux:Nnnx \def:cpx {#1}{#2}
+}
+\def_long_new:Npn \def_long_test_function:npn #1#2#{
+ \def_test_function_aux:Nnnn \def_long:cpn {#1}{#2}
+}
+\def_long_new:Npn \def_long_test_function:npx #1#2#{
+ \def_test_function_aux:Nnnx \def_long:cpx {#1}{#2}
+}
+\def_long_new:Npn \def_test_function_new:npn #1#2#{
+ \def_test_function_aux:Nnnn \def_new:cpn {#1}{#2}
+}
+\def_long_new:Npn \def_long_test_function_new:npn #1#2#{
+ \def_test_function_aux:Nnnn \def_long_new:cpn {#1}{#2}
+}
+\def_long_new:Npn \def_test_function_new:npx #1#2#{
+ \def_test_function_aux:Nnnx \def_new:cpx {#1}{#2}
+}
+\def_long_new:Npn \def_long_test_function_new:npx #1#2#{
+ \def_test_function_aux:Nnnx \def_long_new:cpx {#1}{#2}
+}
+\def_long_test_function_new:npn {cs_if_free:N}#1{\if:w\cs_if_free_p:N #1}
+\let:NN \cs_free:NTF \cs_if_free:NTF
+\let:NN \cs_free:NT \cs_if_free:NT
+\let:NN \cs_free:NF \cs_if_free:NF
+\def_long_test_function_new:npn {cs_if_free:c}#1{
+ \exp_after:NN \if_meaning:NN \cs:w#1\cs_end: \scan_stop:}
+\let:NN \cs_free:cTF \cs_if_free:cTF
+\let:NN \cs_free:cT \cs_if_free:cT
+\let:NN \cs_free:cF \cs_if_free:cF
+\def_long_test_function_new:npn {cs_if_really_free:c}#1{
+ \reverse_if:N\if_cs_exist:w #1\cs_end:}
+\let:NN \cs_really_free:cTF \cs_if_really_free:cTF
+\let:NN \cs_really_free:cT \cs_if_really_free:cT
+\let:NN \cs_really_free:cF \cs_if_really_free:cF
+\def_long_test_function_new:npn {cs_if_exist:N}#1{\if:w\cs_if_exist_p:N #1}
+\def_long_test_function_new:npn {cs_if_exist:c}#1{
+ \exp_after:NN\reverse_if:N
+ \exp_after:NN \if_meaning:NN \cs:w#1\cs_end: \scan_stop:}
+\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_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
+ {\cs:w #1\exp_after:NN\cs_end:\cs:w #2\cs_end:}
+\def_long_new:Npn \use_arg_i:nn #1#2{#1}
+\def_long_new:Npn \use_arg_ii:nn #1#2{#2}
+\def_long_new:NNn \use_arg_i:nnn 3{#1}
+\def_long_new:NNn \use_arg_ii:nnn 3{#2}
+\def_long_new:NNn \use_arg_iii:nnn 3{#3}
+\def_long_new:NNn \use_arg_i:nnnn 4{#1}
+\def_long_new:NNn \use_arg_ii:nnnn 4{#2}
+\def_long_new:NNn \use_arg_iii:nnnn 4{#3}
+\def_long_new:NNn \use_arg_iv:nnnn 4{#4}
+\def_long_new:NNn\use_arg_i_ii:nn 2{#1#2}
+\def_long_new:Npn \use_none_delimit_by_q_nil:w #1\q_nil{}
+\def_long_new:Npn \use_none_delimit_by_q_stop:w #1\q_stop{}
+\def_long_new:Npn \use_arg_i_delimit_by_q_nil:nw #1#2\q_nil{#1}
+\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:NNn \use_none:nn 2{}
+\def_long_new:NNn \use_none:nnn 3{}
+\def_long_new:NNn \use_none:nnnn 4{}
+\def_long_new:NNn \use_none:nnnnn 5{}
+\def_long_new:NNn \use_none:nnnnnn 6{}
+\def_long_new:NNn \use_none:nnnnnnn 7{}
+\def_long_new:NNn \use_none:nnnnnnnn 8{}
+\def_long_new:NNn \use_none:nnnnnnnnn 9{}
+\def_new:Npn \gtmp:w {}
+\def_new:Npn \tmp:w {}
+\def_new:Npn \use_noop: {}
+\def_new:Npn \cs_to_str:N {\exp_after:NN\use_none:n \token_to_string:N}
+\def_test_function_new:npn {cs_if_eq:NN} #1#2{\if_meaning:NN #1#2}
+\def_new:Npn \cs_if_eq:cNTF {\exp_args:Nc \cs_if_eq:NNTF}
+\def_new:Npn \cs_if_eq:cNT {\exp_args:Nc \cs_if_eq:NNT}
+\def_new:Npn \cs_if_eq:cNF {\exp_args:Nc \cs_if_eq:NNF}
+\def_new:Npn \cs_if_eq:NcTF {\exp_args:NNc \cs_if_eq:NNTF}
+\def_new:Npn \cs_if_eq:NcT {\exp_args:NNc \cs_if_eq:NNT}
+\def_new:Npn \cs_if_eq:NcF {\exp_args:NNc \cs_if_eq:NNF}
+\def_new:Npn \cs_if_eq:ccTF {\exp_args:Ncc \cs_if_eq:NNTF}
+\def_new:Npn \cs_if_eq:ccT {\exp_args:Ncc \cs_if_eq:NNT}
+\def_new:Npn \cs_if_eq:ccF {\exp_args:Ncc \cs_if_eq:NNF}
+\def_new:Npn\file_not_found:nTF #1#2#3{\IfFileExists{#1}{#3}{#2}}
+%% File: l3chk.dtx Copyright (C) 1990-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.
+%%
+%% -----------------------------------------------------------------------
+%%
+\GetIdInfo$Id: l3chk.dtx 573 2006-08-21 20:59:37Z 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}
+
+\def_new:Npn \chk_local_aux:w #1#2#3\q_stop{
+ \if_num:w\tex_uccode:D`#2=`G\scan_stop:
+ \err_latex_bug:x{Local~mismatch:~local~function~called~with~
+ global~variable:^^J\text_put_four_sp: #1#2#3~
+ on~line~\tex_the:D\tex_inputlineno:D}
+ \else:
+ \if_num:w\tex_uccode:D`#2=`L\scan_stop:
+ \else:
+ \err_latex_bug:x{Variable~mismatch:~function~not~called~with~
+ proper~variable:^^J\text_put_four_sp: #1#2#3~
+ on~line~\tex_the:D\tex_inputlineno:D}\fi:
+ \fi:}
+\tex_newlinechar:D=`\^^J
+\def_new:Npn \chk_global:N #1{\exp_after:NN
+ \chk_global_aux:w \token_to_string:N#1\q_stop}
+\def_new:Npn \chk_global_aux:w #1#2#3\q_stop{
+ \if_num:w\tex_uccode:D`#2=`L\scan_stop:
+ \err_latex_bug:x{Global~mismatch:~global~function~called~with~
+ local~variable:~#1#2#3~
+ on~line~\tex_the:D\tex_inputlineno:D}
+ \else:
+ \if_num:w\tex_uccode:D`#2=`G\scan_stop:
+ \else:
+ \err_latex_bug:x{Variable~mismatch:~function~not~called~with~
+ proper~variable:~#1#2#3~
+ on~line~\tex_the:D\tex_inputlineno:D}\fi:\fi:}
+\def_new:Npn \pref_global_chk: {
+ \gdef:Npn \chk_local_or_pref_global:N ##1{
+ \chk_global:N ##1
+ \glet:NN \chk_local_or_pref_global:N \chk_local:N}
+ \pref_global:D}
+\let_new:NN \chk_local_or_pref_global:N \chk_local:N
+\def_new:Npn \chk_var_or_const:N #1{\exp_after:NN
+ \chk_var_or_const_aux:w \token_to_string:N#1\q_stop }
+\def_new:Npn \chk_var_or_const_aux:w #1#2#3\q_stop {
+ \if_num:w\tex_uccode:D`#2=`L\scan_stop:
+ \else:
+ \if_num:w\tex_uccode:D`#2=`G\scan_stop:
+ \else:
+ \if_num:w\tex_uccode:D`#2=`C\scan_stop:
+ \else:
+ \if_charcode:w#2q\scan_stop:
+ \else:
+ \err_latex_bug:x{Variable~mismatch:~function~not~called~with~
+ proper~variable:^^J\text_put_four_sp: #1#2#3~
+ on~line~\tex_the:D\tex_inputlineno:D}\fi:\fi:\fi:
+ \fi:}
+\def_new:Npn\donotcheck{
+ \let:NN \chk_global:N \use_none:n
+ \let:NN \chk_local:N \use_none:n
+ \let:NN \chk_local_or_pref_global:N \use_none:n
+ \let:NN \pref_global_chk: \pref_global:D
+ \let:NN \chk_new_cs:N \use_none:n
+ \let:NN \chk_exist_cs:N \use_none:n
+ \let:NN \chk_var_or_const:N \use_none:n
+ \let:NN \cs_record_name:N \use_none:n
+ \let:NN \cs_record_name:c \use_none:n
+ \let:NN \cs_record_meaning:N \use_none:n
+ \let:NN \register_record_name:N \use_none:n
+}
+\def_new:Npn\absolutelytracingall{
+ \pref_global:D\g_trace_commands_status\c_two
+ \pref_global:D\g_trace_statistics_status\c_two
+ \pref_global:D\g_trace_pages_status\c_one
+ \pref_global:D\g_trace_output_status\c_one
+ \pref_global:D\g_trace_chars_status\c_one
+ \pref_global:D\g_trace_macros_status\c_two
+ \pref_global:D\g_trace_paragraphs_status\c_one
+ \pref_global:D\g_trace_restores_status\c_one
+ \pref_global:D\g_trace_box_breadth_int\c_ten_thousand
+ \pref_global:D\g_trace_box_depth_int\c_ten_thousand
+ \pref_global:D\g_trace_online_status\c_one
+ \tex_errorstopmode:D}
+\def_new:Npn\tracingoff{
+ \pref_global:D\g_trace_online_status\c_zero
+ \pref_global:D\g_trace_commands_status\c_zero
+ \pref_global:D\g_trace_statistics_status\c_zero
+ \pref_global:D\g_trace_pages_status\c_zero
+ \pref_global:D\g_trace_output_status\c_zero
+ \pref_global:D\g_trace_chars_status\c_zero
+ \pref_global:D\g_trace_macros_status\c_zero
+ \pref_global:D\g_trace_paragraphs_status\c_zero
+ \pref_global:D\g_trace_restores_status\c_zero
+ \pref_global:D\g_trace_box_breadth_int\c_zero
+ \pref_global:D\g_trace_box_depth_int\c_zero
+}
+\let_new:NN\traceon\use_none:n
+\let_new:NN\traceoff\use_none:n
+%% File: l3tlp.dtx Copyright (C) 1990-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.
+%%
+%% -----------------------------------------------------------------------
+\GetIdInfo$Id: l3tlp.dtx 581 2006-12-12 12:28:27Z morten $
+ {L3 Experimental Token List Pointers}
+\def_long_new:Npn \tlp_new:Nn #1#2{
+ \chk_new_cs:N #1
+ \gdef:Npn #1{#2}
+}
+\def_new:Npn \tlp_new:cn {\exp_args:Nc \tlp_new:Nn }
+\def_long_new:Npn \tlp_new:Nx #1#2{
+ \chk_new_cs:N #1
+ \gdef:Npx #1{#2}
+}
+\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'~
+ has~ an~ erroneous~ structure!}
+ \else:
+ \exp_after:NN #1
+ \fi:
+}
+\def_new:Npn \tlp_use:c {\exp_args:Nc \tlp_use:N}
+\def_long_new:Npn\tlp_set:Nn#1#2{\def:Npn#1{#2}}
+\def_long_new:Npn\tlp_set:Nx#1#2{\def:Npx#1{#2}}
+\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: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: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
+\let_new:NN \tlp_gset_eq:NN \glet:NN
+\def_new:Npn \tlp_set_eq:Nc {\exp_args:NNc \tlp_set_eq:NN}
+\def_new:Npn \tlp_set_eq:cN {\exp_args:Nc \tlp_set_eq:NN}
+\def_new:Npn \tlp_set_eq:cc {\exp_args:Ncc \tlp_set_eq:NN}
+\def_new:Npn \tlp_gset_eq:Nc {\exp_args:NNc \tlp_gset_eq:NN}
+\def_new:Npn \tlp_gset_eq:cN {\exp_args:Nc \tlp_gset_eq:NN}
+\def_new:Npn \tlp_gset_eq:cc {\exp_args:Ncc \tlp_gset_eq:NN}
+\def_new:Npn \tlp_clear:N #1{\tlp_set_eq:NN #1\c_empty_tlp}
+\def_new:Npn \tlp_clear:c {\exp_args:Nc \tlp_clear:N}
+\def_new:Npn \tlp_gclear:N #1{\tlp_gset_eq:NN #1\c_empty_tlp}
+\def_new:Npn \tlp_gclear:c {\exp_args:Nc \tlp_gclear:N}
+\let_new:NN \tlp_clear_new:N \tlp_clear:N
+\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_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_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_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}
+\def_new:Npn \tlp_set:Nc #1#2{\tlp_set:No #1{\cs:w#2\cs_end:}}
+\def_new:Npn \tlp_if_empty_p:N #1{
+ \if_meaning:NN#1\c_empty_tlp \c_true \else: \c_false \fi:}
+\def_new:Npn \tlp_if_empty_p:c {\exp_args:Nc\tlp_if_empty_p:N}
+\def_test_function_new:npn {tlp_if_empty:N} #1{
+ \if_meaning:NN#1\c_empty_tlp}
+\def_new:Npn \tlp_if_empty:cTF {\exp_args:Nc \tlp_if_empty:NTF}
+\def_new:Npn \tlp_if_empty:cT {\exp_args:Nc \tlp_if_empty:NT}
+\def_new:Npn \tlp_if_empty:cF {\exp_args:Nc \tlp_if_empty:NF}
+\def_new:Npn \tlp_if_eq_p:NN #1#2{
+ \if_meaning:NN#1#2 \c_true \else: \c_false \fi:}
+\def_new:Npn \tlp_if_eq_p:Nc {\exp_args:NNc\tlp_if_empty_p:NN}
+\def_new:Npn \tlp_if_eq_p:cN {\exp_args:Nc\tlp_if_empty_p:NN}
+\def_new:Npn \tlp_if_eq_p:cc {\exp_args:Ncc\tlp_if_empty_p:NN}
+\def_test_function_new:npn {tlp_if_eq:NN} #1#2{\if_meaning:NN#1#2}
+\def_new:Npn \tlp_if_eq:cNTF{\exp_args:Nc \tlp_if_eq:NNTF}
+\def_new:Npn \tlp_if_eq:cNT {\exp_args:Nc \tlp_if_eq:NNT}
+\def_new:Npn \tlp_if_eq:cNF {\exp_args:Nc \tlp_if_eq:NNF}
+\def_new:Npn \tlp_if_eq:NcTF{\exp_args:NNc \tlp_if_eq:NNTF}
+\def_new:Npn \tlp_if_eq:NcT {\exp_args:NNc \tlp_if_eq:NNT}
+\def_new:Npn \tlp_if_eq:NcF {\exp_args:NNc \tlp_if_eq:NNF}
+\def_new:Npn \tlp_if_eq:ccTF{\exp_args:Ncc \tlp_if_eq:NNTF}
+\def_new:Npn \tlp_if_eq:ccT {\exp_args:Ncc \tlp_if_eq:NNT}
+\def_new:Npn \tlp_if_eq:ccF {\exp_args:Ncc \tlp_if_eq:NNF}
+\tlp_new:Nn \c_empty_tlp {}
+\tlp_new:Nn \c_relax_tlp {\scan_stop:}
+\tlp_new:Nn \g_tmpa_tlp{}
+\tlp_new:Nn \g_tmpb_tlp{}
+\tlp_new:Nn \l_testa_tlp {}
+\tlp_new:Nn \l_testb_tlp {}
+\tlp_new:Nn \g_testa_tlp {}
+\tlp_new:Nn \g_testb_tlp {}
+\tlp_new:Nn \l_tmpa_tlp{}
+\tlp_new:Nn \l_tmpb_tlp{}
+\def_new:Npn \tlp_to_str:N {\exp_after:NN\tlp_to_str_aux:w
+ \token_to_meaning:N}
+\def_new:Npn \tlp_to_str_aux:w #1>{}
+\def_new:Npn\tlp_to_str:c{\exp_args:Nc\tlp_to_str:N}
+\def_long_new:Npn \tlist_if_empty_p:n #1{
+ \exp_after:NN\if_meaning:NN\exp_after:NN\q_nil\tlist_to_str:n{#1}\q_nil
+ \c_true
+ \else:
+ \c_false
+ \fi:
+}
+\def_new:Npn \tlist_if_empty_p:o {\exp_args:No\tlist_if_empty_p:n}
+\def_long_test_function_new:npn{tlist_if_empty:n}#1{
+ \if:w\tlist_if_empty_p:n{#1}}
+\def_long_test_function_new:npn{tlist_if_empty:o}#1{
+ \if:w\tlist_if_empty_p:o{#1}}
+\def_long_new:Npn \tlist_if_blank_p:n #1{
+ \exp_after:NN\tlist_if_blank_p_aux:w\tlist_to_str:n{#1}aa..\q_nil
+}
+\def_new:Npn \tlist_if_blank_p_aux:w #1#2a#3#4\q_nil{
+ \if_meaning:NN #3#4\c_true\else:\c_false\fi:}
+\def_long_test_function_new:npn{tlist_if_blank:n}#1{
+ \if:w\tlist_if_blank_p:n{#1}}
+\def:Npn \tlist_if_blank_p:o{\exp_args:No\tlist_if_blank_p:n}
+\def_long_test_function_new:npn{tlist_if_blank:o}#1{
+ \if:w\tlist_if_blank_p:o{#1}}
+\let_new:NN \tlist_to_lowercase:n \tex_lowercase:D
+\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
+}
+\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
+}
+\def_long_new:Npn \tlist_map_function_aux:Nn #1#2{
+ \quark_if_nil:nT{#2} \tlist_map_break:w
+ #1{#2} \tlist_map_function_aux:Nn #1
+}
+\def_new:Npn\tlp_map_function:cN{\exp_args:Nc\tlp_map_function:NN}
+\def_long_new:Npn \tlist_map_inline:nn #1#2{
+ \num_incr:N \l_tlp_inline_level_num
+ \def_long:cpn {tlist_map_inline_ \num_use:N \l_tlp_inline_level_num :n}
+ ##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
+ \num_decr:N \l_tlp_inline_level_num
+}
+\def_long_new:Npn \tlp_map_inline:Nn #1#2{
+ \num_incr:N \l_tlp_inline_level_num
+ \def_long:cpn {tlist_map_inline_ \num_use:N \l_tlp_inline_level_num :n}
+ ##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
+ \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
+}
+\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
+ #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 \tlp_map_break:w \tlist_map_break:w
+\let_new:NN \tlist_compare:xx \pdfstrcmp
+\def_long_new:NNn \tlist_compare:nn 2{
+ \tlist_compare:xx{\exp_not:n{#1}}{\exp_not:n{#2}}
+}
+\def_long_new:NNn \tlist_compare:nx 1{
+ \tlist_compare:xx{\exp_not:n{#1}}
+}
+\def_long_new:NNn \tlist_compare:xn 2{
+ \tlist_compare:xx{#1}{\exp_not:n{#2}}
+}
+\def_long_new:NNn \tlist_compare:no 2{
+ \tlist_compare:xx{\exp_not:n{#1}}{\exp_not:n\exp_after:NN{#2}}
+}
+\def_long_new:NNn \tlist_compare:on 2{
+ \tlist_compare:xx{\exp_not:n\exp_after:NN{#1}}{\exp_not:n{#2}}
+}
+\def_long_new:NNn \tlist_compare:oo 2{
+ \tlist_compare:xx{\exp_not:n\exp_after:NN{#1}}{\exp_not:n\exp_after:NN{#2}}
+}
+\def_long_new:NNn \tlist_compare:xo 2{
+ \tlist_compare:xx{#1}{\exp_not:n\exp_after:NN{#2}}
+}
+\def_long_new:NNn \tlist_compare:ox 2{
+ \tlist_compare:xx{\exp_not:n\exp_after:NN{#1}}{\exp_not:n{#2}}
+}
+\def:Npn \tmp:w #1{
+ \def_long_new:cNx {tlist_if_eq_p:#1} 2{
+ \exp_not:N \if_num:w
+ \exp_after:NN \exp_not:N \cs:w tlist_compare:#1\cs_end:{##1}{##2}
+ \exp_not:n{ =\c_zero \c_true \else: \c_false \fi: }
+ }
+ \def_long_test_function_new:npx{tlist_if_eq:#1}##1##2{
+ \exp_not:N \if_num:w
+ \exp_after:NN \exp_not:N \cs:w tlist_compare:#1\cs_end:{##1}{##2}
+ \exp_not:n{ =\c_zero }
+ }
+}
+\tmp:w{xx} \tmp:w{nn} \tmp:w{oo} \tmp:w{xn} \tmp:w{nx}
+\tmp:w{on} \tmp:w{no} \tmp:w{xo} \tmp:w{ox}
+\cs_if_really_free:cT{pdf_strcmp:D}{
+ \def_long_test_function:npn{tlist_if_eq:nn}#1#2{
+ \tlp_set:Nx \l_testa_tlp {\exp_not:n{#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:Npn \tlp_if_in:NnTF #1#2{
+ \def_long:Npn\tmp:w ##1 #2 ##2\q_stop{
+ \quark_if_no_value:nFT{##2}
+ }
+ \exp_after:NN \tmp:w #1 #2 \q_no_value \q_stop
+}
+\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}
+ }
+ \exp_after:NN \tmp:w #1 #2 \q_no_value \q_stop
+}
+\def_new:Npn \tlp_if_in:cnT {\exp_args:Nc\tlp_if_in:NnT}
+\def_long:Npn \tlp_if_in:NnF #1#2{
+ \def_long:Npn\tmp:w ##1 #2 ##2\q_stop{
+ \quark_if_no_value:nT{##2}
+ }
+ \exp_after:NN \tmp:w #1 #2 \q_no_value \q_stop
+}
+\def_new:Npn \tlp_if_in:cnF {\exp_args:Nc\tlp_if_in:NnF}
+\def_long_new:Npn \tlist_if_in:nnTF #1#2{
+ \def_long:Npn\tmp:w ##1 #2 ##2\q_stop{
+ \quark_if_no_value:nFT{##2}
+ }
+ \tmp:w #1 #2 \q_no_value \q_stop
+}
+\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{
+ \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{
+ \tlp_put_right:Nx \l_tlp_replace_tlp {\exp_not:o{\use_none:n ####1}}
+ }
+ \tmp:w \q_mark ##2
+ }
+ #1#2\l_tlp_replace_tlp
+ }
+ \use_arg_i:n{\exp_after:NN \tmp:w\exp_after:NN\q_mark}
+ #2#3 \q_no_value\q_stop
+}
+\def_new:Npn \tlp_replace_in:Nnn {\tlp_replace_in_aux:NNnn \tlp_set_eq:NN}
+\def_new:Npn \tlp_replace_in:cnn{\exp_args:Nc\tlp_replace_in:Nnn}
+\def_new:Npn \tlp_greplace_in:Nnn {\tlp_replace_in_aux:NNnn \tlp_gset_eq:NN}
+\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{
+ \quark_if_no_value:nTF{##2}
+ {
+ \tlp_put_right:Nx \l_tlp_replace_tlp {\exp_not:o{\use_none:n##1}}
+ }
+ {
+ \tlp_put_right:Nx \l_tlp_replace_tlp {\exp_not:o{\use_none:n##1 #4}}
+ \tmp:w \q_mark##2 \q_stop
+ }
+ }
+ \use_arg_i:n{\exp_after:NN \tmp:w\exp_after:NN\q_mark}
+ #2#3 \q_no_value\q_stop
+ #1#2\l_tlp_replace_tlp
+}
+\def_new:Npn \tlp_replace_all_in:Nnn {
+ \tlp_replace_all_in_aux:NNnn \tlp_set_eq:NN}
+\def_new:Npn \tlp_replace_all_in:cnn{\exp_args:Nc\tlp_replace_all_in:Nnn}
+\def_new:Npn \tlp_greplace_all_in:Nnn {
+ \tlp_replace_all_in_aux:NNnn \tlp_gset_eq:NN}
+\def_new:Npn \tlp_greplace_all_in:cnn{\exp_args:Nc\tlp_greplace_all_in:Nnn}
+\def_long_new:NNn \tlp_remove_in:Nn 2{\tlp_replace_in:Nnn #1{#2}{}}
+\def_long_new:NNn \tlp_gremove_in:Nn 2{\tlp_greplace_in:Nnn #1{#2}{}}
+\def_new:Npn \tlp_remove_in:cn{\exp_args:Nc\tlp_remove_in:Nn}
+\def_new:Npn \tlp_gremove_in:cn{\exp_args:Nc\tlp_gremove_in:Nn}
+\def_long_new:Npn \tlp_remove_all_in:Nn #1#2{
+ \tlp_replace_all_in:Nnn #1{#2}{}
+}
+\def_long_new:Npn \tlp_gremove_all_in:Nn #1#2{
+ \tlp_greplace_all_in:Nnn #1{#2}{}
+}
+\def_new:Npn \tlp_remove_all_in:cn{\exp_args:Nc\tlp_remove_all_in:Nn}
+\def_new:Npn \tlp_gremove_all_in:cn{\exp_args:Nc\tlp_gremove_all_in:Nn}
+\def_long_new:Npn \tlist_head:n #1{\tlist_head:w #1\q_nil}
+\let_new:NN \tlist_head_i:n \tlist_head:n
+\def_long_new:Npn \tlist_tail:n #1{\tlist_tail:w #1\q_nil}
+\def_new:Npn \tlist_tail:f {\exp_args:Nf \tlist_tail:n}
+\def_long_new:Npn \tlist_head_iii:n #1{\tlist_head_iii:w #1\q_nil}
+\def_new:Npn \tlist_head_iii:f {\exp_args:Nf \tlist_head_iii:n}
+\let_new:NN \tlist_head:w \use_arg_i_delimit_by_q_nil:nw
+\def_long_new:Npn \tlist_tail:w #1#2\q_nil{#2}
+\def_long_new:Npn \tlist_head_iii:w #1#2#3#4\q_nil{#1#2#3}
+\def_long_new:Npn \tlist_if_head_eq_meaning_p:nN #1#2{
+ \exp_after:NN \if_meaning:NN \tlist_head:w #1\q_nil#2
+ \c_true
+ \else:
+ \c_false
+ \fi:
+}
+\def_long_test_function_new:npn {tlist_if_head_eq_meaning:nN}#1#2{
+ \if:w \tlist_if_head_eq_meaning_p:nN{#1}#2}
+\def_long_new:Npn \tlist_if_head_eq_charcode_p:nN #1#2{
+ \exp_after:NN\if_charcode:w \exp_after:NN\exp_not:N
+ \tlist_head:w #1\q_nil\exp_not:N#2
+ \c_true
+ \else:
+ \c_false
+ \fi:
+}
+\def_long_test_function_new:npn {tlist_if_head_eq_charcode:nN}#1#2{
+ \if:w\tlist_if_head_eq_charcode_p:nN{#1}#2}
+\def_long_new:Npn \tlist_if_head_eq_charcode_p:fN #1#2{
+ \exp_after:NN\if_charcode:w \tlist_head:w #1\q_nil\exp_not:N#2
+ \c_true
+ \else:
+ \c_false
+ \fi:
+}
+\def_long_test_function_new:npn {tlist_if_head_eq_charcode:fN}#1#2{
+ \if:w\tlist_if_head_eq_charcode_p:fN{#1}#2}
+\def_long_new:Npn \tlist_if_head_eq_catcode_p:nN #1#2{
+ \exp_after:NN\if_charcode:w \exp_after:NN\exp_not:N
+ \tlist_head:w #1\q_nil\exp_not:N#2
+ \c_true
+ \else:
+ \c_false
+ \fi:
+}
+\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
+}
+\def_long_new:Npn \tlist_reverse_aux:nN #1#2{
+ \quark_if_nil:NT #2
+ { \use_arg_i_delimit_by_q_stop:nw {#1} }
+ \tlist_reverse_aux:nN {#2#1}
+}
+%% File: l3expan.dtx Copyright (C) 1990-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.
+%%
+%% -----------------------------------------------------------------------
+\GetIdInfo$Id: l3expan.dtx 573 2006-08-21 20:59:37Z morten $
+ {L3 Experimental Argument Expansion module}
+\tlp_new:Nn\l_exp_tlp{}
+\def_new:Npn\exp_arg_next:nnn#1#2#3{
+ #2\:::{#3#1}
+}
+\def_new:Npn\::n#1\:::#2#3{
+ #1\:::{#2{#3}}
+}
+\def_new:Npn\::N#1\:::#2#3{
+ #1\:::{#2#3}
+}
+\def_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{
+ \exp_after:NN\exp_arg_next:nnn\exp_after:NN{\exp_after:NN{#3}}{#1}{#2}
+}
+\def_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{
+ \exp_after:NN\exp_C_aux:nnn\cs:w #3\cs_end:{#1}{#2}}
+\def_new:Npn\exp_C_aux:nnn #1
+ {
+ \exp_after:NN
+ \exp_arg_next:nnn
+ \exp_after:NN
+ {
+ \exp_after:NN
+ {#1}
+ }
+ }
+\def:Npn\::E#1\:::#2#3{
+ \exp_after:NN\exp_arg_next:nnn \exp_after:NN{#3}{#1}{#2}
+}
+\def:Npn\::e#1\:::#2#3{
+ \exp_after:NN\exp_arg_next:nnn \exp_after:NN{#3}{#1}{#2}
+}
+\def: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}
+}
+\let:NN \exp_args:NE \exp_after:NN
+\def:Npn \exp_args:NNE #1{\exp_args:NE#1\exp_args:NE}
+\def:Npn \exp_args:NNNE #1#2{\exp_args:NE#1\exp_args:NE#2\exp_args:NE}
+\def:Npn \exp_args:NEE #1{\exp_args:NE\exp_args:NE\exp_args:NE#1\exp_args:NE}
+\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:NcNc {\::c\::N\::c\:::}
+\def:Npn \exp_args:NcNo {\::c\::N\::o\:::}
+\def:Npn \exp_args:Ncco {\::c\::c\::o\:::}
+\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: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\:::}
+\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\:::}
+\def_new:Npn\exp_not:o#1{\exp_not:n\exp_after:NN{#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
+ \exp_after:NN#2\exp_after:NN{#3}}
+\def_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
+ \exp_after:NN{#3}}
+\def_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
+ \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
+ \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
+ \cs:w#3\cs_end:}
+\def_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
+ \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
+ \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
+ \cs_end:\exp_after:NN{#3}}
+\def:Npn\exp_def_form:nnn#1#2#3{
+ \exp_after:NN
+ \def:Npn
+ \cs:w
+ #1:#3
+ \exp_after:NN
+ \cs_end:
+ \exp_after:NN
+ {
+ \cs:w
+ exp_args:N#3
+ \exp_after:NN
+ \cs_end:
+ \cs:w
+ #1:#2
+ \cs_end:
+ }
+ \cs_if_free:cT
+ {exp_args:N#3}
+ {\def:cpx {exp_args:N#3}
+ {\exp_args_form_x:w #3 :}
+ }
+}
+\def_new:Npn\exp_args_form_x:w #1 {
+ \exp_not:c{::#1}
+ \if_meaning:NN #1 :
+ \else:
+ \exp_after:NN\exp_args_form_x:w
+ \fi:}
+%% File: l3quark.dtx Copyright (C) 1990-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.
+%%
+%% -----------------------------------------------------------------------
+\GetIdInfo$Id: l3quark.dtx 573 2006-08-21 20:59:37Z morten $
+ {L3 Experimental Quark Commands}
+\def_new:Npn \quark_new:N #1{\tlp_new:Nn #1{#1}}
+\quark_new:N \q_stop
+\quark_new:N \q_no_value
+\quark_new:N \q_nil
+\quark_new:N\q_error
+\quark_new:N\q_mark
+\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{
+ \if_meaning:NN \q_no_value #1 \c_true
+ \else: \c_false \fi:
+}
+\cs_if_really_free:cTF{pdf_strcmp:D}{
+ \def_long_new:Npn \quark_if_no_value_p:n #1{
+ \if:w \exp_args:No \str_if_eq_var_p:nf
+ {\token_to_string:N\q_no_value\text_put_sp:}
+ {\tlist_to_str:n{#1}}
+ \c_true
+ \else:
+ \c_false
+ \fi:
+ }
+}
+{
+ \def_long_new:Npn \quark_if_no_value_p:n #1{
+ \if_num:w
+ \pdf_strcmp:D {\exp_not:N \q_no_value}{\exp_not:n{#1}}=\c_zero
+ \c_true \else: \c_false \fi:
+ }
+}
+\def_long_test_function_new:npn {quark_if_no_value:n} #1 {
+ \if:w \quark_if_no_value_p:n{#1}}
+\def_long:Npn \quark_if_no_value:nFT #1{
+ \if:w \quark_if_no_value_p:n{#1}
+ \exp_after:NN\use_arg_ii:nn
+ \else:
+ \exp_after:NN\use_arg_i:nn
+ \fi:
+}
+\def_long_new:Npn \quark_if_nil_p:N #1{
+ \if_meaning:NN \q_nil #1 \c_true
+ \else: \c_false \fi:
+}
+\def_long_test_function_new:npn {quark_if_nil:N}#1{
+ \if_meaning:NN\q_nil#1}
+\cs_if_really_free:cTF{pdf_strcmp:D}{
+ \def_long_new:Npn \quark_if_nil_p:n #1{
+ \if:w \exp_args:No \str_if_eq_var_p:nf
+ {\token_to_string:N\q_nil\text_put_sp:}
+ {\tlist_to_str:n{#1}}
+ \c_true
+ \else:
+ \c_false
+ \fi:
+ }
+}
+{
+ \def_long_new:Npn \quark_if_nil_p:n #1{
+ \if_num:w
+ \pdf_strcmp:D {\exp_not:N \q_nil}{\exp_not:n{#1}}=\c_zero
+ \c_true \else: \c_false \fi:
+ }
+}
+\def_long_test_function_new:npn {quark_if_nil:n} #1 {
+ \if:w \quark_if_nil_p:n{#1}}
+\def_new:Npn \quark_if_nil_p:o{\exp_args:No\quark_if_nil_p:n}
+\def_new:Npn \quark_if_nil:oTF{\exp_args:No\quark_if_nil:nTF}
+\def_new:Npn \quark_if_nil:oT {\exp_args:No\quark_if_nil:nT}
+\def_new:Npn \quark_if_nil:oF {\exp_args:No\quark_if_nil:nF}
+%% File: l3num.dtx Copyright (C) 2005-2006 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
+%% 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.
+%%
+%% -----------------------------------------------------------------------
+\GetIdInfo$Id: l3num.dtx 573 2006-08-21 20:59:37Z morten $
+ {L3 Experimental token numbers}
+\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
+\let_new:NN \if_case:w \tex_ifcase:D
+\let_new:NN \or: \tex_or:D
+\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}
+\def:Npn \num_incr:N #1{\num_add:Nn#1 1}
+\def:Npn \num_decr:N #1{\num_add:Nn#1 \c_minus_one}
+\def:Npn \num_gincr:N #1{\num_gadd:Nn#1 1}
+\def:Npn \num_gdecr:N #1{\num_gadd:Nn#1 \c_minus_one}
+\def_new:Npn \num_incr:c {\exp_args:Nc \num_incr:N}
+\def_new:Npn \num_decr:c {\exp_args:Nc \num_decr:N}
+\def_new:Npn \num_gincr:c {\exp_args:Nc \num_gincr:N}
+\def_new:Npn \num_gdecr:c {\exp_args:Nc \num_gdecr:N}
+\def_new:Npn \num_zero:N #1 {\num_set:Nn #1 0}
+\def_new:Npn \num_gzero:N #1 {\num_gset:Nn #1 0}
+\def_new:Npn \num_zero:c {\exp_args:Nc \num_zero:N}
+\def_new:Npn \num_gzero:c {\exp_args:Nc \num_gzero:N}
+\def_new:Npn \num_new:N #1{\tlp_new:Nn #1{0}}
+\def_new:Npn \num_new:c {\exp_args:Nc \num_new:N}
+\def_new:Npn \num_eval:n #1{\num_eval:w #1\scan_stop:}
+\def_new:Npn \num_set:Nn #1#2{
+ \tlp_set:No #1{ \tex_number:D \num_eval:n {#2} }
+}
+\def_new:Npn \num_gset:Nn {\pref_global:D \num_set:Nn}
+\def_new:Npn \num_set:cn {\exp_args:Nc \num_set:Nn }
+\def_new:Npn \num_gset:cn {\exp_args:Nc \num_gset:Nn }
+\let_new:NN \num_set_eq:NN \tlp_set_eq:NN
+\def_new:Npn \num_set_eq:cN {\exp_args:Nc \num_set_eq:NN}
+\def_new:Npn \num_set_eq:Nc {\exp_args:NNc \num_set_eq:NN}
+\def_new:Npn \num_set_eq:cc {\exp_args:Ncc \num_set_eq:NN}
+\let_new:NN \num_gset_eq:NN \tlp_gset_eq:NN
+\def_new:Npn \num_gset_eq:cN {\exp_args:Nc \num_gset_eq:NN}
+\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_gadd:Nn {\pref_global:D \num_add: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{
+ \if_num:w \num_eval:n {#1}#2\num_eval:n {#3}
+}
+\def_new:Npn \num_compare:cNcTF { \exp_args:NcNc\num_compare:nNnTF }
+\def_new:Npn \num_compare_p:nNn #1#2#3{
+ \if_num:w \num_eval:n {#1}#2\num_eval:n {#3}
+ \c_true
+ \else:
+ \c_false
+ \fi:
+}
+\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
+{
+ \let_new:NN \const_new_aux:Nw \tex_chardef:D
+ \const_new_aux:Nw \c_max_register_num = 65535 \scan_stop:
+}
+{
+ \let_new:NN \const_new_aux:Nw \tex_mathchardef:D
+ \const_new_aux:Nw \c_max_register_num = 32767 \scan_stop:
+}
+\def_new:Npn \const_new:Nn #1#2 {
+ \num_compare:nNnTF {#2} > \c_minus_one
+ {
+ \num_compare:nNnTF {#2} > \c_max_register_num
+ {\int_new:N #1 \int_set:Nn #1{#2}}
+ {\chk_new_cs:N #1 \const_new_aux:Nw #1 = #2 \scan_stop: }
+ }
+ {\int_new:N #1 \int_set:Nn #1{#2}}
+}
+ %% \tex_countdef:D \c_minus_one = 10 \scan_stop:
+ %% \c_minus_one = -1 \scan_stop: %% in l3basics
+ %% \tex_chardef:D \c_sixteen = 16\scan_stop: %% in l3basics
+\const_new:Nn \c_zero {0}
+\const_new:Nn \c_one {1}
+\const_new:Nn \c_two {2}
+\const_new:Nn \c_three {3}
+\const_new:Nn \c_four {4}
+\const_new:Nn \c_six {6}
+\const_new:Nn \c_seven {7}
+\const_new:Nn \c_nine {9}
+\const_new:Nn \c_ten {10}
+\const_new:Nn \c_eleven {11}
+\const_new:Nn \c_thirty_two {32}
+\const_new:Nn \c_hundred_one {101}
+\const_new:Nn \c_twohundred_fifty_five {255}
+\const_new:Nn \c_twohundred_fifty_six {256}
+\const_new:Nn \c_thousand {1000}
+\const_new:Nn \c_ten_thousand {10000}
+\const_new:Nn \c_ten_thousand_one {10001}
+\const_new:Nn \c_ten_thousand_two {10002}
+\const_new:Nn \c_ten_thousand_three {10003}
+\const_new:Nn \c_ten_thousand_four {10004}
+\const_new:Nn \c_twenty_thousand {20000}
+%% File: l3seq.dtx Copyright (C) 1990-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.
+%%
+%% -----------------------------------------------------------------------
+\GetIdInfo$Id: l3seq.dtx 573 2006-08-21 20:59:37Z morten $
+ {L3 Experimental sequences and stacks}
+\let_new:NN \seq_elt:w \ERROR
+\let_new:NN \seq_elt_end: \ERROR
+\def_new:Npn \seq_new:N #1{\tlp_new:Nn #1{}}
+\def_new:Npn \seq_new:c {\exp_args:Nc \seq_new:N}
+\let_new:NN \seq_clear:N \tlp_clear:N
+\let_new:NN \seq_clear:c \tlp_clear:c
+\let_new:NN \seq_gclear:N \tlp_gclear:N
+\let_new:NN \seq_gclear:c \tlp_gclear:c
+\let_new:NN \seq_clear_new:N \tlp_clear_new:N
+\let_new:NN \seq_clear_new:c \tlp_clear_new:c
+\let_new:NN \seq_gclear_new:N \tlp_gclear_new:N
+\let_new:NN \seq_gclear_new:c \tlp_gclear_new:c
+\let_new:NN \seq_if_empty_p:N \tlp_if_empty_p:N
+\let_new:NN \seq_if_empty:NTF \tlp_if_empty:NTF
+\def_new:Npn \seq_if_empty:cTF {\exp_args:Nc\seq_if_empty:NTF}
+\let_new:NN \seq_if_empty:NF \tlp_if_empty:NF
+\def_new:Npn \seq_if_empty:cF {\exp_args:Nc\seq_if_empty:NF}
+\def_new:Npn \seq_if_empty_err:N #1{\if_meaning:NN#1\c_empty_tlp
+ \tlp_clear:N \l_testa_tlp % catch prefixes
+ \err_latex_bug:x{Empty~sequence~`\token_to_string:N#1'}\fi:}
+\def_new:Npn \seq_get:NN #1{
+ \seq_if_empty_err:N #1
+ \exp_after:NN\seq_get_aux:w #1\q_stop}
+\def_new:Npn \seq_get_aux:w \seq_elt:w #1\seq_elt_end:
+ #2\q_stop #3{\tlp_set:Nn #3{#1}}
+\def_new:Npn \seq_get:cN {\exp_args:Nc \seq_get:NN}
+\def_new:Npn \seq_pop_aux:nnNN #1#2#3{
+ \seq_if_empty_err:N #3
+ \exp_after:NN\seq_pop_aux:w #3\q_stop #1#2#3}
+\def_new:Npn \seq_pop_aux:w \seq_elt:w #1\seq_elt_end:
+ #2\q_stop #3#4#5#6{#3#5{#2}#4#6{#1}}
+\def_new:Npn \seq_put_aux:Nnn #1{
+ \exp_after:NN\seq_put_aux:w #1\q_stop #1}
+\def_new:Npn \seq_put_aux:w #1\q_stop #2#3#4{\tlp_set:Nn #2{#3#1#4}}
+\def_new:Npn \seq_put_left:Nn #1#2{
+ \seq_put_aux:Nnn #1{\seq_elt:w #2\seq_elt_end:}{}}
+\def_new:Npn \seq_put_left:cn {\exp_args:Nc\seq_put_left:Nn}
+\def_new:Npn \seq_put_left:No {\exp_args:NNo\seq_put_left:Nn}
+\def_new:Npn \seq_put_left:Nx {\exp_args:Nnx\seq_put_left:Nn}
+\def_new:Npn \seq_put_right:Nn #1#2{
+ \seq_put_aux:Nnn #1{}{\seq_elt:w #2\seq_elt_end:}}
+\def_new:Npn \seq_put_right:No {\exp_args:NNo\seq_put_right:Nn}
+\def_new:Npn \seq_put_right:Nx {\exp_args:NNx\seq_put_right:Nn}
+\def_new:Npn \seq_gput_left:Nn {
+ \pref_global:D
+ \seq_put_left:Nn}
+\def_new:Npn \seq_gput_right:Nn {
+ \pref_global:D
+ \seq_put_right:Nn}
+\def_new:Npn \seq_gput_right:No {\exp_args:NNo \seq_gput_right:Nn}
+\def_new:Npn \seq_gput_right:Nc {\exp_args:NNc \seq_gput_right:Nn}
+\def_new:Npn \seq_gput_right:cn {\exp_args:Nc \seq_gput_right:Nn}
+\def_new:Npn \seq_gput_right:co {\exp_args:Nco \seq_gput_right:Nn}
+\def_new:Npn \seq_gput_right:cc {\exp_args:Ncc \seq_gput_right:Nn}
+\def_new:Npn \seq_map_variable_aux:Nnw #1#2\seq_elt:w#3\seq_elt_end:{
+ \tlp_set:Nn #1{#3}
+ \quark_if_nil:NT #1 \seq_map_break:w
+ #2
+ \seq_map_variable_aux:Nnw #1{#2}
+}
+\def_new:Npn \seq_map_variable:NNn #1#2#3{
+ \tlp_set:Nx #2 {\exp_not:n{\seq_map_variable_aux:Nnw #2{#3}}}
+ \exp_after:NN #2 #1 \seq_elt:w \q_nil\seq_elt_end: \q_stop
+}
+\def_new:Npn \seq_map_variable:cNn{\exp_args:Nc\seq_map_variable:Nn}
+\let_new:NN \seq_map_break:w \use_none_delimit_by_q_stop:w
+\def_new:Npn \seq_map:NN #1#2{
+ \def:Npn \seq_elt:w ##1\seq_elt_end: {#2{##1}}#1
+ \let:NN \seq_elt:w \ERROR
+}
+\def_new:Npn \seq_map_inline:Nn #1#2{
+ \def:Npn \seq_elt:w ##1\seq_elt_end: {#2}#1
+ \let:NN \seq_elt:w \ERROR
+}
+\def_new:Npn \seq_map_inline:cn{\exp_args:Nc\seq_map_inline:Nn}
+\let_new:NN \seq_set_eq:NN \let:NN
+\def_new:Npn \seq_set_eq:Nc {\exp_args:NNc \seq_set_eq:NN}
+\let_new:NN \seq_gset_eq:NN \glet:NN
+\def_new:Npn \seq_gset_eq:cN {\exp_args:Nc \seq_gset_eq:NN}
+\def_new:Npn \seq_gset_eq:Nc {\exp_args:NNc \seq_gset_eq:NN}
+\def_new:Npn \seq_gset_eq:cc {\exp_args:Ncc \seq_gset_eq:NN}
+\def_new:Npn \seq_gconcat:NNN #1#2#3{
+ \tlp_gset:Nx #1 {\exp_not:o{#2}\exp_not:o{#3}}
+}
+\def_new:Npn \seq_gconcat:ccc{\exp_args:Nccc\seq_gconcat:NNN}
+\def_new:Npn \seq_if_in:NnTF #1#2{
+ \def:Npn\tmp:w
+ ##1\seq_elt:w #2\seq_elt_end: ##2##3\q_stop{
+ \if_meaning:NN\q_no_value##2
+ \exp_after:NN\use_arg_ii:nn
+ \else:
+ \exp_after:NN\use_arg_i:nn
+ \fi:
+ }
+ \exp_after:NN
+ \tmp:w #1\seq_elt:w
+ #2\seq_elt_end: \q_no_value \q_stop}
+\def_new:Npn \seq_if_in:coTF {\exp_args:Nco \seq_if_in:NnTF}
+\def_new:Npn \seq_if_in:cnTF {\exp_args:Nc \seq_if_in:NnTF}
+\def_new:Npn \seq_if_in:cxTF {\exp_args:Ncx \seq_if_in:NnTF}
+\def_new:Npn \seq_if_in:NnF #1#2 { \seq_if_in:NnTF #1{#2}\use_noop: }
+\def_new:Npn \seq_if_in:cnF {\exp_args:Nc \seq_if_in:NnF}
+\let_new:NN \seq_push:Nn \seq_put_left:Nn
+\let_new:NN \seq_push:No \seq_put_left:No
+\let_new:NN \seq_push:cn \seq_put_left:cn
+\def_new:Npn \seq_pop:NN {\seq_pop_aux:nnNN \tlp_set:Nn \tlp_set:Nn}
+\def_new:Npn \seq_pop:cN {\exp_args:Nc \seq_pop:NN}
+\let_new:NN \seq_gpush:Nn \seq_gput_left:Nn
+\def_new:Npn \seq_gpush:No {\exp_args:NNo \seq_gpush:Nn}
+\def_new:Npn \seq_gpush:cn {\exp_args:Nc \seq_gpush:Nn}
+\def_new:Npn \seq_gpush:NC {\exp_args:NNC \seq_gpush:Nn}
+\def_new:Npn \seq_gpop:NN {\seq_pop_aux:nnNN \tlp_gset:Nn \tlp_set:Nn}
+\def_new:Npn \seq_gpop:cN {\exp_args:Nc \seq_gpop:NN}
+\let_new:NN \seq_top:NN \seq_get:NN
+\let_new:NN \seq_top:cN \seq_get:cN
+%% File: l3alloc.dtx Copyright (C) 1990-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.
+%%
+%% -----------------------------------------------------------------------
+\GetIdInfo$Id: l3alloc.dtx 581 2006-12-12 12:28:27Z morten $
+ {L3 Experimental register allocation}%
+\def_new:Npn \alloc_setup_type:nnn #1 #2 #3{
+ \num_new:c {g_ #1 _allocation_num}
+ \num_new:c {l_ #1 _allocation_num}
+ \seq_new:c {g_ #1 _allocation_seq}
+ \num_set:cn {g_ #1 _allocation_num}{#2}
+ \num_set:cn {l_ #1 _allocation_num}{#3}
+}
+\def_new:Npn \alloc_next_g:n #1 {
+ \num_gincr:c {g_ #1 _allocation_num}
+ \num_compare:cNcTF {g_ #1 _allocation_num} = {l_ #1 _allocation_num}
+ {\io_put_term:x{We~ ran~ out~ of~ registers~ of~ type~ g_#1!}}
+ {
+ \seq_if_in:cxTF {g_ #1 _allocation_seq}
+ {\num_use:c{g_ #1 _allocation_num}}
+ {\io_put_term:x{\num_use:c{g_ #1 _allocation_num}~Already~ allocated!}
+ \alloc_next_g:n {#1} }
+ {\use_noop:}
+ }
+ }
+\def_new:Npn \alloc_next_l:n #1 {
+ \num_gdecr:c {l_ #1 _allocation_num}
+ \num_compare:cNcTF {g_ #1 _allocation_num} = {l_ #1 _allocation_num}
+ {\io_put_term:x{We~ ran~ out~ of~ registers~ of~ type~ l_#1!}}
+ {
+ \seq_if_in:cxTF {g_ #1 _allocation_seq}
+ {\num_use:c{l_ #1 _allocation_num}}
+ {\io_put_term:x{\num_use:c{l_ #1 _allocation_num}~Already~ allocated!}
+ \alloc_next_l:n {#1} }
+ {\io_put_term:x{\num_use:c{l_ #1 _allocation_num}~Free!}}
+ }
+ }
+\def_new:Npn \alloc_reg:NnNN #1 #2 #3 #4{
+ \chk_new_cs:N #4
+ \if:w#1g
+ \exp_after:NN \pref_global:D
+ \fi:
+ #3 #4 \num_use:c{#1_ #2 _allocation_num}
+ %%\cs_record_meaning:N#1
+ \io_put_log:x{
+ \token_to_string:N#4=#2~register~\num_use:c{#1_ #2 _allocation_num}}
+ \cs_use:c{alloc_next_#1:n} {#2}
+ }
+%% File: l3io.dtx Copyright (C) 1990-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.
+%%
+%% -----------------------------------------------------------------------
+\GetIdInfo$Id: l3io.dtx 573 2006-08-21 20:59:37Z 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}
+\def_new:Npn \iow_new:c {\exp_args:Nc \iow_new:N}
+\def_new:Npn \iow_open:Nn #1#2{\iow_close:N #1
+ \tex_immediate:D\tex_openout:D#1#2\scan_stop:}
+\def_new:Npn \iow_open:cn {\exp_args:Nc \iow_open:Nn}
+\def_new:Npn \iow_close:N {\tex_immediate:D\tex_closeout:D}
+\let_new:NN \c_io_term_stream \c_sixteen
+\let_new:NN \c_iow_log_stream \c_minus_one
+\def_new:Npn \iow_expanded:Nn {\tex_immediate:D\iow_deferred_expanded:Nn}
+\def_new:Npn \iow_unexpanded:Nn #1#2{
+ \iow_expanded:Nn #1{\exp_not:n{#2}}}
+\def:Npn \iow_expanded_log:n {\iow_expanded:Nn \c_iow_log_stream}
+\def:Npn \iow_expanded_term:n{\iow_expanded:Nn \c_io_term_stream}
+
+\def_new:Npn \iow_unexpanded_term:n {\iow_unexpanded:Nn \c_io_term_stream}
+\def_new:Npn \iow_unexpanded_if_avail:Nn #1{
+ \cs_free:NTF #1\use_none:n {\iow_unexpanded:Nn #1}}
+\def_new:Npn \iow_unexpanded_if_avail:cn {
+ \exp_args:Nc \iow_unexpanded_if_avail:Nn }
+\def_new:Npn \iow_long_expanded_aux:w #1#2#3{
+ \group_begin:\tex_newlinechar:D`\ #1#2{#3}\group_end:}
+\def_new:Npn \iow_long_expanded:Nn {\iow_long_expanded_aux:w
+ \iow_expanded:Nn}
+\def_new:Npn \iow_long_unexpanded:Nn {\iow_long_expanded_aux:w
+ \iow_unexpanded:Nn}
+\let:NN \iow_deferred_expanded:Nn \tex_write:D
+\def_new:Npn \iow_deferred_unexpanded:Nn #1#2{
+ \iow_deferred_expanded:Nn{\exp_not:n{#2}}
+}
+%% Old implementation:
+\def_new:Npn \iow_newline: {^^J}
+\tlp_new:Nx \c_iow_comment_char {\cs_to_str:N\%}
+\tlp_new:Nx \c_iow_lbrace_char{\cs_to_str:N\{}
+\tlp_new:Nx \c_iow_rbrace_char{\cs_to_str:N\}}
+\alloc_setup_type:nnn {ior} \c_zero \c_sixteen
+\def_new:Npn \ior_new:N #1 {\alloc_reg:NnNN g {ior} \tex_chardef:D #1}
+\let:NN \ior_close:N \tex_closein:D
+\def_new:Npn \ior_open:Nn #1#2{\ior_close:N #1\scan_stop:
+ \tex_openin:D#1#2\scan_stop:}
+\def_new:Npn \ior_eof:NTF #1{\if_eof:w#1
+ \exp_after:NN\use_arg_i:nn \else:
+ \exp_after:NN\use_arg_ii:nn \fi:}
+\let:NN \if_eof:w \tex_ifeof:D
+\def_new:Npn \ior_eof:NF #1{\if_eof:w#1
+ \exp_after:NN \use_none:nn \fi: \use_arg_i:n}
+ \def_new:Npn \ior_to:NN #1{\tex_read:D#1to}
+\def_new:Npn \ior_gto:NN {
+ \pref_global:D
+ \ior_to:NN}
+%% File: l3int.dtx Copyright (C) 1990-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.
+%%
+%% -----------------------------------------------------------------------
+\GetIdInfo$Id: l3int.dtx 573 2006-08-21 20:59:37Z morten $
+ {L3 Experimental Integer module}
+
+\let_new:NN \int_to_roman:w \tex_romannumeral:D
+\let_new:NN \int_to_number:w \tex_number:D
+\let_new:NN \int_advance:w \tex_advance:D
+\def_new:Npn \int_incr:N #1{\int_advance:w#1\c_one
+}
+\def_new:Npn \int_decr:N #1{\int_advance:w#1\c_minus_one
+}
+\def_new:Npn \int_gincr:N {
+ \pref_global:D
+ \int_incr:N}
+\def_new:Npn \int_gdecr:N {
+ \pref_global:D
+ \int_decr:N}
+\def:Npn \int_incr:N #1{\int_add:Nn#1\c_one}
+\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}
+\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}
+\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:
+}
+\def_new:Npn \int_gset:Nn {
+ \pref_global:D
+ \int_set:Nn }
+\def_new:Npn \int_set:cn {\exp_args:Nc \int_set:Nn }
+\def_new:Npn \int_gset:cn {\exp_args:Nc \int_gset:Nn }
+\def_new:Npn \int_zero:N #1 {#1=\c_zero}
+\def_new:Npn \int_zero:c #1 {\exp_args:Nc \int_zero:N}
+\def_new:Npn \int_gzero:N #1 {\pref_global:D #1=\c_zero}
+\def_new:Npn \int_gzero:c {\exp_args:Nc \int_gzero:N}
+\def_new:Npn \int_add:Nn #1#2{
+ \int_advance:w #1 by \int_eval:w #2\scan_stop:
+}
+\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:
+}
+\def_new:Npn \int_gadd:Nn {
+ \pref_global:D
+ \int_add:Nn }
+\def_new:Npn \int_gsub:Nn {
+ \pref_global:D
+ \int_sub: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}
+ \def:cpn {int_to_uc_roman_#1:}{#3}
+}
+\int_roman_lcuc_mapping:Nnn i i I
+\int_roman_lcuc_mapping:Nnn v v V
+\int_roman_lcuc_mapping:Nnn x x X
+\int_roman_lcuc_mapping:Nnn l l L
+\int_roman_lcuc_mapping:Nnn c c C
+\int_roman_lcuc_mapping:Nnn d d D
+\int_roman_lcuc_mapping:Nnn m m M
+\int_roman_lcuc_mapping:Nnn Q \use_none:nn \use_none:nn
+\def_new:Npn \int_to_roman:n #1 {
+ \exp_after:NN \int_to_roman_lcuc:NN \exp_after:NN l
+ \int_to_roman:w \int_eval:n {#1} Q
+}
+\def_new:Npn \int_to_Roman:n #1 {
+ \exp_after:NN \int_to_roman_lcuc:NN \exp_after:NN u
+ \int_to_roman:w \int_eval:n {#1} Q
+}
+\def_new:Npn \int_to_roman_lcuc:NN #1#2{
+ \cs_use:c {int_to_#1c_roman_#2:}
+ \int_to_roman_lcuc:NN #1
+}
+\def:Npn \int_convert_number_with_rule:nnN #1#2#3{
+ \int_compare:nNnTF {#1}>{#2}
+ {
+ \exp_args:No \int_convert_number_with_rule:nnN
+ { \int_use:N\int_div_truncate:nn {#1-1}{#2} }{#2}
+ #3
+ \exp_args:No #3 { \int_use:N\int_eval:n{1+\int_mod:nn {#1-1}{#2}} }
+ }
+ { \exp_args:No #3{ \int_use:N\int_eval:n{#1} } }
+}
+\def_new:Npn \int_alph_default_conversion_rule:n #1{
+ \if_case:w #1
+ \or: a\or: b\or: c\or: d\or: e\or: f
+ \or: g\or: h\or: i\or: j\or: k\or: l
+ \or: m\or: n\or: o\or: p\or: q\or: r
+ \or: s\or: t\or: u\or: v\or: w\or: x
+ \or: y\or: z
+ \fi:
+}
+\def_new:Npn \int_Alph_default_conversion_rule:n #1{
+ \if_case:w #1
+ \or: A\or: B\or: C\or: D\or: E\or: F
+ \or: G\or: H\or: I\or: J\or: K\or: L
+ \or: M\or: N\or: O\or: P\or: Q\or: R
+ \or: S\or: T\or: U\or: V\or: W\or: X
+ \or: Y\or: Z
+ \fi:
+}
+\def_new:Npn \int_to_alph:n #1{
+ \int_convert_number_with_rule:nnN {#1}{26}
+ \int_alph_default_conversion_rule:n
+}
+\def_new:Npn \int_to_Alph:n #1{
+ \int_convert_number_with_rule:nnN {#1}{26}
+ \int_Alph_default_conversion_rule:n
+}
+\def_new:Npn \int_to_symbol:n #1{
+ \mode_math:TF
+ {
+ \int_convert_number_with_rule:nnN {#1}{9}
+ \int_symbol_math_conversion_rule:n
+ }
+ {
+ \int_convert_number_with_rule:nnN {#1}{9}
+ \int_symbol_text_conversion_rule:n
+ }
+}
+\def_new:Npn \int_symbol_math_conversion_rule:n #1 {
+ \if_case:w #1
+ \or: *
+ \or: \dagger
+ \or: \ddagger
+ \or: \mathsection
+ \or: \mathparagraph
+ \or: \|
+ \or: **
+ \or: \dagger\dagger
+ \or: \ddagger\ddagger
+ \fi:
+}
+\def_new:Npn \int_symbol_text_conversion_rule:n #1 {
+ \if_case:w #1
+ \or: \textasteriskcentered
+ \or: \textdagger
+ \or: \textdaggerdbl
+ \or: \textsection
+ \or: \textparagraph
+ \or: \textbardbl
+ \or: \textasteriskcentered\textasteriskcentered
+ \or: \textdagger\textdagger
+ \or: \textdaggerdbl\textdaggerdbl
+ \fi:
+}
+\int_new:N \l_tmpa_int
+\int_new:N \l_tmpb_int
+\int_new:N \l_tmpc_int
+\int_new:N \g_tmpa_int
+\int_new:N \g_tmpb_int
+\int_new:N \l_loop_int % a variable for use in loops (whilenum etc)
+\let_new:NN \int_eval:n \num_eval:n
+\let_new:NN \int_eval:w \num_eval:w
+\const_new:Nn \c_max_int {2147483647}
+\def:Npn \int_pre_eval_one_arg:Nnn #1#2{\exp_args:No#1{\int_eval:w#2}}
+\def:Npn \int_pre_eval_two_args:Nnn #1#2#3{
+ \exp_args:Noo#1{\int_use:N\int_eval:w#2}{\int_use:N\int_eval:w#3}
+}
+\def_new:Npn \int_div_truncate:nn {
+ \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) }
+}
+\def_new:Npn \int_div_round:nn {
+ \int_pre_eval_two_args:Nnn\int_div_round_raw:nn
+}
+\def_new:Npn \int_div_round_raw:nn #1#2 {\int_eval:n{#1/#2}}
+\def_new:Npn \int_mod:nn {\int_pre_eval_two_args:Nnn\int_mod_raw:nn}
+\def_new:Npn \int_mod_raw:nn #1#2 {
+ \int_eval:n{ #1 - \int_div_truncate_raw:nn {#1}{#2} * #2 }
+}
+\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_compare_p:nNn \num_compare_p:nNn
+\def_new:Npn \int_if_odd_p:n #1 {
+ \if_num_odd:w \int_eval:n{#1}
+ \c_true
+ \else:
+ \c_false
+ \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{
+ \int_compare:nNnT {#1}#2{#3}{#4 \int_whiledo:nNnT {#1}#2{#3}{#4}}
+}
+\def_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{
+ #4 \int_compare:nNnT {#1}#2{#3}{\int_dowhile:nNnT {#1}#2{#3}{#4}}
+}
+\def_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{
+ \int_get_sign_and_digits_aux:nNNN {#1} \c_true \c_true \c_true
+}
+\def_new:Npn \int_get_sign:n #1{
+ \int_get_sign_and_digits_aux:nNNN {#1} \c_true \c_true \c_false
+}
+\def_new:Npn \int_get_digits:n #1{
+ \int_get_sign_and_digits_aux:nNNN {#1} \c_true \c_false \c_true
+}
+\def_new:Npn \int_get_sign_and_digits_aux:nNNN #1#2#3#4{
+ \tlist_if_head_eq_charcode:fNTF {#1} -
+ {
+ \bool_if:NTF #2
+ { \int_get_sign_and_digits_aux:oNNN {\use_none:n #1} \c_false #3#4 }
+ { \int_get_sign_and_digits_aux:oNNN {\use_none:n #1} \c_true #3#4 }
+ }
+ {
+ \tlist_if_head_eq_charcode:fNTF {#1} +
+ { \int_get_sign_and_digits_aux:oNNN {\use_none:n #1} #2#3#4}
+ {
+ \bool_double_if:NNnnnn #3#4
+ { \bool_if:NF #2 - #1 }
+ { \bool_if:NF #2 - }
+ { #1 } { }
+ }
+ }
+}
+\def_new:Npn \int_get_sign_and_digits_aux:oNNN{
+ \exp_args:No\int_get_sign_and_digits_aux:nNNN
+}
+\def:Npn \int_convert_from_base_ten:nn#1#2{
+ \num_compare:nNnTF {#1}<\c_zero
+ {
+ - \int_convert_from_base_ten_aux:non {}
+ { \int_use:N \int_eval:n {-#1} }
+ }
+ {
+ \int_convert_from_base_ten_aux:non {}
+ { \int_use:N \int_eval:n {#1} }
+ }
+ {#2}
+}
+\def_new:Npn \int_convert_from_base_ten_aux:nnn#1#2#3{
+ \num_compare:nNnTF {#2}<{#3}
+ { \int_convert_number_to_letter:n{#2} #1 }
+ {
+ \int_convert_from_base_ten_aux:fon
+ {
+ \int_convert_number_to_letter:n {\int_use:N\int_mod_raw:nn {#2}{#3}}
+ #1
+ }
+ {\int_use:N \int_div_truncate_raw:nn{#2}{#3}}
+ {#3}
+ }
+}
+\def:Npn \int_convert_from_base_ten_aux:non{
+ \exp_args:Nno\int_convert_from_base_ten_aux:nnn
+}
+\def:Npn \int_convert_from_base_ten_aux:fon{
+ \exp_args:Nfo\int_convert_from_base_ten_aux:nnn
+}
+\def:Npn \int_convert_number_to_letter:n #1{ \if_case:w \int_eval:w
+ #1-10\scan_stop: \exp_after:NN A \or: \exp_after:NN B \or:
+ \exp_after:NN C \or: \exp_after:NN D \or: \exp_after:NN E \or:
+ \exp_after:NN F \or: \exp_after:NN G \or: \exp_after:NN H \or:
+ \exp_after:NN I \or: \exp_after:NN J \or: \exp_after:NN K \or:
+ \exp_after:NN L \or: \exp_after:NN M \or: \exp_after:NN N \or:
+ \exp_after:NN O \or: \exp_after:NN P \or: \exp_after:NN Q \or:
+ \exp_after:NN R \or: \exp_after:NN S \or: \exp_after:NN T \or:
+ \exp_after:NN U \or: \exp_after:NN V \or: \exp_after:NN W \or:
+ \exp_after:NN X \or: \exp_after:NN Y \or: \exp_after:NN Z \else:
+ \use_arg_i_after_fi:nw{ #1 }\fi: }
+\def:Npn \int_convert_to_base_ten:nn #1#2 {
+ \int_use:N\int_eval:n{
+ \int_get_sign:n{#1}
+ \exp_args:Nf\int_convert_to_base_ten_aux:nn {\int_get_digits:n{#1}}{#2}
+ }
+}
+\def_new:Npn \int_convert_to_base_ten_aux:nn #1#2{
+ \int_convert_to_base_ten_auxi:nnN {0}{#2} #1 \q_nil
+}
+\def_new:Npn \int_convert_to_base_ten_auxi:nnN#1#2#3{
+ \quark_if_nil:NTF #3
+ {#1}
+ {\exp_args:No\int_convert_to_base_ten_auxi:nnN
+ {\int_use:N \int_eval:n{ #1*#2+\int_convert_letter_to_number:N #3} }
+ {#2}
+ }
+}
+\def:Npn \int_convert_letter_to_number:N #1{
+ \int_compare:nNnTF{`#1}<{58}{#1}
+ {
+ \int_eval:n{ `#1 -
+ \if:w\int_compare_p:nNn{`#1}<{91}
+ 55
+ \else:
+ 87
+ \fi:
+ }
+ }
+}
+%% File: l3clist.dtx Copyright (C) 2005-2006 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
+%% 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.
+%%
+%% -----------------------------------------------------------------------
+\GetIdInfo$Id: l3clist.dtx 573 2006-08-21 20:59:37Z morten $
+ {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}
+\let_new:NN \clist_clear:N \tlp_clear:N
+\let_new:NN \clist_clear:c \tlp_clear:c
+\let_new:NN \clist_gclear:N \tlp_gclear:N
+\let_new:NN \clist_gclear:c \tlp_gclear:c
+\let_new:NN \clist_set_eq:NN \let:NN
+\let_new:NN \clist_gset_eq:NN \glet:NN
+\def_new:Npn \clist_gset_eq:cN {\exp_args:Nc \clist_gset_eq:NN}
+\def_new:Npn \clist_gset_eq:Nc {\exp_args:NNc \clist_gset_eq:NN}
+\def_new:Npn \clist_gset_eq:cc {\exp_args:Ncc \clist_gset_eq:NN}
+\let_new:NN \clist_if_empty_p:N \tlp_if_empty_p:N
+\def_test_function_new:npn {clist_if_empty:N}#1{\if_meaning:NN#1\c_empty_tlp}
+\def_new:Npn \clist_if_empty:cTF {\exp_args:Nc\clist_if_empty:NTF}
+\def_new:Npn \clist_if_empty:cT {\exp_args:Nc\clist_if_empty:NT}
+\def_new:Npn \clist_if_empty:cF {\exp_args:Nc\clist_if_empty:NF}
+\def_new:Npn \clist_if_empty_err:N #1{
+ \if_meaning:NN#1\c_empty_tlp
+ \tlp_clear:N \l_testa_tlp % catch prefixes
+ \err_latex_bug:x{Empty~comma-list~`\token_to_string:N#1'}
+ \fi:}
+\let_new:NN \clist_if_eq:NNTF \tlp_if_eq:NNTF
+\def_new:Npn \clist_get:NN #1{
+ \clist_if_empty_err:N #1
+ \exp_after:NN\clist_get_aux:w #1,\q_stop}
+\def_new:Npn \clist_get_aux:w #1,#2\q_stop #3{\tlp_set:Nn #3{#1}}
+\def_new:Npn \clist_get:cN {\exp_args:Nc \clist_get:NN}
+\def_new:Npn \clist_pop_aux:nnNN #1#2#3{
+ \clist_if_empty_err:N #3
+ \exp_after:NN\clist_pop_aux:w #3,\q_nil\q_stop #1#2#3}
+\def_new:Npn \clist_pop_aux:w #1,#2\q_stop #3#4#5#6{
+ #4#6{#1}
+ #3#5{#2}
+ \quark_if_nil:NTF #5
+ { #3#5{} }
+ { \clist_pop_auxi:w #2 #3#5 }
+}
+\def_new:Npn\clist_pop_auxi:w #1,\q_nil #2#3 {#2#3{#1}}
+\def_new:Npn \clist_put_aux:NNnnNn #1#2#3#4#5#6{
+ \clist_if_empty:NTF#5 {#1 #5{#6}}
+ { \tlist_if_empty:nF {#6}{ #2 #5{#3#6#4} } }
+}
+\def_new:Npn \clist_put_left:Nn {
+ \clist_put_aux:NNnnNn \tlp_set:Nn \tlp_put_left:Nn {} ,
+}
+\def_new:Npn \clist_put_left:cn {\exp_args:Nc \clist_put_left:Nn}
+\def_new:Npn \clist_put_left:No {\exp_args:NNo\clist_put_left:Nn}
+\def_new:Npn \clist_put_left:Nx {\exp_args:Nnx\clist_put_left:Nn}
+\def_new:Npn \clist_gput_left:Nn {
+ \clist_put_aux:NNnnNn \tlp_gset:Nn \tlp_gput_left:Nn {} ,
+}
+\def_new:Npn \clist_put_right:Nn {
+ \clist_put_aux:NNnnNn \tlp_set:Nn \tlp_put_right:Nn , {}
+}
+\def_new:Npn \clist_put_right:cn {\exp_args:Nc \clist_put_right:Nn}
+\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 , {}
+}
+\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}
+\def_new:Npn \clist_gput_right:co {\exp_args:Nco \clist_gput_right:Nn}
+\def_new:Npn \clist_gput_right:cc {\exp_args:Ncc \clist_gput_right:Nn}
+\def_new:Npn \clist_gput_right:NC {\exp_args:NNC \clist_gput_right:Nn}
+\def_new:Npn \clist_map_function:NN #1#2{
+ \clist_if_empty:NF #1
+ {
+ \exp_after:NN \clist_map_function_aux:Nw
+ \exp_after:NN #2 #1 , \q_nil , \q_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 }
+}
+\def_new:Npn \clist_map_function_aux:Nw #1#2,{
+ \quark_if_nil:nT{#2} \clist_map_break:w
+ #1{#2}
+ \clist_map_function_aux:Nw #1
+}
+\let_new:NN \clist_map_break:w \use_none_delimit_by_q_stop:w
+\int_new:N \l_clist_inline_level_int
+\def_new:Npn \clist_map_inline:Nn #1#2{
+ \clist_if_empty:NF #1
+ {
+ \int_incr:N \l_clist_inline_level_int
+ \def:cpn {clist_map_inline_ \int_use:N \l_clist_inline_level_int :n}
+ ##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
+ \int_decr:N \l_clist_inline_level_int
+ }
+}
+\def_new:Npn \clist_map_inline:cn{\exp_args:Nc\clist_map_inline:Nn}
+\def_new:Npn \clist_map_inline:nn #1#2{
+ \tlist_if_empty:nF {#1}
+ {
+ \int_incr:N \l_clist_inline_level_int
+ \def:cpn {clist_map_inline_ \int_use:N \l_clist_inline_level_int :n}
+ ##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
+ \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
+ }
+}
+\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
+ #2 \clist_map_variable_aux:Nnw #1{#2}
+}
+\def_new:Npn \clist_concat_aux:NNNN #1#2#3#4{
+ \toks_set:No \l_tmpa_toks {#3}
+ \toks_set:No \l_tmpb_toks {#4}
+ #1 #2 {
+ \toks_use:N \l_tmpa_toks
+ \toks_if_empty:NF \l_tmpa_toks {\toks_if_empty:NF \l_tmpb_toks ,}
+ \toks_use:N \l_tmpb_toks
+ }
+}
+\def_new:Npn \clist_concat:NNN {\clist_concat_aux:NNNN \tlp_set:Nx}
+\def_new:Npn \clist_gconcat:NNN {\clist_concat_aux:NNNN \tlp_gset:Nx}
+\def_new:Npn \clist_gconcat:NNc{\exp_args:Nnnc\clist_gconcat:NNN}
+\def_new:Npn \clist_gconcat:ccc{\exp_args:Nccc\clist_gconcat:NNN}
+\def:Npn \clist_remove_duplicates_aux:NN #1#2 {
+ \clist_clear:N \l_clist_remove_duplicates_clist
+ \clist_map_function:NN #2 \clist_remove_duplicates_aux:n
+ #1 #2 \l_clist_remove_duplicates_clist
+}
+\def:Npn \clist_remove_duplicates_aux:n #1 {
+ \clist_if_in:NnTF \l_clist_remove_duplicates_clist {#1} {}
+ {\clist_put_right:Nn \l_clist_remove_duplicates_clist {#1}}
+}
+\def_new:Npn \clist_remove_duplicates:N {
+ \clist_remove_duplicates_aux:NN \clist_set_eq:NN
+}
+\def_new:Npn \clist_gremove_duplicates:N {
+ \clist_remove_duplicates_aux:NN \clist_gset_eq:NN
+}
+\clist_new:N \l_clist_remove_duplicates_clist
+\def_new:Npn \clist_use:N #1 {
+ \if_meaning:NN #1 \scan_stop:
+ \err_latex_bug:x {Comma~list~ `\token_to_string:N #1'~
+ has~ an~ erroneous~ structure!}
+ \else:
+ \exp_after:NN #1
+ \fi:
+}
+\def_new:Npn \clist_use:c {\exp_args:Nc \clist_use:N}
+\def_new:Npn \clist_if_in:NnTF #1#2{
+ \def:Npn \tmp:w ##1 ,#2, ##2##3\q_stop{
+ \if_meaning:NN\q_no_value##2
+ \exp_after:NN\use_arg_ii:nn
+ \else:
+ \exp_after:NN\use_arg_i:nn
+ \fi:
+ }
+ \exp_after:NN \tmp:w
+ \exp_after:NN , #1, #2, \q_no_value \q_stop
+}
+\def_new:Npn \clist_if_in:NoTF {\exp_args:NNo \clist_if_in:NnTF}
+\def_new:Npn \clist_if_in:coTF {\exp_args:Nco \clist_if_in:NnTF}
+\def_new:Npn \clist_if_in:cnTF {\exp_args:Nc \clist_if_in:NnTF}
+\let_new:NN \clist_push:Nn \clist_put_left:Nn
+\let_new:NN \clist_push:No \clist_put_left:No
+\let_new:NN \clist_push:cn \clist_put_left:cn
+\def_new:Npn \clist_pop:NN {\clist_pop_aux:nnNN \tlp_set:Nn \tlp_set:Nn}
+\def_new:Npn \clist_pop:cN {\exp_args:Nc \clist_pop:NN}
+\let_new:NN \clist_gpush:Nn \clist_gput_left:Nn
+\def_new:Npn \clist_gpush:No {\exp_args:NNo \clist_gpush:Nn}
+\def_new:Npn \clist_gpush:cn {\exp_args:Nc \clist_gpush:Nn}
+\def_new:Npn \clist_gpop:NN {\clist_pop_aux:nnNN \tlp_gset:Nn \tlp_set:Nn}
+\def_new:Npn \clist_gpop:cN {\exp_args:Nc \clist_gpop:NN}
+\let_new:NN \clist_top:NN \clist_get:NN
+\let_new:NN \clist_top:cN \clist_get:cN
+%% File: l3prop.dtx Copyright (C) 1990-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.
+%%
+%% -----------------------------------------------------------------------
+\GetIdInfo$Id: l3prop.dtx 581 2006-12-12 12:28:27Z morten $
+ {L3 Experimental Property Lists}
+\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: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}}
+ \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_aux:w 6{
+ #1{#2{#6}#3}
+ \quark_if_no_value:nF {#4}
+ {
+ \def:Npn \tmp:w ##1#2\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: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_long_new:NNn \prop_put_if_new_aux:w 6{
+ \quark_if_no_value:nT {#4}{#1{#2{#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: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_gset_eq:Nc \toks_gset_eq:Nc
+\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
+\let_new:NN \prop_if_empty:NTF \toks_if_empty:NTF
+\let_new:NN \prop_if_empty:NT \toks_if_empty:NT
+\let_new:NN \prop_if_empty:NF \toks_if_empty:NF
+\let_new:NN \prop_if_empty:cTF \toks_if_empty:cTF
+\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}
+}
+\def_new:NNn \prop_if_eq:NNT 2 {
+ \tlist_if_eq:xxT{\prop_use:N #1}{\prop_use:N #2}
+}
+\def_new:NNn \prop_if_eq:NNF 2 {
+ \tlist_if_eq:xxF{\prop_use:N #1}{\prop_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}
+\def_new:Npn \prop_if_eq:NcF {\exp_args:NNc \prop_if_eq:NNF}
+\def_new:Npn \prop_if_eq:cNTF {\exp_args:Nc \prop_if_eq:NNTF}
+\def_new:Npn \prop_if_eq:cNT {\exp_args:Nc \prop_if_eq:NNT}
+\def_new:Npn \prop_if_eq:cNF {\exp_args:Nc \prop_if_eq:NNF}
+\def_new:Npn \prop_if_eq:ccTF {\exp_args:Ncc \prop_if_eq:NNTF}
+\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
+}
+\def_new:Npn \prop_map_function_aux:NNn #1#2#3{
+ \if_meaning:NN \q_nil #1
+ \exp_after:NN \prop_map_break:w
+ \fi:
+ #1#2{#3}
+ \prop_map_function_aux:NNn #1
+}
+\def_new:Npn \prop_map_function:cN {\exp_args:Nc \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_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
+%% File: l3token.dtx Copyright (C) 2005-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.
+%%
+%% -----------------------------------------------------------------------
+\GetIdInfo$Id: l3token.dtx 578 2006-11-21 18:13:24Z 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{
+ \char_set_catcode:w #1 = \int_eval:n{#2}
+}
+\def_new:Npn \char_value_catcode:w {\int_use:N\tex_catcode:D}
+\def_new:Npn \char_value_catcode:n #1{\char_value_catcode:w \int_eval:n{#1}}
+\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_lccode:w \tex_lccode:D
+\def_new:Npn \char_set_lccode:nn #1#2{
+ \char_set_lccode:w #1 = \int_eval:n{#2}
+}
+\def_new:Npn \char_value_lccode:w {\int_use:N\tex_lccode:D}
+\def_new:Npn \char_value_lccode:n #1{\char_value_lccode:w \int_eval:n{#1}}
+\def_new:Npn \char_show_value_lccode:w {\tex_showthe:D\tex_lccode:D}
+\def_new:Npn \char_show_value_lccode:n #1{
+ \char_show_value_lccode:w \int_eval:n{#1}}
+\let_new:NN \char_set_uccode:w \tex_uccode:D
+\def_new:Npn \char_set_uccode:nn #1#2{
+ \char_set_uccode:w #1 = \int_eval:n{#2}
+}
+\def_new:Npn \char_value_uccode:w {\int_use:N\tex_uccode:D}
+\def_new:Npn \char_value_uccode:n #1{\char_value_uccode:w \int_eval:n{#1}}
+\def_new:Npn \char_show_value_uccode:w {\tex_showthe:D\tex_uccode:D}
+\def_new:Npn \char_show_value_uccode:n #1{
+ \char_show_value_uccode:w \int_eval:n{#1}}
+\let_new:NN \char_set_sfcode:w \tex_sfcode:D
+\def_new:Npn \char_set_sfcode:nn #1#2{
+ \char_set_sfcode:w #1 = \int_eval:n{#2}
+}
+\def_new:Npn \char_value_sfcode:w {\int_use:N\tex_uccode:D}
+\def_new:Npn \char_value_sfcode:n #1{\char_value_sfcode:w \int_eval:n{#1}}
+\def_new:Npn \char_show_value_sfcode:w {\tex_showthe:D\tex_sfcode:D}
+\def_new:Npn \char_show_value_sfcode:n #1{
+ \char_show_value_sfcode:w \int_eval:n{#1}}
+\def_new:Npn \token_new:Nn #1#2{\glet_new:NN #1#2}
+\let_new:NN \c_group_begin_token {
+\let_new:NN \c_group_end_token }
+\group_begin:
+\char_set_catcode:nn{`\*}{3}
+\token_new:Nn \c_math_shift_token {*}
+\char_set_catcode:nn{`\*}{4}
+\token_new:Nn \c_alignment_tab_token {*}
+\token_new:Nn \c_parameter_token {#}
+\token_new:Nn \c_math_superscript_token {^}
+\char_set_catcode:nn{`\*}{8}
+\token_new:Nn \c_math_subscript_token {*}
+\token_new:Nn \c_space_token {~}
+\token_new:Nn \c_letter_token {a}
+\token_new:Nn \c_other_char_token {1}
+\char_set_catcode:nn{`\*}{13}
+\token_new:Nn \c_active_char_token {*}
+\group_end:
+\def_new:Npn \token_if_group_begin_p:N #1{
+ \if_catcode:w \exp_not:N #1\c_group_begin_token
+ \c_true
+ \else:
+ \c_false
+ \fi:
+}
+\def_test_function_new:npn {token_if_group_begin:N} #1{
+ \if:w\token_if_group_begin_p:N #1}
+\def_new:Npn \token_if_group_end_p:N #1{
+ \if_catcode:w \exp_not:N #1\c_group_end_token
+ \c_true
+ \else:
+ \c_false
+ \fi:
+}
+\def_test_function_new:npn {token_if_group_end:N} #1{
+ \if:w\token_if_group_end_p:N #1}
+\def_new:Npn \token_if_math_shift_p:N #1{
+ \if_catcode:w \exp_not:N #1\c_math_shift_token
+ \c_true
+ \else:
+ \c_false
+ \fi:
+}
+\def_test_function_new:npn {token_if_math_shift:N} #1{
+ \if:w\token_if_math_shift_p:N#1}
+\def_new:Npn \token_if_alignment_tab_p:N #1{
+ \if_catcode:w \exp_not:N #1\c_alignment_tab_token
+ \c_true
+ \else:
+ \c_false
+ \fi:
+}
+\def_test_function_new:npn {token_if_alignment_tab:N} #1{
+ \if:w\token_if_alignment_tab_p:N#1}
+\def_new:Npn \token_if_parameter_p:N #1{
+ \exp_after:NN\if_catcode:w \cs:w c_parameter_token\cs_end:\exp_not:N #1
+ \c_true
+ \else:
+ \c_false
+ \fi:
+}
+\def_test_function_new:npn {token_if_parameter:N} #1{
+ \if:w\token_if_parameter_p:N#1}
+\def_new:Npn \token_if_math_superscript_p:N #1{
+ \if_catcode:w \exp_not:N #1\c_math_superscript_token
+ \c_true
+ \else:
+ \c_false
+ \fi:
+}
+\def_test_function_new:npn {token_if_math_superscript:N} #1{
+ \if:w\token_if_math_superscript_p:N #1}
+\def_new:Npn \token_if_math_subscript_p:N #1{
+ \if_catcode:w \exp_not:N #1\c_math_subscript_token
+ \c_true
+ \else:
+ \c_false
+ \fi:
+}
+\def_test_function_new:npn {token_if_math_subscript:N} #1{
+ \if:w\token_if_math_subscript_p:N #1}
+\def_new:Npn \token_if_space_p:N #1{
+ \if_catcode:w \exp_not:N #1\c_space_token
+ \c_true
+ \else:
+ \c_false
+ \fi:
+}
+\def_test_function_new:npn {token_if_space:N} #1{
+ \if:w\token_if_space_p:N #1}
+\def_new:Npn \token_if_letter_p:N #1{
+ \if_catcode:w \exp_not:N #1\c_letter_token
+ \c_true
+ \else:
+ \c_false
+ \fi:
+}
+\def_test_function_new:npn {token_if_letter:N} #1{
+ \if:w\token_if_letter_p:N #1}
+\def_new:Npn \token_if_other_char_p:N #1{
+ \if_catcode:w \exp_not:N #1\c_other_char_token
+ \c_true
+ \else:
+ \c_false
+ \fi:
+}
+\def_test_function_new:npn {token_if_other_char:N} #1{
+ \if:w\token_if_other_char_p:N #1}
+\def_new:Npn \token_if_active_char_p:N #1{
+ \if_catcode:w \exp_not:N #1\c_active_char_token
+ \c_true
+ \else:
+ \c_false
+ \fi:
+}
+\def_test_function_new:npn {token_if_active_char:N} #1{
+ \if:w\token_if_active_char_p:N #1}
+\def_new:Npn \token_if_eq_meaning_p:NN #1#2 {
+ \if_meaning:NN #1 #2
+ \c_true
+ \else:
+ \c_false
+ \fi:
+}
+\def_test_function_new:npn {token_if_eq_meaning:NN}#1#2{
+ \if_meaning:NN #1 #2}
+\def_new:Npn \token_if_eq_catcode_p:NN #1#2 {
+ \if_catcode:w \exp_not:N #1 \exp_not:N #2
+ \c_true
+ \else:
+ \c_false
+ \fi:
+}
+\def_test_function_new:npn {token_if_eq_catcode:NN}#1#2{
+ \if:w\token_if_eq_catcode_p:NN#1#2}
+\def_new:Npn \token_if_charcode_eq_p:NN #1#2 {
+ \if_charcode:w \exp_not:N #1 \exp_not:N #2
+ \c_true
+ \else:
+ \c_false
+ \fi:
+}
+\def_test_function_new:npn {token_if_eq_charcode:NN}#1#2{
+ \if:w\token_if_eq_charcode_p:NN#1#2}
+\def_new:Npn \token_if_macro_p:N #1 {
+ \exp_after:NN \token_if_macro_p_aux:w \token_to_meaning:N #1 -> \q_nil
+}
+\def_new:Npn \token_if_macro_p_aux:w #1 -> #2 \q_nil{
+ \if:w \tlist_if_empty_p:n{#2} \c_false \else: \c_true \fi:
+}
+\def_test_function_new:npn {token_if_macro:N} #1{\if:w\token_if_macro_p:N#1}
+\def_new:Npn \token_if_cs_p:N {\token_if_eq_catcode_p:NN \scan_stop:}
+\def_test_function_new:npn {token_if_cs:N} #1{
+ \if:w \token_if_eq_catcode_p:NN \scan_stop: #1}
+\def_new:Npn \token_if_expandable_p:N #1{
+ \exp_after:NN \if_token_eq:NN \exp_not:N #1 \scan_stop:
+ \c_true
+ \else:
+ \c_false
+ \fi:
+}
+\def_test_function_new:npn {token_if_expandable:N} #1{
+ \if:w\token_if_expandable_p:N#1}
+\group_begin:
+ \char_set_lccode:nn {`\X}{`\n}
+ \char_set_lccode:nn {`\Y}{`\t}
+ \char_set_lccode:nn {`\Z}{`\d}
+ \char_set_lccode:nn {`\?}{`\\}
+ \tlist_map_inline:nn{\X\Y\Z\M\T\C\H\A\R\O\U\S\K\I\P\L\G\P\E}
+ {\char_set_catcode:nn {`#1}{12}}
+\tlist_to_lowercase:n{
+ \group_end:
+\def_new:Npn \token_if_chardef_p:N #1 {
+ \exp_after:NN \token_if_chardef_p_aux:w
+ \token_to_meaning:N #1?CHAR"\q_nil
+}
+\def_new:Npn \token_if_chardef_p_aux:w #1?CHAR"#2\q_nil{
+ \tlist_if_empty_p:n{#1}
+}
+\def_new:Npn \token_if_mathchardef_p:N #1 {
+ \exp_after:NN \token_if_mathchardef_p_aux:w
+ \token_to_meaning:N #1?MAYHCHAR"\q_nil
+}
+\def_new:Npn \token_if_mathchardef_p_aux:w #1?MAYHCHAR"#2\q_nil{
+ \tlist_if_empty_p:n{#1}
+}
+\def:Npn \token_if_int_register_p:N #1{
+ \if_meaning:NN \tex_countdef:D #1
+ \c_false
+ \else:
+ \exp_after:NN \token_if_int_register_p_aux:w
+ \token_to_meaning:N #1?COUXY\q_nil
+ \fi:
+}
+\def_new:Npn \token_if_int_register_p_aux:w #1?COUXY#2\q_nil{
+ \tlist_if_empty_p:n{#1}
+}
+\def:Npn \token_if_skip_register_p:N #1{
+ \if_meaning:NN \tex_skipdef:D #1
+ \c_false
+ \else:
+ \exp_after:NN \token_if_skip_register_p_aux:w
+ \token_to_meaning:N #1?SKIP\q_nil
+ \fi:
+}
+\def_new:Npn \token_if_skip_register_p_aux:w #1?SKIP#2\q_nil{
+ \tlist_if_empty_p:n{#1}
+}
+\def:Npn \token_if_dim_register_p:N #1{
+ \if_meaning:NN \tex_dimendef:D #1
+ \c_false
+ \else:
+ \exp_after:NN \token_if_dim_register_p_aux:w
+ \token_to_meaning:N #1?ZIMEX\q_nil
+ \fi:
+}
+\def_new:Npn \token_if_dim_register_p_aux:w #1?ZIMEX#2\q_nil{
+ \tlist_if_empty_p:n{#1}
+}
+\def:Npn \token_if_toks_register_p:N #1{
+ \if_meaning:NN \tex_toksdef:D #1
+ \c_false
+ \else:
+ \exp_after:NN \token_if_toks_register_p_aux:w
+ \token_to_meaning:N #1?YOKS\q_nil
+ \fi:
+}
+\def_new:Npn \token_if_toks_register_p_aux:w #1?YOKS#2\q_nil{
+ \tlist_if_empty_p:n{#1}
+}
+\def_new:Npn \token_if_protected_macro_p:N #1 {
+ \exp_after:NN \token_if_protected_macro_p_aux:w
+ \token_to_meaning:N #1?PROYECYEZ~MACRO\q_nil
+}
+\def_new:Npn \token_if_protected_macro_p_aux:w #1?PROYECYEZ~MACRO#2\q_nil{
+ \tlist_if_empty_p:n{#1}
+}
+\def_new:Npn \token_if_long_macro_p:N #1 {
+ \exp_after:NN \token_if_long_macro_p_aux:w
+ \token_to_meaning:N #1?LOXG~MACRO\q_nil
+}
+\def_new:Npn \token_if_long_macro_p_aux:w #1?LOXG~MACRO#2\q_nil{
+ \tlist_if_empty_p:n{#1}
+}
+\def_new:Npn \token_if_protected_long_macro_p:N #1 {
+ \exp_after:NN \token_if_protected_long_macro_p_aux:w
+ \token_to_meaning:N #1?PROYECYEZ~?LOXG~MACRO\q_nil
+}
+\def_new:Npn \token_if_protected_long_macro_p_aux:w #1
+ ?PROYECYEZ~?LOXG~MACRO#2\q_nil{
+ \tlist_if_empty_p:n{#1}
+}
+}
+\def_test_function_new:npn {token_if_chardef:N} {\if:w \token_if_chardef_p:N}
+\def_test_function_new:npn {token_if_mathchardef:N} {
+ \if:w \token_if_mathchardef_p:N}
+\def_test_function_new:npn {token_if_long_macro:N} {
+ \if:w \token_if_long_macro_p:N}
+\def_test_function_new:npn {token_if_protected_macro:N} {
+ \if:w \token_if_protected_macro_p:N}
+\def_test_function_new:npn {token_if_protected_long_macro:N} {
+ \if:w \token_if_protected_long_macro_p:N}
+\def_test_function_new:npn {token_if_dim_register:N} {
+ \if:w \token_if_dim_register_p:N}
+\def_test_function_new:npn {token_if_skip_register:N} {
+ \if:w \token_if_skip_register_p:N}
+\def_test_function_new:npn {token_if_int_register:N} {
+ \if:w \token_if_int_register_p:N}
+\def_test_function_new:npn {token_if_toks_register:N} {
+ \if:w \token_if_toks_register_p:N}
+\group_begin:
+\char_set_lccode:nn {`\?}{`\:}
+\char_set_catcode:nn{`\M}{12}
+\char_set_catcode:nn{`\A}{12}
+\char_set_catcode:nn{`\C}{12}
+\char_set_catcode:nn{`\R}{12}
+\char_set_catcode:nn{`\O}{12}
+\tlist_to_lowercase:n{
+ \group_end:
+ \def_new:Npn \token_get_prefix_arg_replacement_aux:w #1MACRO?#2->#3\q_nil#4{
+ #4{#1}{#2}{#3}
+ }
+ \def_new:Npn\token_get_prefix_spec:N #1{
+ \token_if_macro:NTF #1{
+ \exp_after:NN \token_get_prefix_arg_replacement_aux:w
+ \token_to_meaning:N #1\q_nil\use_arg_i:nnn
+ }{\scan_stop:}
+ }
+ \def_new:Npn\token_get_arg_spec:N #1{
+ \token_if_macro:NTF #1{
+ \exp_after:NN \token_get_prefix_arg_replacement_aux:w
+ \token_to_meaning:N #1\q_nil\use_arg_ii:nnn
+ }{\scan_stop:}
+ }
+ \def_new:Npn\token_get_replacement_spec:N #1{
+ \token_if_macro:NTF #1{
+ \exp_after:NN \token_get_prefix_arg_replacement_aux:w
+ \token_to_meaning:N #1\q_nil\use_arg_iii:nnn
+ }{\scan_stop:}
+ }
+}
+\def_new:Npn \token_if_primitive_p:N #1{
+ \if:w \token_if_cs_p:N #1\scan_stop:
+ \if:w \token_if_macro_p:N #1
+ \c_false
+ \else:
+ \token_if_primitive_p_aux:N #1
+ \fi:
+ \else:
+ \if:w \token_if_active_p:N #1
+ \if:w \token_if_macro_p:N #1
+ \c_false
+ \else:
+ \token_if_primitive_p_aux:N #1
+ \fi:
+ \else:
+ \c_false
+ \fi:
+ \fi:
+}
+\def_new:Npn \token_if_primitive_p_aux:N #1{
+ \if:w \token_if_chardef_p:N #1 \c_false
+ \else:
+ \if:w \token_if_mathchardef_p:N #1 \c_false
+ \else:
+ \if:w \token_if_int_register_p:N #1 \c_false
+ \else:
+ \if:w \token_if_skip_register_p:N #1 \c_false
+ \else:
+ \if:w \token_if_dim_register_p:N #1 \c_false
+ \else:
+ \if:w \token_if_toks_register_p:N #1 \c_false
+ \else:
+ \c_true
+ \fi:
+ \fi:
+ \fi:
+ \fi:
+ \fi:
+ \fi:
+}
+\def_test_function_new:npn {token_if_primitive:N} #1{
+ \if:w\token_if_primitive_p:N#1}
+\token_new:Nn \l_peek_token {?}
+\token_new:Nn \g_peek_token {?}
+\token_new:Nn \l_peek_search_token {?}
+\def_new:Npn \peek_after:NN {\tex_futurelet:D \l_peek_token }
+\def_new:Npn \peek_gafter:NN {
+ \pref_global:D \tex_futurelet:D \g_peek_token
+}
+\tlp_new:Nn \l_peek_true_tlp {}
+\tlp_new:Nn \l_peek_false_tlp {}
+\def_new:Npn \peek_tmp:w{}
+\tlp_new:Nn \l_peek_search_tlp{}
+\def_long_new:Npn \peek_token_generic:NNTF #1#2#3#4{
+ \let:NN \l_peek_search_token #2
+ \tlp_set:Nn \l_peek_search_tlp {#2}
+ \tlp_set:Nx \l_peek_true_tlp {\exp_not:n{\group_align_safe_end: #3}}
+ \tlp_set:Nx \l_peek_false_tlp {\exp_not:n{\group_align_safe_end: #4}}
+ \group_align_safe_begin:
+ \peek_after:NN #1
+}
+\def_long_new:Npn \peek_token_remove_generic:NNTF #1#2#3#4{
+ \let:NN \l_peek_search_token #2
+ \tlp_set:Nn \l_peek_search_tlp {#2}
+ \tlp_set:Nx \l_peek_true_aux_tlp { \exp_not:n{ #3 } }
+ \tlp_set_eq:NN \l_peek_true_tlp \c_peek_true_remove_next_tlp
+ \tlp_set:Nx \l_peek_false_tlp {\exp_not:n{\group_align_safe_end: #4}}
+ \group_align_safe_begin:
+ \peek_after:NN #1
+}
+\tlp_new:Nn \l_peek_true_aux_tlp {}
+\tlp_new:Nn \c_peek_true_remove_next_tlp {\group_align_safe_end:
+ \tex_afterassignment:D \l_peek_true_aux_tlp \let:NN \peek_tmp:w
+}
+\def_new:Npn \peek_execute_branches_meaning: {
+ \if_meaning:NN \l_peek_token \l_peek_search_token
+ \exp_after:NN \l_peek_true_tlp
+ \else:
+ \exp_after:NN \l_peek_false_tlp
+ \fi:
+}
+\def_new:Npn \peek_execute_branches_catcode: {
+ \if_catcode:w \exp_not:N\l_peek_token \exp_not:N\l_peek_search_token
+ \exp_after:NN \l_peek_true_tlp
+ \else:
+ \exp_after:NN \l_peek_false_tlp
+ \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}
+ }
+ { \l_peek_false_tlp }
+ { \exp_after:NN \peek_execute_branches_charcode_aux:NN \l_peek_search_tlp }
+}
+\def_long_new:Npn \peek_execute_branches_charcode_aux:NN #1#2{
+ \if_charcode:w \exp_not:N #1\exp_not:N#2
+ \exp_after:NN \l_peek_true_tlp
+ \else:
+ \exp_after:NN \l_peek_false_tlp
+ \fi:
+ #2
+}
+\def_new:Npn \peek_meaning:NTF {
+ \peek_token_generic:NNTF \peek_execute_branches_meaning:
+}
+\def_new:Npn \peek_meaning_ignore_spaces:NTF {
+ \let:NN \peek_execute_branches: \peek_execute_branches_meaning:
+ \peek_token_generic:NNTF \peek_ignore_spaces_execute_branches:
+}
+\def_new:Npn \peek_meaning_remove:NTF {
+ \peek_token_remove_generic:NNTF \peek_execute_branches_meaning:
+}
+\def_new:Npn \peek_meaning_remove_ignore_spaces:NTF {
+ \let:NN \peek_execute_branches: \peek_execute_branches_meaning:
+ \peek_token_remove_generic:NNTF \peek_ignore_spaces_execute_branches:
+}
+\def_new:Npn \peek_catcode:NTF {
+ \peek_token_generic:NNTF \peek_execute_branches_catcode:
+}
+\def_new:Npn \peek_catcode_ignore_spaces:NTF {
+ \let:NN \peek_execute_branches: \peek_execute_branches_catcode:
+ \peek_token_generic:NNTF \peek_ignore_spaces_execute_branches:
+}
+\def_new:Npn \peek_catcode_remove:NTF {
+ \peek_token_remove_generic:NNTF \peek_execute_branches_catcode:
+}
+\def_new:Npn \peek_catcode_remove_ignore_spaces:NTF {
+ \let:NN \peek_execute_branches: \peek_execute_branches_catcode:
+ \peek_token_remove_generic:NNTF \peek_ignore_spaces_execute_branches:
+}
+\def_new:Npn \peek_charcode:NTF {
+ \peek_token_generic:NNTF \peek_execute_branches_charcode:
+}
+\def_new:Npn \peek_charcode_ignore_spaces:NTF {
+ \let:NN \peek_execute_branches: \peek_execute_branches_charcode:
+ \peek_token_generic:NNTF \peek_ignore_spaces_execute_branches:
+}
+\def_new:Npn \peek_charcode_remove:NTF {
+ \peek_token_remove_generic:NNTF \peek_execute_branches_charcode:
+}
+
+\def_new:Npn \peek_charcode_remove_ignore_spaces:NTF {
+ \let:NN \peek_execute_branches: \peek_execute_branches_charcode:
+ \peek_token_remove_generic:NNTF \peek_ignore_spaces_execute_branches:
+}
+\def_new:Npn \peek_ignore_spaces_aux: {
+ \peek_after:NN \peek_ignore_spaces_execute_branches:
+}
+\def_new:Npn \peek_ignore_spaces_execute_branches: {
+ \token_if_eq_meaning:NNTF \l_peek_token \c_space_token
+ { \tex_afterassignment:D \peek_ignore_spaces_aux:
+ \let:NN \peek_tmp:w
+ }
+ \peek_execute_branches:
+}
+%% File: l3vers.dtx Copyright (C) 1990-2005 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.
+%%
+%% -----------------------------------------------------------------------
+\GetIdInfo$Id: l3vers.dtx 573 2006-08-21 20:59:37Z morten $
+ {L3 Experimental LaTeX format version}
+\def:Npn\c_format_name{Experimental~ LaTeX3}
+\def:Npn\c_format_date{2005/12/25}
+\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
+ {\iow_expanded_term:n{^^J
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^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
+ !^^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
+ !~~before~continuing~to~build~an~experimental~LaTeX3~format.^^J
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J
+ }
+ \tex_errhelp:D{
+ To~avoid~this~error~message,~obtain~new~Experimental~LaTeX3~sources.}
+ \tex_errmessage:D{
+ Experimental~LaTeX3~source~files~are~more~than~
+ \num_use:N\num_eval:n{\c_fmt_too_old}~months~old!}
+ }
+}
+\exp_after:NN\chk_format_age:w\c_format_date\q_stop
+\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
+%%
+%% 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.
+%%
+%% -----------------------------------------------------------------------
+\GetIdInfo$Id: l3skip.dtx 573 2006-08-21 20:59:37Z morten $
+ {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 }
+\def_new:Npn\skip_new_l:N #1 {\alloc_reg:NnNN l {skip} \tex_skipdef:D #1 }
+\def_new:Npn \skip_new:c {\exp_args:Nc \skip_new:N}
+\def_new:Npn \skip_set:Nn #1#2{#1\skip_eval:n{#2}
+}
+\def_new:Npn \skip_gset:Nn {
+ \pref_global:D
+ \skip_set:Nn }
+\def_new:Npn \skip_set:cn {\exp_args:Nc \skip_set:Nn }
+\def_new:Npn \skip_gset:cn {\exp_args:Nc \skip_gset:Nn }
+\def_new:Npn \skip_zero:N #1{#1\c_zero_skip \scan_stop:
+}
+\def_new:Npn \skip_gzero:N {
+ \pref_global:D
+ \skip_zero:N}
+\def_new:Npn \skip_zero:c {\exp_args:Nc \skip_zero:N}
+\def_new:Npn \skip_gzero:c {\exp_args:Nc \skip_gzero:N}
+\def_new:Npn \skip_add:Nn #1#2{
+ \tex_advance:D#1 by \skip_eval:n{#2}
+}
+\def_new:Npn\skip_add:cn{\exp_args:Nc\skip_add:Nn}
+\def_new:Npn \skip_sub:Nn #1#2{
+ \tex_advance:D#1-\skip_eval:n{#2}
+}
+\def_new:Npn \skip_gadd:Nn {
+ \pref_global:D
+ \skip_add:Nn }
+\def_new:Npn \skip_gsub:Nn {
+ \pref_global:D
+ \skip_sub:Nn }
+\let_new:NN \skip_horizontal:N \tex_hskip:D
+\def_new:Npn \skip_horizontal:c {\exp_args:Nc\skip_horizontal:N}
+\def_new:Npn \skip_horizontal:n #1{\skip_horizontal:N \skip_eval:n{#1}}
+\let_new:NN \skip_vertical:N \tex_vskip:D
+\def_new:Npn \skip_vertital:c {\exp_args:Nc\skip_vertical:N}
+\def_new:Npn \skip_vertical:n #1{\skip_vertical:N \skip_eval:n{#1}}
+\let_new:NN \skip_use:N \tex_the:D
+\def_new:Npn \skip_use:c #1{\exp_args:Nc\skip_use:N}
+\def_new:Npn \skip_eval:n #1 {\etex_glueexpr:D #1 \scan_stop:}
+%%\chk_new_cs:N \l_tmpa_skip
+%%\tex_skipdef:D\l_tmpa_skip 255 %currently taken up by \skip@
+\skip_new:N \l_tmpa_skip
+\skip_new:N \l_tmpb_skip
+\skip_new:N \l_tmpc_skip
+\skip_new:N \g_tmpa_skip
+\skip_new:N \g_tmpb_skip
+\skip_new:N \c_zero_skip
+\skip_set:Nn \c_zero_skip {0pt}
+\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 }
+ }
+}
+\def_new:Npn \skip_split_finite_else_action:nnNN #1#2#3#4{
+ \skip_infinite_glue:nTF {#1}
+ {
+ #3 = \c_zero_skip
+ #4 = \c_zero_skip
+ #2
+ }
+ {
+ #3 = \etex_gluestretch:D #1 \scan_stop:
+ #4 = \etex_glueshrink:D #1 \scan_stop:
+ }
+}
+\alloc_setup_type:nnn {dimen} \c_zero \c_max_register_num
+\def_new:Npn \dim_new:N #1 {\alloc_reg:NnNN g {dimen} \tex_dimendef:D #1 }
+\def_new:Npn \dim_new_l:N #1 {\alloc_reg:NnNN l {dimen} \tex_dimendef:D #1 }
+\def_new:Npn \dim_new:c {\exp_args:Nc \dim_new:N}
+\def_new:Npn \dim_set:Nn #1#2{#1~ \dim_eval:n{#2}}
+\def_new:Npn \dim_gset:Nn {\pref_global:D \dim_set:Nn }
+\def_new:Npn \dim_set:cn {\exp_args:Nc \dim_set:Nn }
+\def_new:Npn \dim_set:Nc {\exp_args:NNc \dim_set:Nn }
+\def_new:Npn \dim_gset:cn {\exp_args:Nc \dim_gset:Nn }
+\def_new:Npn \dim_gset:Nc {\exp_args:NNc \dim_gset:Nn }
+\def_new:Npn \dim_gset:cc {\exp_args:Ncc \dim_gset:Nn }
+\def_new:Npn \dim_zero:N #1{#1\c_zero_skip}
+\def_new:Npn \dim_gzero:N {\pref_global:D \dim_zero:N}
+\def_new:Npn \dim_zero:c {\exp_args:Nc \dim_zero:N}
+\def_new:Npn \dim_gzero:c {\exp_args:Nc \dim_gzero:N}
+\def_new:Npn \dim_add:Nn #1#2{
+ \tex_advance:D#1 by \dim_eval:n{#2}\scan_stop:
+}
+\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_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 }
+\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
+\dim_new:N \l_tmpb_dim
+\dim_new:N \l_tmpc_dim
+\dim_new:N \l_tmpd_dim
+\dim_new:N \g_tmpa_dim
+\dim_new:N \g_tmpb_dim
+\let_new:NN \c_zero_dim \c_zero_skip
+\let_new:NN \c_max_dim \c_max_skip
+\def_new:Npn \dim_eval:n #1 {\etex_dimexpr:D #1 \scan_stop:}
+\let_new:NN \if_dim:w \tex_ifdim:D
+\def_new:Npn \dim_compare:nNnTF #1#2#3{
+ \if_dim:w \dim_eval:n {#1} #2 \dim_eval:n {#3}
+ \exp_after:NN \use_arg_i:nn
+ \else:
+ \exp_after:NN \use_arg_ii:nn
+ \fi:
+}
+\def_new:Npn \dim_compare:nNnT #1#2#3{
+ \if_dim:w \dim_eval:n {#1} #2 \dim_eval:n {#3}
+ \exp_after:NN \use_arg_ii:nn
+ \fi:
+ \use_none:n
+}
+\def_new:Npn \dim_compare:nNnF #1#2#3{
+ \if_dim:w \dim_eval:n {#1} #2 \dim_eval:n {#3}
+ \exp_after:NN \use_none:n
+ \else:
+ \exp_after:NN \use_arg_i:n
+ \fi:
+}
+\def_new:Npn \dim_compare_p:nNn #1#2#3{
+ \if_dim:w \dim_eval:n {#1} #2 \dim_eval:n {#3}
+ \c_true
+ \else:
+ \c_false
+ \fi:
+}
+\def_new:Npn \dim_while:nNnT #1#2#3#4{
+ \dim_compare:nNnT {#1}#2{#3}{#4 \dim_while:nNnT {#1}#2{#3}{#4}}
+}
+\def_new:Npn \dim_while:nNnF #1#2#3#4{
+ \dim_compare:nNnF {#1}#2{#3}{#4 \dim_while:nNnF {#1}#2{#3}{#4}}
+}
+\def_new:Npn \dim_dowhile:nNnT #1#2#3#4{
+ #4 \dim_compare:nNnT {#1}#2{#3}{\dim_dowhile:nNnT {#1}#2{#3}{#4}}
+}
+\def_new:Npn \dim_dowhile:nNnF #1#2#3#4{
+ #4 \dim_compare:nNnF {#1}#2{#3}{\dim_dowhile:nNnF {#1}#2{#3}{#4}}
+}
+\alloc_setup_type:nnn {muskip} \c_zero \c_max_register_num
+\def_new:Npn \muskip_new:N #1{\alloc_reg:NnNN g {muskip} \tex_muskipdef:D #1}
+\def_new:Npn \muskip_new_l:N #1{\alloc_reg:NnNN l {muskip} \tex_muskipdef:D #1}
+\def_new:Npn \muskip_set:Nn#1#2{#1\etex_muexpr:D#2\scan_stop:}
+\def_new:Npn \muskip_gset:Nn{\pref_global:D\muskip_set:Nn}
+\def_new:Npn \muskip_add:Nn#1#2{\tex_advance:D#1\etex_muexpr:D#2\scan_stop:}
+\def_new:Npn \muskip_gadd:Nn{\pref_global:D\muskip_add:Nn}
+\def_new:Npn \muskip_sub:Nn#1#2{\tex_advance:D#1-\etex_muexpr:D#2\scan_stop:}
+\def_new:Npn \muskip_gsub:Nn{\pref_global:D\muskip_sub:Nn}
+%% File: l3toks.dtx Copyright (C) 1990-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.
+%%
+%% -----------------------------------------------------------------------
+\GetIdInfo$Id: l3toks.dtx 580 2006-11-26 15:56:47Z 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}
+\def_new:Npn \toks_new_l:N #1{\alloc_reg:NnNN l {toks} \tex_toksdef:D #1}
+\def_new:Npn \toks_new:c {\exp_args:Nc\toks_new:N}
+\def_new:Npn \toks_clear:N #1{#1\c_empty_toks
+}
+\def_new:Npn \toks_gclear:N {
+ \pref_global:D
+ \toks_clear:N}
+\let_new:NN \toks_use:N \the_internal:D
+\def_new:Npn \toks_use:c {\exp_args:Nc\toks_use:N}
+\def_new:Npn \toks_use_clear:N#1{
+ \exp_after:NN
+ \toks_clear:N
+ \exp_after:NN
+ #1
+ \toks_use:N#1}
+\def_new:Npn \toks_use_gclear:N{
+ \pref_global:D
+ \toks_use_clear:N}
+\def_new:Npn \toks_put_left:Nn #1{
+ \exp_after:NN\toks_put_left_aux:w\exp_after:NN\q_mark
+ \toks_use:N #1\q_stop #1}
+\def_new:Npn \toks_put_left:No {\exp_args:NNo \toks_put_left:Nn}
+\def_new:Npn \toks_gput_left:Nn {
+ \pref_global:D
+ \toks_put_left:Nn}
+\def_new:Npn \toks_gput_left:Nx {\exp_args:NNx \toks_gput_left:Nn}
+\def_long_new:Npn \toks_put_left_aux:w #1\q_stop #2#3{
+ #2\exp_after:NN{\use_arg_i:nn{#3}#1}
+}
+\def_long_new:Npn \toks_put_right:Nn #1#2{#1\exp_after:NN{\toks_use:N #1#2}
+}
+\def_new:Npn \toks_gput_right:Nn {
+ \pref_global:D
+ \toks_put_right:Nn}
+\def_long_new:Npn\toks_put_right:No#1#2{#1\exp_after:NN\exp_after:NN
+\exp_after:NN{\exp_after:NN\toks_use:N\exp_after:NN #1#2}}
+\def_long_new:Npn\toks_put_right:Nd#1#2{
+ \exp_after:NN\toks_put_right:No\exp_after:NN#1\exp_after:NN{#2}}
+\def_long_new:Npn \toks_put_right:Nf #1#2{
+ #1\exp_after:NN\exp_after:NN\exp_after:NN{
+ \exp_after:NN\toks_use:N\exp_after:NN #1\int_to_roman:w -`0#2}}
+\def_new:Npn \toks_put_right:Nx {\exp_args:NNx \toks_put_right:Nn }
+\def_new:Npn \toks_gput_right:No {\exp_args:NNo\toks_gput_right:Nn}
+\def_new:Npn \toks_gput_right:Nx {\exp_args:NNx\toks_gput_right:Nn}
+ \let_new:NN \toks_set:Nn\use_noop:
+ \def_long_new:Npn \toks_set:No#1#2{#1\exp_after:NN{#2}}
+ \def_long_new:Npn \toks_set:Nd#1#2{
+ #1\exp_after:NN\exp_after:NN\exp_after:NN{#2}}
+\def_new:Npn \toks_set:Nx {\exp_args:NNx \toks_set:Nn}
+\def_long_new:Npn\toks_set:Nf #1#2{
+ #1\exp_after:NN{\int_to_roman:w -`0#2}}
+\def_new:Npn \toks_set:cf {\exp_args:Nc\toks_set:Nf}
+\def_new:Npn \toks_set:cn {\exp_args:Nc\toks_set:Nn}
+\def_new:Npn \toks_set:co {\exp_args:Nc\toks_set:No}
+\def_new:Npn \toks_set:cx {\exp_args:Nc\toks_set:Nx}
+ \let_new:NN \toks_gset:Nn\pref_global:D
+\def_new:Npn \toks_gset:No {\exp_args:NNo \toks_gset:Nn}
+\def_new:Npn \toks_gset:Nx {\exp_args:NNx \toks_gset:Nn}
+\def_new:Npn \toks_gset:cn {\exp_args:Nc \toks_gset:Nn}
+\def_new:Npn \toks_gset:co {\exp_args:Nc \toks_gset:No}
+\def_new:Npn \toks_gset:cx {\exp_args:Nc \toks_gset:Nx}
+ \let_new:NN \toks_set_eq:NN \use_noop:
+ \let_new:NN \toks_gset_eq:NN \pref_global:D
+\def_new:Npn \toks_set_eq:Nc {\exp_args:NNc\toks_set_eq:NN}
+\def_new:Npn \toks_set_eq:cN {\exp_args:Nc\toks_set_eq:NN}
+\def_new:Npn \toks_set_eq:cc {\exp_args:Ncc\toks_set_eq:NN}
+\def_new:Npn \toks_gset_eq:Nc {\exp_args:NNc\toks_gset_eq:NN}
+\def_new:Npn \toks_gset_eq:cN {\exp_args:Nc\toks_gset_eq:NN}
+\def_new:Npn \toks_gset_eq:cc {\exp_args:Ncc\toks_gset_eq:NN}
+\def_new:Npn\toks_if_empty_p:N#1{
+ \if:w \tlist_if_empty_p:o{\toks_use:N #1}
+ \c_true
+ \else:
+ \c_false
+ \fi:
+}
+\def_test_function_new:npn{toks_if_empty:N}#1{\if:w \toks_if_empty_p:N #1}
+\def_new:Npn\toks_if_empty:cTF{\exp_args:Nc\toks_if_empty:NTF}
+\def_new:Npn\toks_if_empty:cT{\exp_args:Nc\toks_if_empty:NT}
+\def_new:Npn\toks_if_empty:cF{\exp_args:Nc\toks_if_empty:NF}
+\def_new:NNn \toks_if_eq:NNTF 2 {
+ \tlist_if_eq:xxTF{\toks_use:N #1}{\toks_use:N #2}
+}
+\def_new:NNn \toks_if_eq:NNT 2 {
+ \tlist_if_eq:xxT{\toks_use:N #1}{\toks_use:N #2}
+}
+\def_new:NNn \toks_if_eq:NNF 2 {
+ \tlist_if_eq:xxF{\toks_use:N #1}{\toks_use:N #2}
+}
+\def_new:Npn \toks_if_eq:NcTF {\exp_args:NNc \toks_if_eq:NNTF}
+\def_new:Npn \toks_if_eq:NcT {\exp_args:NNc \toks_if_eq:NNT}
+\def_new:Npn \toks_if_eq:NcF {\exp_args:NNc \toks_if_eq:NNF}
+\def_new:Npn \toks_if_eq:cNTF {\exp_args:Nc \toks_if_eq:NNTF}
+\def_new:Npn \toks_if_eq:cNT {\exp_args:Nc \toks_if_eq:NNT}
+\def_new:Npn \toks_if_eq:cNF {\exp_args:Nc \toks_if_eq:NNF}
+\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}
+\tex_toksdef:D \l_tmpa_toks = 255
+\seq_put_right:Nn \g_toks_allocation_seq {255}
+\toks_new:N \l_tmpb_toks
+\toks_new:N \l_tmpc_toks
+\toks_new:N \g_tmpa_toks
+\toks_new:N \g_tmpb_toks
+\toks_new:N \g_tmpc_toks
+\toks_new:N \c_empty_toks
+\def_new:Npn \toks_remove_extra_brace_group:N #1{
+ \exp_after:NN \toks_remove_extra_brace_group_aux:NNw
+ \exp_after:NN \toks_set:Nn \exp_after:NN #1
+ \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
+%%
+%% 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.
+%%
+%% -----------------------------------------------------------------------
+\GetIdInfo$Id: l3messages.dtx 573 2006-08-21 20:59:37Z morten $
+ {L3 Experimental LaTeX Messages module}
+\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: {~}
+\def_new:Npn \text_put_four_sp: {\text_put_sp: \text_put_sp:
+ \text_put_sp: \text_put_sp: }
+\def:Npn\cmd_arg_list_build#1{
+ \toks_clear:N\l_tmpb_toks
+ \int_set:Nn \l_tmpa_int {#1}
+ \int_while:nNnT \l_tmpa_int > \c_zero {
+ \toks_put_left:No \l_tmpb_toks {\the_internal:D\l_tmpa_int}
+ \toks_put_left:Nn \l_tmpb_toks {##}
+ \int_decr:N\l_tmpa_int
+ }
+ \def:Npx\l_cmd_arg_list{\the_internal:D\l_tmpb_toks}
+}
+\def:Npn\cmd_declare:Nnn#1[#2]{
+ \cmd_arg_list_build{#2}
+ \exp_args:NNO\def:Npn#1\l_cmd_arg_list
+}
+\def_new:Npn \io_show_file_lineno:{
+ on~line~\the_internal:D\tex_inputlineno:D\text_put_sp:~of~
+ file~\g_file_curr_name_tlp}
+\let:NwN \g_err_help_toks \tex_errhelp:D
+\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}
+ \io_put_log:x {#1~\io_show_file_lineno:}}
+\def_new:Npn \err_warn:nn #1#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}
+ \io_put_log:x {#1}}
+\def_new:Npn \err_warn_noline:nn #1#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:
+ \let:NwN \par\use_noop:
+ \CodeStop
+ \NamesStart:
+ %\clearshortrefmaps
+ \tex_input:D #1~\err_display_aux:w}
+\def_new:Npn \err_fatal:nn #1#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}
+ \io_put_term:x {#1}
+ \tex_end:D
+ }
+\def_new:Npn \err_newline: {^^J}
+\iow_new:N \c_iow_err_stream
+\tlp_new:Nn \g_err_curr_fname{}
+\def_new:Npn \err_file_new:Nn #1#2{
+ \tlp_if_empty:NF\g_err_curr_fname
+ {\err_latex_bug:x{Unclosed~error~file~`\g_err_curr_fname'}}
+ \iow_open:Nn \c_iow_err_stream {#2}
+ \err_kernel_info:n{Errorfile~`#2'~opened~for~output}
+ \tlp_gset:Nn \g_err_curr_fname{#2}
+ \tlp_new:Nn #1{#2}}
+\def_new:Npn \err_file_close:N#1{
+ \tlp_if_eq:NNF#1\g_err_curr_fname
+ {\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
+ Was~searching~for~a~function~
+ with~the~following~meaning:\iow_newline
+ \token_to_string:N\token_to_meaning:N
+ \token_to_string:N\l_err_label_token}
+ \group_end:}
+ \iow_close:N \c_iow_err_stream
+ \err_kernel_info:n{Errorfile~`\g_err_curr_fname'~closed}
+ \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
+ \if_meaning:NN#1\g_err_curr_fname
+ \else:
+ \err_latex_bug:x{Error~text~goes~to~wrong~err~file:~
+ `\g_err_curr_fname'~is~open~but~you~requested~
+ `#1'}
+ \fi:
+ \err_interrupt_new_aux:w}
+\def_long_new:Npn \err_interrupt_new_aux:w #1#2#3#4#5{
+ \iow_long_unexpanded:Nn \c_iow_err_stream
+ {\err_msgline_aux:NNnnn #1#2{#3}{#4}{#5}\use_noop:}
+ \group_end:}
+\def_new:Npn \err_msgline_aux:NNnnn #1#2#3#4#5{
+ \if_meaning:NN#1\l_err_label_token
+ \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
+ \text_put_sp:\text_put_four_sp: \text_put_sp:
+ 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.}
+ \err_message:x{#3}
+ #5}
+ \tex_endinput:D
+ \fi:}
+\def_new:Npn \err_display_aux:w {}
+\def_new:Npn \err_kernel_interrupt:Nw {\err_interrupt:NNw \c_kernel_err_tlp}
+\def_new:Npn \err_kernel_interrupt_new:NNnnn {
+ \err_interrupt_new:NNNnnn \c_kernel_err_tlp}
+\def_new:Npn \err_kernel_info:n #1 {
+ \err_info:nn {LaTeX~Info:~#1}
+ {\text_put_four_sp:\text_put_four_sp:\text_put_four_sp:}
+ }
+\def_new:Npn \err_kernel_warn:n #1 {
+ \err_warn:nn {LaTeX~Warning:~#1}
+ {\text_put_sp:\text_put_sp:\text_put_sp:
+ \text_put_four_sp:\text_put_four_sp:\text_put_four_sp:}
+ }
+\def_new:Npn \err_kernel_fatal:n #1 {
+ \err_fatal:nn {LaTeX~Fatal:~#1}
+ {\text_put_sp:
+ \text_put_four_sp:\text_put_four_sp:\text_put_four_sp:}
+ }
+\def_new:Npn \err_kernel_info_noline:n #1 {
+ \err_info_noline:nn {LaTeX~Info:~#1}
+ {\text_put_four_sp:\text_put_four_sp:\text_put_four_sp:}
+ }
+\def_new:Npn \err_kernel_warn_noline:n #1 {
+ \err_warn_noline:nn {LaTeX~Warning:~#1}
+ {\text_put_sp:\text_put_sp:\text_put_sp:
+ \text_put_four_sp:\text_put_four_sp:\text_put_four_sp:}
+ }
+\def_new:Npn \err_kernel_fatal_noline:n #1 {
+ \err_fatal_noline:nn {LaTeX~Fatal:~#1}
+ {\text_put_sp:
+ \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
+%%
+%% 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.
+%%
+%% -----------------------------------------------------------------------
+\GetIdInfo$Id: l3box.dtx 573 2006-08-21 20:59:37Z 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}
+\def_new:Npn \box_new:N #1 {\alloc_reg:NnNN g {box} \tex_mathchardef:D #1}
+\def_new:Npn \box_new_l:N #1 {\alloc_reg:NnNN l {box} \tex_mathchardef:D #1}
+\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_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}
+\def_new:Npn \box_if_empty:cF {\exp_args:Nc \box_if_empty:NF}
+\def_new:Npn \box_set_eq:NN #1#2 {\tex_setbox:D #1 \tex_box:D #2}
+\def_new:Npn \box_set_eq:cN {\exp_args:Nc \box_set_eq:NN}
+\def_new:Npn \box_set_eq:Nc {\exp_args:NNc \box_set_eq:NN}
+\def_new:Npn \box_set_eq:cc {\exp_args:Ncc \box_set_eq:NN}
+\def_new:Npn \box_gset_eq:NN {\pref_global:D\box_set_eq:NN}
+\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}
+\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}}
+\def_long_new:Npn \box_move_down:nn #1#2{\tex_lower:D\dim_eval:n{#1}{#2}}
+\def_new:Npn \box_clear:N #1{\box_set_eq:NN #1 \c_empty_box }
+\def_new:Npn \box_clear:c {\exp_args:Nc \box_clear:N }
+\def_new:Npn \box_gclear:N {\pref_global:D\box_clear:N}
+\def_new:Npn \box_gclear:c {\exp_args:Nc \box_gclear:c }
+\let_new:NN \box_ht:N \tex_ht:D
+\def_new:Npn \box_ht:c {\exp_args:Nc \box_ht:N}
+\let_new:NN \box_dp:N \tex_dp:D
+\def_new:Npn \box_dp:c {\exp_args:Nc \box_dp:N}
+\let_new:NN \box_wd:N \tex_wd:D
+\def_new:Npn \box_wd:c {\exp_args:Nc \box_wd:N}
+\let_new:NN \box_use_clear:N \tex_box:D
+\def_new:Npn \box_use_clear:c {\exp_args:Nc \box_use_clear:N}
+\let_new:NN \box_use:N \tex_copy:D
+\def_new:Npn \box_use:c {\exp_args:Nc \box_use:N}
+\let:NN \box_show:N \tex_showbox:D
+\def_new:Npn \box_show:c {\exp_args:Nc \box_show:N}
+\box_new:N \c_empty_box
+\box_new:N \l_tmpa_box
+\box_new:N \l_tmpb_box
+\def_new:Npn \vbox:n {\tex_vbox:D \scan_stop:}
+\def_long_new:Npn \vbox_set:Nn #1#2 {\tex_setbox:D #1 \tex_vbox:D {#2}}
+\def_new:Npn \vbox_set:cn {\exp_args:Nc \vbox_set:Nn}
+\def_new:Npn \vbox_gset:Nn {\pref_global:D \vbox_set:Nn}
+\def_new:Npn \vbox_gset:cn {\exp_args:Nc \vbox_gset:Nn}
+\def_long_new:Npn \vbox_set_to_ht:Nnn #1#2#3 {
+ \tex_setbox:D #1 \tex_vbox:D to #2 {#3}}
+\def_new:Npn \vbox_set_to_ht:cnn{\exp_args:Nc \vbox_set_to_ht:Nnn }
+\def_new:Npn \vbox_gset_to_ht:Nnn {\pref_global:D \vbox_set_to_ht:Nnn }
+\def_new:Npn \vbox_gset_to_ht:cnn{\exp_args:Nc \vbox_gset_to_ht:Nnn }
+\def_new:Npn \vbox_gset_to_ht:ccn {\exp_args:Ncc \vbox_gset_to_ht:Nnn}
+\def_new:Npn \vbox_set_inline_begin:N #1 {
+ \tex_setbox:D #1 \tex_vbox:D \c_group_begin_token }
+\let_new:NN \vbox_set_inline_end: \c_group_end_token
+\def_new:Npn \vbox_gset_inline_begin:N {
+ \pref_global:D \vbox_set_inline_begin:N }
+\let_new:NN \vbox_gset_inline_end: \c_group_end_token
+\def_long_new:Npn \vbox_to_ht:nn #1#2{\tex_vbox:D to \dim_eval:n{#1}{#2}}
+\def_long_new:Npn \vbox_to_zero:n #1 {\tex_vbox:D to \c_zero_dim {#1}}
+\def_new:Npn \vbox_set_split_to_ht:NNn #1#2#3{
+ \tex_setbox:D #1 \tex_vsplit:D #2 to #3
+}
+\let_new:NN \vbox_unpack:N \tex_unvcopy:D
+\def_new:Npn \vbox_unpack:c {\exp_args:Nc \vbox_unpack:N}
+\let_new:NN \vbox_unpack_clear:N \tex_unvbox:D
+\def_new:Npn \vbox_unpack_clear:c {\exp_args:Nc \vbox_unpack_clear:N}
+\def_new:Npn \hbox:n {\tex_hbox:D \scan_stop:}
+\def_long_new:Npn \hbox_set:Nn #1#2 {\tex_setbox:D #1 \tex_hbox:D {#2}}
+\def_new:Npn \hbox_set:cn {\exp_args:Nc \hbox_set:Nn}
+\def_new:Npn \hbox_gset:Nn {\pref_global:D \hbox_set:Nn}
+\def_new:Npn \hbox_gset:cn {\exp_args:Nc \hbox_gset:Nn}
+\def_long_new:Npn \hbox_set_to_wd:Nnn #1#2#3 {
+ \tex_setbox:D #1 \tex_hbox:D to \dim_eval:n{#2} {#3}}
+\def_new:Npn \hbox_set_to_wd:cnn{\exp_args:Nc \hbox_set_to_wd:Nnn }
+\def_new:Npn \hbox_gset_to_wd:Nnn {\pref_global:D \hbox_set_to_wd:Nnn }
+\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 }
+\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 }
+\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}}
+\let_new:NN \hbox_unpack:N \tex_unhcopy:D
+\def_new:Npn \hbox_unpack:c {\exp_args:Nc \hbox_unpack:N}
+\let_new:NN \hbox_unpack_clear:N \tex_unhbox:D
+\def_new:Npn \hbox_unpack_clear:c {\exp_args:Nc \hbox_unpack_clear:N}
+%% File: l3precom.dtx Copyright (C) 1990-2006 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
+%% 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.
+%%
+%% -----------------------------------------------------------------------
+\GetIdInfo$Id: l3precom.dtx 573 2006-08-21 20:59:37Z morten $
+ {L3 Experimental precompilation module}
+\iow_new:N\c_cs_dump_stream
+\tlp_new:Nn\g_cs_dump_name_tlp{}
+\seq_new:N\g_cs_dump_seq
+\def_new:Npn\cs_record_name:N#1{
+\seq_gput_left:Nn
+ \g_cs_dump_seq#1}
+\def_new:Npn\cs_record_name:c{\exp_args:Nc\cs_record_name:N}
+\def_new:Npn\cs_dump:{
+\iow_expanded_term:n{Precompiling~style~into~(\g_cs_dump_name_tlp)}
+\iow_open:Nn\c_cs_dump_stream{\g_cs_dump_name_tlp}
+\iow_expanded:Nn\c_cs_dump_stream
+{\group_begin:
+\tex_catcode:D`\token_to_string:N\*=11\scan_stop:
+\token_to_string:N\CodeStart
+}
+\seq_map_inline:Nn
+\g_cs_dump_seq
+{\tex_message:D{.}
+\iow_expanded:Nn\c_cs_dump_stream
+ {\exp_not:n{\gdef:Npn ##1}
+ {\tlp_to_str:N##1}}
+}
+\iow_expanded:Nn \c_cs_dump_stream {\exp_not:n{\num_gset:Nn
+ \g_gen_sym_num}
+ {\num_use:N\g_gen_sym_num}^^J
+\exp_not:n{\num_gset:Nn \g_ggen_sym_num}
+ {\num_use:N\g_ggen_sym_num}}
+\iow_expanded:Nn
+\c_cs_dump_stream
+{\group_end:}
+\iow_close:N\c_cs_dump_stream
+\tex_message:D{~finished}
+}
+\def_new:Npn\cs_load_dump:n#1{
+\file_not_found:nTF{#1.cmp}
+{\tlp_gset:Nn\g_cs_dump_name_tlp{#1.cmp}}
+{\input{#1.cmp}
+\let:NN\cs_dump:\fi:
+\if_false:}}
+\num_new:N\g_gen_sym_num \num_gset:Nn\g_gen_sym_num{0}
+\num_new:N\g_ggen_sym_num \num_gset:Nn\g_ggen_sym_num{0}
+\def_new:Npn\cs_gen_sym:N#1{
+\num_gincr:N\g_gen_sym_num
+\tlp_set:Nc#1{l*\tex_romannumeral:D\num_use:N\g_gen_sym_num}
+\exp_after:NN\cs_record_name:N#1
+\exp_after:NN\tlp_clear_new:N#1}
+\def_new:Npn\cs_ggen_sym:N#1{
+\num_gincr:N\g_ggen_sym_num
+\tlp_set:Nc#1{g*\tex_romannumeral:D\num_use:N\g_ggen_sym_num}
+\exp_after:NN\cs_record_name:N#1
+\exp_after:NN\tlp_clear_new:N#1}
+%% File: l3prg.dtx Copyright (C) 2005-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.
+%%
+%% -----------------------------------------------------------------------
+\GetIdInfo$Id: l3prg.dtx 574 2006-08-21 23:30:10Z morten $
+ {L3 Experimental control structures}
+\def_new:Npn \mode_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: {
+ \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: {
+ \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:} {
+ \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 \scan_align_safe_stop: {
+ \num_compare:nNnT \etex_currentgrouptype:D = \c_six
+ {
+ \num_compare:nNnF \etex_lastnodetype:D = \c_zero
+ {
+ \num_compare:nNnF \etex_lastnodetype:D = \c_seven
+ \scan_stop:
+ }
+ }
+}
+\def_new:Npn \prg_replicate:nn #1{
+ \cs:w use_noop:
+ \exp_after:NN\prg_replicate_first_aux:N
+ \int_use:N \int_eval:n{#1} \cs_end:
+ \cs_end:
+}
+\def_new:Npn \prg_replicate_aux:N#1{
+ \cs:w prg_replicate_#1:n\prg_replicate_aux:N
+}
+\def_new:Npn \prg_replicate_first_aux:N#1{
+ \cs:w prg_replicate_first_#1:n\prg_replicate_aux:N
+}
+\def_new:Npn \prg_replicate_ :n #1{}% no, this is not a typo!
+\def_long_new:cpn {prg_replicate_0:n}#1{\cs_end:{#1#1#1#1#1#1#1#1#1#1}}
+\def_long_new:cpn {prg_replicate_1:n}#1{\cs_end:{#1#1#1#1#1#1#1#1#1#1}#1}
+\def_long_new:cpn {prg_replicate_2:n}#1{\cs_end:{#1#1#1#1#1#1#1#1#1#1}#1#1}
+\def_long_new:cpn {prg_replicate_3:n}#1{
+ \cs_end:{#1#1#1#1#1#1#1#1#1#1}#1#1#1}
+\def_long_new:cpn {prg_replicate_4:n}#1{
+ \cs_end:{#1#1#1#1#1#1#1#1#1#1}#1#1#1#1}
+\def_long_new:cpn {prg_replicate_5:n}#1{
+ \cs_end:{#1#1#1#1#1#1#1#1#1#1}#1#1#1#1#1}
+\def_long_new:cpn {prg_replicate_6:n}#1{
+ \cs_end:{#1#1#1#1#1#1#1#1#1#1}#1#1#1#1#1#1}
+\def_long_new:cpn {prg_replicate_7:n}#1{
+ \cs_end:{#1#1#1#1#1#1#1#1#1#1}#1#1#1#1#1#1#1}
+\def_long_new:cpn {prg_replicate_8:n}#1{
+ \cs_end:{#1#1#1#1#1#1#1#1#1#1}#1#1#1#1#1#1#1#1}
+\def_long_new:cpn {prg_replicate_9:n}#1{
+ \cs_end:{#1#1#1#1#1#1#1#1#1#1}#1#1#1#1#1#1#1#1#1}
+\def_long_new:cpn {prg_replicate_first_0:n}#1{\cs_end: }
+\def_long_new:cpn {prg_replicate_first_1:n}#1{\cs_end: #1}
+\def_long_new:cpn {prg_replicate_first_2:n}#1{\cs_end: #1#1}
+\def_long_new:cpn {prg_replicate_first_3:n}#1{\cs_end: #1#1#1}
+\def_long_new:cpn {prg_replicate_first_4:n}#1{\cs_end: #1#1#1#1}
+\def_long_new:cpn {prg_replicate_first_5:n}#1{\cs_end: #1#1#1#1#1}
+\def_long_new:cpn {prg_replicate_first_6:n}#1{\cs_end: #1#1#1#1#1#1}
+\def_long_new:cpn {prg_replicate_first_7:n}#1{\cs_end: #1#1#1#1#1#1#1}
+\def_long_new:cpn {prg_replicate_first_8:n}#1{\cs_end: #1#1#1#1#1#1#1#1}
+\def_long_new:cpn {prg_replicate_first_9:n}#1{\cs_end: #1#1#1#1#1#1#1#1#1}
+\def_long_new:NNn \prg_stepwise_function:nnnN 2{
+ \num_compare:nNnTF{#2}<\c_zero
+ {\exp_args:No\prg_stepwise_function_decr:nnnN }
+ {\exp_args:No\prg_stepwise_function_incr:nnnN }
+ {\int_use:N\int_eval:n{#1}}{#2}
+}
+\def_long_new:NNn \prg_stepwise_function_incr:nnnN 4{
+ \num_compare:nNnF {#1}>{#3}
+ {
+ #4{#1}
+ \exp_args:No \prg_stepwise_function_incr:nnnN
+ {\int_use:N\int_eval:n{#1 + #2}}
+ {#2}{#3}{#4}
+ }
+}
+\def_long_new:NNn \prg_stepwise_function_decr:nnnN 4{
+ \num_compare:nNnF {#1}<{#3}
+ {
+ #4{#1}
+ \exp_args:No \prg_stepwise_function_decr:nnnN
+ {\int_use:N\int_eval:n{#1 + #2}}
+ {#2}{#3}{#4}
+ }
+}
+\int_new:N\l_prg_inline_level_int
+\def_long_new:NNn\prg_stepwise_inline:nnnn 4{
+ \int_incr:N \l_prg_inline_level_int
+ \def:cpn{prg_stepwise_inline_\int_use:N\l_prg_inline_level_int :n}##1{#4}
+ \num_compare:nNnTF {#2}<\c_zero
+ {\exp_args:Nco \prg_stepwise_inline_decr:Nnnn }
+ {\exp_args:Nco \prg_stepwise_inline_incr:Nnnn }
+ {prg_stepwise_inline_\int_use:N\l_prg_inline_level_int :n}
+ {\int_use:N\int_eval:n{#1}} {#2} {#3}
+ \int_decr:N \l_prg_inline_level_int
+}
+\def_long_new:NNn \prg_stepwise_inline_incr:Nnnn 4{
+ \num_compare:nNnF {#2}>{#4}
+ {
+ #1{#2}
+ \exp_args:NNo \prg_stepwise_inline_incr:Nnnn #1
+ {\int_use:N\int_eval:n{#2 + #3}} {#3}{#4}
+ }
+}
+\def_long_new:NNn \prg_stepwise_inline_decr:Nnnn 4{
+ \num_compare:nNnF {#2}<{#4}
+ {
+ #1{#2}
+ \exp_args:NNo \prg_stepwise_inline_decr:Nnnn #1
+ {\int_use:N\int_eval:n{#2 + #3}} {#3}{#4}
+ }
+}
+\def_long_new:NNn \prg_stepwise_variable:nnnNn 2 {
+ \num_compare:nNnTF {#2}<\c_zero
+ {\exp_args:No\prg_stepwise_variable_decr:nnnNn}
+ {\exp_args:No\prg_stepwise_variable_incr:nnnNn}
+ {\int_use:N\int_eval:n{#1}}{#2}
+}
+\def_long_new:NNn \prg_stepwise_variable_incr:nnnNn 5 {
+ \num_compare:nNnF {#1}>{#3}
+ {
+ \def:Npn #4{#1} #5
+ \exp_args:No \prg_stepwise_variable_incr:nnnNn
+ {\int_use:N\int_eval:n{#1 + #2}}{#2}{#3}#4{#5}
+ }
+}
+\def_long_new:NNn \prg_stepwise_variable_decr:nnnNn 5 {
+ \num_compare:nNnF {#1}<{#3}
+ {
+ \def:Npn #4{#1} #5
+ \exp_args:No \prg_stepwise_variable_decr:nnnNn
+ {\int_use:N\int_eval:n{#1 + #2}}{#2}{#3}#4{#5}
+ }
+}
+\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_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_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_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_false:N #1 { \glet:NN #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
+\let_new:NN \bool_set_eq:cc \let:cc
+\let_new:NN \bool_gset_eq:NN \glet:NN
+\let_new:NN \bool_gset_eq:Nc \glet:Nc
+\let_new:NN \bool_gset_eq:cN \glet:cN
+\let_new:NN \bool_gset_eq:cc \glet:cc
+\bool_new:N \l_tmpa_bool
+\bool_new:N \g_tmpa_bool
+\def_test_function_new:npn{bool_if:N}#1{\if:w #1}
+\def_new:Npn \bool_if:cTF{\exp_args:Nc\bool_if:NTF}
+\def_new:Npn \bool_if:cT{\exp_args:Nc\bool_if:NT}
+\def_new:Npn \bool_if:cF{\exp_args:Nc\bool_if:NF}
+\def_new:Npn \bool_if_p:N #1 { #1 }
+\let_new:NN \bool_if_p:c \cs_use:c
+\def_long_new:Npn \bool_whiledo:NT #1 #2 {
+ \bool_if:NT #1 {#2 \bool_whiledo:NT #1 {#2}}
+}
+\def_new:Npn \bool_whiledo:cT{\exp_args:Nc\bool_whiledo:NT}
+\def_long_new:Npn \bool_whiledo:NF #1 #2 {
+ \bool_if:NF #1 {#2 \bool_whiledo:NF #1 {#2}}
+}
+\def_new:Npn \bool_whiledo:cF{\exp_args:Nc\bool_whiledo:NF}
+\def_long_new:Npn \bool_dowhile:NT #1 #2 {
+ #2 \bool_if:NT #1 {\bool_dowhile:NT #1 {#2}}
+}
+\def_new:Npn \bool_dowhile:cT{\exp_args:Nc\bool_dowhile:NT}
+\def_long_new:Npn \bool_dowhile:NF #1 #2 {
+ #2 \bool_if:NF #1 {\bool_dowhile:NF #1 {#2}}
+}
+\def_new:Npn \bool_dowhiledo:cF{\exp_args:Nc\bool_dowhile:cF}
+\def_new:Npn \bool_double_if:NNnnnn#1#2{
+ \if_case:w \num_eval:w #1\scan_stop:
+ \if_case:w \num_eval:w #2\scan_stop:
+ \exp_after:NN\exp_after:NN\exp_after:NN \use_arg_i:nnnn
+ \else:
+ \exp_after:NN\exp_after:NN\exp_after:NN \use_arg_ii:nnnn
+ \fi:
+ \else:
+ \if_case:w \num_eval:w #2\scan_stop:
+ \exp_after:NN\exp_after:NN\exp_after:NN \use_arg_iii:nnnn
+ \else:
+ \exp_after:NN\exp_after:NN\exp_after:NN \use_arg_iv:nnnn
+ \fi:
+ \fi:
+}
+\def_new:Npn \bool_double_if:cNnnnn{\exp_args:Nc\bool_double_if:NNnnnn}
+\def_new:Npn \bool_double_if:Ncnnnn{\exp_args:NNc\bool_double_if:NNnnnn}
+\def_new:Npn \bool_double_if:ccnnnn{\exp_args:Ncc\bool_double_if:NNnnnn}
+\def_long_new:Npn \prg_whiledo:nT #1#2{
+ #1 {#2 \prg_whiledo:nT {#1}{#2}}
+}
+\def_long_new:Npn \prg_whiledo:nF #1#2{
+ #1 {#2 \prg_whiledo:nF {#1}{#2}}
+}
+\def_long_new:Npn \prg_dowhile:nT #1#2{
+ #2 #1 {\prg_dowhile:nT {#1}{#2}}
+}
+\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_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:NNn \prg_define_quicksort:nnn 3 {
+ \def_long:cNx{#1_quicksort:n}1{
+ \exp_not:c{#1_quicksort_start_partition:w} ##1
+ \exp_not:n{#2\q_nil#3\q_stop}
+ }
+ \def_long:cNx{#1_quicksort_braced:n}1{
+ \exp_not:c{#1_quicksort_start_partition_braced:n} ##1
+ \exp_not:N\q_nil\exp_not:N\q_stop
+ }
+ \def_long:cpx {#1_quicksort_start_partition:w} #2 ##1 #3{
+ \exp_not:N \quark_if_nil:nT {##1}\exp_not:N \use_none_delimit_by_q_stop:w
+ \exp_not:c{#1_quicksort_do_partition_i:nnnw} {##1}{}{}
+ }
+ \def_long:cNx {#1_quicksort_start_partition_braced:n} 1 {
+ \exp_not:N \quark_if_nil:nT {##1}\exp_not:N \use_none_delimit_by_q_stop:w
+ \exp_not:c{#1_quicksort_do_partition_i_braced:nnnn} {##1}{}{}
+ }
+ \def_long:cpx {#1_quicksort_do_partition_i:nnnw} ##1##2##3 #2 ##4 #3 {
+ \exp_not:N \quark_if_nil:nTF {##4} \exp_not:c {#1_do_quicksort_braced:nnnnw}
+ {
+ \exp_not:c{#1_quicksort_compare:nnTF}{##1}{##4}
+ \exp_not:c{#1_quicksort_partition_greater_ii:nnnn}
+ \exp_not:c{#1_quicksort_partition_less_ii:nnnn}
+ }
+ {##1}{##2}{##3}{##4}
+ }
+ \def_long:cNx {#1_quicksort_do_partition_i_braced:nnnn} 4 {
+ \exp_not:N \quark_if_nil:nTF {##4} \exp_not:c {#1_do_quicksort_braced:nnnnw}
+ {
+ \exp_not:c{#1_quicksort_compare:nnTF}{##1}{##4}
+ \exp_not:c{#1_quicksort_partition_greater_ii_braced:nnnn}
+ \exp_not:c{#1_quicksort_partition_less_ii_braced:nnnn}
+ }
+ {##1}{##2}{##3}{##4}
+ }
+ \def_long:cpx {#1_quicksort_do_partition_ii:nnnw} ##1##2##3 #2 ##4 #3 {
+ \exp_not:N \quark_if_nil:nTF {##4} \exp_not:c {#1_do_quicksort_braced:nnnnw}
+ {
+ \exp_not:c{#1_quicksort_compare:nnTF}{##4}{##1}
+ \exp_not:c{#1_quicksort_partition_less_i:nnnn}
+ \exp_not:c{#1_quicksort_partition_greater_i:nnnn}
+ }
+ {##1}{##2}{##3}{##4}
+ }
+ \def_long:cNx {#1_quicksort_do_partition_ii_braced:nnnn} 4 {
+ \exp_not:N \quark_if_nil:nTF {##4} \exp_not:c {#1_do_quicksort_braced:nnnnw}
+ {
+ \exp_not:c{#1_quicksort_compare:nnTF}{##4}{##1}
+ \exp_not:c{#1_quicksort_partition_less_i_braced:nnnn}
+ \exp_not:c{#1_quicksort_partition_greater_i_braced:nnnn}
+ }
+ {##1}{##2}{##3}{##4}
+ }
+ \def_long:cNx {#1_quicksort_partition_less_i:nnnn} 4{
+ \exp_not:c{#1_quicksort_do_partition_i:nnnw}{##1}{##2}{{##4}##3}}
+ \def_long:cNx {#1_quicksort_partition_less_ii:nnnn} 4{
+ \exp_not:c{#1_quicksort_do_partition_ii:nnnw}{##1}{##2}{##3{##4}}}
+ \def_long:cNx {#1_quicksort_partition_greater_i:nnnn} 4{
+ \exp_not:c{#1_quicksort_do_partition_i:nnnw}{##1}{{##4}##2}{##3}}
+ \def_long:cNx {#1_quicksort_partition_greater_ii:nnnn} 4{
+ \exp_not:c{#1_quicksort_do_partition_ii:nnnw}{##1}{##2{##4}}{##3}}
+ \def_long:cNx {#1_quicksort_partition_less_i_braced:nnnn} 4{
+ \exp_not:c{#1_quicksort_do_partition_i_braced:nnnn}{##1}{##2}{{##4}##3}}
+ \def_long:cNx {#1_quicksort_partition_less_ii_braced:nnnn} 4{
+ \exp_not:c{#1_quicksort_do_partition_ii_braced:nnnn}{##1}{##2}{##3{##4}}}
+ \def_long:cNx {#1_quicksort_partition_greater_i_braced:nnnn} 4{
+ \exp_not:c{#1_quicksort_do_partition_i_braced:nnnn}{##1}{{##4}##2}{##3}}
+ \def_long:cNx {#1_quicksort_partition_greater_ii_braced:nnnn} 4{
+ \exp_not:c{#1_quicksort_do_partition_ii_braced:nnnn}{##1}{##2{##4}}{##3}}
+ \def_long:cpx {#1_do_quicksort_braced:nnnnw} ##1##2##3##4\q_stop {
+ \exp_not:c{#1_quicksort_braced:n}{##2}
+ \exp_not:c{#1_quicksort_function:n}{##1}
+ \exp_not:c{#1_quicksort_braced:n}{##3}
+ }
+}
+\prg_define_quicksort:nnn {prg}{}{}
+\let:NN \prg_quicksort_function:n \ERROR
+\let:NN \prg_quicksort_compare:nnTF \ERROR
+%% 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.
+%%
+%% -----------------------------------------------------------------------
+\GetIdInfo$Id: l3xref.dtx 579 2006-11-25 23:38:03Z 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
+\def_new:Npn \xref_new:nn {\xref_new_aux:nnn{immediate}}
+\def_new:Npn \xref_deferred_new:nn {\xref_new_aux:nnn{deferred}}
+\def_new:Npn \xref_new_aux:nnn #1#2#3{
+ \prop_gput:ccx {g_xref_all_curr_ #1 _fields_plist}
+ { xref_ #2 _key }
+ { \exp_not:c {l_xref_curr_#2_tlp }}
+ \def_protected:cpn { xref_#2_key }{}
+ \tlp_new:cn{l_xref_curr_#2_tlp}{#3}
+ \toks_set:Nx \l_tmpa_toks {
+ \exp_not:n { \def:cpn {xref_get_value_#2_aux:w} ##1 }
+ \exp_not:c { xref_#2_key }
+ }
+ \toks_use:N \l_tmpa_toks ##2 ##3\q_nil {##2}
+}
+\def_new:Npn \xref_get_value:nn #1#2 {
+ \cs_if_really_free:cTF{g_xref_#2_plist}
+ {??}
+ {
+ \exp_args:NcNc \exp_after:NN {xref_get_value_#1_aux:w}
+ \prop_use:N {g_xref_#2_plist}
+ \q_nil
+ }
+}
+\def:NNn \exp_after:cc 2 {
+ \exp_after:NN \exp_after:NN
+ \cs:w #1\exp_after:NN\cs_end: \cs:w #2\cs_end:
+}
+\def_protected_new:Npn \xref_define_label:nn {
+ \group_begin:
+ \char_set_catcode:nn {`\ }\c_ten
+ \xref_define_label_aux:nn
+}
+\def_new:Npn \xref_define_label_aux:nn #1#2 {
+ \cs_if_really_free:cTF{g_xref_#1_plist}
+ {\prop_new:c{g_xref_#1_plist}}{\WARNING}
+ \toks_gset:cn{g_xref_#1_plist}{#2}
+ \group_end:
+}
+\def:Npn \xref_set_label:n #1{
+ \def:Npx \tmp:w{\prop_use:N\g_xref_all_curr_immediate_fields_plist}
+ \exp_args:NNx\iow_deferred_expanded:Nn \xref_write{
+ \xref_define_label:nn {#1} {
+ \tmp:w
+ \prop_use:N \g_xref_all_curr_deferred_fields_plist
+ }
+ }
+}
+\iow_new:N \xref_write
+%% File: l3final.dtx Copyright (C) 1990-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.
+%%
+%% -----------------------------------------------------------------------
+\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
+%%
+%%
+%% End of file `lbase.ltx'.
diff --git a/Master/texmf-dist/doc/latex/expl3/readme.txt b/Master/texmf-dist/doc/latex/expl3/readme.txt
new file mode 100644
index 00000000000..e1012dc0353
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/expl3/readme.txt
@@ -0,0 +1,330 @@
+
+ Experimental Packages Demonstrating
+ A Possible LaTeX3 Programming Convention
+ ========================================
+
+ 2006/08/15
+
+
+OVERVIEW
+--------
+
+The packages in this directory implement a possible language for `low
+level' programming in TeX. The syntax conventions described here are NOT
+intended either for use in documents or for use in describing design
+layouts in document class files.
+
+All aspects of these package 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.
+
+This code has been developed over time and has been used in previous
+versions for prototype implementations, experiments, etc. Its internal
+documentation (in the .dtx files) reflects the age of parts of it; it
+often contains personal comments and it sometimes refers to parts that
+are at present not distributed. We kindly ask you to overlook its
+deficiencies and inaccuracies --- if we had tried to clean this up it
+would never have surfaced and, for the purpose of discussions and
+comments, we hope its present form is adequate.
+
+
+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
+------------------
+
+ Frank Mittelbach, Denys Duchier, Johannes Braams, Michael Downes,
+ David Carlisle, Alan Jeffrey, Chris Rowley, Rainer Schoepf
+ Javier Bezos, Morten Hoegholm, Thomas Lotze
+
+
+DISCUSSION
+----------
+
+Discussion concerning the approach, suggestions for improvements, changes,
+additions, etc. should be addressed to the list LATEX-L.
+
+You can subscribe to this list by sending mail to
+
+ listserv@urz.uni-heidelberg.de
+
+with the body containing
+
+ subscribe LATEX-L <Your-First-Name> <Your-Second-Name>
+
+
+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.
+
+Also please don't expect these package to work with *any* code that
+floats around in the LaTeX2e world. :-)
+
+
+
+MANIFEST
+--------
+
+The following packages are in this release:
+
+
+l3names
+=======
+
+Documents the general naming scheme, and gives new names to all the TeX
+primitives.
+
+If this package is used with the option [removeoldnames] then the
+original TeX primitive names (\hbox, \def, ...) are made *undefined* and
+so free to be defined for other purposes if needed. Of course this
+breaks almost all existing LaTeX2 code, but it may be used for testing
+purposes, see test2.tex.
+
+l3basics
+========
+
+Some basic definitions that are used by the other packages.
+
+l3chk
+=====
+
+Functions that check definitions.
+(Comparable to LaTeX2's \newcommand/\renewcommand.)
+
+l3alloc
+=======
+
+Generic functions for allocating registers.
+
+l3toks
+======
+
+TeX's token registers. (Can be compiled with checking enabled)
+
+l3tlp
+=====
+
+Token List Pointers. A basic LaTeX3 datatype for storing token lists.
+(These are essentially macros with no arguments.) The module also
+provides functions for arbitrary token lists. (Package can be compiled
+with checking enabled.)
+
+l3expan
+=======
+
+The argument expansion module. One of the main features of the language
+proposed here is a systematic treatment of the handling of argument
+expansion. The basic functions for preprocessing command arguments are
+defined here.
+
+l3quark
+=======
+
+A `quark' is a command that is defined to expand to itself. So it may
+not be directly used (it would generate an infinite loop) but has many
+uses as special markers within LaTeX code.
+
+l3seq
+=====
+
+A module implementing the basic list and stack datatypes.
+
+l3clist
+=======
+
+A module implementing the handling of comma separated lists
+
+l3prop
+======
+
+Property lists are the datatype for handling key/value assignments.
+
+l3int
+=====
+
+Integer and fake integer registers. With eTeX/Omega becoming more and
+more accessible this module is, at least in parts only of historical
+significance. (Can be compiled with checking enabled)
+
+l3num
+=====
+
+Storing numbers as token-lists in macros
+
+l3skip
+======
+
+Dealing with length registers
+
+l3precom
+=========
+
+Low-level pointer-related code, with further checking and tracing.
+
+l3io
+====
+
+Low-level input and ouput.
+
+l3prg
+=====
+
+Experimental control structures. This covers booleans and various
+other code.
+
+l3box
+=====
+
+Low level box handling code
+
+l3token
+=====
+
+Functions that investigate tokens and determine of which categories
+they are. For instance, is the token in question expandable or not? Is
+it a macro taking arguments? Also functions for peeking ahead in the
+token stream.
+
+l3xref
+=====
+
+Module providing the low-level interface for cross references. This
+module also contains a test file which is generated along with the
+package.
+
+l3messages
+=====
+
+Module providing a new mechanism to provide longer warning and error
+messages based on storing the messages in external files.
+
+l3calc
+=====
+
+Module for using infix notation for the built-in register types
+(lengths and counters).
+
+l3keyval
+=====
+
+Module for extracting data from a key=val list for further processing.
+
+=====================================================================
+
+Install file
+=============
+
+l3.ins
+======
+
+Process with plain TeX or LaTeX2e to generate the experimental
+packages.
+
+=====================================================================
+
+Experimental LaTeX3 Format
+==========================
+
+l3vers.dtx
+==========
+
+This file contains the version information and other release related
+coding.
+
+l3final.dtx
+===========
+
+This file is reserved for the last minute coding for producing a
+format (such as the dump instruction).
+
+source3.tex
+===========
+
+Run this file with pdfLaTeX in extended mode:
+pdflatex "*source3.tex" to produce the documentation.
+Doing this will produce three extra files (source3.ist, l3doc.cfg and
+l3full.cfg). The first of these is a style file for makeindex; the
+others or configuration files for the documentation class.
+If you want to full documentation including the code listings than
+rename l3full.cfg to l3doc.cfg and run LaTeX again.
+Alternatively, run (in extended mode)
+ pdflatex "\PassOptionsToClass{full}{l3doc}\input{source3}"
+After that run makeindex to produce the index, like so:
+makeindex -s source3.ist source3
+and rerun LaTeX.
+
+l3format.ins
+============
+
+Process with plain TeX or LaTeX2e to generate the experimental
+format file lbase.ltx and its companion lbase.ini.
+The run pdfetex --ini "*lbase.ini" to produce the experimental
+format.
+
+=====================================================================
+
+Test Files
+==========
+
+Two test files show the expansion module at work.
+
+test1.tex
+=========
+
+Test document showing the expansion module at work.
+
+test2.tex
+=========
+
+The same test as the file test1, but this time the l3names package is
+loaded with [removeoldnames]. This is useful for testing, but as it
+breaks all LaTeX2 code, it is not so useful for documents. (For
+example {document} would generate an error.) In this mode
+\RequirePackage may be used to load further packages, as demonstrated
+in this file, but any other LaTeX2 command is likely to fail.
+
+test3.tex
+=========
+
+This tests the io and precomp modules.
+
+
+=====================================================================
+
+--- Copyright 1998 -- 2006
+ 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
new file mode 100644
index 00000000000..5a3c071a71f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/expl3/source3.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/expl3/source3.tex b/Master/texmf-dist/doc/latex/expl3/source3.tex
new file mode 100644
index 00000000000..e16341f586e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/expl3/source3.tex
@@ -0,0 +1,397 @@
+% \iffalse
+%% File: source3.dtx Copyright (C) 1990-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.
+%%
+%% -----------------------------------------------------------------------
+%% \fi
+
+% This document will typeset the LaTeX3 sources as a single document.
+% This will produce quite a large file (roughly ??? pages) and may
+% take a long time.
+%
+% Some notes on processing this document are contained at the end
+% of this document, after \end{document}
+%
+% DPC 1997/11/17
+% JLB 2005/03/09 copied from source2e.tex for l3in2e sources
+% First a special index style for makeindex
+%
+
+\begin{filecontents}{source3.ist}
+actual '='
+quote '!'
+level '>'
+preamble
+"\n \\begin{theindex} \n \\makeatletter\\scan@allowedfalse\n"
+postamble
+"\n\n \\end{theindex}\n"
+item_x1 "\\efill \n \\subitem "
+item_x2 "\\efill \n \\subsubitem "
+delim_0 "\\pfill "
+delim_1 "\\pfill "
+delim_2 "\\pfill "
+% The next lines will produce some warnings when
+% running Makeindex as they try to cover two different
+% versions of the program:
+lethead_prefix "{\\bfseries\\hfil "
+lethead_suffix "\\hfil}\\nopagebreak\n"
+lethead_flag 1
+heading_prefix "{\\bfseries\\hfil "
+heading_suffix "\\hfil}\\nopagebreak\n"
+headings_flag 1
+
+% and just for source3:
+% Remove R so I is treated in sequence I J K not I II III
+page_precedence "rnaA"
+\end{filecontents}
+
+\begin{filecontents}{l3doc.cfg}
+ \DisableCrossrefs
+ \AtEndOfClass{\OnlyDescription}
+\end{filecontents}
+
+\begin{filecontents}{l3full.cfg}
+
+% Set up the Index and Change History to use \part
+ \IndexPrologue{\part*{Index}%
+ \markboth{Index}{Index}%
+ \addcontentsline{toc}{part}{Index}%
+ The italic numbers denote the pages where the
+ corresponding entry is described,
+ numbers underlined point to the definition,
+ all others indicate the places where it is used.}
+
+ \GlossaryPrologue{\part*{Change History}%
+% Allow control names to be hyphenated here...
+ {\GlossaryParms\ttfamily\hyphenchar\font=`\-}%
+ \markboth{Change History}{Change History}%
+ \addcontentsline{toc}{part}{Change History}}
+
+ \RecordChanges
+ \CodelineIndex
+ \EnableCrossrefs
+ \AlsoImplementation
+ \setcounter{IndexColumns}{2}
+\end{filecontents}
+
+
+\documentclass{l3doc}
+
+\listfiles
+
+% Do not index some TeX primitives, and some common plain TeX commands.
+
+%% to be filled in later\DoNotIndex{...}
+% The standard \changes command modified slightly to better cope with
+% this multiple file document.
+%\makeatletter
+%\def\changes@#1#2#3{%
+% \let\protect\@unexpandable@protect
+% \edef\@tempa{\noexpand\glossary{#2\space\currentfile\space#1\levelchar
+% \ifx\saved@macroname\@empty
+% \space
+% \actualchar
+% \generalname
+% \else
+% \expandafter\@gobble
+% \saved@macroname
+% \actualchar
+% \string\verb\quotechar*%
+% \verbatimchar\saved@macroname
+% \verbatimchar
+% \fi
+% :\levelchar #3}}%
+% \@tempa\endgroup\@esphack}
+%\makeatother
+
+% Needed for documentation in ltoutenc.dtx
+\usepackage{textcomp}
+
+\begin{document}
+ \title{The \LaTeX3 Sources}
+ \author{\Team}
+
+ \pagenumbering{roman}
+ \maketitle
+ \renewcommand\maketitle{}
+
+ \tableofcontents
+
+ \clearpage
+
+ \pagenumbering{arabic}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Each of the following \DocInput lines includes a file with extension
+% .dtx. Each of these files may be typeset separately. For instance
+% latex l3boxes.dtx
+% will typeset the source of the LaTeX3 box commands.
+%
+% If this file is processed, each of these separate dtx files will be
+% contained as a part of a single document. Using ltxdoc.cfg you can
+% then optionally produce a combined index and/or change history for
+% the entire source of the format file. Note that such a document will
+% be quite large (about ??? pages).
+%
+
+ \DocInput{l3names.dtx} % System dependant initialisation
+
+ \DocInput{l3basics.dtx} %
+
+ \DocInput{l3chk.dtx} % Checking assignments
+
+ \DocInput{l3tlp.dtx} %
+
+ \DocInput{l3expan.dtx} %
+
+ \DocInput{l3num.dtx} %
+
+ \DocInput{l3seq.dtx} %
+
+ \DocInput{l3alloc.dtx} %
+
+ \DocInput{l3io.dtx} %
+
+ \DocInput{l3clist.dtx} %
+
+ \DocInput{l3prop.dtx} %
+
+ \DocInput{l3int.dtx} %
+
+ \DocInput{l3skip.dtx} %
+
+ \DocInput{l3toks.dtx} %
+
+ \DocInput{l3messages.dtx} %
+
+ \DocInput{l3box.dtx} %
+
+ \DocInput{l3precom.dtx} %
+
+ \DocInput{l3quark.dtx} %
+
+ \DocInput{l3prg.dtx} %
+
+ \DocInput{l3token.dtx} %
+
+ \DocInput{l3xref.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}}
+
+\clearpage
+\pagestyle{headings}
+
+% Make TeX shut up.
+\hbadness=10000
+\newcount\hbadness
+\hfuzz=\maxdimen
+
+\typeout{%
+ \string # Produce change log with^^J%
+ makeindex -s gglo.ist -o source3.gls source3.glo}
+
+
+\PrintChanges
+
+\clearpage
+
+% makeindex needs a symbol between the parts of composite page numbers
+% but we dont want one, so:
+\typeout{%
+ \string # Produce index with^^J%
+ makeindex -s source3.ist source3.idx}
+
+\begingroup
+\def\endash{--}
+\catcode`\-\active
+\def-{\futurelet\temp\indexdash}
+\def\indexdash{\ifx\temp-\endash\fi}
+
+\PrintIndex
+\endgroup
+
+% Make sure that the index is not printed twice
+% (ltxdoc.cfg might have a second \PrintIndex command)
+\let\PrintChanges\relax
+\let\PrintIndex\relax
+
+\end{document}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+To use this file to produce a fully indexed source code
+you need to execute the following (or equivalent) commands:
+
+ latex source3.tex
+
+ makeindex -s source3.ist source3.idx
+ makeindex -s gglo.ist -o source3.gls source3.glo
+
+ latex source3.tex
+ latex source3.tex
+
+
+The makeindex style source3.ist is used in place of the usual
+doc gind.ist to ensure that I is used in the sequence I J K
+not I II II, which would be the default makeindex behaviour.
+
+The third run with latex is only required to get the table of
+contents entries for the change log and index. You may speed things up
+by using the \includeonly mechanism so as not to typeset the source
+files on the second run. This involves changing the file
+ltxdoc.cfg
+between the latex runs.
+
+The following unix script automates this.
+ (It could easily be ported to scripts for DOS or VMS,
+ rm is ReMove a file, and echo "..." > file writes ... to "file".)
+
+
+After this script (after the second ==============) is a similar script
+that will produce the documentation for all the files in the base
+distribution that are *not* included in source3.dvi. This second script
+was requested, but before using it, beware it will take a long time!
+It may however be modified as required, eg to not typeset the fdd files
+or whatever...
+
+==============
+#!/bin/sh
+
+rm -f source3.gls source3.ind source3.toc
+
+# First run:
+# Create new standard ltxdoc.cfg file
+# Pass the (possibly empty) list of arguments supplied on the
+# command line to article class.
+#
+# If you use A4 paper, running this script with argument
+# a4paper
+# may save about 30 pages.
+#
+echo "\PassOptionsToClass{$*}{article}" > ltxdoc.cfg
+
+
+# Now LaTeX the file with this cfg file.
+#
+latex source3.tex
+
+
+# Make the Change log and Glossary.
+#
+makeindex -s source3.ist source3.idx
+makeindex -s gglo.ist -o source3.gls source3.glo
+
+
+# Second run: append \includeonly{} to ltxdoc.cfg to speed up things
+# (this run needed only to get changes and index listed in .toc file)
+#
+# Note that the index will not be made incorrect by the insertion
+# of the table of contents as the front matter uses a diferent page
+# numbering scheme.
+#
+echo "\includeonly{}" >> ltxdoc.cfg
+
+latex source3.tex
+
+
+# Third and final run, to put everything together.
+# First restore the cfg file:
+#
+echo "\PassOptionsToClass{$*}{article}" > ltxdoc.cfg
+latex source3.tex
+
+
+==============
+#!/bin/sh
+
+# Running this script will process all the dtx fdd and *guide.tex
+# and ltnews*.tex files in the LaTeX distribution, except the dtx
+# files included in source3.tex.
+# (The shell first script in the comments of source3.tex will
+# process those.)
+
+# Any command line arguments (eg a4paper) are taken as options to the
+# article class.
+
+# This script is likely to take ages!
+
+echo "\PassOptionsToClass{$*}{article}" > ltxdoc.cfg
+echo "\batchmode" >> ltxdoc.cfg
+
+# The next four lines produce full indexes and change logs
+# you may not want those.
+echo "\AtBeginDocument{\RecordChanges}" >> ltxdoc.cfg
+echo "\AtEndDocument{\PrintChanges}" >> ltxdoc.cfg
+echo "\AtBeginDocument{\CodelineIndex\EnableCrossrefs}" >> ltxdoc.cfg
+echo "\AtEndDocument{\PrintIndex}" >> ltxdoc.cfg
+
+# If you do not want any code listings, just documentation, then instead
+# of the above four lines, uncomment the following:
+# echo "\AtBeginDocument{\OnlyDescription}" >> ltxdoc.cfg
+
+echo "\PassOptionsToClass{$*}{article}" > ltxguide.cfg
+echo "\batchmode" >> ltxguide.cfg
+
+cp ltxguide.cfg ltnews.cfg
+
+
+for i in *dtx *fdd *guide.tex ltnews*.tex
+do
+B=`basename $i .dtx`
+
+if (grep "Include{$B}" source3.tex >/dev/null ; )
+then
+echo In source3: $i
+else
+echo latex $i
+ if (latex $i > /dev/null)
+ then
+ echo latex $i
+ latex $i > /dev/null
+ echo makeindex -s gind.ist $B.idx
+ makeindex -s gind.ist $B.idx > /dev/null 2> /dev/null
+ echo makeindex -s gglo.ist -o $B.gls $B.glo
+ makeindex -s gglo.ist -o $B.gls $B.glo > /dev/null 2> /dev/null
+ echo latex $i
+ latex $i > /dev/null
+ else
+ echo "!!! LaTeX ERROR: $i. (See $B.log.)"
+ fi
+fi
+
+done
diff --git a/Master/texmf-dist/doc/latex/expl3/test1.dvi b/Master/texmf-dist/doc/latex/expl3/test1.dvi
deleted file mode 100644
index 6986cae5eb9..00000000000
--- a/Master/texmf-dist/doc/latex/expl3/test1.dvi
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/expl3/test1.tex b/Master/texmf-dist/doc/latex/expl3/test1.tex
index e419bdb37aa..d40189e37dc 100644
--- a/Master/texmf-dist/doc/latex/expl3/test1.tex
+++ b/Master/texmf-dist/doc/latex/expl3/test1.tex
@@ -1,7 +1,49 @@
+% \iffalse
+%% File: test1 Copyright (C) 1990-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.
+%%
+%% -----------------------------------------------------------------------
+%%
+\def\next$Id: #1.tex #2 #3-#4-#5 #6 #7$#8{%
+ \def\fileversion{#2}%
+ \def\filedate{#3/#4/#5}%
+ \ProvidesFile{#1.tex}[#3/#4/#5 v#2 #8]%
+}
+\next$Id: test1.tex 573 2006-08-21 20:59:37Z morten $
+ {L3 Test 1}
+% \fi
\documentclass{article}
-
+\tracingmacros2
\usepackage{l3expan,l3io}
\begin{document}
diff --git a/Master/texmf-dist/doc/latex/expl3/test2.tex b/Master/texmf-dist/doc/latex/expl3/test2.tex
index 1a1ed8d813b..764ad74fc39 100644
--- a/Master/texmf-dist/doc/latex/expl3/test2.tex
+++ b/Master/texmf-dist/doc/latex/expl3/test2.tex
@@ -1,3 +1,45 @@
+% \iffalse
+%% File: test2 Copyright (C) 1990-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.
+%%
+%% -----------------------------------------------------------------------
+%%
+\def\next$Id: #1.tex #2 #3-#4-#5 #6 #7$#8{%
+ \def\fileversion{#2}%
+ \def\filedate{#3/#4/#5}%
+ \ProvidesFile{#1.tex}[#3/#4/#5 v#2 #8]%
+}
+\next$Id: test2.tex 573 2006-08-21 20:59:37Z morten $
+ {L3 Test 2}
+% \fi
\RequirePackage[removeoldnames]{l3names}
diff --git a/Master/texmf-dist/doc/latex/expl3/test3.dvi b/Master/texmf-dist/doc/latex/expl3/test3.dvi
deleted file mode 100644
index 6986cae5eb9..00000000000
--- a/Master/texmf-dist/doc/latex/expl3/test3.dvi
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/expl3/test3.tex b/Master/texmf-dist/doc/latex/expl3/test3.tex
index 8d3630839bb..3dd5f714d35 100644
--- a/Master/texmf-dist/doc/latex/expl3/test3.tex
+++ b/Master/texmf-dist/doc/latex/expl3/test3.tex
@@ -1,3 +1,38 @@
+% \iffalse
+%% File: test2 Copyright (C) 1990-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.
+%%
+%% -----------------------------------------------------------------------
+%%
+% \fi
\documentclass{article}
\usepackage{l3precom}