summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3dt/l3dt.dtx1258
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3dt/l3dt.ins40
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3str/l3str.dtx40
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/xcoffins/xcoffins.dtx20
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx64
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/xgalley/xgalley.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/expl3.dtx659
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx9
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3basics.dtx54
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx618
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3box.dtx33
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx27
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3clist.dtx23
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx33
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3color.dtx21
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3doc.dtx35
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx26
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx34
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3expan.dtx16
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3file.dtx62
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3final.dtx15
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx7
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx8
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx7
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx7
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx7
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx7
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-old.dtx7
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx16
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx5
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx7
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx91
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp.dtx21
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3int.dtx162
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3keys.dtx129
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx18
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3msg.dtx44
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3names.dtx105
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prg.dtx64
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prop.dtx17
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3quark.dtx21
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3seq.dtx17
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3skip.dtx33
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl.dtx173
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3token.dtx19
-rw-r--r--Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx39
-rw-r--r--Master/texmf-dist/source/latex/l3packages/xfrac/xfrac.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx63
-rw-r--r--Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx16
50 files changed, 1591 insertions, 2624 deletions
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3dt/l3dt.dtx b/Master/texmf-dist/source/latex/l3experimental/l3dt/l3dt.dtx
deleted file mode 100644
index 36454f14c49..00000000000
--- a/Master/texmf-dist/source/latex/l3experimental/l3dt/l3dt.dtx
+++ /dev/null
@@ -1,1258 +0,0 @@
-% \iffalse meta-comment
-%
-%% File l3dt.dtx Copyright (C) 2011-2013 The 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 "l3experimental 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/svnroot/experimental/trunk/
-%%
-%% 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.
-%%
-%% -----------------------------------------------------------------------
-%%
-%
-%<*driver|package>
-\RequirePackage{expl3}
-\GetIdInfo$Id: l3dt.dtx 4482 2013-04-24 21:05:12Z joseph $
- {L3 Experimental data tables}
-%</driver|package>
-%<*driver>
-\documentclass[full]{l3doc}
-\begin{document}
- \DocInput{\jobname.dtx}
-\end{document}
-%</driver>
-% \fi
-%
-% \title{^^A
-% The \pkg{l3dt} package\\ Data tables^^A
-% \thanks{This file describes v\ExplFileVersion,
-% last revised \ExplFileDate.}^^A
-% }
-%
-% \author{^^A
-% The \LaTeX3 Project\thanks
-% {^^A
-% E-mail:
-% \href{mailto:latex-team@latex-project.org}
-% {latex-team@latex-project.org}^^A
-% }^^A
-% }
-%
-% \date{Released \ExplFileDate}
-%
-% \maketitle
-%
-% \begin{documentation}
-%
-% \LaTeX3 implements a \enquote{data table} variable type, which is made up of
-% a series of rows each of which contain a number of key--value pairs. Thus
-% a data table is in effect an array of property lists. The rows of the table
-% are stored in a fixed order, and are numbered consecutively from one.
-% In the same way, the order of keys (columns) is recorded in a sequence-like
-% manner, again indexed from one.
-%
-% Within each row in a data table each entry must have a unique \meta{key}: if
-% an entry is added to a row within a data table which already contains the
-% \meta{key} then the new entry will overwrite the existing one. The
-% \meta{keys} are compared on a string basis, using the same method as
-% \cs{str_if_eq:nn}.
-%
-% \section{Creating and initialising data tables}
-%
-% \begin{function}{\dt_new:N}
-% \begin{syntax}
-% \cs{dt_new:N} \meta{data table}
-% \end{syntax}
-% Creates a new \meta{data table} or raises an error if the name is
-% already taken. The declaration is global. The \meta{property lists} will
-% initially contain no entries.
-% \end{function}
-%
-% \begin{function}{\dt_clear:N, \dt_gclear:N}
-% \begin{syntax}
-% \cs{dt_clear:N} \meta{data table}
-% \end{syntax}
-% Clears all entries and keys from the \meta{data table}.
-% \end{function}
-%
-% \begin{function}{\dt_clear_new:N, \dt_gclear_new:N}
-% \begin{syntax}
-% \cs{dt_clear_new:N} \meta{data table}
-% \end{syntax}
-% Ensures that the \meta{data table} exists globally by applying
-% \cs{dt_new:N} if necessary, then applies \cs{dt_(g)clear:N} to leave
-% the table empty.
-% \end{function}
-%
-% \begin{function}{\dt_set_eq:NN, \dt_gset_eq:NN}
-% \begin{syntax}
-% \cs{dt_set_eq:NN} \meta{data table1} \meta{data table2}
-% \end{syntax}
-% Sets the content of \meta{data table1} equal to that of
-% \meta{data table2}.
-% \end{function}
-%
-% \section{Adding data}
-%
-% \begin{function}{\dt_add_key:Nn, \dt_gadd_key:Nn}
-% \begin{syntax}
-% \cs{dt_add_key:Nn} \meta{dt} \Arg{key}
-% \end{syntax}
-% Adds the \meta{key} to the list of those in the \meta{data table}. The
-% \meta{key} will be converted to a string using \cs{tl_to_str:n}, and thus
-% category codes in the \meta{key} are ignored. If the \meta{key} is already
-% present in the \meta{data table} then no action is taken.
-% \end{function}
-%
-% \begin{function}{\dt_add_row:N, \dt_gadd_row:N}
-% \begin{syntax}
-% \cs{dt_add_row:N} \meta{dt}
-% \end{syntax}
-% Adds a new row to the \meta{data table}. This will initially contain
-% no entries: all keys will be blank.
-% \end{function}
-%
-% \begin{function}{\dt_put:Nnn, \dt_gput:Nnn}
-% \begin{syntax}
-% \cs{dt_put:Nnn} \meta{dt} \Arg{key} \Arg{value}
-% \end{syntax}
-% Adds an entry to the current row of the \meta{data table} which may be
-% accessed using the \meta{key} and which has \meta{value}. Both the
-% \meta{key} and \meta{value} may contain any \meta{balanced text}. The
-% \meta{key} is stored after processing with \cs{tl_to_str:n}, meaning
-% that category codes are ignored. If the \meta{key} is already present
-% in the current row of the \meta{data table}, the existing entry is
-% overwritten by the new \meta{value}.
-% \end{function}
-%
-% \begin{function}{\dt_put:Nnnn, \dt_gput:Nnnn}
-% \begin{syntax}
-% \cs{dt_put:Nnnn} \meta{dt} \Arg{row} \Arg{key} \Arg{value}
-% \end{syntax}
-% Adds an entry to the \meta{row} of the \meta{data table} which may be
-% accessed using the \meta{key} and which has \meta{value}. Both the
-% \meta{key} and \meta{value} may contain any \meta{balanced text}. The
-% \meta{key} is stored after processing with \cs{tl_to_str:n}, meaning
-% that category codes are ignored. If the \meta{key} is already present
-% in the \meta{row} of the \meta{data table}, the existing entry is
-% overwritten by the new \meta{value}. The \meta{row} should be given as
-% an \meta{integer expression}.
-% \end{function}
-%
-% \section{Removing data}
-%
-% \begin{function}{\dt_remove:Nn, \dt_gremove:Nn}
-% \begin{syntax}
-% \cs{dt_remove:Nn} \meta{dt} \Arg{key}
-% \end{syntax}
-% Deletes any entry from the current row of the \meta{data table} with
-% the \meta{key}. The \meta{key} is compared after processing with
-% \cs{tl_to_str:n}, meaning that category codes are ignored. Deleting of
-% all entries from a row does not delete the row itself.
-% \end{function}
-%
-% \begin{function}{\dt_remove:Nnn, \dt_gremove:Nnn}
-% \begin{syntax}
-% \cs{dt_remove:Nnn} \meta{dt} \Arg{row} \Arg{key}
-% \end{syntax}
-% Deletes any entry from the \meta{row} of the \meta{data table} with
-% the \meta{key}. The \meta{key} is compared after processing with
-% \cs{tl_to_str:n}, meaning that category codes are ignored. The \meta{row}
-% may be given as an \meta{integer expression}. Deleting of
-% all entries from a row does not delete the row itself.
-% \end{function}
-%
-% \begin{function}{\dt_remove_key:Nn, \dt_gremove_key:Nn}
-% \begin{syntax}
-% \cs{dt_remove_key:N} \meta{data table} \Arg{key}
-% \end{syntax}
-% Removes the \meta{key} from the \meta{data table} if it is present.
-% The \meta{key} and any associated \meta{value} will be removed from any
-% row that it is found in.
-% \end{function}
-%
-% \begin{function}{\dt_remove_row:Nn, \dt_gremove_row:Nn}
-% \begin{syntax}
-% \cs{dt_remove_row:Nn} \meta{data table} \Arg{row}
-% \end{syntax}
-% Removes the \meta{row} (given as an \meta{integer expressions}) from the
-% \meta{data table}. The remaining rows of the table will be renumbered
-% such that they are sequential.
-% \end{function}
-%
-% \section{Recovering information}
-%
-% \begin{function}[EXP]{\dt_keys:N}
-% \begin{syntax}
-% \cs{dt_keys:N} \meta{dt}
-% \end{syntax}
-% Leaves the number of keys in the \meta{data table} in the input
-% stream as an \meta{integer denotation}.
-% \end{function}
-%
-% \begin{function}[EXP]{\dt_rows:N}
-% \begin{syntax}
-% \cs{dt_rows:N} \meta{dt}
-% \end{syntax}
-% Leaves the number of rows in the \meta{data table} in the input
-% stream as an \meta{integer denotation}.
-% \end{function}
-%
-% \begin{function}{\dt_get:NnN}
-% \begin{syntax}
-% \cs{dt_get:NnnN} \meta{dt} \Arg{key} \meta{tl var}
-% \end{syntax}
-% Recovers the \meta{value} stored with \meta{key} from the current row in
-% the \meta{data table}, and places this in the \meta{token list variable}.
-% If the \meta{key} is not found in the \meta{row} of the \meta{data table}
-% then the \meta{token list variable} will contain the special marker
-% \cs{q_no_value}. The \meta{token list variable} is set within the
-% current \TeX{} group. The \meta{row} should be given as an
-% \meta{integer expression}. See also \cs{dt_get:NnNTF}.
-% \end{function}
-%
-% \begin{function}[TF]{\dt_get:NnN}
-% \begin{syntax}
-% \cs{dt_get:NnnNTF} \meta{dt} \Arg{key} \meta{tl var} \Arg{true code} \Arg{false code}
-% \end{syntax}
-% Recovers the \meta{value} stored with \meta{key} from the current row in
-% the \meta{data table}, and places this in the \meta{token list variable}.
-% If the \meta{key} is not found in the \meta{row} of the \meta{data table}
-% then the \meta{token list variable} will contain the special marker
-% \cs{q_no_value}. The \meta{token list variable} is set within the
-% current \TeX{} group. The \meta{row} should be given as an
-% \meta{integer expression}. Once the \meta{token list variable} has been
-% assigned either the \meta{true code} or \meta{false code} will be left in
-% the input stream, depending on whether the \meta{key} was found.
-% See also \cs{dt_get:NnN}.
-% \end{function}
-%
-% \begin{function}{\dt_get:NnnN}
-% \begin{syntax}
-% \cs{dt_get:NnnN} \meta{dt} \Arg{row} \Arg{key} \meta{tl var}
-% \end{syntax}
-% Recovers the \meta{value} stored with \meta{key} from \meta{row} in the
-% \meta{data table}, and places this in the \meta{token list variable}. If
-% the \meta{key} is not found in the \meta{row} of the \meta{data table}
-% then the \meta{token list variable} will contain the special marker
-% \cs{q_no_value}. The \meta{token list variable} is set within the
-% current \TeX{} group. The \meta{row} should be given as an
-% \meta{integer expression}. See also \cs{dt_get:NnnNTF}.
-% \end{function}
-%
-% \begin{function}[TF]{\dt_get:NnnN}
-% \begin{syntax}
-% \cs{dt_get:NnnNTF} \meta{dt} \Arg{row} \Arg{key} \meta{tl var} \Arg{true code} \Arg{false code}
-% \end{syntax}
-% Recovers the \meta{value} stored with \meta{key} from \meta{row} in the
-% \meta{data table}, and places this in the \meta{token list variable}. If
-% the \meta{key} is not found in the \meta{row} of the \meta{data table}
-% then the \meta{token list variable} will contain the special marker
-% \cs{q_no_value}. The \meta{token list variable} is set within the
-% current \TeX{} group. The \meta{row} should be given as an
-% \meta{integer expression}. Once the \meta{token list variable} has been
-% assigned either the \meta{true code} or \meta{false code} will be left in
-% the input stream, depending on whether the \meta{key} was found.
-% See also \cs{dt_get:NnnN}.
-% \end{function}
-%
-% \section{Mapping to data tables}
-%
-% \begin{function}{\dt_map_variables:Nnn}
-% \begin{syntax}
-% \cs{dt_map_variables:Nnn} \meta{data table} \Arg{key--variable mapping} \Arg{code}
-% \end{syntax}
-% Applies the \meta{code} to each \meta{row} of the \meta{data table}. The
-% \meta{keys} of the \meta{data table} are mapped to variables by the
-% \meta{key--variable mapping}, which should be a key--value list of the form
-% \begin{verbatim}
-% key-a = \l_a_tl ,
-% key-b = \l_b_tl
-% ...
-% \end{verbatim}
-% It is not necessary to map all of the \meta{keys} in a \meta{data table}
-% to variables. If there is not \meta{value} for a \meta{key} in a row,
-% the variable will contain the marker \cs{q_no_value}. Assignment of the
-% \meta{variables} is local to the current \TeX{} group. The mapping
-% to rows is ordered.
-% \end{function}
-%
-% \begin{variable}{\g_dt_map_level_int}
-% The nesting level of the data table mapping is available as
-% \cs{g_dt_map_level_int}. Within a mapping, the \texttt{int} variable
-% \cs{l_dt_map_\meta{level}_row_int} is available so that the row
-% number being operated on is available. Thus
-% \begin{verbatim}
-% \int_use:c { l_dt_map_ \int_use:N \g_dt_map_level_int _row_int }
-% \end{verbatim}
-% will give the current row for the current mapping.
-% \end{variable}
-%
-% \begin{function}[rEXP]{\dt_map_break:, \dt_map_break:n}
-% \begin{syntax}
-% \cs{dt_map_break:}
-% \cs{dt_map_break:n} \Arg{tokens}
-% \end{syntax}
-% Used to terminate a \cs{dt_map_\ldots} function before all
-% entries in the \meta{data table} have been processed. This will
-% normally take place within a conditional statement, for example
-% \begin{verbatim}
-% \dt_map_variables:Nn \l_my_dt { a = \l_my_tl }
-% {
-% \str_if_eq:VnTF \l_my_tl { bingo }
-% { \dt_map_break: }
-% {
-% % Do something useful
-% }
-% }
-% \end{verbatim}
-% The \texttt{:n} variant will insert the \meta{tokens} into the input stream
-% after the mapping terminates. Use outside of a \cs{dt_map_\ldots} scenario
-% will lead to low level \TeX{} errors.
-% \end{function}
-%
-% \section{Data table conditionals}
-%
-% \begin{function}[EXP, pTF]{\dt_if_empty:N}
-% \begin{syntax}
-% \cs{dt_if_empty_p:N} \meta{dt}
-% \cs{dt_if_empty:NTF} \meta{dt} \Arg{true code} \Arg{false code}
-% \end{syntax}
-% Tests if the \meta{dt} is empty, containing no keys and no rows.
-% \end{function}
-%
-% \begin{function}[EXP, pTF]{\dt_if_in:Nn}
-% \begin{syntax}
-% \cs{dt_if_in_p:Nn} \meta{dt} \Arg{key}
-% \cs{dt_if_in:NnTF} \meta{dt} \Arg{key} \Arg{true code} \Arg{false code}
-% \end{syntax}
-% Tests if the \meta{key} is present in the \meta{data table} at all,
-% \emph{i.e.} if it is one of the columns of the table. This test will be
-% \texttt{true} even if none of the rows contain an entry for the \meta{key}.
-% \end{function}
-%
-% \begin{function}[EXP, pTF]{\dt_if_in_row:Nnn}
-% \begin{syntax}
-% \cs{dt_if_in_row_p:Nnn} \meta{dt} \Arg{row} \Arg{key}
-% \cs{dt_if_in_row:NnnTF} \meta{dt} \Arg{row} \Arg{key} \Arg{true code} \Arg{false code}
-% \end{syntax}
-% Tests if the \meta{key} is present in the \meta{row} of the
-% \meta{data table}. The \meta{row} may be given as an \meta{integer
-% expression}.
-% \end{function}
-%
-% \begin{function}[EXP, pTF]{\dt_if_in_row:Nn}
-% \begin{syntax}
-% \cs{dt_if_in_row_p:Nn} \meta{dt} \Arg{key}
-% \cs{dt_if_in_row:NnTF} \meta{dt} \Arg{key} \Arg{true code} \Arg{false code}
-% \end{syntax}
-% Tests if the \meta{key} is present in the current row of
-% \meta{data table}.
-% \end{function}
-%
-% \section{Variables}
-%
-% \begin{variable}{\c_empty_dt}
-% A permanently empty data table.
-% \end{variable}
-%
-% \begin{variable}{\l_tmpa_dt, \l_tmpb_dt, \g_tmpa_dt, \g_tmpb_dt}
-% Scratch data tables for general use: these are never used by the kernel.
-% \end{variable}
-%
-% \end{documentation}
-%
-% \begin{implementation}
-%
-% \section{\pkg{l3dt} implementation}
-%
-% \begin{macrocode}
-%<*initex|package>
-% \end{macrocode}
-%
-% \begin{macrocode}
-%<@@=dt>
-% \end{macrocode}
-%
-% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-%</package>
-% \end{macrocode}
-%
-% \subsection{Structures}
-%
-% The structure of a data table must allow each row (record) to contain only
-% some of the keys, and for the keys to be removed after the table
-% is initialised. It also needs to ensure that a unique match can be made to
-% every item in the table. At the same time, it is desirable to keep all of
-% the information about the table in a single \TeX{} macro. This can be
-% achieved by packing the data into a structure in which each key and row is
-% numbered:
-% \begin{quote}
-% \Arg{rows} \\
-% \Arg{columns} \\
-% \cs{q_@@} \meta{key_1} \cs{q_@@} \meta{key_2} \cs{q_@@} \ldots \\
-% \cs{q_nil} \\
-% \cs{q_@@_header} \\
-% \cs{q_@@_row} \\
-% \meta{row_1} \\
-% \cs{q_@@} \meta{key_1} \cs{q_@@} \Arg{data_{1,1}} \\
-% \cs{q_@@} \meta{key_2} \cs{q_@@} \Arg{data_{1,2}} \\
-% \ldots \\
-% \cs{q_@@} \\
-% \cs{q_nil} \\
-% \cs{q_@@_row} \\
-% \meta{row_2} \\
-% \cs{q_@@} \meta{key_1} \cs{q_@@} \Arg{data_{2,1}} \\
-% \cs{q_@@} \meta{key_2} \cs{q_@@} \Arg{data_{2,2}} \\
-% \ldots \\
-% \cs{q_@@} \\
-% \cs{q_nil} \\
-% \cs{q_@@_row} \\
-% \ldots \\
-% \cs{q_@@_row}
-% \end{quote}
-%
-% \begin{variable}{\q_@@, \q_@@_row, \q_@@_header}
-% The quarks are set up.
-% \begin{macrocode}
-\quark_new:N \q_@@
-\quark_new:N \q_@@_row
-\quark_new:N \q_@@_header
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{variable}{\c_empty_dt}
-% A permanently-empty data table, which therefore contains only the minimum
-% number of items necessary to comply with the structure above.
-% \begin{macrocode}
-\tl_const:Nn \c_empty_dt
- {
- { 0 }
- { 0 }
- \q_@@
- \q_nil
- \q_@@_header
- \q_@@_row
- }
-% \end{macrocode}
-% \end{variable}
-%
-% \subsection{Allocation and initialisation}
-%
-% \begin{macro}{\dt_new:N}
-% Internally, data tables are token lists, but an empty dt
-% is not an empty tl.
-% \begin{macrocode}
-\cs_new_protected:Npn \dt_new:N #1 { \cs_new_eq:NN #1 \c_empty_dt }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\dt_clear:N, \dt_gclear:N}
-% The same idea for clearing.
-% \begin{macrocode}
-\cs_new_protected:Npn \dt_clear:N #1 { \cs_set_eq:NN #1 \c_empty_dt }
-\cs_new_protected:Npn \dt_gclear:N #1 { \cs_gset_eq:NN #1 \c_empty_dt }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}
-% {\dt_clear_new:N, \dt_gclear_new:N}
-% Once again a simple copy from the token list functions.
-% \begin{macrocode}
-\cs_new_protected:Npn \dt_clear_new:N #1
- { \cs_if_exist:NTF #1 { \dt_clear:N #1 } { \dt_new:N #1 } }
-\cs_new_protected:Npn \dt_gclear_new:N #1
- { \cs_if_exist:NTF #1 { \dt_gclear:N #1 } { \dt_new:N #1 } }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\dt_set_eq:NN, \dt_gset_eq:NN}
-% Once again, these are simply copies from the token list functions.
-% \begin{macrocode}
-\cs_new_eq:NN \dt_set_eq:NN \tl_set_eq:NN
-\cs_new_eq:NN \dt_gset_eq:NN \tl_gset_eq:NN
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{variable}{\l_tmpa_dt, \l_tmpb_dt, \g_tmpa_dt, \g_tmpb_dt}
-% Scratch tables.
-% \begin{macrocode}
-\dt_new:N \l_tmpa_dt
-\dt_new:N \l_tmpb_dt
-\dt_new:N \g_tmpa_dt
-\dt_new:N \g_tmpb_dt
-% \end{macrocode}
-% \end{variable}
-%
-% \subsection{Splitting functions}
-%
-% \begin{macro}[aux]{\@@_split:nnnn}
-% \begin{macro}[aux]{\@@_split:w}
-% Two general auxiliaries. The \texttt{nnnn} function is used to apply the
-% \texttt{T} branch if a match is found and the \texttt{F} branch otherwise.
-% The \texttt{w} function is general purpose, and is used to define the
-% matching parameter set.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_split:nnnn #1#2#3#4 { #3 #2 }
-\cs_new_protected:Npn \@@_split:w { }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[int,EXP]{\@@_split_header:NT}
-% \begin{macro}[aux,EXP]{\@@_split_header:wn}
-% Splits the header from the table, inserting the code required to then
-% process the split table. The \cs{q_nil} is also removed from the end of the
-% header, as it is essentially a distraction here.
-% \begin{macrocode}
-\cs_new:Npn \@@_split_header:NT #1#2
- { \exp_after:wN \@@_split_header:wn #1 \q_stop {#2} }
-\cs_new:Npn \@@_split_header:wn #1 \q_nil \q_@@_header #2 \q_stop #3
- { #3 {#1} { \q_@@_header #2 } }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[int]{\@@_split_key:nnTF}
-% \begin{macro}[aux]{\@@_split_key_aux:nnTF}
-% Here, the split is made for a partial list within a row. The row is
-% basically the same as a property list, so the split here is almost
-% identical to that in \cs{prop_split_aux:NnTF}. The row-end data is set up
-% such that it will not interfere with this process.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_split_key:nnTF #1#2
- { \exp_args:No \@@_split_key_aux:nnTF { \tl_to_str:n {#2} } {#1} }
-\cs_new_protected:Npn \@@_split_key_aux:nnTF #1#2
- {
- \cs_set_protected:Npn \@@_split:w
- ##1 \q_@@ #1 \q_@@ ##2##3##4 \q_mark ##5 \q_stop
- { \@@_split:nnnn ##3 { { ##1 \q_@@ } {##2} {##4} } }
- \@@_split:w #2 \q_mark
- \q_@@ #1 \q_@@ { } { ? \use_ii:nn { } } \q_mark \q_stop
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[int]{\@@_split_key_list:NnTF}
-% \begin{macro}[aux]{\@@_split_key_list_aux:NnTF}
-% Finding a key in the header uses a similar approach to finding a key in
-% a property list. Here, if the key is found there will always be at least
-% one token between \cs{q_@@} and \cs{q_@@_header} due to the \cs{q_nil}
-% which is part of a new table. The use of |##1##2##3| in \cs{@@_split:w}
-% here is to deal with the overall number of rows and keys. The set up here
-% means that these will always be unbraced then rebraced: simply grabbing
-% |##1##2| to include this and anything before the key of interest will give
-% variable results depending on whether the match is to the very first key or not.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_split_key_list:NnTF #1#2
- { \exp_args:NNo \@@_split_key_list_aux:NnTF #1 { \tl_to_str:n {#2} } }
-\cs_new_protected:Npn \@@_split_key_list_aux:NnTF #1#2
- {
- \cs_set_protected:Npn \@@_split:w
- ##1##2##3 \q_@@ #2 \q_@@ ##4##5 \q_@@_header ##6 \q_mark ##7 \q_stop
- {
- \@@_split:nnnn ##4
- { { {##1} {##2} ##3 \q_@@ } { ##4##5 \q_@@_header ##6 } }
- }
- \exp_after:wN \@@_split:w #1 \q_mark
- \q_@@ #2 \q_@@ { ? \use_ii:nn { } } \q_@@_header \q_mark \q_stop
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[int]{\@@_split_row:NnTF}
-% \begin{macro}[aux]{\@@_split_row_aux:NnTF, \@@_split_row_aux:NfTF}
-% The usual approach, here using the fact that each row start with row number
-% and ends with \cs{q_nil} so there will always be at least one token to be
-% absorbed as |##2|. The only odd thing to watch here is that the row
-% number is evaluated so that higher-level functions in the main do not
-% need to have an \texttt{f}-type variant.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_split_row:NnTF #1#2
- { \@@_split_row_aux:NfTF #1 { \int_eval:n {#2} } }
-\cs_new_protected:Npn \@@_split_row_aux:NnTF #1#2
- {
- \cs_set_protected:Npn \@@_split:w
- ##1 \q_@@_row #2 \q_@@ ##2##3 \q_@@_row ##4 \q_mark ##5 \q_stop
- {
- \@@_split:nnnn ##2
- { { ##1 \q_@@_row } { #2 \q_@@ ##2##3 } {##4} }
- }
- \exp_after:wN \@@_split:w #1 \q_mark
- \q_@@_row #2 \q_@@ { ? \use_ii:nn { } } \q_@@_row \q_mark \q_stop
- }
-\cs_generate_variant:Nn \@@_split_row_aux:NnTF { Nf }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \subsection{Adding and removing data}
-%
-% \begin{macro}{\dt_add_key:Nn, \dt_gadd_key:Nn}
-% \begin{macro}[aux]{\@@_add_key:NNn}
-% \begin{macro}[aux]{\@@_add_key:NNnnn}
-% \begin{macro}[aux]{\@@_add_key:NNnnn}
-% Here, there are two stages. If the key is already present in the list of
-% known keys then no action is taken, and the split list is thrown away.
-% On the other hand, if the key is not present then the header and body
-% are separated and the key is added to the end of the list of known keys
-% (hence keys are ordered). The \cs{@@_split_header:Nn} function will have
-% removed the \cs{q_nil} from the header, and so it is put back in here.
-% \begin{macrocode}
-\cs_new_protected_nopar:Npn \dt_add_key:Nn { \@@_add_key:NNn \tl_set:Nx }
-\cs_new_protected_nopar:Npn \dt_gadd_key:Nn { \@@_add_key:NNn \tl_gset:Nx }
-\cs_new_protected:Npn \@@_add_key:NNn #1#2#3
- {
- \@@_split_key_list:NnTF #2 {#3}
- { \use_none:nn }
- {
- \@@_split_header:NT #2
- { \@@_add_key:NNnnn #1 #2 {#3} }
- }
- }
-\cs_new_protected:Npn \@@_add_key:NNnnn #1#2#3#4#5
- { \@@_add_key:NNnnnwnn #1 #2 #4 \q_stop {#3} {#5} }
-\cs_new_protected:Npn \@@_add_key:NNnnnwnn #1#2#3#4#5 \q_stop #6#7
- {
- #1 #2
- {
- {#3}
- { \int_eval:n { #4 + \c_one } }
- \exp_not:n {#5}
- \tl_to_str:n {#6}
- \exp_not:n { \q_@@ \q_nil #7 }
- }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\dt_add_row:N, \dt_gadd_row:N}
-% \begin{macro}[aux]{\@@_add_row:NN}
-% \begin{macro}[aux]{\@@_add_row:NnN, \@@_add_row:NfN}
-% \begin{macro}[aux,EXP]{\@@_add_row:nw}
-% Adding a row means incrementing the total number and adding the structure
-% of an empty row. As finding the rows will get slow for large tables, this
-% is only done once.
-% \begin{macrocode}
-\cs_new_protected_nopar:Npn \dt_add_row:N { \@@_add_row:NN \tl_set:Nx }
-\cs_new_protected_nopar:Npn \dt_gadd_row:N { \@@_add_row:NN \tl_gset:Nx }
-\cs_new_protected:Npn \@@_add_row:NN #1#2
- { \@@_add_row:NfN #1 { \int_eval:n { \dt_rows:N #2 + \c_one } } #2 }
-\cs_new_protected:Npn \@@_add_row:NnN #1#2#3
- {
- #1 #3
- {
- {#2}
- \exp_after:wN \@@_add_row:nw #3 \q_stop
- #2
- \exp_not:n { \q_@@ \q_nil \q_@@_row }
- }
- }
-\cs_generate_variant:Nn \@@_add_row:NnN { Nf }
-\cs_new:Npn \@@_add_row:nw #1#2 \q_stop { \exp_not:n {#2} }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\dt_put:Nnn, \dt_gput:Nnn}
-% Adding to the current row is simply a special case of adding to an
-% arbitrary row.
-% \begin{macrocode}
-\cs_new_protected:Npn \dt_put:Nnn #1
- { \dt_put:Nnnn #1 { \dt_rows:N #1 } }
-\cs_new_protected:Npn \dt_gput:Nnn #1
- { \dt_gput:Nnnn #1 { \dt_rows:N #1 } }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\dt_put:Nnnn, \dt_gput:Nnnn}
-% \begin{macro}[aux]{\@@_put:NNNnnn}
-% \begin{macro}[aux]{\@@_put:NNnnnnn}
-% \begin{macro}[aux]{\@@_put_update:NNnnnnnnn}
-% \begin{macro}[aux]{\@@_put_add_to_row:NNnnnnn}
-% \begin{macro}[aux, EXP]{\@@_put_add_to_row_aux:w}
-% Adding to a row is a slightly complex procedure. The lead-off is the
-% standard combination across the local and global routes.
-% \begin{macrocode}
-\cs_new_protected_nopar:Npn \dt_put:Nnnn
- { \@@_put:NNNnnn \dt_add_key:Nn \tl_set:Nx }
-\cs_new_protected_nopar:Npn \dt_gput:Nnnn
- { \@@_put:NNNnnn \dt_gadd_key:Nn \tl_gset:Nx }
-% \end{macrocode}
-% Add the key to the list those known, if necessary, then check that the
-% row requested makes sense.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_put:NNNnnn #1#2#3#4#5#6
- {
- #1 #3 {#5}
- \@@_split_row:NnTF #3 {#4}
- { \@@_put:NNnnnnn #2 #3 {#5} {#6} }
- {
- \__msg_kernel_error:nnxxx { dt } { unknown-row }
- { \token_to_str:N #3 } { \int_eval:n {#4} } { \dt_rows:N #3 }
- }
- }
-% \end{macrocode}
-% At this stage, the arguments are
-% \begin{enumerate}
-% \item the set function \cs{tl_(g)set:Nx},
-% \item the data table,
-% \item the key,
-% \item the value,
-% \item the data table before the row,
-% \item the extracted data table row,
-% \item the data table after the row.
-% \end{enumerate}
-% Splitting on the key will then leave three further items in the input
-% stack if the key is already present. So there is some care needed sending
-% the parameters forward without running out of \TeX{} arguments.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_put:NNnnnnn #1#2#3#4#5#6#7
- {
- \@@_split_key:nnTF {#6} {#3}
- { \@@_put_update:NNnnnnnnn #1 #2 {#3} {#4} {#5} {#7} }
- { \@@_put_add_to_row:NNnnnnn #1 #2 {#3} {#4} {#5} {#6} {#7} }
- }
-% \end{macrocode}
-% The arguments here are
-% \begin{enumerate}
-% \item the set function \cs{tl_(g)set:Nx},
-% \item the data table,
-% \item the key,
-% \item the value,
-% \item the data table before the row,
-% \item the data table after the row,
-% \item the row before the key,
-% \item the current value for the key
-% \item the row after the key.
-% \end{enumerate}
-% What happens here is a reconstruction of the table: everything except
-% |#8| is needed. To try to keep things clear, there are a few more
-% \cs{exp_not:n} here than formally required.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_put_update:NNnnnnnnn #1#2#3#4#5#6#7#8#9
- {
- #1 #2
- {
- \exp_not:n { #5 #7 }
- \tl_to_str:n {#3}
- \exp_not:n { \q_@@ {#4} \q_@@ #9 \q_@@_row #6 }
- }
- }
-% \end{macrocode}
-% A slightly more complex case when adding an item. The arguments here are
-% identical to those for \cs{@@_put:NNnnnnnn}. The row has not been
-% split, so the \cs{q_nil} there is removed and re-added to come after the
-% new content.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_put_add_to_row:NNnnnnn #1#2#3#4#5#6#7
- {
- #1 #2
- {
- \exp_not:n {#5}
- \exp_not:o { \@@_put_add_to_row_aux:w #6 }
- \tl_to_str:n {#3}
- \exp_not:n { \q_@@ {#4} \q_@@ \q_nil \q_@@_row #7 }
- }
- }
-\cs_new:Npn \@@_put_add_to_row_aux:w #1 \q_nil {#1}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[EXP]{\dt_keys:N}
-% \begin{macro}[EXP, aux]{\@@_keys:nnw}
-% \begin{macro}[EXP]{\dt_rows:N}
-% The number of rows in a dt is the very first entry. Getting the number of
-% keys is almost the same, except a custom auxiliary is needed.
-% \begin{macrocode}
-\cs_new:Npn \dt_keys:N #1 { \exp_after:wN \@@_keys:nnw #1 \q_stop }
-\cs_new:Npn \@@_keys:nnw #1#2#3 \q_stop {#2}
-\cs_new:Npn \dt_rows:N #1
- { \exp_after:wN \use_i_delimit_by_q_stop:nw #1 \q_stop }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \subsection{Removing data}
-%
-% \begin{macro}{\dt_remove:Nn,\dt_gremove:Nn}
-% Deleting to the current row is simply a special case of deleting to an
-% arbitrary row.
-% \begin{macrocode}
-\cs_new_protected:Npn \dt_remove:Nn #1
- { \dt_remove:Nnn #1 { \dt_rows:N #1 } }
-\cs_new_protected:Npn \dt_gremove:Nn #1
- { \dt_gremove:Nnn #1 { \dt_rows:N #1 } }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\dt_remove:Nnn, \dt_gremove:Nnn}
-% \begin{macro}[aux]{\dt_remove_aux:NNnn}
-% \begin{macro}[aux]{\dt_remove_aux:NNnnnn}
-% \begin{macro}[aux]{\dt_remove_aux:NNnnnnn}
-% Deleting a single entry from a single row means first splitting by row,
-% then splitting by key, and finally doing the assignment. If the row or the
-% key are not present then the entire function does nothing at all.
-% \begin{macrocode}
-\cs_new_protected_nopar:Npn \dt_remove:Nnn { \dt_remove_aux:NNnn \tl_set:Nn }
-\cs_new_protected_nopar:Npn \dt_gremove:Nnn { \dt_remove_aux:NNnn \tl_gset:Nn }
-\cs_new_protected:Npn \dt_remove_aux:NNnn #1#2#3#4
- {
- \@@_split_row:NnTF #2 {#3}
- { \dt_remove_aux:NNnnnn #1 #2 {#4} }
- { }
- }
-\cs_new_protected:Npn \dt_remove_aux:NNnnnn #1#2#3#4#5#6
- {
- \@@_split_key:nnTF {#5} {#3}
- { \dt_remove_aux:NNnnnnn #1 #2 {#4} {#6} }
- { }
- }
-\cs_new_protected:Npn \dt_remove_aux:NNnnnnn #1#2#3#4#5#6#7
- { #1 #2 { #3 #5 #7 #4 } }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\dt_remove_key:Nn, \dt_gremove_key:Nn}
-% \begin{macro}[aux]{\dt_remove_key_aux:NNn}
-% \begin{macro}[aux]{\dt_remove_key_aux:nNNnn}
-% \begin{macro}[aux, EXP]{\dt_remove_key_aux:w}
-% Deleting a key also removes from the table itself, so that there is no
-% need to do any awkward checks when extracting data from the table. (It's
-% likely that there will be more cases of accessing data than deleting
-% rows). The deletion mapping ignores rows entirely and just pulls out
-% matching key--value pairs, as this reduces the number of matches needed
-% to a minimum.
-% \begin{macrocode}
-\cs_new_protected_nopar:Npn \dt_remove_key:Nn
- { \dt_remove_key_aux:NNn \tl_set:Nx }
-\cs_new_protected_nopar:Npn \dt_gremove_key:Nn
- { \dt_remove_key_aux:NNn \tl_gset:Nx }
-\cs_new_protected:Npn \dt_remove_key_aux:NNn #1#2#3
- {
- \@@_split_key_list:NnTF #2 {#3}
- { \exp_args:No \dt_remove_key_aux:nNNnn { \tl_to_str:n {#3} } #1 #2 }
- { }
- }
-\cs_new_protected:Npn \dt_remove_key_aux:nNNnn #1#2#3#4#5
- { \dt_remove_key_aux:nNNnnwn {#1} #2 #3 #4 \q_stop {#5} }
-\cs_new_protected:Npn \dt_remove_key_aux:nNNnnwn #1#2#3#4#5#6 \q_stop #7
- {
- \cs_set:Npn \dt_remove_key_aux:w ##1 \q_@@ #1 \q_@@ ##2 ##3
- {
- \exp_not:n {##1}
- \__quark_if_recursion_tail_break:nN {##3} \dt_map_break:
- \dt_remove_key_aux:w ##3
- }
-
- #2 #3
- {
- {#4}
- { \int_eval:n { #5 - \c_one } }
- \exp_not:n {#6}
- \dt_remove_key_aux:w #7 \q_@@ #1 \q_@@ { } \q_recursion_tail
- \__prg_break_point:Nn \dt_map_break: { }
- }
- }
-\cs_new:Npn \dt_remove_key_aux:w { }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\dt_remove_row:Nn, \dt_gremove_row:Nn}
-% \begin{macro}[aux]{\dt_remove_row_aux:NNn}
-% \begin{macro}[aux]{\dt_remove_row_aux:NNnnnn}
-% \begin{macro}[aux, EXP]{\dt_remove_row_aux:nw}
-% \begin{macro}[aux, EXP]{\dt_remove_row_loop:nw}
-% Removing a row is a slightly complex operation as there are two stages.
-% The row itself is easy enough to remove, but then all later rows have to
-% be renumbers.
-% \begin{macrocode}
-\cs_new_protected_nopar:Npn \dt_remove_row:Nn
- { \dt_remove_row_aux:NNn \tl_set:Nx }
-\cs_new_protected_nopar:Npn \dt_gremove_row:Nn
- { \dt_remove_row_aux:NNn \tl_gset:Nx }
-\cs_new_protected:Npn \dt_remove_row_aux:NNn #1#2#3
- {
- \@@_split_row:NnTF #2 {#3}
- { \dt_remove_row_aux:NNnnn #1 #2 }
- { }
- }
-% \end{macrocode}
-% If the code gets here, then |#3| is the table before the removed row,
-% |#4| is the removed row and |#5| is everything afterwards. The first stage
-% is to work out the new number of rows, then include all of |#3| except
-% the old number of rows. The removed row |#4| is thrown away, and then there
-% is a loop to recalculate the row numbers for all of the later rows.
-% \begin{macrocode}
-\cs_new_protected:Npn \dt_remove_row_aux:NNnnn #1#2#3#4#5
- {
- #1 #2
- {
- { \int_eval:n { \dt_rows:N #2 - \c_one } }
- \dt_remove_row_aux:nw #3 \q_stop
- \dt_remove_row_loop:nw #5 \q_recursion_tail \q_@@_row
- \__prg_break_point:Nn \dt_map_break: { }
- }
- }
-\cs_new_eq:NN \dt_remove_row_aux:nw \@@_add_row:nw
-\cs_new:Npn \dt_remove_row_loop:nw #1#2 \q_@@_row
- {
- \__quark_if_recursion_tail_break:nN {#1} \dt_map_break:
- \int_eval:n { #1 - \c_one }
- \exp_not:n { #2 \q_@@_row }
- \dt_remove_row_loop:nw
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \subsection{Accessing data in data tables}
-%
-% \begin{macro}{\dt_get:NnnN}
-% \begin{macro}[aux]{\dt_get_aux:nNnnn}
-% \begin{macro}[aux]{\dt_get_aux:nNnnn}
-% Recovering a value from a row means doing two splits: first find the row,
-% then find the key. Nothing exciting, just a question of tracking the
-% returned items.
-% \begin{macrocode}
-\cs_new_protected:Npn \dt_get:NnnN #1#2#3#4
- {
- \@@_split_row:NnTF #1 {#2}
- { \dt_get_aux:nNnnn {#3} #4 }
- { \tl_set:Nn #4 { \q_no_value } }
- }
-\cs_new_protected:Npn \dt_get_aux:nNnnn #1#2#3#4#5
- {
- \@@_split_key:nnTF {#4} {#1}
- { \dt_get_aux:Nnnn #2 }
- { \tl_set:Nn #2 { \q_no_value } }
- }
-\cs_new_protected:Npn \dt_get_aux:Nnnn #1#2#3#4 { \tl_set:Nn #1 {#3} }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[TF]{\dt_get:NnnN}
-% \begin{macro}[aux]{\@@_get_true:nNnnn}
-% \begin{macro}[aux]{\@@_get_true:Nnnn}
-% The same idea as the standard method, but built as a conditional.
-% \begin{macrocode}
-\prg_new_protected_conditional:Npnn \dt_get:NnnN #1#2#3#4 { T , F , TF }
- {
- \@@_split_row:NnTF #1 {#2}
- { \@@_get_true:nNnnn {#3} #4 }
- { \prg_return_false: }
- }
-\cs_new_protected:Npn \@@_get_true:nNnnn #1#2#3#4#5
- {
- \@@_split_key:nnTF {#4} {#1}
- { \@@_get_true:Nnnn #2 }
- { \prg_return_false: }
- }
-\cs_new_protected:Npn \@@_get_true:Nnnn #1#2#3#4
- {
- \tl_set:Nn #1 {#3}
- \prg_return_true:
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\dt_get:NnN}
-% \begin{macro}[TF]{\dt_get:NnN}
-% Simple wrappers.
-% \begin{macrocode}
-\cs_new_protected:Npn \dt_get:NnN #1
- { \dt_get:NnnN #1 { \dt_rows:N #1 } }
-\cs_new_protected:Npn \dt_get:NnNT #1
- { \dt_get:NnnNF #1 { \dt_rows:N #1 } }
-\cs_new_protected:Npn \dt_get:NnNF #1
- { \dt_get:NnnNF #1 { \dt_rows:N #1 } }
-\cs_new_protected:Npn \dt_get:NnNTF #1
- { \dt_get:NnnNTF #1 { \dt_rows:N #1 } }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \subsection{Mapping to data tables}
-%
-% \begin{variable}{\g_dt_map_level_int}
-% Unlike other mappings, the mapping level here has to be available
-% and so linked to the module.
-% \begin{macrocode}
-\int_new:N \g_dt_map_level_int
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{macro}{\dt_map_variables:Nnn}
-% \begin{macro}[aux]{\@@_map_variables_key:nn}
-% \begin{macro}[aux]{\@@_map_variables:nnn}
-% \begin{macro}[aux]{\@@_map_variables:nNNw}
-% \begin{macro}[aux]{\@@_map_variables:nnw}
-% Mapping across a data table is more complex than other cases as there
-% are two \enquote{dimensions} to worry about: the rows and the keys.
-% The first stage of the mapping is to convert the key--variable mapping
-% into a sequence that can be used later. This is done with the assumption
-% that any key without a variable can simply be dropped entirely. The
-% header of the table is then split from the body.
-% \begin{macrocode}
-\cs_new_protected:Npn \dt_map_variables:Nnn #1#2#3
- {
- \int_gincr:N \g_dt_map_level_int
- \seq_gclear_new:c { g_dt_map_ \int_use:N \g_dt_map_level_int _seq }
- \keyval_parse:NNn \use_none:n \@@_map_variables_key:nn {#2}
- \@@_split_header:NT #1 { \@@_map_variables:nnn {#3} }
- }
-\cs_new_protected:Npn \@@_map_variables_key:nn #1#2
- {
- \seq_gput_right:cn { g_dt_map_ \int_use:N \g_dt_map_level_int _seq }
- { {#1} #2 }
- }
-% \end{macrocode}
-% As \cs{@@_split_header:NT} will leave a couple of tokens at the front
-% of the body part of the split, there is a quick piece of tidying up
-% to remove them.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_map_variables:nnn #1#2#3
- { \@@_map_variables:nNNw {#1} #3 \q_stop }
-\cs_new_protected:Npn \@@_map_variables:nNNw
- #1 \q_@@_header \q_@@_row #2 \q_stop
- {
- \int_zero_new:c { l_dt_map_ \int_use:N \g_dt_map_level_int _row_int }
- \@@_map_variables:nnw {#1} #2 { } \q_recursion_tail \q_@@_row
- \__prg_break_point:Nn \dt_map_break:
- { \int_gdecr:N \g_dt_map_level_int }
- }
-\cs_new_protected:Npn \@@_map_variables:nnw #1#2#3#4 \q_@@_row
- {
- \__quark_if_recursion_tail_break:nN {#3} \dt_map_break:
- \seq_map_inline:cn { g_dt_map_ \int_use:N \g_dt_map_level_int _seq }
- { \dt_get_aux:nNnnn ##1 { } {#3#4} { } }
- #1
- \int_incr:c { l_dt_map_ \int_use:N \g_dt_map_level_int _row_int }
- \@@_map_variables:nnw {#1}
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[rEXP]{\dt_map_break:}
-% \begin{macro}[rEXP]{\dt_map_break:n}
-% The break statements use the general \cs{__prg_map_break:Nn}.
-% \begin{macrocode}
-\cs_new_nopar:Npn \dt_map_break:
- { \__prg_map_break:Nn \dt_map_break: { } }
-\cs_new_nopar:Npn \dt_map_break:n
- { \__prg_map_break:Nn \dt_map_break: }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \subsection{Data table conditionals}
-%
-% \begin{macro}[pTF, EXP]{\dt_if_empty:N}
-% An empty data table has not only no rows but also no keys. (The number of
-% rows can be tested using \cs{dt_rows:N} and an \texttt{int} test.)
-% \begin{macrocode}
-\prg_new_conditional:Npnn \dt_if_empty:N #1 { T , F , TF , p }
- {
- \if_meaning:w #1 \c_empty_dt
- \prg_return_true:
- \else:
- \prg_return_false:
- \fi:
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[pTF, EXP]{\dt_if_in:Nn}
-% \begin{macro}[aux, EXP]{\@@_if_in:nnn}
-% \begin{macro}[aux, EXP]{\@@_if_in:nwN}
-% \begin{macro}[aux, EXP]{\@@_if_in:n}
-% Expandably checking for the presence of a key in the table as a whole
-% requires a mapping to the header. The idea is the usual recursion set
-% up with a string-based comparison only after checking for the end of
-% the loop.
-% \begin{macrocode}
-\prg_new_conditional:Npnn \dt_if_in:Nn #1#2 { p , T , F , TF }
- { \@@_split_header:NT #1 { \@@_if_in:nnn {#2} } }
-\cs_new:Npn \@@_if_in:nnn #1#2#3
- {
- \exp_last_unbraced:Nno \@@_if_in:nwN {#1} { \use_none:nn #2 }
- \q_recursion_tail \q_@@
- \__prg_break_point:
- }
-\cs_new:Npn \@@_if_in:nwN #1#2 \q_@@
- {
- \if_meaning:w \q_recursion_tail #2
- \exp_after:wN \__prg_break:n
- \else:
- \exp_after:wN \use_none:n
- \fi:
- { \prg_return_false: }
- \str_if_eq:nnTF {#1} {#2}
- { \__prg_break:n { \prg_return_true: } }
- { \@@_if_in:nwN {#1} }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[pTF, EXP]{\dt_if_in_row:Nnn}
-% \begin{macro}[aux, EXP]{\@@_if_in_row:nw}
-% \begin{macro}[aux, EXP]{\@@_if_in_row:nn}
-% \begin{macro}[aux, EXP]{\@@_if_in_row:nwn}
-% \begin{macro}[aux, EXP]{\@@_if_in_row:N}
-% Finding a key in a single row in an expandable way requires two mappings.
-% To start of with, there is a search for the row. This uses for termination
-% the fact that each row starts \cs{q_@@_row} and ends \cs{q_nil}, and
-% always contains at least the row number as the first \meta{balanced
-% text}. That can be replaced by the tail marker to terminate iteration:
-% all that is then needed is the correct placement of the clean-up code.
-% \begin{macrocode}
-\prg_new_conditional:Npnn \dt_if_in_row:Nnn #1#2#3 { p , T , F , TF }
- {
- \exp_last_unbraced:Nno \@@_if_in_row:nw {#2} #1
- \q_recursion_tail \q_nil
- \__prg_break_point:
- { \tl_to_str:n {#3} }
- }
-% \end{macrocode}
-% The row iteration does a numerical comparison to see if the target row has
-% been found. That means that the row argument does not need to be converted
-% to a number earlier.
-% \begin{macrocode}
-\cs_new:Npn \@@_if_in_row:nw #1#2 \q_@@_row #3#4 \q_nil
- {
- \if_meaning:w \q_recursion_tail #3
- \exp_after:wN \__prg_break:n
- \else:
- \exp_after:wN \use_none:n
- \fi:
- {
- \use_i:nn
- \prg_return_false:
- }
- \int_compare:nNnTF {#1} = {#3}
- { \__prg_break:n { \exp_args:Nno \@@_if_in_row:nn {#4} } }
- { \@@_if_in_row:nw {#1} }
- }
-% \end{macrocode}
-% The second iteration is along the row. This is basically the same as
-% \cs{prop_if_in:NnTF} with the \cs{q_@@} in place of \cs{q__prop}.
-% \begin{macrocode}
-\cs_new:Npn \@@_if_in_row:nn #1#2
- {
- \@@_if_in_row:nwn {#2} #1 {#2} \q_@@ { } \q_recursion_tail
- \__prg_break_point:
- }
-\cs_new:Npn \@@_if_in_row:nwn #1 \q_@@ #2 \q_@@ #3
- {
- \str_if_eq_x:nnTF {#1} {#2}
- { \@@_if_in_row:N }
- { \@@_if_in_row:nwn {#1} }
- }
-\cs_new:Npn \@@_if_in_row:N #1
- {
- \if_meaning:w \q_@@ #1
- \prg_return_true:
- \else:
- \prg_return_false:
- \fi:
- \__prg_break:
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[pTF, EXP]{\dt_if_in_row:Nn}
-% Simple wrappers.
-% \begin{macrocode}
-\cs_new:Npn \dt_if_in_row_p:Nn #1
- { \dt_if_in_row_p:Nnn #1 { \dt_rows:N #1 } }
-\cs_new:Npn \dt_if_in_row:NnT #1
- { \dt_if_in_row:NnnT #1 { \dt_rows:N #1 } }
-\cs_new:Npn \dt_if_in_row:NnF #1
- { \dt_if_in_row:NnnF #1 { \dt_rows:N #1 } }
-\cs_new:Npn \dt_if_in_row:NnTF #1
- { \dt_if_in_row:NnnTF #1 { \dt_rows:N #1 } }
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Messages}
-%
-% \begin{macrocode}
-\__msg_kernel_new:nnnn { dt } { unknown-row }
- { Data~table~#1~does~not~contain~a~row~'#2'. }
- {
- Data~table~#1~contains~#3~rows.~These~must~be~accessed~by~number:~row~
- #2~is~not~present~in~the~table.
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-%</initex|package>
-% \end{macrocode}
-%
-% \end{implementation}
-%
-% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3dt/l3dt.ins b/Master/texmf-dist/source/latex/l3experimental/l3dt/l3dt.ins
deleted file mode 100644
index 54db0f43b92..00000000000
--- a/Master/texmf-dist/source/latex/l3experimental/l3dt/l3dt.ins
+++ /dev/null
@@ -1,40 +0,0 @@
-\iffalse meta-comment
-
-File l3dt.ins Copyright (C) 2011 The 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 "l3trial 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.
-
-\fi
-
-\input l3docstrip.tex
-\askforoverwritefalse
-
-\preamble
-
-EXPERIMENTAL CODE
-
-Do not distribute this file without also distributing the
-source files specified above.
-
-Do not distribute a modified version of this file.
-
-\endpreamble
-% stop docstrip adding \endinput
-\postamble
-\endpostamble
-
-\keepsilent
-
-\generate{\file{l3dt.sty}{\from{l3dt.dtx}{package}}}
-
-\endbatchfile
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str.dtx
index 90a2575bcd0..17c2b53a187 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3str.dtx Copyright (C) 2011-2013 The LaTeX3 Project
+%% File: l3str.dtx Copyright (C) 2011-2014 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{expl3}
-\GetIdInfo$Id: l3str.dtx 4576 2013-07-24 21:40:24Z joseph $
+\GetIdInfo$Id: l3str.dtx 4728 2014-05-04 13:25:37Z joseph $
{L3 Experimental strings}
%</driver|package>
%<*driver>
@@ -66,7 +66,7 @@
% \date{Released \ExplFileDate}
%
% \maketitle
-%
+%
% \tableofcontents
%
% \begin{documentation}
@@ -112,40 +112,6 @@
% |\|\meta{character}.
% \end{variable}
%
-% \begin{function}[EXP]{\tl_to_str:N, \tl_to_str:n}
-% \begin{syntax}
-% \cs{tl_to_str:N} \meta{tl var}
-% \cs{tl_to_str:n} \Arg{token list}
-% \end{syntax}
-% Converts the \meta{token list} to a \meta{string}, leaving the
-% resulting character tokens in the input stream.
-% \begin{texnote}
-% Converting a \meta{token list} to a \meta{string} yields a
-% concatenation of the string representations of every token in the
-% \meta{token list}.
-% The string representation of a control sequence is
-% \begin{itemize}
-% \item an escape character, whose character code is given by the
-% internal parameter \tn{escapechar}, absent if the
-% \tn{escapechar} is negative;
-% \item the control sequence name, as defined by \cs{cs_to_str:N};
-% \item a space, unless the control sequence name is a single
-% character whose category at the time of expansion of
-% \cs{tl_to_str:n} is not \enquote{letter}.
-% \end{itemize}
-% The string representation of an explicit character token is that
-% character, doubled in the case of (explicit) macro parameter
-% characters (normally |#|).
-% In particular, the string representation of a token list may
-% depend on the category codes in effect when it is evaluated, and
-% the value of the \tn{escapechar}: for instance |\tl_to_str:n {\a}|
-% normally produces the three character \enquote{backslash},
-% \enquote{lower-case a}, \enquote{space}, but it may also produce a
-% single \enquote{lower-case a} if the escape character is negative
-% and \texttt{a} is currently not a letter.
-% \end{texnote}
-% \end{function}
-%
% \begin{function}{\str_new:N, \str_new:c}
% \begin{syntax}
% \cs{str_new:N} \meta{str~var}
diff --git a/Master/texmf-dist/source/latex/l3experimental/xcoffins/xcoffins.dtx b/Master/texmf-dist/source/latex/l3experimental/xcoffins/xcoffins.dtx
index 1d2a22efea3..8efec4fc252 100644
--- a/Master/texmf-dist/source/latex/l3experimental/xcoffins/xcoffins.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/xcoffins/xcoffins.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: xcoffins.dtx Copyright(C) 2010,2011 The LaTeX3 Project
+%% File: xcoffins.dtx Copyright(C) 2010-2012,2014 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -36,13 +36,13 @@
%
%<*driver|package>
\RequirePackage{xparse}
-\GetIdInfo$Id: xcoffins.dtx 4029 2012-07-29 18:16:03Z bruno $
+\GetIdInfo$Id: xcoffins.dtx 4728 2014-05-04 13:25:37Z joseph $
{L3 Experimental design-level coffins}
%</driver|package>
%<*driver>
\documentclass[full]{l3doc}
\usepackage{xcoffins} % Not yet part of expl3, so not in l3doc
-\usepackage{xcolor} % As coffins only loads basic colour support
+\usepackage{xcolor} % As coffins only loads basic color support
\NewCoffin \ExampleCoffin
\NewCoffin \SmallCoffin
\NewCoffin \OutputCoffin
@@ -131,9 +131,9 @@
% Before any alignment can take place, coffins must be created and
% their contents must be created. All coffin operations are local
% to the current \TeX{} group with the exception of coffin creation.
-% Coffins are also \enquote{colour safe}: in contrast to the code-level
+% Coffins are also \enquote{color safe}: in contrast to the code-level
% \cs{box_\ldots} functions there is no need to add additional grouping
-% to coffins when dealing with colour.
+% to coffins when dealing with color.
%
% \begin{function}{\NewCoffin}
% \begin{syntax}
@@ -620,7 +620,7 @@
%
% \begin{function}{\DisplayCoffinHandles}
% \begin{syntax}
-% \cs{DisplayCoffinHandles} \meta{coffin} \Arg{colour}
+% \cs{DisplayCoffinHandles} \meta{coffin} \Arg{color}
% \end{syntax}
% This function first calculates the intersections between all of
% the \meta{poles} of the \meta{coffin} to give a set of
@@ -628,20 +628,20 @@
% location in the source, with the position of the \meta{handles}
% marked on the coffin. The \meta{handles} will be labelled as part
% of this process: the locations of the \meta{handles} and the labels
-% are both printed in the \meta{colour} specified.
+% are both printed in the \meta{color} specified.
% \end{function}
%
% \begin{function}{\MarkCoffinHandle}
% \begin{syntax}
% \cs{MarkCoffinHandle} \meta{coffin}
-% ~~[ \meta{pole1} , \meta{pole2} ] \Arg{colour}
+% ~~[ \meta{pole1} , \meta{pole2} ] \Arg{color}
% \end{syntax}
% This function first calculates the \meta{handle} for the
% \meta{coffin} as defined by the intersection of \meta{pole1} and
% \meta{pole2}. It then marks the position of the \meta{handle}
% on the \meta{coffin}. The \meta{handle} will be labelled as part of
% this process: the location of the \meta{handle} and the label are
-% both printed in the \meta{colour} specified. If no \meta{poles} are
+% both printed in the \meta{color} specified. If no \meta{poles} are
% give, the default |(H,l)| is used.
% \end{function}
%
@@ -689,7 +689,7 @@
% \begin{macrocode}
%<*package>
% \end{macrocode}
-%
+%
% \begin{macrocode}
%<@@=coffin>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx b/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx
index 3bbe92eacc0..f22931ea3b9 100644
--- a/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx
@@ -1,7 +1,7 @@
% \iffalse
%
%% File: l3galley.dtx Copyright (C) 1999-2001, 2004-2009 Frank Mittelbach
-%% (C) 2010-2013 The LaTeX3 Project
+%% (C) 2010-2014 The 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
@@ -37,7 +37,7 @@
%
%<*driver|package>
\RequirePackage{xparse}
-\GetIdInfo$Id: l3galley.dtx 4494 2013-05-24 06:27:01Z joseph $
+\GetIdInfo$Id: l3galley.dtx 4728 2014-05-04 13:25:37Z joseph $
{L3 Experimental galley code}
%</driver|package>
%<*driver>
@@ -172,7 +172,7 @@
% \end{function}
%
% \subsection{Between paragraphs}
-%
+%
% \begin{variable}{\g_galley_previous_par_lines_int}
% The number of lines in the preceding conceptual paragraph. This may not
% correspond to the \TeX{} \tn{prevgraf} primitive value as one conceptual
@@ -355,7 +355,7 @@
% the interaction of a display block with the paragraphs before and after it
% can be adjusted independent of the design of text.
% \end{function}
-%
+%
% \subsection{Hyphenation}
%
% \begin{variable}{\l_galley_hyphen_left_int}
@@ -562,7 +562,7 @@
% \end{variable}
%
% \section{Paragraphs}
-%
+%
% \begin{function}{\galley_par:}
% \begin{syntax}
% \cs{galley_par:}
@@ -675,7 +675,7 @@
% \begin{macrocode}
%<*initex|package>
% \end{macrocode}
-%
+%
% \begin{macrocode}
%<@@=galley>
% \end{macrocode}
@@ -691,7 +691,7 @@
%
% Functions or settings which are needed by the galley but perhaps also
% elsewhere.
-%
+%
% \begin{macro}{\seq_map_function:Nc}
% Used to allow a mapping to choose the outcome using a passed option.
% \begin{macrocode}
@@ -706,7 +706,7 @@
\tex_defaulthyphenchar:D 45 \scan_stop:
%</initex>
% \end{macrocode}
-%
+%
% \subsection{Scratch variables}
%
% \begin{variable}{\l_@@_tmp_int}
@@ -735,7 +735,7 @@
\bool_new:N \l_@@_parshape_multipar_bool
% \end{macrocode}
% \end{variable}
-%
+%
% \begin{variable}
% {\l_@@_parshape_left_indent_seq, \l_@@_parshape_right_indent_seq}
% Used to convert user input comma lists into sequences for mapping, and also
@@ -811,7 +811,7 @@
\bool_new:N \l_@@_begin_level_bool
% \end{macrocode}
% \end{variable}
-%
+%
% \begin{variable}
% {
% \g_@@_cutout_left_seq, \l_@@_cutout_left_seq,
@@ -1148,7 +1148,7 @@
{
\group_begin:
\tex_par:D
- \group_end:
+ \group_end:
}
% \end{macrocode}
% In horizontal mode, the paragraph shape is set \enquote{just in time}
@@ -1160,7 +1160,7 @@
% \begin{macrocode}
{
\g_galley_par_end_hook_tl
- \group_begin:
+ \group_begin:
\tex_par:D
\group_end:
\int_gset:Nn \g_galley_previous_par_lines_int
@@ -1528,7 +1528,7 @@
% \end{macro}
%
% \subsection{Measure}
-%
+%
% \begin{variable}{\l_@@_total_left_margin_dim, \l_@@_total_right_margin_dim}
% Used to set the measure, first by providing a place to save the existing
% values, then allowing calculation of the difference between old and new
@@ -1570,7 +1570,7 @@
- \l_galley_total_left_margin_dim
- \l_galley_total_right_margin_dim
}
- \@@_set_measure:
+ \@@_set_measure:
}
% \end{macrocode}
% Saves the previous margin state so that it can be used for calculation
@@ -1595,7 +1595,7 @@
{
\int_compare:nNnTF \tex_parshape:D = \c_zero
{ \@@_parshape_measure: }
- {
+ {
\dim_sub:Nn \l_@@_total_left_margin_dim
\l_galley_total_left_margin_dim
\dim_sub:Nn \l_@@_total_right_margin_dim
@@ -1621,7 +1621,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
-%
+%
% \begin{macro}{\@@_parshape_reset:}
% Test for paragraph shapes to be removed: a multi-step procedure! First,
% check to see if there is a shape at all. If there is, the second check
@@ -1634,9 +1634,9 @@
\int_compare:nNnF \tex_parshape:D = \c_zero
{
\bool_if:nTF
- {
+ {
\seq_if_empty_p:N \g_@@_cutout_left_seq
- && \seq_if_empty_p:N \g_@@_cutout_right_seq
+ && \seq_if_empty_p:N \g_@@_cutout_right_seq
}
{
\bool_if:NF \l_@@_parshape_multipar_bool
@@ -1659,13 +1659,13 @@
{ \@@_parshape_set: }
{ \@@_parshape_measure: }
\@@_cutout_set:Nn \g_@@_cutout_left_seq { left }
- \@@_cutout_set:Nn \g_@@_cutout_right_seq { right }
+ \@@_cutout_set:Nn \g_@@_cutout_right_seq { right }
}
- }
+ }
}
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}[int]{\@@_parshape_measure:}
% Sets the parshape to the full measure at the current time: used in a few
% places, so worth spinning out.
@@ -1679,7 +1679,7 @@
}
% \end{macrocode}
% \end{macro}
-%
+%
% \subsection{Paragraph shape}
%
% \begin{macro}
@@ -1731,7 +1731,7 @@
{
\seq_put_right:Nn \l_@@_parshape_left_indent_seq { 0 pt }
\seq_put_right:Nn \l_@@_parshape_right_indent_seq { 0 pt }
- }
+ }
\@@_parshape_set:
}
\cs_new_protected_nopar:Npn \@@_parshape_set:
@@ -1758,13 +1758,13 @@
% \end{macro}
% \end{macro}
% \end{macro}
-%
+%
% \subsection{Cutouts}
-%
+%
% Cutouts are another way of looking at paragraph shapes, but apply to
% a fixed number of lines within a galley. As such, they require separate
% handling from the measure and shape.
-%
+%
% \begin{macro}{\galley_cutout_left:nn, \galley_cutout_right:nn}
% \begin{macro}[int]{\@@_cutout:nnn}
% \begin{macro}[aux]{\@@_cutout_store:nn}
@@ -1800,7 +1800,7 @@
{ \seq_count:c { g_@@_cutout_ #1 _ seq } }
{
\seq_map_inline:Nn \l_@@_tmpa_seq
- {
+ {
\@@_cutout_store:nn
{ \seq_gpop:cNF { g_@@_cutout_ #1 _ seq } }
{##1}
@@ -1808,7 +1808,7 @@
}
{
\seq_map_inline:cn { g_@@_cutout_ #1 _ seq }
- {
+ {
\@@_cutout_store:nn
{ \seq_pop:NNF \l_@@_tmpa_seq }
{##1}
@@ -1889,14 +1889,14 @@
\c_space_tl
\dim_eval:n { \etex_parshapelength:D \l_@@_tmp_int - ( #1 ) }
\c_space_tl
- }
+ }
}
}
\cs_new_protected:Npn \@@_cutout_right:n #1
{
\int_incr:N \l_@@_tmp_int
\tl_put_right:Nx \l_@@_tmp_tl
- {
+ {
\int_compare:nNnTF \l_@@_tmp_int > \tex_parshape:D
{
\dim_use:N \l_@@_total_left_margin_dim
@@ -1920,12 +1920,12 @@
{
\int_incr:N \l_@@_tmp_int
\tl_put_right:Nx \l_@@_tmp_tl
- {
+ {
\dim_eval:n { \etex_parshapeindent:D #1 }
\c_space_tl
\dim_eval:n { \etex_parshapelength:D #1 }
\c_space_tl
- }
+ }
}
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3experimental/xgalley/xgalley.dtx b/Master/texmf-dist/source/latex/l3experimental/xgalley/xgalley.dtx
index d0086f4a3e3..b1dda9c1990 100644
--- a/Master/texmf-dist/source/latex/l3experimental/xgalley/xgalley.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/xgalley/xgalley.dtx
@@ -1,7 +1,7 @@
% \iffalse
%
%% File: xgalley.dtx Copyright (C) 1999-2001, 2004-2009 Frank Mittelbach
-%% (C) 2010-2012 The LaTeX3 Project
+%% (C) 2010-2012,2014 The 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
@@ -37,7 +37,7 @@
%
%<*driver|package>
\RequirePackage{expl3}
-\GetIdInfo$Id: xgalley.dtx 4373 2012-12-17 16:41:59Z joseph $
+\GetIdInfo$Id: xgalley.dtx 4728 2014-05-04 13:25:37Z joseph $
{L3 Experimental galley}
%</driver|package>
%<*driver>
@@ -744,7 +744,7 @@
% \begin{macrocode}
%<*package>
% \end{macrocode}
-%
+%
% \begin{macrocode}
%<@@=galley>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
index 5713c41d607..5acf857be21 100644
--- a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
@@ -33,25 +33,12 @@
%%
%% -----------------------------------------------------------------------
%
-%<package>\RequirePackage{l3names}[2012/12/07]
-%<package>\@ifpackagelater{l3names}{2012/12/07}
-%<package> {}
-%<package> {%
-%<package> \PackageError{expl3}{Mismatched LaTeX3 packages detected.}
-%<package> {%
-%<package> Please install an up to date version of l3kernel
-%<package> using your TeX package manager or from CTAN.%
-%<package> \MessageBreak \MessageBreak
-%<package> Loading expl3 will abort!%
-%<package> }%
-%<package> \endinput
-%<package> }
-%<*driver|package>
+%<*driver|generic|package>
\def\ExplFileName{expl3}
-\def\ExplFileDescription{L3 Experimental code bundle wrapper}
-\def\ExplFileDate{2014/01/07}
-\def\ExplFileVersion{4646}
-%</driver|package>
+\def\ExplFileDescription{L3 programming layer}
+\def\ExplFileDate{2014/05/05}
+\def\ExplFileVersion{4742}
+%</driver|generic|package>
%<*driver>
\documentclass[full]{l3doc}
\begin{document}
@@ -954,7 +941,7 @@
% purposes, as it means that there is a complete list of all functions
% created by each module loaded (with the exceptions of a very small number
% required by the bootstrap code for \LaTeX3).
-%
+%
% \DescribeOption{driver}
% Selects the driver to be used for color, graphics and related operations that
% are driver-dependent. Options available are
@@ -970,6 +957,27 @@
% \item[xdvipdfmx] Use the \texttt{xdvipdfmx} driver (\XeTeX{} only).
% \end{itemize}
%
+% \section{Using \pkg{expl3} with formats other than \LaTeXe{}}
+%
+% As well as the \LaTeXe{} package \pkg{expl3}, there is also a
+% \enquote{generic} loader for the code, \texttt{expl3.tex}. This may be
+% loaded using the plain \TeX{} syntax
+% \begin{verbatim}
+% \input expl3-generic %
+% \end{verbatim}
+% This will enable the programming layer to work with the other formats.
+% As no options are available loading in this way, the \enquote{native}
+% drivers are automatically used. If this \enquote{generic} loader is
+% used with \LaTeXe{} the code will automatically switch to the appropriate
+% package route.
+%
+% After loading the programming layer using the generic interface, the
+% commands \cs{ExplSyntaxOn} and \cs{ExplSyntaxOff} and the code-level
+% functions and variables detailed in \pkg{interface3} will be available.
+% Note that other \LaTeXe{} packages \emph{using} \pkg{expl3} will not
+% be loadable: package loading is dependent on the \LaTeXe{} package-management
+% mechanism.
+%
% \section{The \LaTeX3 Project}
%
% Development of \LaTeX3 is carried out by The \LaTeX3 Project. Over time,
@@ -1027,27 +1035,132 @@
%
% \section{\pkg{expl3} implementation}
%
+% The implementation here covers several things. There are two
+% \enquote{loaders} to define: the parts of the code that are specific to
+% \LaTeXe{} or to non-\LaTeXe{} formats. These have to cover the same
+% concepts as each other but in rather different ways: as a result, much
+% of the code is given in separate blocks. There is also a short piece of
+% code for the start of the \enquote{payload}: this is to ensure that
+% loading is always done in the right way.
+%
+% \subsection{Loader interlock}
+%
+% A short piece of set up to check that the loader and \enquote{payload}
+% versions match.
+%
+% \begin{macro}{\ExplLoaderFileVersion}
+% As DocStrip is used to generate \cs{ExplFileVersion}
+% for all files from the same source, it has to match. Thus the loaders
+% simply save this information with a new name.
% \begin{macrocode}
-%<*package>
+%<*loader>
+\let\ExplLoaderFileVersion\ExplFileVersion
+%</loader>
% \end{macrocode}
+% \end{macro}
%
-% Load \pkg{etex} as otherwise we are likely to get into trouble
-% with registers. Some inserts are reserved also as these have to
-% be from the standard pool. The \cs{relax} is here as
-% \cs{reserveinserts} is outer. Most of the time this is fine, but
-% some packages (for example \pkg{catoptions}) redefine \cs{RequirePackage}
-% such that the trailing optional argument is tested for as a macro argument,
-% which will then lead to an error!
+% The interlock test itself is simple: \cs{ExplLoaderFileVersion} must be
+% defined and identical to \cs{ExplFileVersion}. As this has to work for
+% both \LaTeXe{} and other formats, there is some auto-detection involved.
+% (Done this way avoids having two very similar blocks for \LaTeXe{} and
+% other formats.)
% \begin{macrocode}
-\RequirePackage{etex}
-\relax
-\reserveinserts{32}
+%<*!loader>
+\begingroup
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx PackageError\endcsname\relax
+ \begingroup
+ \def\PackageError##1##2##3%
+ {%
+ \endgroup
+ \errhelp{##3}%
+ \errmessage{##1 Error: ##2!}
+ }
+ \fi
+ \def\next{}
+ \expandafter\ifx\csname ExplLoaderFileVersion\endcsname\relax
+ \def\next
+ {%
+ \PackageError{expl3}{No expl3 loader detected}
+ {%
+ You have attempted to use the expl3 code directly rather than using
+ the correct loader. Loading of expl3 will abort.
+ }
+ \endinput
+ }
+ \else
+ \ifx\ExplLoaderFileVersion\ExplFileVersion
+ \def\next{}
+ \else
+ \def\next
+ {%
+ \PackageError{expl3}{Mismatched expl3 files detected}
+ {%
+ You have attempted to load expl3 with mismatched files:
+ probably you have one or more files 'locally installed' which
+ are in conflict. Loading of expl3 will abort.
+ }%
+ \endinput
+ }
+ \fi
+ \expandafter\fi
+\expandafter\endgroup
+\next
+%</!loader>
+% \end{macrocode}
+%
+% A reload test for the payload, just in case.
+% \begin{macrocode}
+%<*!loader>
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname ver@\ExplFileName -code.tex\endcsname\relax
+ \expandafter\edef\csname ver@\ExplFileName -code.tex\endcsname
+ {%
+ \ExplFileDate\space v\ExplFileVersion\space
+ \ExplFileDescription\space
+ }
+\else
+ \expandafter\endinput
+\fi
+%</!loader>
% \end{macrocode}
%
-% Do the package identification: this will turn on code syntax.
+% All good: log the version of the code used (for log completeness). As this
+% is more-or-less \cs{ProvidesPackage} without a separate file and as this also
+% needs to work without \LaTeXe{}, just write the information directly to the
+% log.
% \begin{macrocode}
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
+%<*!loader>
+\immediate\write-1 %
+ {%
+ Package:
+ \ExplFileName\space
+ \ExplFileDate\space v\ExplFileVersion\space \ExplFileDescription\space
+ (code)
+ }
+%</!loader>
+% \end{macrocode}
+%
+% \subsection{\LaTeXe{} loader}
+%
+% \begin{macrocode}
+%<*package&loader>
+% \end{macrocode}
+%
+% Identify the package.
+% \begin{macrocode}
+\ProvidesPackage{\ExplFileName}
+ [%
+ \ExplFileDate\space v\ExplFileVersion\space
+ \ExplFileDescription\space (loader)
+ ]
+% \end{macrocode}
+%
+% For handling driver options the \pkg{ifpdf} package will be needed. To
+% avoid issues during package loading, it's most convenient to load this before
+% setting up any of the code environment.
+% \begin{macrocode}
+\RequirePackage{ifpdf}
% \end{macrocode}
%
% \begin{macro}[aux]{\expl@create@bool@option}
@@ -1063,218 +1176,69 @@
% options are handled here: others are left for a proper key--value approach
% once the kernel is loaded.
% \begin{macrocode}
-\newcommand \expl@create@bool@option [ 2 ]
- {
- \DeclareOption {#1} { \renewcommand* #2 { 1 } }
- \DeclareOption { #1 = true } { \renewcommand* #2 { 1 } }
- \DeclareOption { #1 = false } { \renewcommand* #2 { 0 } }
- \newcommand* #2 { 0 }
+\newcommand\expl@create@bool@option[2]%
+ {%
+ \DeclareOption{#1}{\chardef #2=1 }%
+ \DeclareOption{#1=true}{\chardef #2=1 }%
+ \DeclareOption{#1=false}{\chardef #2=0 }%
+ \newcommand*#2{}%
+ \chardef #2=0 %
}
-\expl@create@bool@option { check-declarations } \l@expl@check@declarations@bool
-\expl@create@bool@option { log-functions } \l@expl@log@functions@bool
-\let \expl@create@bool@option \@undefined
-\newcommand* \l@expl@options@clist { }
+\expl@create@bool@option{check-declarations}\l@expl@check@declarations@bool
+\expl@create@bool@option{log-functions}\l@expl@log@functions@bool
+\let\expl@create@bool@option\@undefined
+\newcommand*\l@expl@options@clist{}
\DeclareOption*
- {
- \ifx \l@expl@options@clist \@empty
- \let \l@expl@options@clist \CurrentOption
+ {%
+ \ifx\l@expl@options@clist\@empty
+ \let\l@expl@options@clist\CurrentOption
\else
- \edef \l@expl@options@clist
- {
- \unexpanded \expandafter \expandafter \expandafter
- {
- \expandafter \l@expl@options@clist \expandafter , \CurrentOption
- }
- }
+ \expandafter\expandafter\expandafter\def
+ \expandafter\expandafter\expandafter\l@expl@options@clist
+ \expandafter\expandafter\expandafter
+ {\expandafter\l@expl@options@clist\expandafter,\CurrentOption}
\fi
}
-\ProcessOptions \relax
+\ProcessOptions\relax
% \end{macrocode}
% \end{variable}
% \end{variable}
% \end{macro}
%
-% We already loaded \pkg{l3names} at the beginning of the \texttt{dtx} file.
-% We now load the base of \LaTeX3, stopping once token list variables are
-% defined.
-% \begin{macrocode}
-\RequirePackage { l3basics, l3expan, l3tl }
-% \end{macrocode}
-%
-% \begin{macro}[int]{\__cs_check_exists:N}
-% When used as a package, there is an option to be picky and to
-% check definitions exist. This part of the process is done now, so that
-% variable types based on |tl| (for example |clist|, |seq| and |prop|) will
-% inherit the appropriate definitions.
-% \begin{macrocode}
-\ifodd \l@expl@check@declarations@bool \relax
- \cs_new_protected:Npn \__cs_check_exists:N #1
- {
- \cs_if_exist:NF #1
- {
- \__msg_kernel_error:nnx { check } { non-declared-variable }
- { \token_to_str:N #1 }
- }
- }
-% \end{macrocode}
-% No \cs{tl_map_\ldots} yet as the mechanisms are not fully in place. Thus
-% instead do a more low level set up for a mapping, as in \pkg{l3basics}.
-% \begin{macrocode}
- \cs_set_protected:Npn \__cs_tmp:w #1
- {
- \if_meaning:w ? #1
- \exp_after:wN \use_none_delimit_by_q_recursion_stop:w
- \fi:
- \use:x
- {
- \cs_set_protected:Npn #1 \exp_not:n { ##1 ##2 }
- {
- \__cs_check_exists:N \exp_not:n {##1}
- \exp_not:o { #1 {##1} {##2} }
- }
- }
- \__cs_tmp:w
- }
- \__cs_tmp:w
- \tl_set:Nn \tl_set:No \tl_set:Nx
- \tl_gset:Nn \tl_gset:No \tl_gset:Nx
- \tl_put_left:Nn \tl_put_left:NV
- \tl_put_left:No \tl_put_left:Nx
- \tl_gput_left:Nn \tl_gput_left:NV
- \tl_gput_left:No \tl_gput_left:Nx
- \tl_put_right:Nn \tl_put_right:NV
- \tl_put_right:No \tl_put_right:Nx
- \tl_gput_right:Nn \tl_gput_right:NV
- \tl_gput_right:No \tl_gput_right:Nx
- ? \q_recursion_stop
-% \end{macrocode}
-% The two \texttt{set_eq} functions are done by hand as the internals there
-% are a bit different.
-% \begin{macrocode}
- \cs_set_protected:Npn \tl_set_eq:NN #1#2
- {
- \__cs_check_exists:N #1
- \__cs_check_exists:N #2
- \cs_set_eq:NN #1 #2
- }
- \cs_set_protected:Npn \tl_gset_eq:NN #1#2
- {
- \__cs_check_exists:N #1
- \__cs_check_exists:N #2
- \cs_gset_eq:NN #1 #2
- }
-% \end{macrocode}
-% There is also a need to check all three arguments of the
-% \texttt{concat} functions: a token list |#2| or |#3| equal to
-% \cs{scan_stop:} would lead to problems later on.
-% \begin{macrocode}
- \cs_set_protected:Npn \tl_concat:NNN #1#2#3
- {
- \__cs_check_exists:N #1
- \__cs_check_exists:N #2
- \__cs_check_exists:N #3
- \tl_set:Nx #1 { \exp_not:o {#2} \exp_not:o {#3} }
- }
- \cs_set_protected:Npn \tl_gconcat:NNN #1#2#3
- {
- \__cs_check_exists:N #1
- \__cs_check_exists:N #2
- \__cs_check_exists:N #3
- \tl_gset:Nx #1 { \exp_not:o {#2} \exp_not:o {#3} }
- }
-\fi
-% \end{macrocode}
+% \begin{macro}{\GetIdInfo}
+% This is implemented right at the start of \texttt{l3bootstrap.dtx}.
% \end{macro}
%
-% The second part of the file can now be loaded, stopping once the boolean
-% data type is defined.
+% \begin{macro}{\ProvidesExplPackage, \ProvidesExplClass, \ProvidesExplFile}
+% For other packages and classes building on this one it is convenient
+% not to need \cs{ExplSyntaxOn} each time.
% \begin{macrocode}
-\RequirePackage { l3seq, l3int, l3quark, l3prg }
-% \end{macrocode}
-%
-% Booleans are not based on token lists but do need checking: another
-% block of code.
-% \begin{macrocode}
-\ifodd \l@expl@check@declarations@bool \relax
- \cs_set_protected:Npn \bool_set_true:N #1
- {
- \__cs_check_exists:N #1
- \cs_set_eq:NN #1 \c_true_bool
- }
- \cs_set_protected:Npn \bool_set_false:N #1
- {
- \__cs_check_exists:N #1
- \cs_set_eq:NN #1 \c_false_bool
- }
- \cs_set_protected:Npn \bool_gset_true:N #1
- {
- \__cs_check_exists:N #1
- \cs_gset_eq:NN #1 \c_true_bool
- }
- \cs_set_protected:Npn \bool_gset_false:N #1
- {
- \__cs_check_exists:N #1
- \cs_gset_eq:NN #1 \c_false_bool
- }
- \cs_set_protected:Npn \bool_set_eq:NN #1
- {
- \__cs_check_exists:N #1
- \cs_set_eq:NN #1
- }
- \cs_set_protected:Npn \bool_gset_eq:NN #1
- {
- \__cs_check_exists:N #1
- \cs_gset_eq:NN #1
- }
- \cs_set_protected:Npn \bool_set:Nn #1#2
- {
- \__cs_check_exists:N #1
- \tex_chardef:D #1 = \bool_if_p:n {#2}
- }
- \cs_set_protected:Npn \bool_gset:Nn #1#2
- {
- \__cs_check_exists:N #1
- \tex_global:D \tex_chardef:D #1 = \bool_if_p:n {#2}
- }
-\fi
+\protected\def\ProvidesExplPackage#1#2#3#4%
+ {%
+ \ProvidesPackage{#1}[#2 v#3 #4]%
+ \ExplSyntaxOn
+ }
+\protected\def\ProvidesExplClass#1#2#3#4%
+ {%
+ \ProvidesClass{#1}[#2 v#3 #4]%
+ \ExplSyntaxOn
+ }
+\protected\def\ProvidesExplFile#1#2#3#4%
+ {%
+ \ProvidesFile{#1}[#2 v#3 #4]%
+ \ExplSyntaxOn
+ }
% \end{macrocode}
+% \end{macro}
%
-% Now everything else can be loaded.
+% Load the business end: this will leave \cs{expl3} syntax on.
% \begin{macrocode}
-\RequirePackage
- {
- l3clist,
- l3token,
- l3prop,
- l3msg,
- l3file,
- l3skip,
- l3keys,
- l3fp,
- l3box,
- l3coffins,
- l3color,
- l3luatex,
- l3candidates
- }
+\input{expl3-code.tex}
% \end{macrocode}
%
-% The error message for variables cannot be created before now: this means that
-% \pkg{expl3} itself may cause some odd errors.
+% Deactivate writing module information to the log.
% \begin{macrocode}
-\bool_if:nT { \l@expl@check@declarations@bool }
- {
- \__msg_kernel_new:nnnn { check } { non-declared-variable }
- { The~variable~#1~has~not~been~declared~\msg_line_context:. }
- {
- Checking~is~active,~and~you~have~tried~do~so~something~like: \\
- \ \ \tl_set:Nn ~ #1 ~ \{ ~ ... ~ \} \\
- without~first~having: \\
- \ \ \tl_new:N ~ #1 \\
- \\
- LaTeX~will~create~the~variable~and~continue.
- }
- }
+\protected\def\GetIdInfoLog{}
% \end{macrocode}
%
% \begin{macro}{\color}
@@ -1288,7 +1252,7 @@
}
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{variable}[int]{\l__expl_driver_tl}
% \begin{variable}[int]{\l__expl_native_drivers_bool}
% With the code now loaded, options can be handled using a real key--value
@@ -1297,7 +1261,6 @@
% foo}). The checks on driver choice are set up here, so when actually
% the driver it's a straight forward operation.
% \begin{macrocode}
-\RequirePackage{ifpdf}
\__msg_kernel_new:nnnn { expl } { wrong-driver }
{ Driver~request~inconsistent~with~engine:~using~'#2'~driver. }
{
@@ -1417,7 +1380,7 @@
% \box_resize_to_wd:Nn,
% \box_scale:Nnn
% }
-% For the \LaTeXe{} drivers,
+% For the \LaTeXe{} drivers,
% alter various definitions to use the \pkg{graphics} package
% instead. The package is loaded right at the start of the hook
% as there is otherwise a potential issue with \pkg{(x)color}: see
@@ -1478,64 +1441,224 @@
% \end{macrocode}
% \end{macro}
% \begin{variable}[int]{\c__expl_def_ext_tl}
-% For native drivers, just load the appropriate file.
+% For native drivers, just load the appropriate file. As \cs{expl3} syntax
+% is already on and the full mechanism is only engaged at the end of the
+% loader, \cs{ProvidesExplFile} is temporarily redefined here.
% \begin{macrocode}
{
+ \cs_set_protected:Npn \ProvidesExplFile #1#2#3#4
+ { \ProvidesFile {#1} [ #2~v#3~#4 ] }
\tl_const:Nn \c__expl_def_ext_tl { def }
\@onefilewithoptions { l3 \l__expl_driver_tl } [ ] [ ] \c__expl_def_ext_tl
+ \cs_set_protected:Npn \ProvidesExplFile #1#2#3#4
+ {
+ \ProvidesFile {#1} [ #2~v#3~#4 ]
+ \ExplSyntaxOn
+ }
}
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{\ExplSyntaxOff, \ExplSyntaxOn}
-% These are redefined here to reduce unnecessary work when switching.
-% The definition for \cs{ExplSyntaxOff} copies the code from earlier,
-% so that category codes are restored.
+% \begin{macro}{\@pushfilename, \@popfilename}
+% \begin{macro}[aux]{\__expl_status_pop:w}
+% The idea here is to use \LaTeXe{}'s \tn{@pushfilename} and
+% \tn{@popfilename} to track the current syntax status. This can be
+% achieved by saving the current status flag at each push to a stack,
+% then recovering it at the pop stage and checking if the code
+% environment should still be active.
% \begin{macrocode}
-\cs_set_protected_nopar:Npn \ExplSyntaxOn
+\tl_put_left:Nn \@pushfilename
{
- \bool_if:NF \l__kernel_expl_bool
+ \tl_put_left:Nx \l__expl_status_stack_tl
{
- \cs_set_protected_nopar:Npx \ExplSyntaxOff
- {
- \char_set_catcode:nn { 9 } { \char_value_catcode:n { 9 } }
- \char_set_catcode:nn { 32 } { \char_value_catcode:n { 32 } }
- \char_set_catcode:nn { 34 } { \char_value_catcode:n { 34 } }
- \char_set_catcode:nn { 36 } { \char_value_catcode:n { 36 } }
- \char_set_catcode:nn { 38 } { \char_value_catcode:n { 38 } }
- \char_set_catcode:nn { 58 } { \char_value_catcode:n { 58 } }
- \char_set_catcode:nn { 94 } { \char_value_catcode:n { 94 } }
- \char_set_catcode:nn { 95 } { \char_value_catcode:n { 95 } }
- \char_set_catcode:nn { 124 } { \char_value_catcode:n { 124 } }
- \char_set_catcode:nn { 126 } { \char_value_catcode:n { 126 } }
- \tex_endlinechar:D = \tex_the:D \tex_endlinechar:D \scan_stop:
- \bool_set_false:N \l__kernel_expl_bool
- \cs_set_protected_nopar:Npn \ExplSyntaxOff { }
- }
+ \bool_if:NTF \l__kernel_expl_bool
+ { 1 }
+ { 0 }
}
- \char_set_catcode_ignore:n { 9 } % tab
- \char_set_catcode_ignore:n { 32 } % space
- \char_set_catcode_other:n { 34 } % double quote
- \char_set_catcode_math_toggle:n { 36 } % dollar
- \char_set_catcode_alignment:n { 38 } % ampersand
- \char_set_catcode_letter:n { 58 } % colon
- \char_set_catcode_math_superscript:n { 94 } % circumflex
- \char_set_catcode_letter:n { 95 } % underscore
- \char_set_catcode_other:n { 124 } % pipe
- \char_set_catcode_space:n { 126 } % tilde
- \tex_endlinechar:D = 32 \scan_stop:
- \bool_set_true:N \l__kernel_expl_bool
+ \ExplSyntaxOff
}
-\cs_set_protected_nopar:Npx \ExplSyntaxOff
+\tl_put_right:Nn \@popfilename
{
- \exp_not:o \ExplSyntaxOff
- \cs_set_protected_nopar:Npn \ExplSyntaxOff { }
+ \tl_if_empty:NTF \l__expl_status_stack_tl
+ { \ExplSyntaxOff }
+ { \exp_after:wN \__expl_status_pop:w \l__expl_status_stack_tl \q_stop }
}
% \end{macrocode}
+% The pop auxiliary function removes the first item from the stack,
+% saves the rest of the stack and then does the test. The flag here
+% is not a proper \texttt{bool}, so a low-level test is used.
+% \begin{macrocode}
+\cs_new_protected:Npn \__expl_status_pop:w #1#2 \q_stop
+ {
+ \tl_set:Nn \l__expl_status_stack_tl {#2}
+ \int_if_odd:nTF {#1}
+ { \ExplSyntaxOn }
+ { \ExplSyntaxOff }
+ }
+% \end{macrocode}
+% \end{macro}
% \end{macro}
%
+% \begin{variable}{\l__expl_status_stack_tl}
+% As \pkg{expl3} itself cannot be loaded with the code environment
+% already active, at the end of the package \cs{ExplSyntaxOff} can
+% safely be called.
+% \begin{macrocode}
+\tl_new:N \l__expl_status_stack_tl
+\tl_set:Nn \l__expl_status_stack_tl { 0 }
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macrocode}
+%</package&loader>
+% \end{macrocode}
+%
+% \subsection{Generic loader}
+%
+% \begin{macrocode}
+%<*generic>
+% \end{macrocode}
+%
+% The generic loader starts with a test to ensure that the current format is
+% not \LaTeXe{}!
+% \begin{macrocode}
+\begingroup
+ \def\tempa{LaTeX2e}
+ \def\next{}
+ \ifx\fmtname\tempa
+ \def\next
+ {%
+ \PackageInfo{expl3}{Switching from generic to LaTeX2e loader}
+ \endinput \RequirePackage{expl3}
+ }
+ \fi
+\expandafter\endgroup
+\next
+% \end{macrocode}
+%
+% Reload check and identify the package:
+% no \LaTeXe{} mechanism so this is all pretty basic.
+% \begin{macrocode}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname ver@\ExplFileName -generic.tex\endcsname\relax
+\else
+ \immediate\write-1
+ {%
+ Package \ExplFileName\space Info: The package is already loaded.
+ }%
+ \expandafter\endinput
+\fi
+\immediate\write-1
+ {%
+ Package: \ExplFileName\space
+ \ExplFileDate\space v\ExplFileVersion\space
+ \ExplFileDescription\space (loader)
+ }
+\expandafter\edef\csname ver@\ExplFileName -generic.tex\endcsname
+ {\ExplFileDate\space v\ExplFileVersion\space \ExplFileDescription}
+% \end{macrocode}
+%
+% As for the package loader, the \cs{ifpdf} package is loaded, again
+% early so there is no issue with category codes. Notice that here we do
+% not load \cs{etex} as the appropriate stuff is built into the formats.
+% \begin{macrocode}
+\input ifpdf.sty %
+% \end{macrocode}
+%
+% \begin{variable}[aux]{\l@expl@tidy@tl}
+% Save the category code of |@| and then set it to \enquote{letter}.
+% \begin{macrocode}
+\expandafter\edef\csname l@expl@tidy@tl\endcsname
+ {%
+ \catcode64=\the\catcode64\relax
+ \let\expandafter\noexpand\csname l@expl@tidy@tl\endcsname
+ \noexpand\undefined
+ }
+\catcode64=11 %
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}[int]
+% {
+% \l@expl@check@declarations@bool ,
+% \l@expl@log@functions@bool
+% }
+% In generic mode, there is no convenient option handling and so instead
+% the two variables are defined to do nothing.
+% appropriate value before input of the loader.
+% \begin{macrocode}
+\chardef \l@expl@check@declarations@bool = 0 %
+\chardef \l@expl@log@functions@bool = 0 %
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}[aux]{\AtBeginDocument}
+% \begin{macro}[aux]{\expl@AtBeginDocument}
+% There are a few uses of \cs{AtBeginDocument} in the package code: the
+% easiest way around that is to simply do nothing for these. As
+% bundles such as \pkg{miniltx} may have defined \cs{AtBeginDocument}
+% any existing definition is saved for restoration after the payload.
+% \begin{macrocode}
+\let\expl@AtBeginDocument\AtBeginDocument
+\def\AtBeginDocument#1{}
+\expandafter\def\expandafter\l@expl@tidy@tl\expandafter
+ {%
+ \l@expl@tidy@tl
+ \let\AtBeginDocument\expl@AtBeginDocument
+ \let\expl@AtBeginDocument\undefined
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% Load the business end: this will leave \cs{expl3} syntax on.
+% \begin{macrocode}
+\input expl3-code.tex %
+% \end{macrocode}
+%
+% \begin{macro}{\__iow_wrap_set:Nx}
+% Without \LaTeXe{} there is no \cs{protected@edef} so the more risky
+% direct use of \cs{tl_set:Nx} is required.
+% \begin{macrocode}
+\cs_set_eq:NN \__iow_wrap_set:Nx \tl_set:Nx
+% \end{macrocode}
+% \end{macro}
+%
+% Deactivate writing module information to the log.
+% \begin{macrocode}
+\protected\def\GetIdInfoLog{}
+% \end{macrocode}
+%
+% For driver loading in generic mode, there are no options: pick the most
+% appropriate case! To allow this loading to take place a temporary
+% definition of \cs{ProvidesExplFile} is provided
+% \begin{macrocode}
+\cs_set_protected:Npn \ProvidesExplFile #1#2#3#4
+ { \iow_log:n { File:~#1~#2~v#3~#4 } }
+\tex_input:D
+ l3
+ \xetex_if_engine:TF
+ { xdvipdfmx }
+ {
+ \ifpdf
+ pdfmode
+ \else
+ dvips
+ \fi
+ }
+ .def \scan_stop:
+\cs_undefine:N \ProvidesExplFile
+% \end{macrocode}
+%
+% For the generic loader, a few final steps to take. Turn of \cs{expl3}
+% syntax and tidy up the small number of temporary changes.
+% \begin{macrocode}
+\ExplSyntaxOff
+\l@expl@tidy@tl
+% \end{macrocode}
+%
% \begin{macrocode}
-%</package>
+%</generic>
% \end{macrocode}
%
% \end{implementation}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx
index b2e99f603d4..9a6b87ce213 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3alloc.dtx Copyright (C) 1990-2012 The LaTeX3 Project
+%% File: l3alloc.dtx Copyright (C) 1990-2012,2014 The 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
@@ -33,13 +33,10 @@
%%
%% -----------------------------------------------------------------------
%
-%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3alloc.dtx 4274 2012-11-05 09:16:29Z joseph $
- {L3 Register allocation}
-%</driver|package>
%<*driver>
\documentclass[full]{l3doc}
+\GetIdInfo$Id: l3alloc.dtx 4712 2014-04-30 08:17:49Z joseph $
+ {L3 Register allocation}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
index 9acc07c63da..54fcf80009b 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
@@ -33,13 +33,14 @@
%%
%% -----------------------------------------------------------------------
%
+%<*driver>
+\documentclass[full]{l3doc}
+%</driver>
%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3basics.dtx 4642 2014-01-04 17:28:32Z joseph $
+\GetIdInfo$Id: l3basics.dtx 4728 2014-05-04 13:25:37Z joseph $
{L3 Basic definitions}
%</driver|package>
%<*driver>
-\documentclass[full]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -183,7 +184,7 @@
% \cs{par} tokens but the function will not expand within an
% \texttt{x}-type expansion.
% \end{description}
-%
+%
% Finally, the functions in
% Subsections~\ref{sec:l3basics:defining-new-function-1}~and
% \ref{sec:l3basics:defining-new-function-2} are primarily meant to define
@@ -196,7 +197,7 @@
% described in Section~\ref{sec:l3prg:new-conditional-functions}).
% \item[|p| and |w|] These are special cases.
% \end{description}
-%
+%
% The |\cs_new:| functions below (and friends) do not stop you from using
% other argument specifiers in your function names, but they do not handle
% expansion for you. You should define the base function and then use
@@ -741,7 +742,7 @@
% \abc
% \end{verbatim}
% after two expansions of \cs{use:c}.
-%
+%
% \begin{function}[TF, added = 2012-11-10]
% {\cs_if_exist_use:N,\cs_if_exist_use:c}
% \begin{syntax}
@@ -751,7 +752,7 @@
% (whether as a function or another control sequence type), and if it
% does inserts the \meta{control sequence} into the input stream.
% \end{function}
-%
+%
% \begin{function}[TF,EXP, added = 2012-11-10]
% {\cs_if_exist_use:N,\cs_if_exist_use:c}
% \begin{syntax}
@@ -1294,6 +1295,16 @@
% error.
% \end{function}
%
+% \begin{function}{\__chk_if_exist_var:N}
+% \begin{syntax}
+% \cs{__chk_if_exist_var:N} \meta{var}
+% \end{syntax}
+% This function checks that \meta{var} is defined according to the
+% criteria for \cs{cs_if_free_p:N}, and if not raises a kernel-level
+% error. This function is only created if the package option
+% \texttt{check-declarations} is active.
+% \end{function}
+%
% \begin{function}[EXP]{\__cs_count_signature:N, \__cs_count_signature:c}
% \begin{syntax}
% \cs{__cs_count_signature:N} \meta{function}
@@ -1388,14 +1399,6 @@
%<*initex|package>
% \end{macrocode}
%
-% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\__expl_package_check:
-%</package>
-% \end{macrocode}
-%
% \subsection{Renaming some \TeX{} primitives (again)}
%
% Having given all the \TeX{} primitives a consistent name, we need to
@@ -2458,6 +2461,25 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}[int]{\__chk_if_exist_var:N}
+% Create the checking function for variable definitions when the option
+% is set.
+% \begin{macrocode}
+%<*package>
+\tex_ifodd:D \l@expl@check@declarations@bool
+ \cs_set_protected:Npn \__chk_if_exist_var:N #1
+ {
+ \cs_if_exist:NF #1
+ {
+ \__msg_kernel_error:nnx { check } { non-declared-variable }
+ { \token_to_str:N #1 }
+ }
+ }
+\fi:
+%</package>
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}[int]{\__chk_if_exist_cs:N, \__chk_if_exist_cs:c}
% This function issues an error message when the control sequence
% in its argument does not exist.
@@ -3195,7 +3217,7 @@
}
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\__prg_break_point:}
% \begin{macro}{\__prg_break:, \__prg_break:n}
% Very simple analogues of \cs{__prg_break_point:Nn} and
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
index 9c90e27a197..a5916afd225 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
@@ -36,18 +36,28 @@
%<*driver|package>
% \begin{macro}{\GetIdInfo}
% \begin{macro}[aux]{\GetIdInfoAuxI, \GetIdInfoAuxII, \GetIdInfoAuxIII}
+% \begin{macro}[int]{\GetIdInfoLog}
% The idea here is to extract out the information needed from a standard
% \textsc{svn} \texttt{Id} line, but without a line that will get
% changed when the file is checked in. Hence the fact that there is
% not a line which includes both a dollar sign and the \texttt{Id}
% keyword together!
+%
+% At this stage, no test has taken place for the \eTeX{} extensions, and
+% so using \cs{protected} could give an error. To avoid that, it is used
+% by csname: if it's not available, the bootstrap code will bail out at
+% the point of testing for the necessary primitives, while if it is available
+% then \cs{GetIdInfo} and so on will be properly protected. All of this is
+% then done in a group to avoid leaving \cs{protected} about as equivalent
+% to \cs{relax} if the extensions are unavailable.
% \begin{macrocode}
-\protected\def\GetIdInfo
- {%
- \begingroup
- \catcode 32 = 10 %
- \GetIdInfoAuxI
- }
+\begingroup
+ \csname protected\endcsname\gdef\GetIdInfo
+ {%
+ \begingroup
+ \catcode 32 = 10 %
+ \GetIdInfoAuxI
+ }
% \end{macrocode}
% A first check for a completely empty \textsc{svn} field. If that is
% not the case, there is a second case when a file created using
@@ -56,70 +66,86 @@
% with that is the reason for the space in the line to use
% \cs{GetIdInforAuxII}.
% \begin{macrocode}
-\protected\def\GetIdInfoAuxI$#1$#2%
- {%
- \def\tempa{#1}%
- \def\tempb{Id}%
- \ifx\tempa\tempb
- \def\tempa
- {%
- \endgroup
- \def\ExplFileDate{9999/12/31}%
- \def\ExplFileDescription{#2}%
- \def\ExplFileName{[unknown name]}%
- \def\ExplFileExtension{[unknown extension]}%
- \def\ExplFileVersion{999}%
- }%
- \else
- \def\tempa
- {%
- \endgroup
- \def\ExplFileDescription{#2}%
- \GetIdInfoAuxII$#1 $%
- }%
- \fi
- \tempa
- }
-% \end{macrocode}
-% Here, |#1| is |Id|, |#2| is the file name, |#3| is the extension,
-% |#4| is the version, |#5| is the check in date and |#6| is the check in
-% time and user, plus some trailing spaces. If |#4| is the marker |-1| value
-% then |#5| and |#6| will be empty.
-% \begin{macrocode}
-\protected\def\GetIdInfoAuxII$#1 #2.#3 #4 #5 #6$%
- {%
- \def\ExplFileName{#2}%
- \def\ExplFileExtension{#3}%
- \def\ExplFileVersion{#4}%
- \begingroup
- \def\tempa{#4}%
- \def\tempb{-1}%
+ \csname protected\endcsname\gdef\GetIdInfoAuxI$#1$#2%
+ {%
+ \def\tempa{#1}%
+ \def\tempb{Id}%
\ifx\tempa\tempb
\def\tempa
{%
\endgroup
\def\ExplFileDate{0000/00/00}%
+ \def\ExplFileDescription{#2}%
+ \def\ExplFileName{[unknown name]}%
+ \def\ExplFileExtension{[unknown extension]}%
+ \def\ExplFileDate{-1}%
}%
\else
\def\tempa
{%
\endgroup
- \GetIdInfoAuxIII$#5$%
+ \def\ExplFileDescription{#2}%
+ \GetIdInfoAuxII$#1 $%
}%
\fi
\tempa
- }
+ \GetIdInfoLog
+ }
+% \end{macrocode}
+% Here, |#1| is |Id|, |#2| is the file name, |#3| is the extension,
+% |#4| is the version, |#5| is the check in date and |#6| is the check in
+% time and user, plus some trailing spaces. If |#4| is the marker |-1| value
+% then |#5| and |#6| will be empty.
+% \begin{macrocode}
+ \csname protected\endcsname\gdef\GetIdInfoAuxII$#1 #2.#3 #4 #5 #6$%
+ {%
+ \def\ExplFileName{#2}%
+ \def\ExplFileExtension{#3}%
+ \def\ExplFileVersion{#4}%
+ \begingroup
+ \def\tempa{#4}%
+ \def\tempb{-1}%
+ \ifx\tempa\tempb
+ \def\tempa
+ {%
+ \endgroup
+ \def\ExplFileDate{0000/00/00}%
+ }%
+ \else
+ \def\tempa
+ {%
+ \endgroup
+ \GetIdInfoAuxIII$#5$%
+ }%
+ \fi
+ \tempa
+ }
% \end{macrocode}
% Convert an \textsc{svn}-style date into a \LaTeX{}-style one.
% \begin{macrocode}
-\protected\def\GetIdInfoAuxIII$#1-#2-#3$%
- {%
- \def\ExplFileDate{#1/#2/#3}%
- }
+ \csname protected\endcsname\gdef\GetIdInfoAuxIII$#1-#2-#3$%
+ {%
+ \def\ExplFileDate{#1/#2/#3}%
+ }
+% \end{macrocode}
+% During loading of \pkg{expl3}, module information is added to the log.
+% This function gets redefined once loading is complete.
+% \begin{macrocode}
+ \csname protected\endcsname\gdef\GetIdInfoLog
+ {%
+ \immediate\write-1 %
+ {%
+ L3 Module:
+ \ExplFileName\space
+ \ExplFileDate\space v\ExplFileVersion\space \ExplFileDescription
+ }
+ }
+\endgroup
% \end{macrocode}
% \end{macro}
% \end{macro}
-\GetIdInfo$Id: l3bootstrap.dtx 4640 2014-01-04 16:03:52Z joseph $
+% \end{macro}
+\GetIdInfo$Id: l3bootstrap.dtx 4741 2014-05-05 14:16:57Z joseph $
{L3 Bootstrap code}
%</driver|package>
%<*driver>
@@ -212,9 +238,9 @@
% \ProvidesExplPackage{\ExplFileName}
% {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
% \end{verbatim}
-%
+%
% \subsection{Internal functions and variables}
-%
+%
% \begin{function}{\__expl_package_check:}
% \begin{syntax}
% \cs{__expl_package_check:}
@@ -263,89 +289,20 @@
%</initex>
% \end{macrocode}
%
-% For \LuaTeX{} the extra primitives need to be enabled before
-% they can be used. No \tn{ifdefined} yet, so do it the old-fashioned
-% way. The primitive \tn{strcmp} is simulated using some \Lua{}
-% code, which currently has to be applied to every job as the \Lua{}
-% code is not part of the format. Thanks to Taco Hoekwater for this
-% code. The odd \tn{csname} business is needed so that the later
-% deletion code will work.
+% For \LuaTeX{}, the extra primitives need to be enabled. This is not needed
+% in package mode: plain \TeX{} and Con\TeX{}t have the primitives enabled
+% while \LaTeXe{} has them with the prefix \texttt{luatex} (which is handled
+% in \pkg{l3names}).
% \begin{macrocode}
%<*initex>
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname directlua\endcsname\relax
-\else
- \directlua
- {
- tex.enableprimitives('',tex.extraprimitives ())
- lua.bytecode[1] = function ()
- function strcmp (A, B)
- if A == B then
- tex.write("0")
- elseif A < B then
- tex.write("-1")
- else
- tex.write("1")
- end
- end
- end
- lua.bytecode[1]()
- }
- \everyjob\expandafter
- {\csname\detokenize{luatex_directlua:D}\endcsname{lua.bytecode[1]()}}
- \long\edef\pdfstrcmp#1#2%
- {%
- \expandafter\noexpand\csname\detokenize{luatex_directlua:D}\endcsname
- {%
- strcmp%
- (%
- "\noexpand\luaescapestring{#1}",%
- "\noexpand\luaescapestring{#2}"%
- )%
- }%
- }
+ \directlua{tex.enableprimitives ('', tex.extraprimitives ( ))}
\fi
%</initex>
% \end{macrocode}
%
-% \subsection{Package-specific code part one}
-%
-% The package starts by identifying itself: the information itself is
-% taken from the SVN |Id| string at the start of the source file.
-% \begin{macrocode}
-%<*package>
-\ProvidesPackage{l3bootstrap}
- [%
- \ExplFileDate\space v\ExplFileVersion\space
- L3 Experimental bootstrap code%
- ]
-%</package>
-% \end{macrocode}
-%
-% For \LuaTeX{} the functionality of the \tn{pdfstrcmp} primitive
-% needs to be provided: the \pkg{pdftexmcds} package is used to
-% do this if necessary. At present, there is also a need to deal
-% with some low-level allocation stuff that could usefully be added
-% to \texttt{lualatex.ini}. As it is currently not, load Heiko
-% Oberdiek's \pkg{luatex} package instead.
-% \begin{macrocode}
-%<*package>
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname directlua\endcsname\relax
-\else
- \begingroup
- \def\@tempa
- {%
- \endgroup
- \RequirePackage{luatex}%
- \RequirePackage{pdftexcmds}%
- }%
- \expandafter\@tempa
-\fi
-%</package>
-% \end{macrocode}
-%
-% \subsection{The \tn{pdfstrcmp} primitive in \XeTeX{}}
+% \subsection{The \cs{pdfstrcmp} primitive with \XeTeX{} and \LuaTeX{}}
%
% Only \pdfTeX{} has a primitive called \tn{pdfstrcmp}. The \XeTeX{}
% version is just \tn{strcmp}, so there is some shuffling to do. As
@@ -356,13 +313,82 @@
\let\pdfstrcmp\strcmp
\fi
% \end{macrocode}
-%
+%
+% \begin{macro}{\expl_pdfstrcmp}
+% If \LuaTeX{} is in use then no primitive \cs{(pdf)strcmp} is available.
+% However, it can be emulated using some Lua code. Since this is not
+% the primitive, we do not use a misleading name: instead, a temporary
+% version is set up as \cs{expl_pdfstrcmp}. The latter is then picked up
+% and moved to the correct place by \pkg{l3names}. In earlier versions of
+% the code, the \pkg{pdftexcmds} package was loaded to do this task. However,
+% that raises some issues in \enquote{generic} (it fails with Con\TeX{}t
+% MkIV), and also adds a hardly-needed dependency.
+%
+% Note that \LuaTeX{} prior to version $0.36$ is not supported by
+% \pkg{expl3}: here that means simply skipping the definition, which will
+% then be picked up later. In format mode, the definition needs to be done
+% both during the format construction process and at the start of each
+% job. To achieve that while not requiring a separate file, the Lua code
+% is saved into a macro then used twice. That isn't required for package
+% mode but it does not harm and keeps code-sharing easier.
+% \begin{macrocode}
+\begingroup
+ \expandafter\ifx\csname directlua\endcsname\relax
+ \else
+ \ifnum\luatexversion<36 %
+ \else
+ \catcode`\_=11 %
+ \catcode`\:=11 %
+%<*initex>
+ \def\tempa
+%</initex>
+%<*package>
+ \directlua
+%</package>
+ {%
+ l3kernel = { }
+ function l3kernel.strcmp (A, B)
+ A = A or ""
+ B = B or ""
+ if A == B then
+ tex.write ("0")
+ elseif A < B then
+ tex.write ("-1")
+ else
+ tex.write ("1")
+ end
+ end
+ }
+%<*initex>
+ \directlua{\tempa}
+ \global\everyjob\expandafter
+ {%
+ \expandafter\luatex_directlua:D\expandafter{\tempa}%
+ }
+%</initex>
+ \gdef\expl_pdfstrcmp#1#2%
+ {%
+ \luatex_directlua:D
+ {%
+ l3kernel.strcmp
+ (
+ "\luatex_luaescapestring:D {#1}" ,
+ "\luatex_luaescapestring:D {#2}"
+ )
+ }%
+ }
+ \fi
+ \fi
+\endgroup
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Engine requirements}
%
% The code currently requires functionality equivalent to \tn{pdfstrcmp}
-% in addition to \eTeX{}. In package mode, there is the slight caveat that
-% with \LuaTeX{} emulating this primitive is be done using a different
-% name as the expansion behaviour is different.
+% in addition to \eTeX{}. This is picked up by testing for the \cs{pdfstrcmp}
+% primitive or emulation as \cs{expl_pdfstrcmp}, as the \eTeX{} primitives
+% must be available if it is.
% \begin{macrocode}
\begingroup
\def\ShortText{Required primitives not found}%
@@ -378,260 +404,163 @@
\LineBreak
}%
\expandafter\ifx\csname pdfstrcmp\endcsname\relax
+ \catcode`\_=11 %
+ \expandafter\ifx\csname expl_pdfstrcmp\endcsname\relax
%<*initex>
- \def\LineBreak{^^J}%
- \edef\Error%
- {%
- \endgroup
- \newlinechar`\noexpand\^^J\relax
- \errhelp
- {%
- \LongText
- For pdfTeX and XeTeX the '-etex' command-line switch is also
- needed.\LineBreak
- \LineBreak
- Format building will abort!\LineBreak
- }%
- \errmessage{\ShortText}%
- \noexpand\end
- }%
- \expandafter\Error
-%</initex>
+ \def\LineBreak{^^J}%
+ \edef\Error%
+ {%
+ \endgroup
+ \newlinechar`\noexpand\^^J\relax
+ \errhelp
+ {%
+ \LongText
+ For pdfTeX and XeTeX the '-etex' command-line switch is also
+ needed.\LineBreak
+ \LineBreak
+ Format building will abort!\LineBreak
+ }%
+ \errmessage{\ShortText}%
+ \noexpand\end
+ }%
+%</initex>
%<*package>
- \expandafter\ifx\csname pdf@strcmp\endcsname\relax
\def\LineBreak{\noexpand\MessageBreak}%
\edef\Error%
{%
\endgroup
\noexpand\PackageError{expl3}{\ShortText}
{\LongText Loading of expl3 will abort!}%
- \noexpand\endinput
+ \noexpand\endinput
}%
+%</package>
\expandafter\expandafter\expandafter\Error
\else
\endgroup
\fi
-%</package>
\else
\endgroup
\fi
% \end{macrocode}
%
-% \subsection{Package-specific code part two}
-%
-% \begin{macro}{\ExplSyntaxOff, \ExplSyntaxOn}
-% Experimental syntax switching is set up here for the package-loading
-% process. These are redefined in \pkg{expl3} for the package and in
-% \pkg{l3final} for the format.
+% \subsection{Extending allocators}
+%
+% In format mode, allocating registers is handled by \pkg{l3alloc}. However, in
+% package mode it's much safer to rely on more general code. For example,
+% the ability to extend \TeX{}'s allocation routine to allow for \eTeX{} has
+% been around since 1997 in the \pkg{etex} package.
+%
+% Loading this support is delayed until here as we are now sure that the
+% \eTeX{} extensions and \cs{pdfstrcmp} or equivalent are available. Thus
+% there is no danger of an \enquote{uncontrolled} error if the engine
+% requirements are not met.
+%
+% For \LaTeX{} only, load \pkg{etex} as otherwise we are likely to get into
+% trouble with registers. Some inserts are reserved also as these have to
+% be from the standard pool. Note that \cs{reserveinserts} is \cs{outer}
+% and so is accessed here by csname. In earlier versions, loading \pkg{etex}
+% was done directly and so \cs{reserveinserts} appeared in the code: this
+% then required a \cs{relax} after \cs{RequirePackage} to prevent an error
+% with \enquote{unsafe} definitions as seen for example with \pkg{capoptions}.
+% The optional loading here is done using a group and \cs{ifx} test as we
+% are not quite in the position to have a single name for \cs{pdfstrcmp} just
+% yet.
% \begin{macrocode}
%<*package>
-\protected\edef\ExplSyntaxOff
- {%
- \catcode 9 = \the\catcode 9\relax
- \catcode 32 = \the\catcode 32\relax
- \catcode 34 = \the\catcode 34\relax
- \catcode 38 = \the\catcode 38\relax
- \catcode 58 = \the\catcode 58\relax
- \catcode 94 = \the\catcode 94\relax
- \catcode 95 = \the\catcode 95\relax
- \catcode 124 = \the\catcode 124\relax
- \catcode 126 = \the\catcode 126\relax
- \endlinechar = \the\endlinechar\relax
- \chardef\csname\detokenize{l__kernel_expl_bool}\endcsname = 0 \relax
- }
-\protected\edef\ExplSyntaxOn
- {%
- \catcode 9 = 9 \relax
- \catcode 32 = 9 \relax
- \catcode 34 = 12 \relax
- \catcode 58 = 11 \relax
- \catcode 94 = 7 \relax
- \catcode 95 = 11 \relax
- \catcode 124 = 12 \relax
- \catcode 126 = 10 \relax
- \endlinechar = 32 \relax
- \chardef\csname\detokenize{l__kernel_expl_bool}\endcsname = 1 \relax
- }
-%</package>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{variable}{\l__kernel_expl_bool}
-% The status for experimental code syntax: this is off at present. This
-% code is used by both the package and the format.
-% \begin{macrocode}
-\expandafter\chardef\csname\detokenize{l__kernel_expl_bool}\endcsname = 0 \relax
-% \end{macrocode}
-%\end{variable}
-%
-% \subsection{Dealing with package-mode meta-data}
-%
-% \begin{macro}{\GetIdInfo}
-% This is implemented right at the start of \texttt{l3bootstrap.dtx}.
-% \end{macro}
-%
-% \begin{macro}{\ProvidesExplPackage, \ProvidesExplClass, \ProvidesExplFile}
-% For other packages and classes building on this one it is convenient
-% not to need \cs{ExplSyntaxOn} each time.
-% \begin{macrocode}
-%<*package>
-\protected\def\ProvidesExplPackage
- {%
- \@ifpackageloaded{expl3}
- {}
- {%
- \PackageError{expl3}
- {Cannot load the expl3 modules separately}
- {%
- The expl3 modules cannot be loaded separately;\MessageBreak
- please \string\usepackage\string{expl3\string} instead.%
- }%
- }%
- \protected\def\ProvidesExplPackage##1##2##3##4%
+\begingroup
+ \def\@tempa{LaTeX2e}
+ \def\next{}
+ \ifx\fmtname\@tempa
+ \def\next
{%
- \ProvidesPackage{##1}[##2 v##3 ##4]%
- \ExplSyntaxOn
- }%
- \ProvidesExplPackage
- }
-\protected\def\ProvidesExplClass#1#2#3#4%
- {%
- \ProvidesClass{#1}[#2 v#3 #4]%
- \ExplSyntaxOn
- }
-\protected\def\ProvidesExplFile#1#2#3#4%
- {%
- \ProvidesFile{#1}[#2 v#3 #4]%
- \ExplSyntaxOn
- }
+ \RequirePackage{etex}%
+ \csname reserveinserts\endcsname{32}%
+ }
+ \fi
+\expandafter\endgroup
+\next
%</package>
% \end{macrocode}
-% \end{macro}
%
-% \begin{macro}{\@pushfilename, \@popfilename}
-% The idea here is to use \LaTeXe{}'s \tn{@pushfilename} and
-% \tn{@popfilename} to track the current syntax status. This can be
-% achieved by saving the current status flag at each push to a stack,
-% then recovering it at the pop stage and checking if the code
-% environment should still be active.
+% If \LuaTeX{} is in use there are more allocators to create. Con\TeX{}t
+% already does that, so skip any loading in that case: this is done using the
+% \cs{newattribute} allocator. Otherwise, there is a need for a test to
+% differentiate between \LaTeXe{} and plain.
% \begin{macrocode}
%<*package>
-\edef\@pushfilename
- {%
- \edef\expandafter\noexpand
- \csname\detokenize{l_@@_status_stack_tl}\endcsname
- {%
- \noexpand\ifodd\expandafter\noexpand
- \csname\detokenize{l__kernel_expl_bool}\endcsname
- 1%
- \noexpand\else
- 0%
- \noexpand\fi
- \expandafter\noexpand
- \csname\detokenize{l_@@_status_stack_tl}\endcsname
- }%
- \ExplSyntaxOff
- \unexpanded\expandafter{\@pushfilename}%
- }
-\edef\@popfilename
- {%
- \unexpanded\expandafter{\@popfilename}%
- \noexpand\if a\expandafter\noexpand\csname
- \detokenize{l_@@_status_stack_tl}\endcsname a%
- \ExplSyntaxOff
- \noexpand\else
- \noexpand\expandafter
- \expandafter\noexpand\csname
- \detokenize{@@_status_pop:w}\endcsname
- \expandafter\noexpand\csname
- \detokenize{l_@@_status_stack_tl}\endcsname
- \noexpand\@nil
- \noexpand\fi
- }
+\ifdefined\directlua
+ \ifdefined\newattribute
+ \else
+ \ifdefined\RequirePackage
+ \RequirePackage{luatex}
+ \else
+ \input luatex.sty %
+ \fi
+ \fi
+\fi
%</package>
% \end{macrocode}
-% \end{macro}
%
-% \begin{macro}{\l_@@_status_stack_tl}
-% As \pkg{expl3} itself cannot be loaded with the code environment
-% already active, at the end of the package \cs{ExplSyntaxOff} can
-% safely be called.
-% \begin{macrocode}
-%<*package>
-\@namedef{\detokenize{l_@@_status_stack_tl}}{0}
-%</package>
-% \end{macrocode}
-% \end{macro}
+% \subsection{The \LaTeX3 code environment}
+%
+% The code environment is now set up.
%
-% \begin{macro}[aux]{\@@_status_pop:w}
-% The pop auxiliary function removes the first item from the stack,
-% saves the rest of the stack and then does the test. As
-% \cs{ExplSyntaxOff} is already defined as a protected macro, there
-% is no need for \tn{noexpand} here.
+% \begin{macro}{\ExplSyntaxOff}
+% Before changing any category codes, in package mode we need to save
+% the situation before loading. Note the set up here means that once applied
+% \cs{ExplSyntaxOff} will be a \enquote{do nothing} command until
+% \cs{ExplSyntaxOn} is used. For format mode, there is no need to save
+% category codes so that step is skipped.
% \begin{macrocode}
+\protected\def\ExplSyntaxOff{}
%<*package>
-\expandafter\edef\csname\detokenize{@@_status_pop:w}\endcsname#1#2\@nil
+\protected\edef\ExplSyntaxOff
{%
- \def\expandafter\noexpand
- \csname\detokenize{l_@@_status_stack_tl}\endcsname{#2}%
- \noexpand\ifodd#1\space
- \noexpand\expandafter\noexpand\ExplSyntaxOn
- \noexpand\else
- \noexpand\expandafter\ExplSyntaxOff
- \noexpand\fi
+ \protected\def\ExplSyntaxOff{}%
+ \catcode 9 = \the\catcode 9\relax
+ \catcode 32 = \the\catcode 32\relax
+ \catcode 34 = \the\catcode 34\relax
+ \catcode 38 = \the\catcode 38\relax
+ \catcode 58 = \the\catcode 58\relax
+ \catcode 94 = \the\catcode 94\relax
+ \catcode 95 = \the\catcode 95\relax
+ \catcode 124 = \the\catcode 124\relax
+ \catcode 126 = \the\catcode 126\relax
+ \endlinechar = \the\endlinechar\relax
+ \chardef\csname\detokenize{l__kernel_expl_bool}\endcsname = 0\relax
}
%</package>
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\__expl_package_check:}
-% We want the \pkg{expl3} bundle to be loaded \enquote{as one};
-% this command is used to ensure that one of the |l3| packages isn't loaded
-% on its own.
+% The code environment is now set up.
% \begin{macrocode}
-%<*package>
-\expandafter\protected\expandafter\def
- \csname\detokenize{__expl_package_check:}\endcsname
- {%
- \@ifpackageloaded{expl3}
- {}
- {%
- \PackageError{expl3}
- {Cannot load the expl3 modules separately}
- {%
- The expl3 modules cannot be loaded separately;\MessageBreak
- please \string\usepackage\string{expl3\string} instead.%
- }%
- }%
- }
-%</package>
+\catcode 9 = 9\relax
+\catcode 32 = 9\relax
+\catcode 34 = 12\relax
+\catcode 58 = 11\relax
+\catcode 94 = 7\relax
+\catcode 95 = 11\relax
+\catcode 124 = 12\relax
+\catcode 126 = 10\relax
+\endlinechar = 32\relax
% \end{macrocode}
-% \end{macro}
%
-% \subsection{The \LaTeX3 code environment}
-%
-% The code environment is now set up for the format: the package deals
-% with this using \cs{ProvidesExplPackage}.
+% \begin{variable}{\l__kernel_expl_bool}
+% The status for experimental code syntax: this is on at present.
% \begin{macrocode}
-%<*initex>
-\catcode 9 = 9 \relax
-\catcode 32 = 9 \relax
-\catcode 34 = 12 \relax
-\catcode 58 = 11 \relax
-\catcode 94 = 7 \relax
-\catcode 95 = 11 \relax
-\catcode 124 = 12 \relax
-\catcode 126 = 10 \relax
-\endlinechar = 32 \relax
-%</initex>
+\chardef\l__kernel_expl_bool = 1 ~
% \end{macrocode}
+%\end{variable}
%
-% \begin{macro}{\ExplSyntaxOn, \ExplSyntaxOff}
+% \begin{macro}{\ExplSyntaxOn}
% The idea here is that multiple \cs{ExplSyntaxOn} calls are not
% going to mess up category codes, and that multiple calls to
-% \cs{ExplSyntaxOff} are also not wasting time.
+% \cs{ExplSyntaxOff} are also not wasting time. Applying
+% \cs{ExplSyntaxOn} will alter the definition of \cs{ExplSyntaxOff}
+% and so in package mode this function should not be used until after
+% the end of the loading process!
% \begin{macrocode}
-%<*initex>
\protected \def \ExplSyntaxOn
{
\bool_if:NF \l__kernel_expl_bool
@@ -665,20 +594,9 @@
\tex_endlinechar:D = 32 \scan_stop:
\bool_set_true:N \l__kernel_expl_bool
}
-\protected \def \ExplSyntaxOff { }
-%</initex>
% \end{macrocode}
% \end{macro}
%
-% \begin{variable}{\l__kernel_expl_bool}
-% A flag to show the current syntax status.
-% \begin{macrocode}
-%<*initex>
-\chardef \l__kernel_expl_bool = 0 ~
-%</initex>
-% \end{macrocode}
-% \end{variable}
-%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
index 537ae210617..6c481ee323f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3box.dtx Copyright (C) 2005-2013 The LaTeX3 Project
+%% File: l3box.dtx Copyright (C) 2005-2014 The 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
@@ -33,13 +33,14 @@
%%
%% -----------------------------------------------------------------------
%
+%<*driver>
+\documentclass[full]{l3doc}
+%</driver>
%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3box.dtx 4581 2013-07-28 08:38:50Z joseph $
+\GetIdInfo$Id: l3box.dtx 4728 2014-05-04 13:25:37Z joseph $
{L3 Experimental boxes}
%</driver|package>
%<*driver>
-\documentclass[full]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -328,7 +329,7 @@
% \end{syntax}
% Shows full details of the content of the \meta{box} in the terminal.
% \end{function}
-%
+%
% \begin{function}[added = 2012-05-11]{\box_show:Nnn, \box_show:cnn}
% \begin{syntax}
% \cs{box_show:Nnn} \meta{box} \meta{intexpr_1} \meta{intexpr_2}
@@ -337,14 +338,14 @@
% \meta{intexpr_1} items of the box, and descending into \meta{intexpr_2}
% group levels.
% \end{function}
-%
+%
% \begin{function}[added = 2012-05-11]{\box_log:N, \box_log:c}
% \begin{syntax}
% \cs{box_show:N} \meta{box}
% \end{syntax}
% Writes full details of the content of the \meta{box} to the log.
% \end{function}
-%
+%
% \begin{function}[added = 2012-05-11]{\box_log:Nnn, \box_log:cnn}
% \begin{syntax}
% \cs{box_show:Nnn} \meta{box} \meta{intexpr_1} \meta{intexpr_2}
@@ -650,17 +651,9 @@
% \begin{macrocode}
%<*initex|package>
% \end{macrocode}
-%
-% \begin{macrocode}
-%<@@=box>
-% \end{macrocode}
%
% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\__expl_package_check:
-%</package>
+%<@@=box>
% \end{macrocode}
%
% The code in this module is very straight forward so I'm not going to
@@ -678,7 +671,7 @@
\cs_new_protected:Npn \box_new:N #1
{
\__chk_if_free_cs:N #1
- \newbox #1
+ \cs:w newbox \cs_end: #1
}
%</package>
\cs_generate_variant:Nn \box_new:N { c }
@@ -927,7 +920,7 @@
% \end{variable}
%
% \subsection{Viewing box contents}
-%
+%
% \TeX{}'s \tn{tex_showbox:D} is not really that helpful in many cases, and
% it is also inconsistent with other \LaTeX3{} \texttt{show} functions as it
% does not actually shows material in the terminal. So we provide a richer
@@ -946,7 +939,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
-%
+%
% \begin{macro}{\box_log:N, \box_log:c}
% \begin{macro}{\box_log:Nnn, \box_log:cnn}
% Getting \TeX{} to write to the log without interruption the run is done by
@@ -970,7 +963,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
-%
+%
% \begin{macro}[aux]{\@@_show:NNnn}
% The internal auxiliary to actually do the output uses a group to deal
% with breadth and depth values. The \cs{use:n} here gives better output
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
index 65f3e70e5cc..2c77af11e46 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3candidates.dtx Copyright(C) 2012,2013 The LaTeX3 Project
+%% File: l3candidates.dtx Copyright(C) 2012-2014 The 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
@@ -34,13 +34,14 @@
%% -----------------------------------------------------------------------
%%
%
+%<*driver>
+\documentclass[full]{l3doc}
+%</driver>
%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3candidates.dtx 4643 2014-01-06 13:28:06Z joseph $
+\GetIdInfo$Id: l3candidates.dtx 4734 2014-05-04 21:48:49Z joseph $
{L3 Experimental additions to l3kernel}
%</driver|package>
%<*driver>
-\documentclass[full]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -194,7 +195,7 @@
%
% \begin{texnote}
% Clipping is implemented by the driver, and as such the full content of
-% the box is places in the output file. Thus clipping does not remove
+% the box is placed in the output file. Thus clipping does not remove
% any information from the raw output, and hidden material can therefore
% be viewed by direct examination of the file.
% \end{texnote}
@@ -879,14 +880,6 @@
%<*initex|package>
% \end{macrocode}
%
-% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\__expl_package_check:
-%</package>
-% \end{macrocode}
-%
% \subsection{Additions to \pkg{l3box}}
%
% \begin{macrocode}
@@ -1394,7 +1387,7 @@
\hbox_set:Nn \l_@@_internal_box
{
\box_move_down:nn { #3 - \box_dp:N #1 }
- { \box_use:N \l_@@_internal_box }
+ { \box_use:N \l_@@_internal_box }
}
\box_set_dp:Nn \l_@@_internal_box \c_zero_dim
}
@@ -1769,7 +1762,7 @@
% \begin{macrocode}
\hbox_set:Nn \l_@@_internal_box
{
- \tex_kern:D
+ \tex_kern:D
\__dim_eval:w
\l_@@_bounding_shift_dim - \l_@@_left_corner_dim
\__dim_eval_end:
@@ -1789,7 +1782,7 @@
\box_set_dp:Nn \l_@@_internal_box { 0 pt }
\box_set_wd:Nn \l_@@_internal_box
{ \l_@@_right_corner_dim - \l_@@_left_corner_dim }
- \hbox_set:Nn #1 { \box_use:N \l_@@_internal_box }
+ \hbox_set:Nn #1 { \box_use:N \l_@@_internal_box }
% \end{macrocode}
% The final task is to move the poles and corners such that they are
% back in alignment with the box reference point.
@@ -2347,7 +2340,7 @@
% \begin{macrocode}
\cs_new:Npn \seq_mapthread_function:NNN #1#2#3
{ \exp_after:wN \@@_mapthread_function:wNN #2 \q_stop #1 #3 }
-\cs_new:Npn \@@_mapthread_function:wNN \s_@@ #1 \q_stop #2#3
+\cs_new:Npn \@@_mapthread_function:wNN \s_@@ #1 \q_stop #2#3
{
\exp_after:wN \@@_mapthread_function:wNw #2 \q_stop #3
#1 { ? \__prg_break: } { }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
index 9b26d172cae..dcd332df4ae 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
@@ -2,7 +2,7 @@
%
%% File: l3clist.dtx Copyright (C) 2004-2011 Frank Mittelbach,
%% The LaTeX3 project
-%% (C) 2012,2013 The LaTeX3 Project
+%% (C) 2012-2014 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -35,13 +35,14 @@
%%
%% -----------------------------------------------------------------------
%
+%<*driver>
+\documentclass[full]{l3doc}
+%</driver>
%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3clist.dtx 4581 2013-07-28 08:38:50Z joseph $
+\GetIdInfo$Id: l3clist.dtx 4728 2014-05-04 13:25:37Z joseph $
{L3 Comma separated lists}
%</driver|package>
%<*driver>
-\documentclass[full]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -466,10 +467,10 @@
% For example,
% \begin{verbatim}
% \clist_set:Nn \l_tmpa_clist { a , b , , c , {de} , f }
-% \clist_use:Nn \l_tmpa_clist { ~and~ }
+% \clist_use:Nn \l_tmpa_clist { ~and~ }
% \end{verbatim}
% will insert \enquote{\texttt{a and b and c and de and f}} in the input
-% stream.
+% stream.
% \begin{texnote}
% The result is returned within the \tn{unexpanded}
% primitive (\cs{exp_not:n}), which means that the \meta{items}
@@ -624,14 +625,6 @@
%<@@=clist>
% \end{macrocode}
%
-% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\__expl_package_check:
-%</package>
-% \end{macrocode}
-%
% \begin{variable}{\c_empty_clist}
% An empty comma list is simply an empty token list.
% \begin{macrocode}
@@ -1363,7 +1356,7 @@
{ \__prg_map_break:Nn \clist_map_break: }
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\clist_count:N, \clist_count:c, \clist_count:n}
% \begin{macro}[aux]{\@@_count:n}
% \begin{macro}[aux]{\@@_count:w}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
index 7197d72e18f..f9c0d414665 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3coffins.dtx Copyright(C) 2010-2012 The LaTeX3 Project
+%% File: l3coffins.dtx Copyright(C) 2010-2014 The 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
@@ -34,13 +34,14 @@
%% -----------------------------------------------------------------------
%%
%
+%<*driver>
+\documentclass[full]{l3doc}
+%</driver>
%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3coffins.dtx 4624 2013-12-14 13:58:48Z bruno $
+\GetIdInfo$Id: l3coffins.dtx 4728 2014-05-04 13:25:37Z joseph $
{L3 Coffin code layer}
%</driver|package>
%<*driver>
-\documentclass[full]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -280,7 +281,7 @@
% \begin{function}[updated = 2011-09-02]
% {\coffin_display_handles:Nn, \coffin_display_handles:cn}
% \begin{syntax}
-% \cs{coffin_display_handles:Nn} \meta{coffin} \Arg{colour}
+% \cs{coffin_display_handles:Nn} \meta{coffin} \Arg{color}
% \end{syntax}
% This function first calculates the intersections between all of
% the \meta{poles} of the \meta{coffin} to give a set of
@@ -288,20 +289,20 @@
% location in the source, with the position of the \meta{handles}
% marked on the coffin. The \meta{handles} will be labelled as part
% of this process: the locations of the \meta{handles} and the labels
-% are both printed in the \meta{colour} specified.
+% are both printed in the \meta{color} specified.
% \end{function}
%
% \begin{function}[updated = 2011-09-02]
% {\coffin_mark_handle:Nnnn, \coffin_mark_handle:cnnn}
% \begin{syntax}
-% \cs{coffin_mark_handle:Nnnn} \meta{coffin} \Arg{pole_1} \Arg{pole_2} \Arg{colour}
+% \cs{coffin_mark_handle:Nnnn} \meta{coffin} \Arg{pole_1} \Arg{pole_2} \Arg{color}
% \end{syntax}
% This function first calculates the \meta{handle} for the
% \meta{coffin} as defined by the intersection of \meta{pole_1} and
% \meta{pole_2}. It then marks the position of the \meta{handle}
% on the \meta{coffin}. The \meta{handle} will be labelled as part of
% this process: the location of the \meta{handle} and the label are
-% both printed in the \meta{colour} specified.
+% both printed in the \meta{color} specified.
% \end{function}
%
% \begin{function}[updated = 2012-09-09]
@@ -321,13 +322,13 @@
% the later, rather than the absolute values, which determines the
% direction of the pole.
% \end{function}
-%
+%
% \subsection{Constants and variables}
%
% \begin{variable}{\c_empty_coffin}
% A permanently empty coffin.
% \end{variable}
-%
+%
% \begin{variable}[added = 2012-06-19]{\l_tmpa_coffin, \l_tmpb_coffin}
% Scratch coffins for local assignment. These are never used by
% the kernel code, and so are safe for use with any \LaTeX3-defined
@@ -344,17 +345,9 @@
% \begin{macrocode}
%<*initex|package>
% \end{macrocode}
-%
-% \begin{macrocode}
-%<@@=coffin>
-% \end{macrocode}
%
% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\__expl_package_check:
-%</package>
+%<@@=coffin>
% \end{macrocode}
%
% \subsection{Coffins: data structures and general variables}
@@ -710,7 +703,7 @@
% \end{variable}
% \end{variable}
% \end{variable}
-%
+%
% \begin{variable}{\l_tmpa_coffin, \l_tmpb_coffin}
% The usual scratch space.
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3color.dtx b/Master/texmf-dist/source/latex/l3kernel/l3color.dtx
index caf5f258333..ea0dd4d2799 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3color.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3color.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3color.dtx Copyright(C) 2011,2012 The LaTeX3 Project
+%% File: l3color.dtx Copyright(C) 2011,2012,2014 The 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
@@ -34,13 +34,14 @@
%% -----------------------------------------------------------------------
%%
%
+%<*driver>
+\documentclass[full]{l3doc}
+%</driver>
%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3color.dtx 4156 2012-08-29 11:10:09Z joseph $
+\GetIdInfo$Id: l3color.dtx 4712 2014-04-30 08:17:49Z joseph $
{L3 Experimental color support}
%</driver|package>
%<*driver>
-\documentclass[full]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -48,7 +49,7 @@
% \fi
%
% \title{^^A
-% The \textsf{l3color} package\\ Colour support^^A
+% The \textsf{l3color} package\\ Color support^^A
% \thanks{This file describes v\ExplFileVersion,
% last revised \ExplFileDate.}^^A
% }
@@ -72,7 +73,7 @@
% material here is mainly intended to support a small number of low-level
% requirements in other \pkg{l3kernel} modules.
%
-% \section{Colour in boxes}
+% \section{Color in boxes}
%
% Controlling the color of text in boxes requires a small number of control
% functions, so that the boxed material uses the color at the point where
@@ -107,14 +108,6 @@
%<*initex|package>
% \end{macrocode}
%
-% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\__expl_package_check:
-%</package>
-% \end{macrocode}
-%
% \begin{macro}{\color_group_begin:, \color_group_end:}
% Grouping for color is almost the same as using the basic \cs{group_begin:}
% and \cs{group_end:} functions. However, in vertical mode the end-of-group
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
index 073a979140e..0419b628342 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3doc.dtx Copyright (C) 1990-2012 The LaTeX3 project
+%% File: l3doc.dtx Copyright (C) 1990-2014 The 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
@@ -78,7 +78,7 @@ Do not distribute a modified version of this file.
%</driver|class>
%
%<*driver|class>
-\GetIdInfo$Id: l3doc.dtx 4442 2013-01-13 08:56:27Z bruno $
+\GetIdInfo$Id: l3doc.dtx 4728 2014-05-04 13:25:37Z joseph $
{L3 Experimental documentation class}
%</driver|class>
%
@@ -528,7 +528,7 @@ Do not distribute a modified version of this file.
\bool_new:N \l_@@_tested_bool
% \end{macrocode}
%
-%
+%
%
% \subsection{Options and configuration}
%
@@ -591,6 +591,7 @@ Do not distribute a modified version of this file.
array,
alphalph,
amsmath,
+ amssymb,
booktabs,
color,
colortbl,
@@ -1098,7 +1099,7 @@ Do not distribute a modified version of this file.
}
}
% \end{macrocode}
-% False branch for keys and things that aren't actually csnames:
+% False branch for keys and things that aren't actually csnames:
% \begin{macrocode}
{
% for now don't bother splitting into variants:
@@ -1406,12 +1407,12 @@ Do not distribute a modified version of this file.
{ \int_gzero:N \g_@@_nested_macro_int }
{ \int_incr:N \g_@@_nested_macro_int }
- \bool_gset_false:N \l_@@_macro_aux_bool
- \bool_gset_false:N \l_@@_macro_internal_bool
- \bool_gset_false:N \l_@@_macro_TF_bool
- \bool_gset_false:N \l_@@_macro_pTF_bool
- \bool_gset_false:N \l_@@_macro_var_bool
- \bool_gset_false:N \l_@@_tested_bool
+ \bool_set_false:N \l_@@_macro_aux_bool
+ \bool_set_false:N \l_@@_macro_internal_bool
+ \bool_set_false:N \l_@@_macro_TF_bool
+ \bool_set_false:N \l_@@_macro_pTF_bool
+ \bool_set_false:N \l_@@_macro_var_bool
+ \bool_set_false:N \l_@@_tested_bool
\cs_set_eq:NN \@@_macroname_prefix:n \use:n
\cs_set_eq:NN \@@_macroname_suffix: \c_empty_tl
@@ -1487,11 +1488,11 @@ Do not distribute a modified version of this file.
\cs_set_nopar:Npn \@@_macro_single:n #1
{
\int_incr:N \l_@@_macro_int
-
+
\tl_set:Nx \l_@@_at_replaced_macro_tl { \token_to_str:N #1 }
\@@_replace_at_at:N \l_@@_at_replaced_macro_tl
\tl_set_eq:NN \saved@macroname \l_@@_at_replaced_macro_tl
-
+
\topsep\MacroTopsep
\trivlist
\cs_set_nopar:Npn \makelabel ##1 { \llap{##1} }
@@ -1703,8 +1704,8 @@ Do not distribute a modified version of this file.
\tl_replace_all:Non #1 { \token_to_str:N @ } { @ }
\tl_replace_all:Non #1 { \token_to_str:N _ } { _ }
% \end{macrocode}
-% To make the search-and-replace work, in the source of l3doc
-% itself the \verb|@@| search string needs to be protected from
+% To make the search-and-replace work, in the source of l3doc
+% itself the \verb|@@| search string needs to be protected from
% replacement by l3docstrip! This is easy to do by adding a space.
% \begin{macrocode}
\tl_replace_all:Nox #1 { _@ @ } { __ \g_@@_module_name_tl }
@@ -1754,7 +1755,7 @@ Do not distribute a modified version of this file.
\@.
}
{ \seq_item:Nn \g_@@_tmpa_seq {1}\,~and~others. }
-
+
\bool_if:nT
{
!\l_@@_macro_aux_bool &&
@@ -2519,7 +2520,7 @@ Do not distribute a modified version of this file.
% \subsection{Math extras}
%
% For \pkg{l3fp}.
-%
+%
% \begin{macrocode}
\AtBeginDocument
{
@@ -2531,7 +2532,7 @@ Do not distribute a modified version of this file.
{ \exp_args:Nc \DeclareMathOperator{#1}{#1} }
}
% \end{macrocode}
-%
+%
% \begin{macro}{\nan}
% \begin{macrocode}
\NewDocumentCommand { \nan } { } { \text { \texttt { nan } } }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
index df61cb4b0e4..057b93d8acf 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
@@ -85,22 +85,22 @@
% \maketitle
%
% \begin{documentation}
-%
+%
% \section{Extending \textsf{DocStrip}}
-%
+%
% The \pkg{l3docstrip} module adds \LaTeX3 extensions to the \textsf{DocStrip}
% program for extracting code from \texttt{.dtx}. As such, this documentation
% should be read along with that for \textsf{DocStrip}.
-%
+%
% \section{Internal functions and variables}
-%
+%
% An important consideration for \LaTeX3 development is separating out public
% and internal functions. Functions and variables which are private to one
% module should not be used or modified by any other module. As \TeX{} does
% not have any formal namespacing system, this requires a convention for
% indicating which functions in a code-level module are public and which are
% private.
-%
+%
% Using \pkg{l3docstrip} allows internal functions to be indicated using a
% \enquote{two part} system. Within the \texttt{.dtx} file, internal functions
% may be indicated using |@@| in place of the module name, for example
@@ -124,7 +124,7 @@
% % Some code here
% }
% \tl_new:N \l_@@_internal_tl
-% %</package>
+% %</package>
% \end{verbatim}
% will be extracted as
% \begin{verbatim}
@@ -136,13 +136,13 @@
% \end{verbatim}
% where the |__| indicates that the functions and variables are internal
% to the \texttt{foo} module.
-%
+%
% \end{documentation}
-%
+%
% \begin{implementation}
%
% \section{\pkg{l3docstrip} implementation}
-%
+%
% \begin{macrocode}
%<*program>
% \end{macrocode}
@@ -156,8 +156,8 @@
% \begin{macro}{\checkOption}
% The \cs{checkOption} macro is defined by \textsf{DocStrip} and is redefined
% here to accommodate the new \texttt{\%<@} syntax.
-%
-% When the macros that process a line have found that the line starts with
+%
+% When the macros that process a line have found that the line starts with
% \enquote{\texttt{\%<}}, a guard line has been encountered. The first
% character of a guard can be an asterisk (\texttt{*}), a slash (\texttt{/}),
% a plus (\texttt{+}), a minus (\texttt{-}), a less-than sign (\texttt{<})
@@ -215,7 +215,7 @@
\replaceAllIn\inLine{__@@}{__#1}%
\replaceAllIn\inLine{_@@}{__#1}%
\replaceAllIn\inLine{@@}{__#1}%
- }%
+ }%
\fi
}
\endgroup
@@ -270,7 +270,7 @@
}
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macrocode}
%</program>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
index 778038661c1..0347a9625ed 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
@@ -34,13 +34,14 @@
%% -----------------------------------------------------------------------
%%
%
+%<*driver>
+\documentclass[full]{l3doc}
+%</driver>
%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3drivers.dtx 4641 2014-01-04 17:05:41Z joseph $
+\GetIdInfo$Id: l3drivers.dtx 4735 2014-05-05 06:25:42Z joseph $
{L3 Experimental drivers}
%</driver|package>
%<*driver>
-\documentclass[full]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -97,8 +98,11 @@
% \end{syntax}
% Inserts the content of the \meta{box} at the current insertion point
% such that any material outside of the bounding box will not be displayed
-% by the driver. The material in the \meta{box} is still places in the
+% by the driver. The material in the \meta{box} is still placed in the
% output stream: the clipping takes place at a driver level.
+%
+% This function should only be used within a surrounding horizontal
+% box construct.
% \end{function}
%
% \section{Box rotation and scaling}
@@ -179,7 +183,6 @@
{l3xdvidpfmx.def}{\ExplFileDate}{\ExplFileVersion}
{L3 Experimental driver: xdvipdfmx}
%</xdvipdfmx>
-\__expl_package_check:
%</package>
% \end{macrocode}
%
@@ -215,7 +218,7 @@
% \end{macrocode}
%
% \subsection{Driver utility functions}
-%
+%
% \begin{macro}{\@@_state_save:, \@@_state_restore:}
% All of the drivers have a stack for saving the graphic state. These
% have slightly different interfaces. For both \texttt{dvips} and
@@ -260,7 +263,7 @@
%</pdfmode>
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}[int]{\@@_literal:n}
% The driver code needs to pass on a lot of \enquote{raw} information to
% the underlying binary. The exact command is driver-dependent but the
@@ -275,7 +278,7 @@
%</dvipdfmx|xdvipdfmx>
% \end{macrocode}
% In the case of \texttt{dvips} there is no build-in saving of the current
-% position, and so some additional PostScript is required.to set up the
+% position, and so some additional PostScript is required to set up the
% transformation matrix and also to restore it afterwards. Notice the use
% of the stack to save the current position \enquote{up front} and to
% move back to it at the end of the process.
@@ -297,7 +300,7 @@
%</pdfmode>
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}[int]{\@@_literal_direct:n}
% Even \enquote{lower level} than \cs{\@@_literal:n}, these commands do
% not set the transformation matrix but simply dump the driver code directly
@@ -335,7 +338,7 @@
%</dvips>
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}[int]{\@@_matrix:n}
% Here the appropriate function is set up to insert an affine matrix
% into the PDF. With a new enough \pdfTeX{} (version~1.40.0 or later)
@@ -363,7 +366,7 @@
% \end{macro}
%
% \subsection{Box clipping}
-%
+%
% \begin{macro}{\@@_box_use_clip:N}
% The overall logic to clipping a box is the same in all cases. The general
% method is to save the current location, define a clipping path equivalent
@@ -380,7 +383,7 @@
%<*dvips>
\@@_literal:n
{
- \@@_absolute_lengths:n
+ \@@_absolute_lengths:n
{
0~
\__dim_strip_bp:n { \box_dp:N #1 } ~
@@ -418,7 +421,7 @@
% In PDF mode, an affine matrix is used instead. The transformation for
% \texttt{(x)dvipdfmx} can be done either way: the affine approach is
% chosen here as where possible we pick the PDF-style route.
-%
+%
% In both cases, some rounding code is included to limit the floating
% point values to five decimal places. There is no point using any more
% as \TeX{}'s dimensions are of that precision, and the extra figures
@@ -465,13 +468,12 @@
%</dvips>
}
% \end{macrocode}
-% \end{macro}
% The end of a rotation means tidying up the output grouping.
% \begin{macrocode}
\cs_new_eq:NN \@@_box_rotate_end: \@@_state_restore:
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\@@_box_scale_begin:, \@@_box_scale_end:}
% Scaling is not dissimilar to rotation, but the calculations are somewhat
% less complex.
@@ -518,7 +520,7 @@
%<*pdfmode>
\tl_set:Nn \l_@@_current_color_tl { 0~g~0~G }
%</pdfmode>
-%% \end{macrocode}
+% \end{macrocode}
% \end{variable}
%
% \begin{variable}{\l_@@_color_stack_int}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
index fff17ffadcd..6d920d84956 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
@@ -33,13 +33,14 @@
%%
%% -----------------------------------------------------------------------
%
+%<*driver>
+\documentclass[full]{l3doc}
+%</driver>
%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3expan.dtx 4642 2014-01-04 17:28:32Z joseph $
+\GetIdInfo$Id: l3expan.dtx 4712 2014-04-30 08:17:49Z joseph $
{L3 Argument expansion}
%</driver|package>
%<*driver>
-\documentclass[full]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -623,15 +624,6 @@
%<@@=exp>
% \end{macrocode}
%
-% We start by ensuring that the required packages are loaded.
-% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\__expl_package_check:
-%</package>
-% \end{macrocode}
-%
% \begin{macro}{\exp_after:wN}
% \begin{macro}{\exp_not:N}
% \begin{macro}{\exp_not:n}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
index bd9898475a6..45bb0ec7adf 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3file.dtx Copyright (C) 1990-2013 The LaTeX3 Project
+%% File: l3file.dtx Copyright (C) 1990-2014 The 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
@@ -33,13 +33,14 @@
%%
%% -----------------------------------------------------------------------
%
+%<*driver>
+\documentclass[full]{l3doc}
+%</driver>
%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3file.dtx 4596 2013-10-13 21:24:01Z joseph $
+\GetIdInfo$Id: l3file.dtx 4737 2014-05-05 07:37:48Z joseph $
{L3 File and I/O operations}
%</driver|package>
%<*driver>
-\documentclass[full]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -192,7 +193,7 @@
% allocated to \meta{file name} until a \cs{ior_close:N} instruction
% is given or the \TeX{} run ends.
% \end{function}
-%
+%
% \begin{function}[added = 2013-01-12, TF]{\ior_open:Nn, \ior_open:cn}
% \begin{syntax}
% \cs{ior_open:NnTF} \meta{stream} \Arg{file name} \Arg{true code} \Arg{false code}
@@ -416,11 +417,11 @@
% Additional functions may be added to the wrapping by using the
% \meta{set up}, which is executed before the wrapping takes place: this
% may include overriding the substitutions listed.
-%
+%
% Any expandable material in the \meta{text} which is not to be expanded
% on wrapping should be converted to a string using \cs{token_to_str:N},
% \cs{tl_to_str:n}, \cs{tl_to_str:N}, \emph{etc.}
-%
+%
% The result of the wrapping operation is passed as a braced argument to the
% \meta{function}, which will typically be a wrapper around a write
% operation. The output of \cs{iow_wrap:nnnN} (\emph{i.e.}~the argument
@@ -428,7 +429,7 @@
% \enquote{other} (category code~12), with the exception of spaces which
% will have category \enquote{space} (category code~10). This means that the
% output will \emph{not} expand further when written to a file.
-%
+%
% \begin{texnote}
% Internally, \cs{iow_wrap:nnnN} carries out an \texttt{x}-type expansion
% on the \meta{text} to expand it. This is done in such a way that
@@ -551,14 +552,6 @@
%<@@=file>
% \end{macrocode}
%
-% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\__expl_package_check:
-%</package>
-% \end{macrocode}
-%
% \subsection{File operations}
%
% \begin{variable}{\g_file_current_name_tl}
@@ -738,6 +731,7 @@
% \end{macro}
%
% \begin{macro}{\file_input:n}
+% \begin{macro}[int]{\@@_if_exist:nT}
% \begin{macro}[aux]{\@@_input:n \@@_input:V}
% \begin{macro}[aux]{\@@_input_aux:n, \@@_input_aux:o}
% Loading a file is done in a safe way, checking first that the file
@@ -747,13 +741,22 @@
% \begin{macrocode}
\cs_new_protected:Npn \file_input:n #1
{
+ \@@_if_exist:nT {#1}
+ { \@@_input:V \l_@@_internal_name_tl }
+ }
+% \end{macrocode}
+% This code is spun out as a separate function so it is available
+% for other kernel file operations which have the same logic.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_if_exist:nT #1#2
+ {
\file_add_path:nN {#1} \l_@@_internal_name_tl
\quark_if_no_value:NTF \l_@@_internal_name_tl
{
\@@_name_sanitize:nn {#1}
{ \__msg_kernel_error:nnx { kernel } { file-not-found } }
}
- { \@@_input:V \l_@@_internal_name_tl }
+ { #2 }
}
\cs_new_protected:Npn \@@_input:n #1
{
@@ -783,6 +786,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\file_path_include:n}
% \begin{macro}{\file_path_remove:n}
@@ -907,7 +911,7 @@
\cs_generate_variant:Nn \ior_new:N { c }
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\ior_open:Nn, \ior_open:cn}
% \begin{macro}[aux]{\@@_open_aux:Nn}
% Opening an input stream requires a bit of pre-processing. The file name
@@ -929,7 +933,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
-%
+%
% \begin{macro}[TF]{\ior_open:Nn, \ior_open:cn}
% \begin{macro}[aux]{\@@_open_aux:NnTF}
% Much the same idea for opening a read with a conditional, except the
@@ -953,7 +957,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
-%
+%
% \begin{macro}[int]{\@@_open:Nn, \@@_open:No}
% \begin{macro}[aux]{\@@_open_stream:Nn}
% The stream allocation itself uses the fact that there is a list of all of
@@ -974,7 +978,7 @@
%</initex>
%<*package>
{
- \newread #1
+ \cs:w newread \cs_end: #1
\tl_set:Nx \l_@@_stream_tl { \int_eval:n {#1} }
\@@_open_stream:Nn #1 {#2}
}
@@ -1182,7 +1186,7 @@
%</initex>
%<*package>
{
- \newwrite #1
+ \cs:w newwrite \cs_end: #1
\tl_set:Nx \l_@@_stream_tl { \int_eval:n {#1} }
\@@_open_stream:Nn #1 {#2}
}
@@ -1286,7 +1290,7 @@
%
% \begin{macro}{\iow_newline:}
% Global variable holding the character that forces a new line when
-% something is written to an output stream
+% something is written to an output stream.
% \begin{macrocode}
\cs_new_nopar:Npn \iow_newline: { ^^J }
% \end{macrocode}
@@ -1450,6 +1454,7 @@
% \end{macro}
%
% \begin{macro}{\iow_wrap:nnnN}
+% \begin{macro}[aux]{\@@_wrap_set:Nx}
% The main wrapping function works as follows. First give |\\|,
% \verb*|\ | and other formatting commands the correct definition for
% messages, before fully-expanding the input. In package mode, the
@@ -1484,7 +1489,7 @@
\tl_set:Nx \l_@@_wrap_tl {#1}
%</initex>
%<*package>
- \protected@edef \l_@@_wrap_tl {#1}
+ \@@_wrap_set:Nx \l_@@_wrap_tl {#1}
%</package>
% \end{macrocode}
% This is a bit of a hack to measure the string length of the run on text
@@ -1515,6 +1520,15 @@
#4 \l_@@_wrap_tl
}
% \end{macrocode}
+% As using the generic loader will mean that \cs{protected@edef} is
+% not available, it's not placed directly in the wrap function but is set
+% up as an auxiliary. In the generic loader this can then be redefined.
+% \begin{macrocode}
+%<*package>
+\cs_new_eq:NN \@@_wrap_set:Nx \protected@edef
+%</package>
+% \end{macrocode}
+% \end{macro}
% \end{macro}
%
% \begin{macro}[aux]{\@@_wrap_loop:w}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
index 8f1d56ce04f..93bf9a5f987 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3final.dtx Copyright (C) 1990-2013 The LaTeX3 Project
+%% File: l3final.dtx Copyright (C) 1990-2014 The 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
@@ -33,13 +33,10 @@
%%
%% -----------------------------------------------------------------------
%
-%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3final.dtx 4586 2013-08-22 08:09:53Z joseph $
- {L3 Experimental format finalisation}
-%</driver|package>
%<*driver>
\documentclass[full]{l3doc}
+\GetIdInfo$Id: l3final.dtx 4712 2014-04-30 08:17:49Z joseph $
+ {L3 Experimental format finalisation}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -89,18 +86,20 @@
% \end{macro}
%
% The very last job is to dump the format, taking care to first leave
-% the code environment.
+% the code environment and set the appropriate flag.
% \begin{macrocode}
\use:n
{
+ \bool_set_false:N \l__kernel_expl_bool
\char_set_catcode_space:n { 9 } % tab
\char_set_catcode_space:n { 32 } % space
\char_set_catcode_active:n { 34 } % double quote
\char_set_catcode_active:n { 36 } % dollar
\char_set_catcode_active:n { 38 } % ampersand
+ \char_set_catcode_other:n { 58 } % colon
\char_set_catcode_active:n { 94 } % circumflex
\char_set_catcode_active:n { 95 } % underscore
- \char_set_catcode_other:n { 58 } % colon
+ \char_set_catcode_other:n { 124 } % pipe
\char_set_catcode_active:n { 126 } % tilde
\tex_endlinechar:D = 13 \scan_stop:
\tex_newlinechar:D = 10 \scan_stop:
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx
index c7c07218480..cfab331e2a0 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%%
-%% File: l3fp-assign.dtx Copyright (C) 2011-2013 The LaTeX3 project
+%% File: l3fp-assign.dtx Copyright (C) 2011-2014 The LaTeX3 project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -35,10 +35,9 @@
%%
%
%<*driver>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp-assign.dtx 4605 2013-11-19 03:05:27Z bruno $
- {L3 Floating-point assignments}
\documentclass[full]{l3doc}
+\GetIdInfo$Id: l3fp-assign.dtx 4712 2014-04-30 08:17:49Z joseph $
+ {L3 Floating-point assignments}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
index 03708beff6f..e90741a8d56 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3fp-aux.dtx Copyright(C) 2011-2013 The LaTeX3 Project
+%% File: l3fp-aux.dtx Copyright(C) 2011-2014 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -35,8 +35,8 @@
%%
%
%<*driver>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp-aux.dtx 4622 2013-12-14 13:05:45Z bruno $
+\documentclass[full]{l3doc}
+\GetIdInfo$Id: l3fp-aux.dtx 4712 2014-04-30 08:17:49Z joseph $
{L3 Floating-point support functions}
\documentclass[full]{l3doc}
\begin{document}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
index d5ddae31ab0..44d8857b2b5 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3fp-basics.dtx Copyright (C) 2011-2013 The LaTeX3 Project
+%% File: l3fp-basics.dtx Copyright (C) 2011-2014 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -35,10 +35,9 @@
%%
%
%<*driver>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp-basics.dtx 4619 2013-12-14 12:53:54Z bruno $
- {L3 Floating-point arithmetic}
\documentclass[full]{l3doc}
+\GetIdInfo$Id: l3fp-basics.dtx 4712 2014-04-30 08:17:49Z joseph $
+ {L3 Floating-point arithmetic}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -1651,6 +1650,7 @@
{ \@@_sqrt_Newton_o:wwn 17782794; 0; {#1} {#2#3#4#5#6#7#8#9} }
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}[aux, rEXP]{\@@_sqrt_Newton_o:wwn}
% Newton's method maps $x\mapsto\bigl[(x + [10^{8} a_1 / x])/2\bigr]$
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
index 7b7e11bd20f..77b3d54320b 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3fp-convert.dtx Copyright(C) 2011-2013 The LaTeX3 Project
+%% File: l3fp-convert.dtx Copyright(C) 2011-2014 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -35,10 +35,9 @@
%%
%
%<*driver>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp-convert.dtx 4601 2013-11-18 23:13:28Z bruno $
- {L3 Floating-point conversion}
\documentclass[full]{l3doc}
+\GetIdInfo$Id: l3fp-convert.dtx 4712 2014-04-30 08:17:49Z joseph $
+ {L3 Floating-point conversion}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
index 75a68d95846..8c834488183 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3fp-expo.dtx Copyright (C) 2011-2013 The LaTeX3 Project
+%% File: l3fp-expo.dtx Copyright (C) 2011-2014 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -35,10 +35,9 @@
%%
%
%<*driver>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp-expo.dtx 4617 2013-12-14 12:37:59Z bruno $
- {L3 Floating-point exponential-related functions}
\documentclass[full]{l3doc}
+\GetIdInfo$Id: l3fp-expo.dtx 4712 2014-04-30 08:17:49Z joseph $
+ {L3 Floating-point exponential-related functions}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
index fabc72e0392..080e95b6d98 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3fp-extended.dtx Copyright (C) 2011-2013 The LaTeX3 Project
+%% File: l3fp-extended.dtx Copyright (C) 2011-2014 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -35,10 +35,9 @@
%%
%
%<*driver>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp-extended.dtx 4617 2013-12-14 12:37:59Z bruno $
- {L3 Floating-points with extended precision}
\documentclass[full]{l3doc}
+\GetIdInfo$Id: l3fp-extended.dtx 4712 2014-04-30 08:17:49Z joseph $
+ {L3 Floating-points with extended precision}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
index 49f9630c5f3..42ae286d490 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3fp-logic.dtx Copyright (C) 2011-2013 The LaTeX3 Project
+%% File: l3fp-logic.dtx Copyright (C) 2011-2014 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -35,10 +35,9 @@
%%
%
%<*driver>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp-logic.dtx 3504 2012-03-06 06:38:45Z bruno $
- {L3 Floating-point conditionals}
\documentclass[full]{l3doc}
+\GetIdInfo$Id: l3fp-logic.dtx 4712 2014-04-30 08:17:49Z joseph $
+ {L3 Floating-point conditionals}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-old.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-old.dtx
index b336d346ffe..229840bfcf1 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-old.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-old.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3fp-old.dtx Copyright (C) 2012 The LaTeX3 Project
+%% File: l3fp-old.dtx Copyright (C) 2012,2014 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -35,10 +35,9 @@
%%
%
%<*driver>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp-old.dtx 4163 2012-08-30 16:33:11Z bruno $
- {L3 Experimental floating-points (old)}
\documentclass[full]{l3doc}
+\GetIdInfo$Id: l3fp-old.dtx 4712 2014-04-30 08:17:49Z joseph $
+ {L3 Experimental floating-points (old)}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
index 7f8d4c4a194..755d9020d82 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3fp-parse.dtx Copyright (C) 2011-2013 The LaTeX3 Project
+%% File: l3fp-parse.dtx Copyright (C) 2011-2014 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -35,10 +35,9 @@
%%
%
%<*driver>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp-parse.dtx 4622 2013-12-14 13:05:45Z bruno $
- {L3 Floating-point expression parsing}
\documentclass[full]{l3doc}
+\GetIdInfo$Id: l3fp-parse.dtx 4728 2014-05-04 13:25:37Z joseph $
+ {L3 Floating-point expression parsing}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -2240,8 +2239,15 @@
% arithmetic operations. The power operation must be associative in
% the opposite order from all others. For this, we use two distinct
% precedences.
+%
+% The odd requirement to set \cs{+} here is to cover the case where
+% \pkg{expl3} is loaded by plain \TeX{}: \cs{+} is an \cs{outer} macro there,
+% and so the following code would otherwise give an error in that case.
% \begin{macrocode}
\group_begin:
+%<*package>
+ \cs_set_nopar:Npn \+ { }
+%</package>
\char_set_catcode_other:N \&
\char_set_catcode_letter:N \^
\char_set_catcode_letter:N \/
@@ -2614,7 +2620,7 @@
% \end{macro}
% \end{macro}
%
-% \begingroup\catcode`^^@=12\relax % ^^A hack
+% \begingroup\catcode`\^^@=12\relax % ^^A hack
% \begin{macro}[EXP, aux]{\@@_parse_prefix_^^@:Nw}
% \begin{macrocode}
\group_begin:
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
index 556b1960fdd..78ffdfb48de 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3fp-round.dtx Copyright(C) 2011-2012 The LaTeX3 Project
+%% File: l3fp-round.dtx Copyright(C) 2011-2012,2014 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -35,10 +35,9 @@
%%
%
%<*driver>
-\RequirePackage{l3bootstrap}
+\documentclass[full]{l3doc}
\GetIdInfo$Id: l3fp-round.dtx 3549 2012-03-13 20:54:30Z bruno $
{L3 Floating-point rounding}
-\documentclass[full]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
index 3394561ccdf..8ab6c3d7967 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%%
-%% File: l3fp-traps.dtx Copyright (C) 2011-2013 The LaTeX3 Project
+%% File: l3fp-traps.dtx Copyright (C) 2011-2014 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -35,10 +35,9 @@
%%
%
%<*driver>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp-traps.dtx 4622 2013-12-14 13:05:45Z bruno $
- {L3 Floating-point exception trapping}
\documentclass[full]{l3doc}
+\GetIdInfo$Id: l3fp-traps.dtx 4712 2014-04-30 08:17:49Z joseph $
+ {L3 Floating-point exception trapping}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
index 11a058130d1..11415825d54 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3fp-trig.dtx Copyright (C) 2011-2013 The LaTeX3 Project
+%% File: l3fp-trig.dtx Copyright (C) 2011-2014 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -35,10 +35,9 @@
%%
%
%<*driver>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp-trig.dtx 4617 2013-12-14 12:37:59Z bruno $
- {L3 Floating-point trigonometric functions}
\documentclass[full]{l3doc}
+\GetIdInfo$Id: l3fp-trig.dtx 4721 2014-05-03 13:54:09Z joseph $
+ {L3 Floating-point trigonometric functions}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -469,7 +468,7 @@
% $0.6\cdot\text{ulp}$ in all cases.
%
% ^^A todo: if the exponent range is reduced, store 1/2pi as a simple tl
-% \begin{macro}[aux, EXP]{\@@_trig_inverse_two_pi:}
+% \begin{variable}[aux, EXP]{\@@_trig_inverse_two_pi:}
% This macro expands to |,,!| or~|,!| followed by $10112$~decimals of
% $10^{-16}/(2\pi)$. The number of decimals we really need is the
% maximum exponent plus the number of digits we will need later,~$52$,
@@ -981,28 +980,28 @@
% All inverse trigonometric functions (arcsine, arccosine, arctangent,
% arccotangent, arccosecant, and arcsecant) are based on a function
% often denoted \texttt{atan2}. This function is accessed directly by
-% feeding two arguments to arctangent, and is defined by \(\atan(y, x) =
-% \atan(y/x)\) for generic \(y\) and~\(x\). Its advantages over the
+% feeding two arguments to arctangent, and is defined by \(\operatorname{atan}(y, x) =
+% \operatorname{atan}(y/x)\) for generic \(y\) and~\(x\). Its advantages over the
% conventional arctangent is that it takes values in $[-\pi,\pi]$ rather
% than $[-\pi/2,\pi/2]$, and that it is better behaved in boundary
% cases. Other inverse trigonometric functions are expressed in terms
-% of \(\atan\) as
+% of \(\operatorname{atan}\) as
% \begin{align}
-% \operatorname{acos} x & = \atan(\sqrt{1-x^2}, x) \\
-% \operatorname{asin} x & = \atan(x, \sqrt{1-x^2}) \\
-% \operatorname{asec} x & = \atan(\sqrt{x^2-1}, 1) \\
-% \operatorname{acsc} x & = \atan(1, \sqrt{x^2-1}) \\
-% \operatorname{atan} x & = \atan(x, 1) \\
-% \operatorname{acot} x & = \atan(1, x) .
+% \operatorname{acos} x & = \operatorname{atan}(\sqrt{1-x^2}, x) \\
+% \operatorname{asin} x & = \operatorname{atan}(x, \sqrt{1-x^2}) \\
+% \operatorname{asec} x & = \operatorname{atan}(\sqrt{x^2-1}, 1) \\
+% \operatorname{acsc} x & = \operatorname{atan}(1, \sqrt{x^2-1}) \\
+% \operatorname{atan} x & = \operatorname{atan}(x, 1) \\
+% \operatorname{acot} x & = \operatorname{atan}(1, x) .
% \end{align}
% Rather than introducing a new function, \texttt{atan2}, the arctangent
% function \texttt{atan} is overloaded: it can take one or two
% arguments. In the comments below, following many texts, we call the
-% first argument~$y$ and the second~$x$, because $\atan(y, x) = \atan(y
+% first argument~$y$ and the second~$x$, because $\operatorname{atan}(y, x) = \operatorname{atan}(y
% / x)$ is the angular coordinate of the point $(x, y)$.
%
% As for direct trigonometric functions, the first step in computing
-% $\atan(y, x)$ is argument reduction. The sign of~$y$ will give that
+% $\operatorname{atan}(y, x)$ is argument reduction. The sign of~$y$ will give that
% of the result. We distinguish eight regions where the point $(x,
% \lvert y\rvert)$ can lie, of angular size roughly $\pi/8$,
% characterized by their ``octant'', between $0$ and~$7$ included. In
@@ -1012,29 +1011,29 @@
% arctangent (we assume $y>0$: otherwise replace $y$ by~$-y$ below):
% \begin{itemize}
% \item[0] $0 < \lvert y\rvert < 0.41421 x$, then
-% $\atan\frac{\lvert y\rvert}{x}$
+% $\operatorname{atan}\frac{\lvert y\rvert}{x}$
% is given by a nicely convergent Taylor series;
% \item[1] $0 < 0.41421 x < \lvert y\rvert < x$, then
-% $\atan\frac{\lvert y\rvert}{x}
-% = \frac{\pi}{4}-\atan\frac{x-\lvert y\rvert}{x+\lvert y\rvert}$;
+% $\operatorname{atan}\frac{\lvert y\rvert}{x}
+% = \frac{\pi}{4}-\operatorname{atan}\frac{x-\lvert y\rvert}{x+\lvert y\rvert}$;
% \item[2] $0 < 0.41421 \lvert y\rvert < x < \lvert y\rvert$, then
-% $\atan\frac{\lvert y\rvert}{x}
-% = \frac{\pi}{4}+\atan\frac{-x+\lvert y\rvert}{x+\lvert y\rvert}$;
+% $\operatorname{atan}\frac{\lvert y\rvert}{x}
+% = \frac{\pi}{4}+\operatorname{atan}\frac{-x+\lvert y\rvert}{x+\lvert y\rvert}$;
% \item[3] $0 < x < 0.41421 \lvert y\rvert$, then
-% $\atan\frac{\lvert y\rvert}{x}
-% = \frac{\pi}{2}-\atan\frac{x}{\lvert y\rvert}$;
+% $\operatorname{atan}\frac{\lvert y\rvert}{x}
+% = \frac{\pi}{2}-\operatorname{atan}\frac{x}{\lvert y\rvert}$;
% \item[4] $0 < -x < 0.41421 \lvert y\rvert$, then
-% $\atan\frac{\lvert y\rvert}{x}
-% = \frac{\pi}{2}+\atan\frac{-x}{\lvert y\rvert}$;
+% $\operatorname{atan}\frac{\lvert y\rvert}{x}
+% = \frac{\pi}{2}+\operatorname{atan}\frac{-x}{\lvert y\rvert}$;
% \item[5] $0 < 0.41421 \lvert y\rvert < -x < \lvert y\rvert$, then
-% $\atan\frac{\lvert y\rvert}{x}
-% =\frac{3\pi}{4}-\atan\frac{x+\lvert y\rvert}{-x+\lvert y\rvert}$;
+% $\operatorname{atan}\frac{\lvert y\rvert}{x}
+% =\frac{3\pi}{4}-\operatorname{atan}\frac{x+\lvert y\rvert}{-x+\lvert y\rvert}$;
% \item[6] $0 < -0.41421 x < \lvert y\rvert < -x$, then
-% $\atan\frac{\lvert y\rvert}{x}
-% =\frac{3\pi}{4}+\atan\frac{-x-\lvert y\rvert}{-x+\lvert y\rvert}$;
+% $\operatorname{atan}\frac{\lvert y\rvert}{x}
+% =\frac{3\pi}{4}+\operatorname{atan}\frac{-x-\lvert y\rvert}{-x+\lvert y\rvert}$;
% \item[7] $0 < \lvert y\rvert < -0.41421 x$, then
-% $\atan\frac{\lvert y\rvert}{x}
-% = \pi-\atan\frac{\lvert y\rvert}{-x}$.
+% $\operatorname{atan}\frac{\lvert y\rvert}{x}
+% = \pi-\operatorname{atan}\frac{\lvert y\rvert}{-x}$.
% \end{itemize}
% In the following, we will denote by~$z$ the ratio among
% $\lvert\frac{y}{x}\rvert$, $\lvert\frac{x}{y}\rvert$,
@@ -1051,8 +1050,8 @@
% result should be given in radians or in degrees. Here, we dispatch
% according to the number of arguments. The one-argument versions of
% arctangent and arccotangent are special cases of the two-argument
-% ones: $\atan(y) = \atan(y, 1) = \operatorname{acot}(1, y)$ and
-% $\operatorname{acot}(x) = \atan(1, x) = \operatorname{acot}(x, 1)$.
+% ones: $\operatorname{atan}(y) = \operatorname{atan}(y, 1) = \operatorname{acot}(1, y)$ and
+% $\operatorname{acot}(x) = \operatorname{atan}(1, x) = \operatorname{acot}(x, 1)$.
% \begin{macrocode}
\cs_new_nopar:Npn \@@_atan_o:Nw
{
@@ -1091,7 +1090,7 @@
% other, and we call \cs{@@_atan_inf_o:NNNw} with either an argument
% of~$4$, leading to the values $\pm\pi/2$ (in degrees,~$\pm 90$),
% or~$0$, leading to $\{\pm 0, \pm\pi\}$ (in degrees, $\{\pm 0,\pm
-% 180\}$). Since $\operatorname{acot}(x, y) = \atan(y, x)$,
+% 180\}$). Since $\operatorname{acot}(x, y) = \operatorname{atan}(y, x)$,
% \cs{@@_acotii_o:ww} simply reverses its two arguments.
% \begin{macrocode}
\cs_new:Npn \@@_atanii_o:Nww
@@ -1124,9 +1123,9 @@
% on the signs, and its value is a multiple of $\pi/4$. We use the
% same auxiliary as for normal numbers,
% \cs{@@_atan_combine_o:NwwwwwN}, with arguments the final sign~|#2|;
-% the octant~|#3|; $\atan z/z=1$ as a fixed point number; $z=0$~as a
+% the octant~|#3|; $\operatorname{atan} z/z=1$ as a fixed point number; $z=0$~as a
% fixed point number; and $z=0$~as an extended-precision number.
-% Given the values we provide, $\atan z$ will be computed to be~$0$,
+% Given the values we provide, $\operatorname{atan} z$ will be computed to be~$0$,
% and the result will be $[|#3|/2]\cdot\pi/4$ if the sign~|#5| of~$x$
% is positive, and $[(7-|#3|)/2]\cdot\pi/4$ for negative~$x$, where
% the divisions are rounded up.
@@ -1149,7 +1148,7 @@
% extended-precision numbers, that is, a sign, an exponent ending with
% a comma, and a six-block mantissa ending with a semi-colon. This
% extended precision is required by other inverse trigonometric
-% functions, to compute things like $\atan(x,\sqrt{1-x^2})$ without
+% functions, to compute things like $\operatorname{atan}(x,\sqrt{1-x^2})$ without
% intermediate rounding errors.
% \begin{macrocode}
\cs_new_protected:Npn \@@_atan_normal_o:NNnwNnw
@@ -1166,7 +1165,7 @@
% This receives: the sign~|#1| of~$y$, its exponent~|#2|, its $24$
% digits~|#3| in groups of~$4$, and similarly for~$x$. We prepare to
% call \cs{@@_atan_combine_o:NwwwwwN} which expects the sign~|#1|, the
-% octant, the ratio $(\atan z)/z = 1 - \cdots$, and the value of~$z$,
+% octant, the ratio $(\operatorname{atan} z)/z = 1 - \cdots$, and the value of~$z$,
% both as a fixed point number and as an extended-precision floating
% point number with a mantissa in $[0.01,1)$. For now, we place |#1|
% as a first argument, and start an integer expression for the octant.
@@ -1205,9 +1204,9 @@
% started with is closer to the diagonals $\{\lvert y\rvert = \lvert
% x\rvert\}$ than to the axes $\{xy = 0\}$. In that case, the octant
% is~$1$ (possibly combined with the $7-$ and $3-$ inserted earlier)
-% and we wish to compute $\atan\frac{b-a}{a+b}$. Otherwise, the
+% and we wish to compute $\operatorname{atan}\frac{b-a}{a+b}$. Otherwise, the
% octant is~$0$ (again, combined with earlier terms) and we wish to
-% compute $\atan\frac{a}{b}$. In any case, call \cs{@@_atan_auxi:ww}
+% compute $\operatorname{atan}\frac{a}{b}$. In any case, call \cs{@@_atan_auxi:ww}
% followed by~$z$, as a comma-delimited exponent and a fixed point
% number.
% \begin{macrocode}
@@ -1261,12 +1260,12 @@
%
% \begin{macro}[aux, EXP]
% {\@@_atan_Taylor_loop:www, \@@_atan_Taylor_break:w}
-% We compute the series of $(\atan z)/z$. A typical intermediate
+% We compute the series of $(\operatorname{atan} z)/z$. A typical intermediate
% stage has $|#1|=2k-1$, $|#2| =
% \frac{1}{2k+1}-z^2(\frac{1}{2k+3}-z^2(\cdots-z^2\frac{1}{39}))$, and
% $|#3|=z^2$. To go to the next step $k\to k-1$, we compute
% $\frac{1}{2k-1}$, then subtract from it $z^2$ times |#2|. The loop
-% stops when $k=0$: then |#2| is $(\atan z)/z$, and there is a need to
+% stops when $k=0$: then |#2| is $(\operatorname{atan} z)/z$, and there is a need to
% clean up all the unnecessary data, end the integer expression
% computing the octant with a semicolon, and leave the result~|#2|
% afterwards.
@@ -1293,7 +1292,7 @@
% \begin{macro}[aux, EXP]
% {\@@_atan_combine_o:NwwwwwN, \@@_atan_combine_aux:ww}
% This receives a \meta{sign}, an \meta{octant}, a fixed point value
-% of $(\atan z)/z$, a fixed point number~$z$, and another
+% of $(\operatorname{atan} z)/z$, a fixed point number~$z$, and another
% representation of~$z$, as an \meta{exponent} and the fixed point
% number $10^{-\meta{exponent}} z$, followed by either \cs{use_i:nn}
% (when working in radians) or \cs{use_ii:nn} (when working in
@@ -1302,14 +1301,14 @@
% \meta{sign} \left(
% \left\lceil\frac{\meta{octant}}{2}\right\rceil
% \frac{\pi}{4}
-% + (-1)^{\meta{octant}} \frac{\atan z}{z} \cdot z\right) \,,
+% + (-1)^{\meta{octant}} \frac{\operatorname{atan} z}{z} \cdot z\right) \,,
% \end{equation}
% multiplied by $180/\pi$ if working in degrees, and using in any case
% the most appropriate representation of~$z$. The floating point
% result is passed to \cs{@@_sanitize:Nw}, which checks for overflow
% or underflow. If the octant is~$0$, leave the exponent~|#5| for
-% \cs{@@_sanitize:Nw}, and multiply $|#3|=\frac{\atan z}{z}$
-% with~|#6|, the adjusted~$z$. Otherwise, multiply $|#3|=\frac{\atan
+% \cs{@@_sanitize:Nw}, and multiply $|#3|=\frac{\operatorname{atan} z}{z}$
+% with~|#6|, the adjusted~$z$. Otherwise, multiply $|#3|=\frac{\operatorname{atan}
% z}{z}$ with $|#4|=z$, then compute the appropriate multiple of
% $\frac{\pi}{4}$ and add or subtract the product $|#3|\cdot|#4|$. In
% both cases, convert to a floating point with
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
index 586e0f88ed4..6dff7765268 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
@@ -34,13 +34,14 @@
%% -----------------------------------------------------------------------
%%
%
+%<*driver>
+\documentclass[full]{l3doc}
+%</driver>
%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp.dtx 4642 2014-01-04 17:28:32Z joseph $
+\GetIdInfo$Id: l3fp.dtx 4712 2014-04-30 08:17:49Z joseph $
{L3 Floating points}
%</driver|package>
%<*driver>
-\documentclass[full]{l3doc}
\usepackage{amsmath}
\begin{document}
\DocInput{\jobname.dtx}
@@ -1306,19 +1307,7 @@
%
% \section{\pkg{l3fp} implementation}
%
-% \begin{macrocode}
-%<*package>
-% \end{macrocode}
-%
-% \begin{macrocode}
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\__expl_package_check:
-% \end{macrocode}
-%
-% \begin{macrocode}
-%</package>
-% \end{macrocode}
+% Nothing to see here: everything is in the subfiles!
%
% \end{implementation}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
index 17b33143769..2fa99d37bc9 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3int.dtx Copyright (C) 1990-2013 The LaTeX3 Project
+%% File: l3int.dtx Copyright (C) 1990-2014 The 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
@@ -33,13 +33,14 @@
%%
%% -----------------------------------------------------------------------
%
+%<*driver>
+\documentclass[full]{l3doc}
+%</driver>
%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3int.dtx 4583 2013-08-02 19:14:35Z joseph $
+\GetIdInfo$Id: l3int.dtx 4728 2014-05-04 13:25:37Z joseph $
{L3 Integers}
%</driver|package>
%<*driver>
-\documentclass[full]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -605,24 +606,26 @@
% \end{verbatim}
% \end{function}
%
-% \begin{function}[updated = 2011-09-17, EXP]{\int_to_binary:n}
+% \begin{function}[added = 2014-02-11, EXP]{\int_to_bin:n}
% \begin{syntax}
-% \cs{int_to_binary:n} \Arg{integer expression}
+% \cs{int_to_bin:n} \Arg{integer expression}
% \end{syntax}
% Calculates the value of the \meta{integer expression} and places
% the binary representation of the result in the input stream.
% \end{function}
%
-% \begin{function}[updated = 2011-09-17, EXP]{\int_to_hexadecimal:n}
+% \begin{function}[added = 2014-02-11, EXP]{\int_to_hex:n, \int_to_Hex:n}
% \begin{syntax}
-% \cs{int_to_hexadecimal:n} \Arg{integer expression}
+% \cs{int_to_hex:n} \Arg{integer expression}
% \end{syntax}
% Calculates the value of the \meta{integer expression} and places
% the hexadecimal (base~$16$) representation of the result in the
-% input stream. Upper case letters are used for digits beyond $9$.
+% input stream. Letters are used for digits beyond~$9$: lower
+% case letters for \cs{int_to_hex:n} and upper case ones for
+% \cs{int_to_Hex:n}.
% \end{function}
%
-% \begin{function}[updated = 2011-09-17, EXP]{\int_to_octal:n}
+% \begin{function}[added = 2014-02-11, EXP]{\int_to_oct:n}
% \begin{syntax}
% \cs{int_to_octal:n} \Arg{integer expression}
% \end{syntax}
@@ -631,18 +634,21 @@
% stream.
% \end{function}
%
-% \begin{function}[updated = 2011-09-17, EXP]{\int_to_base:nn}
+% \begin{function}[updated = 2014-02-11, EXP]
+% {\int_to_base:nn, \int_to_Base:nn}
% \begin{syntax}
% \cs{int_to_base:nn} \Arg{integer expression} \Arg{base}
% \end{syntax}
% Calculates the value of the \meta{integer expression} and
% converts it into the appropriate representation in the \meta{base};
% the later may be given as an integer expression. For bases greater
-% than $10$ the higher \enquote{digits} are represented by the upper case
-% letters from the English alphabet.
+% than $10$ the higher \enquote{digits} are represented by
+% letters from the English alphabet: lower
+% case letters for \cs{int_to_base:n} and upper case ones for
+% \cs{int_to_Base:n}.
% The maximum \meta{base} value is $36$.
% \begin{texnote}
-% This is a generic version of \cs{int_to_binary:n}, \emph{etc.}
+% This is a generic version of \cs{int_to_bin:n}, \emph{etc.}
% \end{texnote}
% \end{function}
%
@@ -670,17 +676,17 @@
% \cs{int_to_alph:n}.
% \end{function}
%
-% \begin{function}[EXP]{\int_from_binary:n}
+% \begin{function}[added = 2014-02-11, EXP]{\int_from_bin:n}
% \begin{syntax}
-% \cs{int_from_binary:n} \Arg{binary number}
+% \cs{int_from_bin:n} \Arg{binary number}
% \end{syntax}
% Converts the \meta{binary number} into the integer (base~$10$)
% representation and leaves this in the input stream.
% \end{function}
%
-% \begin{function}[EXP]{\int_from_hexadecimal:n}
+% \begin{function}[added = 2014-02-11, EXP]{\int_from_hex:n}
% \begin{syntax}
-% \cs{int_from_binary:n} \Arg{hexadecimal number}
+% \cs{int_from_hex:n} \Arg{hexadecimal number}
% \end{syntax}
% Converts the \meta{hexadecimal number} into the integer
% (base~$10$) representation and leaves this in the input stream.
@@ -688,9 +694,9 @@
% \meta{hexadecimal number} by upper or lower case letters.
% \end{function}
%
-% \begin{function}[EXP]{\int_from_octal:n}
+% \begin{function}[added = 2014-02-11, EXP]{\int_from_oct:n}
% \begin{syntax}
-% \cs{int_from_octal:n} \Arg{octal number}
+% \cs{int_from_oct:n} \Arg{octal number}
% \end{syntax}
% Converts the \meta{octal number} into the integer (base~$10$)
% representation and leaves this in the input stream.
@@ -914,14 +920,6 @@
%
% \TestFiles{m3int001,m3int002,m3int03}
%
-% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\__expl_package_check:
-%</package>
-% \end{macrocode}
-%
% \begin{macro}{\@@_to_roman:w}
% \begin{macro}{\if_int_compare:w}
% Done in \pkg{l3basics}.
@@ -1087,13 +1085,16 @@
% \begin{macro}{\int_new:N, \int_new:c}
% \UnitTested
% Two ways to do this: one for the format and one for the \LaTeXe{}
-% package.
+% package. In plain \TeX{}, \cs{newcount} (and other allocators) are
+% \cs{outer}: to allow the code here to work in \enquote{generic} mode
+% this is therefore accessed by name. (The same applies to \cs{newbox},
+% \cs{newdimen} and so on.)
% \begin{macrocode}
%<*package>
\cs_new_protected:Npn \int_new:N #1
{
\__chk_if_free_cs:N #1
- \newcount #1
+ \cs:w newcount \cs_end: #1
}
%</package>
\cs_generate_variant:Nn \int_new:N { c }
@@ -1830,9 +1831,9 @@
%
% \begin{macro}{\int_to_base:nn}
% \UnitTested
-% \begin{macro}[aux]{\@@_to_base:nn,
-% \@@_to_base:nnN,\@@_to_base:nnnN}
-% \begin{macro}[aux]{\@@_to_letter:n}
+% \begin{macro}[aux]{\@@_to_base:nn, \@@_to_Base:nn,
+% \@@_to_base:nnN,\@@_to_Base:nnN,\@@_to_base:nnnN,\@@_to_Base:nnnN}
+% \begin{macro}[aux]{\@@_to_letter:n, \@@_to_Letter:n}
% \UnitTested
% Converting from base ten (|#1|) to a second base (|#2|) starts with
% computing |#1|: if it is a complicated calculation, we shouldn't
@@ -1842,12 +1843,20 @@
% \begin{macrocode}
\cs_new:Npn \int_to_base:nn #1
{ \exp_args:Nf \@@_to_base:nn { \int_eval:n {#1} } }
+\cs_new:Npn \int_to_Base:nn #1
+ { \exp_args:Nf \@@_to_Base:nn { \int_eval:n {#1} } }
\cs_new:Npn \@@_to_base:nn #1#2
{
\int_compare:nNnTF {#1} < \c_zero
{ \exp_args:No \@@_to_base:nnN { \use_none:n #1 } {#2} - }
{ \@@_to_base:nnN {#1} {#2} \c_empty_tl }
}
+\cs_new:Npn \@@_to_Base:nn #1#2
+ {
+ \int_compare:nNnTF {#1} < \c_zero
+ { \exp_args:No \@@_to_Base:nnN { \use_none:n #1 } {#2} - }
+ { \@@_to_Base:nnN {#1} {#2} \c_empty_tl }
+ }
% \end{macrocode}
% Here, the idea is to provide a recursive system to deal with the
% input. The output is built up after the end of the function.
@@ -1879,6 +1888,26 @@
#4
#1
}
+\cs_new:Npn \@@_to_Base:nnN #1#2#3
+ {
+ \int_compare:nNnTF {#1} < {#2}
+ { \exp_last_unbraced:Nf #3 { \@@_to_Letter:n {#1} } }
+ {
+ \exp_args:Nf \@@_to_Base:nnnN
+ { \@@_to_Letter:n { \int_mod:nn {#1} {#2} } }
+ {#1}
+ {#2}
+ #3
+ }
+ }
+\cs_new:Npn \@@_to_Base:nnnN #1#2#3#4
+ {
+ \exp_args:Nf \@@_to_Base:nnN
+ { \int_div_truncate:nn {#2} {#3} }
+ {#3}
+ #4
+ #1
+ }
% \end{macrocode}
% Convert to a letter only if necessary, otherwise simply return the
% value unchanged. It would be cleaner to use \cs{int_case:nn},
@@ -1893,6 +1922,39 @@
{
\exp_after:wN \exp_after:wN
\if_case:w \@@_eval:w #1 - \c_ten \@@_eval_end:
+ 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
+ \else: \@@_value:w \@@_eval:w #1 \exp_after:wN \@@_eval_end:
+ \fi:
+ }
+\cs_new:Npn \@@_to_Letter:n #1
+ {
+ \exp_after:wN \exp_after:wN
+ \if_case:w \@@_eval:w #1 - \c_ten \@@_eval_end:
A
\or: B
\or: C
@@ -1927,15 +1989,17 @@
%\end{macro}
%\end{macro}
%
-% \begin{macro}{\int_to_binary:n, \int_to_hexadecimal:n, \int_to_octal:n}
+% \begin{macro}{\int_to_bin:n, \int_to_hex:n, \int_to_Hex:n, \int_to_oct:n}
% \UnitTested
% Wrappers around the generic function.
% \begin{macrocode}
-\cs_new:Npn \int_to_binary:n #1
+\cs_new:Npn \int_to_bin:n #1
{ \int_to_base:nn {#1} { 2 } }
-\cs_new:Npn \int_to_hexadecimal:n #1
+\cs_new:Npn \int_to_hex:n #1
{ \int_to_base:nn {#1} { 16 } }
-\cs_new:Npn \int_to_octal:n #1
+\cs_new:Npn \int_to_Hex:n #1
+ { \int_to_Base:nn {#1} { 16 } }
+\cs_new:Npn \int_to_oct:n #1
{ \int_to_base:nn {#1} { 8 } }
% \end{macrocode}
% \end{macro}
@@ -2141,15 +2205,15 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\int_from_binary:n, \int_from_hexadecimal:n, \int_from_octal:n}
+% \begin{macro}{\int_from_bin:n, \int_from_hex:n, \int_from_oct:n}
% \UnitTested
% Wrappers around the generic function.
% \begin{macrocode}
-\cs_new:Npn \int_from_binary:n #1
+\cs_new:Npn \int_from_bin:n #1
{ \int_from_base:nn {#1} \c_two }
-\cs_new:Npn \int_from_hexadecimal:n #1
+\cs_new:Npn \int_from_hex:n #1
{ \int_from_base:nn {#1} \c_sixteen }
-\cs_new:Npn \int_from_octal:n #1
+\cs_new:Npn \int_from_oct:n #1
{ \int_from_base:nn {#1} \c_eight }
% \end{macrocode}
% \end{macro}
@@ -2363,6 +2427,22 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\int_to_binary:n, \int_from_binary:n}
+% \begin{macro}{\int_to_hexadecimal:n, \int_from_hexadecimal:n}
+% \begin{macro}{\int_to_octal:n, \int_from_octal:n}
+% Deprecated 2014-02-11.
+% \begin{macrocode}
+\cs_new_eq:NN \int_to_binary:n \int_to_bin:n
+\cs_new_eq:NN \int_to_hexadecimal:n \int_to_Hex:n
+\cs_new_eq:NN \int_to_octal:n \int_to_oct:n
+\cs_new_eq:NN \int_from_binary:n \int_from_bin:n
+\cs_new_eq:NN \int_from_hexadecimal:n \int_from_hex:n
+\cs_new_eq:NN \int_from_octal:n \int_from_oct:n
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
index a825c0cad3b..f49bd433df4 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3keys.dtx Copyright (C) 2006-2013 The LaTeX3 Project
+%% File: l3keys.dtx Copyright (C) 2006-2014 The 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
@@ -33,13 +33,14 @@
%%
%% -----------------------------------------------------------------------
%
+%<*driver>
+\documentclass[full]{l3doc}
+%</driver>
%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3keys.dtx 4614 2013-12-08 17:07:31Z joseph $
- {L3 Experimental key-value interfaces}
+\GetIdInfo$Id: l3keys.dtx 4728 2014-05-04 13:25:37Z joseph $
+ {L3 Key-value interfaces}
%</driver|package>
%<*driver>
-\documentclass[full]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -281,7 +282,7 @@
% (which must a floating point expression). If the variable does not exist,
% it will be created globally at the point that the key is set up.
% \end{function}
-%
+%
% \begin{function}[added = 2013-07-14]
% {.groups:n}
% \begin{syntax}
@@ -321,7 +322,7 @@
% is used, then the value will be passed through to the subsidiary
% \meta{keys} for processing (as |#1|).
% \end{function}
-%
+%
% \begin{function}[added = 2013-07-10]{.meta:nn}
% \begin{syntax}
% \meta{key} .meta:nn = \Arg{path} \Arg{keyval list}
@@ -330,7 +331,7 @@
% one go using the \meta{path} in place of the current one.
% If \meta{key} is given with a value at the time the key
% is used, then the value will be passed through to the subsidiary
-% \meta{keys} for processing (as |#1|).
+% \meta{keys} for processing (as |#1|).
% \end{function}
%
% \begin{function}[added = 2011-08-21]{.multichoice:}
@@ -488,7 +489,7 @@
% These variables do not have defined behaviour when used outside of
% code created using \texttt{.choices:nn}
% (\emph{i.e.}~anything might happen).
-%
+%
% It is possible to allow choice keys to take values which have not previously
% been defined by adding code for the special \texttt{unknown} choice. The
% general behavior of the \texttt{unknown} key is described in
@@ -501,16 +502,16 @@
% key / choice-a .code:n = code-a,
% key / choice-b .code:n = code-b,
% key / choice-c .code:n = code-c,
-% key / unknown .code:n =
+% key / unknown .code:n =
% \msg_error:nnxxx { mymodule } { unknown-choice }
% { key } % Name of choice key
% { choice-a , choice-b , choice-c } % Valid choices
% { \exp_not:n {#1} } % Invalid choice given
% %
-% %
+% %
% }
% \end{verbatim}
-%
+%
% Multiple choices are created in a very similar manner to mutually-exclusive
% choices, using the properties \texttt{.multichoice:} and
% \texttt{.multichoices:nn}. As with mutually exclusive choices, multiple
@@ -538,8 +539,8 @@
% key / choice-c .code:n = code-c,
% }
% \end{verbatim}
-% are valid.
-%
+% are valid.
+%
% When a multiple choice key is set
% \begin{verbatim}
% \keys_set:nn { mymodule }
@@ -557,9 +558,9 @@
% key = c ,
% }
% \end{verbatim}
-% Thus each separate choice will have passed to it the
+% Thus each separate choice will have passed to it the
% \cs{l_keys_choice_tl} and \cs{l_keys_choice_int} in exactly
-% the same way as described for \texttt{.choices:nn}.
+% the same way as described for \texttt{.choices:nn}.
%
% \section{Setting keys}
%
@@ -573,17 +574,17 @@
% by defining a special \texttt{unknown} key: this will be illustrated
% later.
% \end{function}
-%
+%
% \begin{variable}{\l_keys_key_tl, \l_keys_path_tl, \l_keys_value_tl}
% For each key processed, information of the full \emph{path} of the
% key, the \emph{name} of the key and the \emph{value} of the key is
% available within three token list variables. These may be used within
% the code of the key.
-%
+%
% The \emph{value} is everything after the \texttt{=}, which may be
% empty if no value was given. This is stored in \cs{l_keys_value_tl}, and
% is not processed in any way by \cs{keys_set:nn}.
-%
+%
% The \emph{path} of the key is a \enquote{full} description of the key,
% and is unique for each key. It consists of the module and full key name,
% thus for example
@@ -596,7 +597,7 @@
% \end{verbatim}
% has path \texttt{mymodule/subset/key-a}. This information is stored in
% \cs{l_keys_path_tl}, and will have been processed by \cs{tl_to_str:n}.
-%
+%
% The \emph{name} of the key is the part of the path after the last
% \texttt{/}, and thus is not unique. In the preceding examples, both keys
% have name \texttt{key-a} despite having different paths. This information
@@ -619,7 +620,7 @@
% }
% \end{verbatim}
%
-% \begin{function}[added = 2011-08-23]
+% \begin{function}[added = 2011-08-23, updated = 2014-04-27]
% {
% \keys_set_known:nnN, \keys_set_known:nVN,
% \keys_set_known:nvN, \keys_set_known:noN,
@@ -636,13 +637,16 @@
% are not processed further by the parser.
% The key--value pairs for each \emph{unknown} key name will be
% stored in the \meta{tl} in a comma-separated form (\emph{i.e.}~an edited
-% version of the \meta{keyval list}). The \cs{keys_set_known:nn} version skips
-% this stage.
+% version of the \meta{keyval list}). The \cs{keys_set_known:nn} version
+% skips this stage.
+%
+% Use of \cs{keys_set_known:nnN} can be nested, with the correct residual
+% \meta{keyval list} returned at each stage.
% \end{function}
-%
+%
% \section{Selective key setting}
% \label{sec:l3keys:selective}
-%
+%
% In some cases it may be useful to be able to select only some keys for
% setting, even though these keys have the same path. For example, with
% a set of keys defined using
@@ -675,12 +679,12 @@
% will assign \texttt{key-one} and \texttt{key-two} to group \texttt{first},
% \texttt{key-three} to group \texttt{second}, while \texttt{key-four} is
% not assigned to a group.
-%
+%
% Selective key setting may be achieved either by selecting one or more
% groups to be made \enquote{active}, or by marking one or more groups to
% be ignored in key setting.
-%
-% \begin{function}[added = 2013-07-14]
+%
+% \begin{function}[added = 2013-07-14, updated = 2014-04-27]
% {
% \keys_set_filter:nnnN, \keys_set_filter:nnVN,
% \keys_set_filter:nnvN, \keys_set_filter:nnoN,
@@ -697,8 +701,11 @@
% key which is filtered out will be stored in the \meta{tl} in a
% comma-separated form (\emph{i.e.}~an edited version of the \meta{keyval
% list}). The \cs{keys_set_filter:nnn} version skips this stage.
+%
+% Use of \cs{keys_set_filter:nnnN} can be nested, with the correct residual
+% \meta{keyval list} returned at each stage.
% \end{function}
-%
+%
% \begin{function}[added = 2013-07-14]
% {
% \keys_set_groups:nnn, \keys_set_groups:nnV,
@@ -826,14 +833,6 @@
%<*initex|package>
% \end{macrocode}
%
-% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\__expl_package_check:
-%</package>
-% \end{macrocode}
-%
% \subsection{Low-level interface}
%
% \begin{macrocode}
@@ -1077,7 +1076,7 @@
\tl_new:N \l_keys_choice_tl
% \end{macrocode}
% \end{variable}
-%
+%
% \begin{variable}{\l_@@_groups_clist}
% Used for storing and recovering the list of groups which apply to a key:
% set as a comma list but at one point we have to use this for a token
@@ -1108,7 +1107,7 @@
\bool_new:N \l_@@_no_value_bool
% \end{macrocode}
% \end{variable}
-%
+%
% \begin{variable}{\l_@@_only_known_bool}
% Used to track if only \enquote{known} keys are being set.
% \begin{macrocode}
@@ -1131,7 +1130,7 @@
\tl_new:N \l_@@_property_tl
% \end{macrocode}
% \end{variable}
-%
+%
% \begin{variable}{\l_@@_selective_bool, \l_@@_filtered_bool}
% Two flags for using key groups: one to indicate that \enquote{selective}
% setting is active, a second to specify which type (\enquote{opt-in}
@@ -1141,7 +1140,7 @@
\bool_new:N \l_@@_filtered_bool
% \end{macrocode}
% \end{variable}
-%
+%
% \begin{variable}{\l_@@_selective_seq}
% The list of key groups being filtered in or out during selective setting.
% \begin{macrocode}
@@ -1162,7 +1161,7 @@
\tl_new:N \l_keys_value_tl
% \end{macrocode}
% \end{variable}
-%
+%
% \begin{variable}{\l_@@_tmp_bool}
% Scratch space.
% \begin{macrocode}
@@ -1399,7 +1398,7 @@
}
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}[int]{\@@_groups_set:n}
% Assigning a key to one or more groups uses comma lists. So that the comma
% list is \enquote{well-behaved} later, the storage is done via a stored
@@ -1521,7 +1520,7 @@
%
% The key property functions are all wrappers for internal functions,
% meaning that things stay readable and can also be altered later on.
-%
+%
% Importantly, while key properties have \enquote{normal} argument specs, the
% underlying code always supplies one braced argument to these. As such, argument
% expansion is handled by hand rather than using the standard tools. This shows
@@ -1655,7 +1654,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
-%
+%
% \begin{macro}{.groups:n}
% A single property to create groups of keys.
% \begin{macrocode}
@@ -1701,7 +1700,7 @@
{ \@@_meta_make:n {#1} }
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{.meta:nn}
% Meta with path: potentially lots of variants, but for the moment
% no so many defined.
@@ -1816,21 +1815,29 @@
% \keys_set_known:nnN, \keys_set_known:nVN,
% \keys_set_known:nvN, \keys_set_known:noN
% }
+% \begin{macro}[aux]{\@@_set_known:nnnN, \@@_set_known:onnN}
% \begin{macro}
% {
% \keys_set_known:nn, \keys_set_known:nV,
% \keys_set_known:nv, \keys_set_known:no
% }
% Setting known keys simply means setting the appropriate flag, then
-% running the standard code.
+% running the standard code. To allow for nested setting, any existing
+% value of \cs{l_@@_unused_clist} is saved on the stack and reset
+% afterwards.Note that for speed/simplicity reasons we use a \texttt{tl}
+% operation to set the \texttt{clist} here!
% \begin{macrocode}
-\cs_new_protected:Npn \keys_set_known:nnN #1#2#3
+\cs_new_protected_nopar:Npn \keys_set_known:nnN
+ { \@@_set_known:onnN \l_@@_unused_clist }
+\cs_generate_variant:Nn \keys_set_known:nnN { nV , nv , no }
+\cs_new_protected:Npn \@@_set_known:nnnN #1#2#3#4
{
\clist_clear:N \l_@@_unused_clist
- \keys_set_known:nn {#1} {#2}
- \tl_set:Nx #3 { \exp_not:o { \l_@@_unused_clist } }
+ \keys_set_known:nn {#2} {#3}
+ \tl_set:Nx #4 { \exp_not:o { \l_@@_unused_clist } }
+ \tl_set:Nn \l_@@_unused_clist {#1}
}
-\cs_generate_variant:Nn \keys_set_known:nnN { nV , nv , no }
+\cs_generate_variant:Nn \@@_set_known:nnnN { o }
\cs_new_protected:Npn \keys_set_known:nn #1#2
{
\bool_set_true:N \l_@@_only_known_bool
@@ -1841,12 +1848,14 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}
% {
% \keys_set_filter:nnnN, \keys_set_filter:nnVN, \keys_set_filter:nnvN
% \keys_set_filter:nnoN
% }
+% \begin{macro}[aux]{\@@_set_filter:nnnnN, \@@_set_filter:onnnN}
% \begin{macro}
% {
% \keys_set_filter:nnn, \keys_set_filter:nnV, \keys_set_filter:nnv
@@ -1858,15 +1867,20 @@
% \keys_set_groups:nno
% }
% The idea of setting keys in a selective manner again uses flags
-% wrapped around the basic code.
+% wrapped around the basic code. The comments on \cs{keys_set_known:nnN}
+% also apply here.
% \begin{macrocode}
-\cs_new_protected:Npn \keys_set_filter:nnnN #1#2#3#4
+\cs_new_protected_nopar:Npn \keys_set_filter:nnnN
+ { \@@_set_filter:onnnN \l_@@_unused_clist }
+\cs_generate_variant:Nn \keys_set_filter:nnnN { nnV , nnv , nno }
+\cs_new_protected:Npn \@@_set_filter:nnnnN #1#2#3#4#5
{
\clist_clear:N \l_@@_unused_clist
- \keys_set_filter:nnn {#1} {#2} {#3}
- \tl_set:Nx #4 { \exp_not:o { \l_@@_unused_clist } }
+ \keys_set_filter:nnn {#2} {#3} {#4}
+ \tl_set:Nx #5 { \exp_not:o { \l_@@_unused_clist } }
+ \tl_set:Nn \l_@@_unused_clist {#1}
}
-\cs_generate_variant:Nn \keys_set_filter:nnnN { nnV , nnv , nno }
+\cs_generate_variant:Nn \@@_set_filter:nnnnN { o }
\cs_new_protected:Npn \keys_set_filter:nnn #1#2#3
{
\bool_set_true:N \l_@@_selective_bool
@@ -1889,6 +1903,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}[int]{\@@_set_elt:n, \@@_set_elt:nn}
% \begin{macro}[aux]{\@@_set_elt_aux:nn}
@@ -2155,7 +2170,7 @@
{
\c_msg_coding_error_text_tl
Inside~\keys_define:nn each~key~name~
- needs~a~property: \\ \\
+ needs~a~property: \\ \\
\iow_indent:n { #1 .<property> } \\ \\
LaTeX~did~not~find~a~'.'~to~indicate~the~start~of~a~property.
}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
index d6e34107c13..ccecf9c4f48 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3luatex.dtx Copyright (C) 2010-2013 The LaTeX3 Project
+%% File: l3luatex.dtx Copyright (C) 2010-2014 The 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
@@ -33,13 +33,14 @@
%%
%% -----------------------------------------------------------------------
%
+%<*driver>
+\documentclass[full]{l3doc}
+%</driver>
%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3luatex.dtx 4581 2013-07-28 08:38:50Z joseph $
+\GetIdInfo$Id: l3luatex.dtx 4712 2014-04-30 08:17:49Z joseph $
{L3 Experimental LuaTeX-specific functions}
%</driver|package>
%<*driver>
-\documentclass[full]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -234,15 +235,6 @@
%<*initex|package>
% \end{macrocode}
%
-% Announce and ensure that the required packages are loaded.
-% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\__expl_package_check:
-%</package>
-% \end{macrocode}
-%
% \begin{macro}{\lua_now_x:n, \lua_now_x:x}
% \begin{macro}{\lua_now:n, \lua_now:x}
% \begin{macro}{\lua_shipout_x:n, \lua_shipout_x:x}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
index aa3cf3ca654..44a558917aa 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3msg.dtx Copyright (C) 2009-2013 The LaTeX3 Project
+%% File: l3msg.dtx Copyright (C) 2009-2014 The 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
@@ -33,13 +33,14 @@
%%
%% -----------------------------------------------------------------------
%
+%<*driver>
+\documentclass[full]{l3doc}
+%</driver>
%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3msg.dtx 4581 2013-07-28 08:38:50Z joseph $
+\GetIdInfo$Id: l3msg.dtx 4728 2014-05-04 13:25:37Z joseph $
{L3 Messages}
%</driver|package>
%<*driver>
-\documentclass[full]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -231,7 +232,7 @@
% message is given, using |#1| as the name of the \meta{module} to
% be included.
% \end{function}
-%
+%
% \begin{function}[EXP]{\msg_see_documentation_text:n}
% \begin{syntax}
% \cs{msg_see_documentation_text:n} \Arg{module}
@@ -239,7 +240,7 @@
% Produces the standard text
% \begin{quote}
% \ttfamily
-%
+%
% See the \meta{module} documentation for further information.
% \end{quote}
% This function can be redefined to alter the language in which the
@@ -768,17 +769,9 @@
% \begin{macrocode}
%<*initex|package>
% \end{macrocode}
-%
-% \begin{macrocode}
-%<@@=msg>
-% \end{macrocode}
%
% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\__expl_package_check:
-%</package>
+%<@@=msg>
% \end{macrocode}
%
% \begin{variable}{\l_@@_internal_tl}
@@ -905,9 +898,9 @@
\tl_const:Nn \c_msg_continue_text_tl
{ Type~<return>~to~continue }
\tl_const:Nn \c_msg_critical_text_tl
- { Reading~the~current~file~will~stop }
+ { Reading~the~current~file~will~stop. }
\tl_const:Nn \c_msg_fatal_text_tl
- { This~is~a~fatal~error:~LaTeX~will~abort }
+ { This~is~a~fatal~error:~LaTeX~will~abort. }
\tl_const:Nn \c_msg_help_text_tl
{ For~immediate~help~type~H~<return> }
\tl_const:Nn \c_msg_no_info_text_tl
@@ -1350,7 +1343,7 @@
% \begin{macrocode}
\group_end:
% \end{macrocode}
-%
+%
% \begin{macro}[aux]{\@@_class_chk_exist:nT}
% Checking that a message class exists. We build this from
% \cs{cs_if_free:cTF} rather than \cs{cs_if_exist:cTF} because that
@@ -1760,7 +1753,7 @@
\c_msg_return_text_tl
}
\@@_kernel_new:nnnn { kernel } { message-redirect-loop }
- {
+ {
Message~redirection~loop~caused~by~ {#1} ~=>~ {#2}
\tl_if_empty:nF {#3} { ~for~module~' \use_none:n #3 ' } .
}
@@ -1835,6 +1828,19 @@
LaTeX~has~been~asked~to~define~the~conditional~form~'#1'~of~
the~function~'#2',~but~only~'TF',~'T',~'F',~and~'p'~forms~exist.
}
+\bool_if:NT \l@expl@check@declarations@bool
+ {
+ \@@_kernel_new:nnnn { check } { non-declared-variable }
+ { The~variable~#1~has~not~been~declared~\msg_line_context:. }
+ {
+ Checking~is~active,~and~you~have~tried~do~so~something~like: \\
+ \ \ \tl_set:Nn ~ #1 ~ \{ ~ ... ~ \} \\
+ without~first~having: \\
+ \ \ \tl_new:N ~ #1 \\
+ \\
+ LaTeX~will~create~the~variable~and~continue.
+ }
+ }
\@@_kernel_new:nnnn { kernel } { scanmark-already-defined }
{ Scan~mark~#1~already~defined. }
{
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
index 55b9165bfeb..b2e834d843c 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
@@ -33,13 +33,14 @@
%%
%% -----------------------------------------------------------------------
%
-%<*package>
-\RequirePackage{l3bootstrap}[2012/07/15]
-\GetIdInfo$Id: l3names.dtx 4640 2014-01-04 16:03:52Z joseph $
- {L3 Namespace for primitives}
-%</package>
%<*driver>
\documentclass[full]{l3doc}
+%</driver>
+%<*driver|package>
+\GetIdInfo$Id: l3names.dtx 4728 2014-05-04 13:25:37Z joseph $
+ {L3 Namespace for primitives}
+%</driver|package>
+%<*driver>
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -102,11 +103,9 @@
%<*initex|package>
% \end{macrocode}
%
+% No prefix substitution here.
% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-%</package>
+%<@@=>
% \end{macrocode}
%
% The code here simply renames all of the primitives to new, internal,
@@ -596,8 +595,10 @@
\__kernel_primitive:NN \directlua \luatex_directlua:D
\__kernel_primitive:NN \initcatcodetable \luatex_initcatcodetable:D
\__kernel_primitive:NN \latelua \luatex_latelua:D
+ \__kernel_primitive:NN \luaescapestring \luatex_luaescapestring:D
\__kernel_primitive:NN \luatexversion \luatex_luatexversion:D
\__kernel_primitive:NN \savecatcodetable \luatex_savecatcodetable:D
+ \__kernel_primitive:NN \Uchar \luatex_Uchar:D
% \end{macrocode}
% Slightly more awkward are the directional primitives in \LuaTeX{}. These
% come from Omega \emph{via} Aleph, but we do not support those engines and
@@ -614,39 +615,79 @@
% \begin{macrocode}
\tex_endgroup:D
% \end{macrocode}
-%
+% If the underlying engine is Lua\TeX{} then the \tn{pdfstrcmp} primitive
+% is emulated as \cs{expl_pdfstrcmp} as part of the bootstrap process.
+% That can be detected as \cs{pdftex_strcmp:D} will not be defined: is
+% that is the case, copy the code and then remove the temporary emulation.
+% \begin{macrocode}
+\etex_ifdefined:D \pdftex_strcmp:D
+\tex_else:D
+ \tex_let:D \pdftex_strcmp:D \expl_pdfstrcmp
+ \tex_let:D \expl_pdfstrcmp \tex_undefined:D
+\tex_fi:D
+% \end{macrocode}
+%
% \LaTeXe{} will have moved a few primitives, so these are sorted out.
+% A convenient test for \LaTeXe{} is the \cs{@@end} saved primitive.
% \begin{macrocode}
%<*package>
-\tex_let:D \tex_end:D \@@end
-\tex_let:D \tex_everydisplay:D \frozen@everydisplay
-\tex_let:D \tex_everymath:D \frozen@everymath
-\tex_let:D \tex_hyphen:D \@@hyph
-\tex_let:D \tex_input:D \@@input
-\tex_let:D \tex_italiccorrection:D \@@italiccorr
-\tex_let:D \tex_underline:D \@@underline
+\etex_ifdefined:D \@@end
+ \tex_let:D \tex_end:D \@@end
+ \tex_let:D \tex_everydisplay:D \frozen@everydisplay
+ \tex_let:D \tex_everymath:D \frozen@everymath
+ \tex_let:D \tex_hyphen:D \@@hyph
+ \tex_let:D \tex_input:D \@@input
+ \tex_let:D \tex_italiccorrection:D \@@italiccorr
+ \tex_let:D \tex_underline:D \@@underline
% \end{macrocode}
-% That is also true for the \pkg{luatex} package for \LaTeXe{}.
+% That is also true for the \LuaTeX{} primitives under \LaTeXe{}.
% \begin{macrocode}
-\tex_let:D \luatex_catcodetable:D \luatexcatcodetable
-\tex_let:D \luatex_initcatcodetable:D \luatexinitcatcodetable
-\tex_let:D \luatex_latelua:D \luatexlatelua
-\tex_let:D \luatex_savecatcodetable:D \luatexsavecatcodetable
+ \tex_let:D \luatex_catcodetable:D \luatexcatcodetable
+ \tex_let:D \luatex_initcatcodetable:D \luatexinitcatcodetable
+ \tex_let:D \luatex_latelua:D \luatexlatelua
+ \tex_let:D \luatex_luaescapestring:D \luatexluaescapestring
+ \tex_let:D \luatex_savecatcodetable:D \luatexsavecatcodetable
+ \tex_let:D \luatex_Uchar:D \luatexUchar
% \end{macrocode}
% Which also covers those slightly odd ones.
% \begin{macrocode}
-\tex_let:D \luatex_bodydir:D \luatexbodydir
-\tex_let:D \luatex_mathdir:D \luatexmathdir
-\tex_let:D \luatex_pagedir:D \luatexpagedir
-\tex_let:D \luatex_pardir:D \luatexpardir
-\tex_let:D \luatex_textdir:D \luatextextdir
+ \tex_let:D \luatex_bodydir:D \luatexbodydir
+ \tex_let:D \luatex_mathdir:D \luatexmathdir
+ \tex_let:D \luatex_pagedir:D \luatexpagedir
+ \tex_let:D \luatex_pardir:D \luatexpardir
+ \tex_let:D \luatex_textdir:D \luatextextdir
+\tex_fi:D
% \end{macrocode}
-% Finally, in package mode with \LuaTeX{} the \cs{pdfstrcmp} primitive will
-% be emulated as \cs{pdf@strcmp}.
+%
+% For Con\TeX{}t, two tests are needed. Both Mark~II and Mark~IV move several
+% primitives: these are all covered by the first test, again using \cs{end}
+% as a marker. For Mark~IV, a few more primitives are moved: they are
+% implemented using some Lua code in the current Con\TeX{}t.
% \begin{macrocode}
-\etex_ifdefined:D \pdftex_strcmp:D
-\tex_else:D
- \tex_let:D \pdftex_strcmp:D \pdf@strcmp
+\etex_ifdefined:D \normalend
+ \tex_let:D \tex_outer:D \normalouter
+ \tex_let:D \tex_input:D \normalinput
+ \tex_let:D \tex_end:D \normalend
+ \tex_let:D \tex_language:D \normallanguage
+ \tex_let:D \tex_vcenter:D \normalvcneter
+ \tex_let:D \tex_over:D \normalover
+ \tex_let:D \tex_mathop:D \normalmathop
+ \tex_let:D \tex_month:D \normalmonth
+ \tex_let:D \tex_everyjob:D \normaleveryjob
+ \tex_let:D \etex_unexpanded:D \normalunexpanded
+\tex_fi:D
+\etex_ifdefined:D \normalitaliccorrection
+ \tex_let:D \tex_hoffset:D \normalhoffset
+ \tex_let:D \tex_italiccorrection:D \normalitaliccorrection
+ \tex_let:D \tex_voffset:D \normalvoffset
+ \tex_let:D \etex_showtokens:D \normalshowtokens
+ \tex_let:D \luatex_bodydir:D \spac_directions_normal_body_dir
+ \tex_let:D \luatex_pagedir:D \spac_directions_normal_page_dir
+\tex_fi:D
+\etex_ifdefined:D \normalleft
+ \tex_let:D \tex_left:D \normalleft
+ \tex_let:D \tex_middle:D \normalmiddle
+ \tex_let:D \tex_right:D \normalright
\tex_fi:D
%</package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
index 599957933fe..3613101e0b6 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
@@ -33,13 +33,14 @@
%%
%% -----------------------------------------------------------------------
%
+%<*driver>
+\documentclass[full]{l3doc}
+%</driver>
%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3prg.dtx 4642 2014-01-04 17:28:32Z joseph $
+\GetIdInfo$Id: l3prg.dtx 4728 2014-05-04 13:25:37Z joseph $
{L3 Control structures}
%</driver|package>
%<*driver>
-\documentclass[full]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -694,14 +695,6 @@
%<*initex|package>
% \end{macrocode}
%
-% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\__expl_package_check:
-%</package>
-% \end{macrocode}
-%
% \subsection{Primitive conditionals}
%
% \begin{macro}{\if_bool:N}
@@ -823,6 +816,55 @@
% \end{macro}
% \end{macro}
%
+% Booleans are not based on token lists but do need checking: this
+% code complements similar material in \pkg{l3tl}.
+% \begin{macrocode}
+%<*package>
+\tex_ifodd:D \l@expl@check@declarations@bool
+ \cs_set_protected:Npn \bool_set_true:N #1
+ {
+ \__chk_if_exist_var:N #1
+ \cs_set_eq:NN #1 \c_true_bool
+ }
+ \cs_set_protected:Npn \bool_set_false:N #1
+ {
+ \__chk_if_exist_var:N #1
+ \cs_set_eq:NN #1 \c_false_bool
+ }
+ \cs_set_protected:Npn \bool_gset_true:N #1
+ {
+ \__chk_if_exist_var:N #1
+ \cs_gset_eq:NN #1 \c_true_bool
+ }
+ \cs_set_protected:Npn \bool_gset_false:N #1
+ {
+ \__chk_if_exist_var:N #1
+ \cs_gset_eq:NN #1 \c_false_bool
+ }
+ \cs_set_protected:Npn \bool_set_eq:NN #1
+ {
+ \__chk_if_exist_var:N #1
+ \cs_set_eq:NN #1
+ }
+ \cs_set_protected:Npn \bool_gset_eq:NN #1
+ {
+ \__chk_if_exist_var:N #1
+ \cs_gset_eq:NN #1
+ }
+ \cs_set_protected:Npn \bool_set:Nn #1#2
+ {
+ \__chk_if_exist_var:N #1
+ \tex_chardef:D #1 = \bool_if_p:n {#2}
+ }
+ \cs_set_protected:Npn \bool_gset:Nn #1#2
+ {
+ \__chk_if_exist_var:N #1
+ \tex_global:D \tex_chardef:D #1 = \bool_if_p:n {#2}
+ }
+\tex_fi:D
+%</package>
+% \end{macrocode}
+%
% \begin{macro}[pTF]{\bool_if:N, \bool_if:c}
% \UnitTested
% Straight forward here. We could optimize here if we wanted to as
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
index bce67a2fb30..265833a8e10 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3prop.dtx Copyright (C) 1990-2013 The LaTeX3 Project
+%% File: l3prop.dtx Copyright (C) 1990-2014 The 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
@@ -33,13 +33,14 @@
%%
%% -----------------------------------------------------------------------
%
+%<*driver>
+\documentclass[full]{l3doc}
+%</driver>
%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3prop.dtx 4623 2013-12-14 13:53:40Z bruno $
+\GetIdInfo$Id: l3prop.dtx 4712 2014-04-30 08:17:49Z joseph $
{L3 Property lists}
%</driver|package>
%<*driver>
-\documentclass[full]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -494,14 +495,6 @@
%<@@=prop>
% \end{macrocode}
%
-% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\__expl_package_check:
-%</package>
-% \end{macrocode}
-%
% A property list is a macro whose top-level expansion is for the form
% \begin{quote}
% \cs{s_@@}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
index d38da212ecb..e204fe0dec2 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3quark.dtx Copyright (C) 1990-2012 The LaTeX3 Project
+%% File: l3quark.dtx Copyright (C) 1990-2014 The 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
@@ -33,13 +33,14 @@
%%
%% -----------------------------------------------------------------------
%
+%<*driver>
+\documentclass[full]{l3doc}
+%</driver>
%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3quark.dtx 4623 2013-12-14 13:53:40Z bruno $
+\GetIdInfo$Id: l3quark.dtx 4728 2014-05-04 13:25:37Z joseph $
{L3 Quarks}
%</driver|package>
%<*driver>
-\documentclass[full]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -373,7 +374,7 @@
% contexts, they can be used to mark the end of a set of instructions.
% This allows to skip to that point if the end of the instructions
% should not be performed (see \pkg{l3regex}).
-%
+%
% The scan marks system is only for internal use by the kernel team in
% a small number of very specific places. These functions should not be
% used more generally.
@@ -412,14 +413,6 @@
%<*initex|package>
% \end{macrocode}
%
-% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\__expl_package_check:
-%</package>
-% \end{macrocode}
-%
% \subsection{Quarks}
%
% \begin{macro}{\quark_new:N}
@@ -613,7 +606,7 @@
% \end{variable}
%
% \subsection{Scan marks}
-%
+%
% \begin{macrocode}
%<@@=scan>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
index ef713afaa31..6924433ab00 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3seq.dtx Copyright (C) 1990-2013 The LaTeX3 Project
+%% File: l3seq.dtx Copyright (C) 1990-2014 The 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
@@ -33,13 +33,14 @@
%%
%% -----------------------------------------------------------------------
%
+%<*driver>
+\documentclass[full]{l3doc}
+%</driver>
%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3seq.dtx 4623 2013-12-14 13:53:40Z bruno $
+\GetIdInfo$Id: l3seq.dtx 4712 2014-04-30 08:17:49Z joseph $
{L3 Sequences and stacks}
%</driver|package>
%<*driver>
-\documentclass[full]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -767,14 +768,6 @@
%<@@=seq>
% \end{macrocode}
%
-% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\__expl_package_check:
-%</package>
-% \end{macrocode}
-%
% A sequence is a control sequence whose top-level expansion is of the
% form \enquote{\cs{s_@@} \cs{@@_item:n} \marg{item_1} \ldots
% \cs{@@_item:n} \marg{item_n}}, with a leading scan
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
index f7af3985dd1..abd4bac865d 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
%% File: l3skip.dtx Copyright (C) 2004-2011 Frank Mittelbach, The LaTeX3 Project
-%% (C) 2012,2013 The LaTeX3 Project
+%% (C) 2012-2014 The 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
@@ -34,13 +34,14 @@
%%
%% -----------------------------------------------------------------------
%
+%<*driver>
+\documentclass[full]{l3doc}
+%</driver>
%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3skip.dtx 4581 2013-07-28 08:38:50Z joseph $
+\GetIdInfo$Id: l3skip.dtx 4738 2014-05-05 08:00:05Z joseph $
{L3 Dimensions and skips}
%</driver|package>
%<*driver>
-\documentclass[full]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -936,14 +937,6 @@
%<@@=dim>
% \end{macrocode}
%
-% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\__expl_package_check:
-%</package>
-% \end{macrocode}
-%
% \subsection{Length primitives renamed}
%
% \begin{macro}{\if_dim:w}
@@ -968,7 +961,7 @@
\cs_new_protected:Npn \dim_new:N #1
{
\__chk_if_free_cs:N #1
- \newdimen #1
+ \cs:w newdimen \cs_end: #1
}
%</package>
\cs_generate_variant:Nn \dim_new:N { c }
@@ -1351,9 +1344,17 @@
% \end{macro}
%
% \begin{macro}[EXP, int]{\@@_strip_bp:n}
+% Conversion to big points is done using a scaling inside \cs{__dim_eval:w}
+% as \eTeX{} does that using $64$-bit precision. Here, $800/803$ is the
+% integer fraction for $72/72.27$.
% \begin{macrocode}
\cs_new:Npn \@@_strip_bp:n #1
- { \@@_strip_pt:n { 0.996 26 \@@_eval:w #1 \@@_eval_end: } }
+ {
+ \__dim_strip_pt:n
+ {
+ \__dim_eval:w ( #1 ) * 800 / 803 \__dim_eval_end:
+ }
+ }
% \end{macrocode}
% \end{macro}
%
@@ -1446,7 +1447,7 @@
\cs_new_protected:Npn \skip_new:N #1
{
\__chk_if_free_cs:N #1
- \newskip #1
+ \cs:w newskip \cs_end: #1
}
%</package>
\cs_generate_variant:Nn \skip_new:N { c }
@@ -1687,7 +1688,7 @@
\cs_new_protected:Npn \muskip_new:N #1
{
\__chk_if_free_cs:N #1
- \newmuskip #1
+ \cs:w newmuskip \cs_end: #1
}
%</package>
\cs_generate_variant:Nn \muskip_new:N { c }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
index f5164b6f093..befa072b22d 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3tl.dtx Copyright (C) 1990-2013 The LaTeX3 Project
+%% File: l3tl.dtx Copyright (C) 1990-2014 The 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
@@ -33,13 +33,14 @@
%%
%% -----------------------------------------------------------------------
%
+%<*driver>
+\documentclass[full]{l3doc}
+%</driver>
%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3tl.dtx 4625 2013-12-27 15:55:36Z joseph $
+\GetIdInfo$Id: l3tl.dtx 4728 2014-05-04 13:25:37Z joseph $
{L3 Token lists}
%</driver|package>
%<*driver>
-\documentclass[full]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -333,20 +334,28 @@
% \cs{tl_set_rescan:Nnn} \meta{tl~var} \Arg{setup} \Arg{tokens}
% \end{syntax}
% Sets \meta{tl~var} to contain \meta{tokens},
-% applying the category code r{\'e}gime specified in the
+% applying the category code r\'{e}gime specified in the
% \meta{setup} before carrying out the assignment. This allows the
% \meta{tl~var} to contain material with category codes
-% other than those that apply when \meta{tokens} are absorbed. See also
-% \cs{tl_rescan:nn}.
+% other than those that apply when \meta{tokens} are absorbed.
+% Trailing spaces at the end of the \meta{tokens} are discarded
+% in the rescanning process. The \meta{setup} is not limited to
+% changes of category code but may contain any valid input, for
+% example assignment of the expansion of active tokens.
+% See also \cs{tl_rescan:nn}.
% \end{function}
%
% \begin{function}[updated = 2011-12-18]{\tl_rescan:nn}
% \begin{syntax}
% \cs{tl_rescan:nn} \Arg{setup} \Arg{tokens}
% \end{syntax}
-% Rescans \meta{tokens} applying the category code r\'egime specified
+% Rescans \meta{tokens} applying the category code r\'{e}gime specified
% in the \meta{setup}, and leaves the resulting tokens in the input
-% stream. See also \cs{tl_set_rescan:Nnn}.
+% stream. Trailing spaces at the end of the \meta{tokens} are discarded
+% in the rescanning process. The \meta{setup} is not limited to
+% changes of category code but may contain any valid input, for
+% example assignment of the expansion of active tokens.
+% See also \cs{tl_set_rescan:Nnn}.
% \end{function}
%
% \section{Reassigning token list character codes}
@@ -632,29 +641,50 @@
%
% \section{Using token lists}
%
-% \begin{function}[EXP]{\tl_to_str:N, \tl_to_str:c}
+% \begin{function}[EXP]{\tl_to_str:n}
% \begin{syntax}
-% \cs{tl_to_str:N} \meta{tl~var}
+% \cs{tl_to_str:n} \Arg{token list}
% \end{syntax}
-% Converts the content of the \meta{tl~var} into a series of characters
-% with category code $12$ (other) with the exception of spaces, which
-% retain category code $10$ (space). This \meta{string} is then left
-% in the input stream.
+% Converts the \meta{token list} to a \meta{string}, leaving the
+% resulting character tokens in the input stream. A \meta{string}
+% is a series of tokens with category code $12$ (other) with the exception
+% of spaces, which retain category code $10$ (space).
+% \begin{texnote}
+% Converting a \meta{token list} to a \meta{string} yields a
+% concatenation of the string representations of every token in the
+% \meta{token list}.
+% The string representation of a control sequence is
+% \begin{itemize}
+% \item an escape character, whose character code is given by the
+% internal parameter \tn{escapechar}, absent if the
+% \tn{escapechar} is negative;
+% \item the control sequence name, as defined by \cs{cs_to_str:N};
+% \item a space, unless the control sequence name is a single
+% character whose category at the time of expansion of
+% \cs{tl_to_str:n} is not \enquote{letter}.
+% \end{itemize}
+% The string representation of an explicit character token is that
+% character, doubled in the case of (explicit) macro parameter
+% characters (normally |#|).
+% In particular, the string representation of a token list may
+% depend on the category codes in effect when it is evaluated, and
+% the value of the \tn{escapechar}: for instance |\tl_to_str:n {\a}|
+% normally produces the three character \enquote{backslash},
+% \enquote{lower-case a}, \enquote{space}, but it may also produce a
+% single \enquote{lower-case a} if the escape character is negative
+% and \texttt{a} is currently not a letter.
+% \end{texnote}
% \end{function}
%
-% \begin{function}[EXP]{\tl_to_str:n}
+% \begin{function}[EXP]{\tl_to_str:N, \tl_to_str:c}
% \begin{syntax}
-% \cs{tl_to_str:n} \Arg{tokens}
+% \cs{tl_to_str:N} \meta{tl~var}
% \end{syntax}
-% Converts the given \meta{tokens} into a series of characters with
-% category code $12$ (other) with the exception of spaces, which
+% Converts the content of the \meta{tl~var} into a series of characters
+% with category code $12$ (other) with the exception of spaces, which
% retain category code $10$ (space). This \meta{string} is then left
-% in the input stream. Note that this function requires only a single
-% expansion.
-% \begin{texnote}
-% This is the \eTeX{} primitive \tn{detokenize}. Hence its argument
-% \emph{must} be given within braces.
-% \end{texnote}
+% in the input stream. For low-level details, see the notes given for
+% \cs{tl_to_str:n}.
% \end{function}
%
% \begin{function}[EXP]{\tl_use:N, \tl_use:c}
@@ -810,7 +840,7 @@
% \end{verbatim}
% yields \verb*| ab|.
% A blank \meta{token list} (see \cs{tl_if_blank:nTF}) will result in
-% \cs{tl_head:n} leaving nothing in the input stream.
+% \cs{tl_head:n} leaving nothing in the input stream.
% \begin{texnote}
% The result is returned within \cs{exp_not:n}, which means that the token
% list will not expand further when appearing in an \texttt{x}-type
@@ -1047,14 +1077,6 @@
%<@@=tl>
% \end{macrocode}
%
-% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\__expl_package_check:
-%</package>
-% \end{macrocode}
-%
% A token list variable is a \TeX{} macro that holds tokens. By using the
% \eTeX{} primitive \tn{unexpanded} inside a \TeX{} \tn{edef} it is
% possible to store any tokens, including |#|, in this way.
@@ -1159,7 +1181,7 @@
\prg_new_eq_conditional:NNn \tl_if_exist:c \cs_if_exist:c { TF , T , F , p }
% \end{macrocode}
% \end{macro}
-%
+%%
% \subsection{Constant token lists}
%
% \begin{variable}{\c_empty_tl}
@@ -1328,6 +1350,85 @@
% \end{macro}
% \end{macro}
%
+% When used as a package, there is an option to be picky and to
+% check definitions exist. This part of the process is done now, so that
+% variable types based on |tl| (for example |clist|, |seq| and |prop|) will
+% inherit the appropriate definitions.
+% No \cs{tl_map_\ldots} yet as the mechanisms are not fully in place. Thus
+% instead do a more low level set up for a mapping, as in \pkg{l3basics}.
+% \begin{macrocode}
+%<*package>
+\tex_ifodd:D \l@expl@check@declarations@bool
+ \cs_set_protected:Npn \__cs_tmp:w #1
+ {
+ \if_meaning:w ? #1
+ \exp_after:wN \use_none_delimit_by_q_recursion_stop:w
+ \fi:
+ \use:x
+ {
+ \cs_set_protected:Npn #1 \exp_not:n { ##1 ##2 }
+ {
+ \__chk_if_exist_var:N \exp_not:n {##1}
+ \exp_not:o { #1 {##1} {##2} }
+ }
+ }
+ \__cs_tmp:w
+ }
+ \__cs_tmp:w
+ \tl_set:Nn \tl_set:No \tl_set:Nx
+ \tl_gset:Nn \tl_gset:No \tl_gset:Nx
+ \tl_put_left:Nn \tl_put_left:NV
+ \tl_put_left:No \tl_put_left:Nx
+ \tl_gput_left:Nn \tl_gput_left:NV
+ \tl_gput_left:No \tl_gput_left:Nx
+ \tl_put_right:Nn \tl_put_right:NV
+ \tl_put_right:No \tl_put_right:Nx
+ \tl_gput_right:Nn \tl_gput_right:NV
+ \tl_gput_right:No \tl_gput_right:Nx
+ ? \q_recursion_stop
+%</package>
+% \end{macrocode}
+% The two \texttt{set_eq} functions are done by hand as the internals there
+% are a bit different.
+% \begin{macrocode}
+%<*package>
+ \cs_set_protected:Npn \tl_set_eq:NN #1#2
+ {
+ \__chk_if_exist_var:N #1
+ \__chk_if_exist_var:N #2
+ \cs_set_eq:NN #1 #2
+ }
+ \cs_set_protected:Npn \tl_gset_eq:NN #1#2
+ {
+ \__chk_if_exist_var:N #1
+ \__chk_if_exist_var:N #2
+ \cs_gset_eq:NN #1 #2
+ }
+%</package>
+% \end{macrocode}
+% There is also a need to check all three arguments of the
+% \texttt{concat} functions: a token list |#2| or |#3| equal to
+% \cs{scan_stop:} would lead to problems later on.
+% \begin{macrocode}
+%<*package>
+ \cs_set_protected:Npn \tl_concat:NNN #1#2#3
+ {
+ \__chk_if_exist_var:N #1
+ \__chk_if_exist_var:N #2
+ \__chk_if_exist_var:N #3
+ \tl_set:Nx #1 { \exp_not:o {#2} \exp_not:o {#3} }
+ }
+ \cs_set_protected:Npn \tl_gconcat:NNN #1#2#3
+ {
+ \__chk_if_exist_var:N #1
+ \__chk_if_exist_var:N #2
+ \__chk_if_exist_var:N #3
+ \tl_gset:Nx #1 { \exp_not:o {#2} \exp_not:o {#3} }
+ }
+\tex_fi:D
+%</package>
+% \end{macrocode}
+%
% \subsection{Reassigning token list category codes}
%
% \begin{variable}{\c_@@_rescan_marker_tl}
@@ -2259,7 +2360,7 @@
% the closing delimiter: this is the only safe choice, as any other token
% would not be able to parse it's own code. Using a marker, we can see if
% what we are grabbing is exactly the marker, or there is anything else to
-% deal with. Is there is, there is a loop. If not, tidy up and leave the
+% deal with. Is there is, there is a loop. If not, tidy up and leave the
% item in the output stream. More detail in
% \url{http://tex.stackexchange.com/a/70168}.
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
index 7132a1f40c0..ff569c8e8c0 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3token.dtx Copyright (C) 2005-2013 The LaTeX3 Project
+%% File: l3token.dtx Copyright (C) 2005-2014 The 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
@@ -33,13 +33,14 @@
%%
%% -----------------------------------------------------------------------
%
+%<*driver>
+\documentclass[full]{l3doc}
+%</driver>
%<*driver|package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3token.dtx 4587 2013-08-25 21:30:10Z joseph $
+\GetIdInfo$Id: l3token.dtx 4728 2014-05-04 13:25:37Z joseph $
{L3 Experimental token manipulation}
%</driver|package>
%<*driver>
-\documentclass[full]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -956,17 +957,9 @@
% \begin{macrocode}
%<*initex|package>
% \end{macrocode}
-%
-% \begin{macrocode}
-%<@@=token>
-% \end{macrocode}
%
% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\__expl_package_check:
-%</package>
+%<@@=token>
% \end{macrocode}
%
% \subsection{Character tokens}
diff --git a/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx b/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx
index f66febfeaeb..6158b9c21a9 100644
--- a/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx
+++ b/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3keys2e.dtx (C) Copyright 2009,2011-2013 The LaTeX3 Project
+%% File: l3keys2e.dtx (C) Copyright 2009,2011-2014 The 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
@@ -37,8 +37,8 @@
%<*driver|package>
% The version of expl3 required is tested as early as possible, as
% some really old versions do not define \ProvidesExplPackage.
-\RequirePackage{expl3}[2013/12/31]
-%<package>\@ifpackagelater{expl3}{2013/12/31}
+\RequirePackage{expl3}[2014/05/05]
+%<package>\@ifpackagelater{expl3}{2014/05/05}
%<package> {}
%<package> {%
%<package> \PackageError{l3keys2e}{Support package l3kernel too old}
@@ -50,7 +50,7 @@
%<package> }%
%<package> \endinput
%<package> }
-\GetIdInfo$Id: l3keys2e.dtx 4634 2013-12-31 17:32:19Z joseph $
+\GetIdInfo$Id: l3keys2e.dtx 4740 2014-05-05 14:04:24Z joseph $
{LaTeX2e option processing using LaTeX3 keys}
%</driver|package>
%<*driver>
@@ -143,7 +143,7 @@
% \begin{macrocode}
%<*package>
% \end{macrocode}
-%
+%
% \begin{macrocode}
%<@@=keys>
% \end{macrocode}
@@ -153,6 +153,11 @@
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
% \end{macrocode}
%
+% One non-standard variant needed.
+% \begin{macrocode}
+\cs_generate_variant:Nn \clist_put_right:Nn { Nv }
+% \end{macrocode}
+%
% \begin{macro}{\l_@@_latexe_options_clist}
% A single list is used for all options, into which they are collected
% before processing.
@@ -193,7 +198,11 @@
}
}
}
- \keys_set:nV {#1} \l_@@_latexe_options_clist
+ \clist_map_inline:Nn \l_@@_latexe_options_clist
+ {
+ \tl_set:Nn \CurrentOption {##1}
+ \keys_set:nn {#1} {##1}
+ }
\AtEndOfPackage { \cs_set_eq:NN \@unprocessedoptions \scan_stop: }
}
% \end{macrocode}
@@ -230,14 +239,20 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_latexe_options_class:n #1
{
- \keys_if_exist:nnTF {#1} { unknown }
- { \clist_put_right:No \l_@@_latexe_options_clist \@classoptionslist }
+ \cs_if_free:cF { opt@ \@currname . \@currext }
{
- \clist_map_inline:Nn \@classoptionslist
+ \keys_if_exist:nnTF {#1} { unknown }
{
- \keys_if_exist:nnTF {#1} { \@@_latexe_remove_equals:n {##1} }
- { \clist_put_right:Nn \l_@@_latexe_options_clist {##1} }
- { \clist_put_right:Nn \@unusedoptionlist {##1} }
+ \clist_put_right:Nv \l_@@_latexe_options_clist
+ { opt@ \@currname . \@currext }
+ }
+ {
+ \clist_map_inline:cn { opt@ \@currname . \@currext }
+ {
+ \keys_if_exist:nnTF {#1} { \@@_latexe_remove_equals:n {##1} }
+ { \clist_put_right:Nn \l_@@_latexe_options_clist {##1} }
+ { \clist_put_right:Nn \@unusedoptionlist {##1} }
+ }
}
}
}
diff --git a/Master/texmf-dist/source/latex/l3packages/xfrac/xfrac.dtx b/Master/texmf-dist/source/latex/l3packages/xfrac/xfrac.dtx
index 0d3243c8dd8..7a1f982e844 100644
--- a/Master/texmf-dist/source/latex/l3packages/xfrac/xfrac.dtx
+++ b/Master/texmf-dist/source/latex/l3packages/xfrac/xfrac.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
%% File: xfrac.dtx Copyright (C) 2004, 2008-2010 Morten Hoegholm
-%% (C) 2011,2012 The LaTeX3 Project
+%% (C) 2011,2012,2014 The 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
@@ -37,7 +37,7 @@
%
%<*driver|package>
\RequirePackage{amstext,graphicx,l3keys2e,textcomp,xparse,xtemplate}
-\GetIdInfo$Id: xfrac.dtx 4299 2012-11-09 18:48:51Z joseph $
+\GetIdInfo$Id: xfrac.dtx 4728 2014-05-04 13:25:37Z joseph $
{L3 Experimental split-level fractions}
%</driver|package>
%<*driver>
@@ -530,7 +530,7 @@
% \begin{macrocode}
%<*package>
% \end{macrocode}
-%
+%
% \begin{macrocode}
%<@@=xfrac>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx b/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx
index 5c8c0ddaa43..cda5afc4764 100644
--- a/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx
+++ b/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx
@@ -4,7 +4,7 @@
%% David Carlisle
%% (C) Copyright 2004-2008 Frank Mittelbach,
%% The LaTeX3 Project
-%% (C) Copyright 2009-2013 The LaTeX3 Project
+%% (C) Copyright 2009-2014 The 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
@@ -41,8 +41,8 @@
%<*driver|package>
% The version of expl3 required is tested as early as possible, as
% some really old versions do not define \ProvidesExplPackage.
-\RequirePackage{expl3}[2013/12/31]
-%<package>\@ifpackagelater{expl3}{2013/12/31}
+\RequirePackage{expl3}[2014/05/05]
+%<package>\@ifpackagelater{expl3}{2014/05/05}
%<package> {}
%<package> {%
%<package> \PackageError{xparse}{Support package l3kernel too old}
@@ -54,7 +54,7 @@
%<package> }%
%<package> \endinput
%<package> }
-\GetIdInfo$Id: xparse.dtx 4634 2013-12-31 17:32:19Z joseph $
+\GetIdInfo$Id: xparse.dtx 4740 2014-05-05 14:04:24Z joseph $
{L3 Experimental document command parser}
%</driver|package>
%<*driver>
@@ -213,7 +213,7 @@
% \item |#4| = ||
% \item |#5| = |Three|
% \end{itemize}
-%
+%
% Delimited argument types (\texttt{d}, \texttt{o} and \texttt{r}) are
% defined such that they require matched pairs of delimiters when collecting
% an argument. For example
@@ -225,7 +225,7 @@
% Also note that |{| and |}| cannot be used as delimiters as they are used
% by \TeX{} as grouping tokens. Arguments to be grabbed inside these tokens
% must be created as either \texttt{m}- or \texttt{g}-type arguments.
-%
+%
% Within delimited arguments, non-balanced or otherwise awkward tokens may
% be included by protecting the entire argument with a brace pair
% \begin{verbatim}
@@ -280,6 +280,8 @@
% \verb*|\foo{arg1} [arg2]| will not. This is so that trailing optional
% arguments are not picked up \enquote{by accident} in input.
%
+% There is one major exception to the rules listed above: when \pkg{xparse} is used to define what \TeX\ defines as \enquote{control symbols} in which the function name is made up of a single character, such as \enquote{\cmd{\\}}, spaces are \emph{not} ignored directly after them even for mandatory arguments.
+%
% \subsection{Required delimited arguments}
%
% The contrast between a delimited (\texttt{D}-type) and \enquote{required
@@ -339,6 +341,7 @@
% \meta{function}. The argument specification for the function is
% given by \meta{arg spec}, and expanding
% to be replaced by the \meta{code}.
+% \end{function}
%
% As an example:
% \begin{verbatim}
@@ -372,10 +375,9 @@
%
% \begin{texnote}
% Unlike \LaTeXe{}'s \cs{newcommand} and relatives, the
-% \cs{DeclareDocumentCommand} function do not prevent creation of
+% \cs{DeclareDocumentCommand} family of functions do not prevent creation of
% functions with names starting \cs{end\ldots}.
% \end{texnote}
-% \end{function}
%
% \begin{function}
% {
@@ -404,8 +406,10 @@
% \begin{function}[EXP,TF]{\IfNoValue}
% \begin{syntax}
% \cs{IfNoValueTF} \Arg{argument} \Arg{true code} \Arg{false code}
+% \cs{IfNoValueT} \Arg{argument} \Arg{true code}
+% \cs{IfNoValueF} \Arg{argument} \Arg{false code}
% \end{syntax}
-% The \cs{IfNoValue} tests are used to check if \meta{argument} (|#1|,
+% The \cs{IfNoValue(TF)} tests are used to check if \meta{argument} (|#1|,
% |#2|, \emph{etc.}) is the special |-NoValue-| marker For example
% \begin{verbatim}
% \DeclareDocumentCommand \foo { o m }
@@ -418,6 +422,10 @@
% will use a different internal function if the optional argument
% is given than if it is not present.
%
+% Note that three tests are available, depending on which outcome
+% branches are required: \cs{IfNoValueTF}, \cs{IfNoValueT} and
+% \cs{IfNoValueF}.
+%
% As the \cs{IfNoValue(TF)} tests are expandable, it is possible to
% test these values later, for example at the point of typesetting or
% in an expansion context.
@@ -521,7 +529,7 @@
% input. The processed input is placed inside
% $\text{\meta{number}} + 1$ sets of braces for further use.
% If there are fewer than \Arg{number} of \Arg{tokens} in the argument
-% then empty brace groups are added at the end of the processed
+% then \cs{NoValue} markers are added at the end of the processed
% argument.
% \begin{verbatim}
% \DeclareDocumentCommand \foo
@@ -692,7 +700,7 @@
% \begin{macrocode}
%<*package>
% \end{macrocode}
-%
+%
% \begin{macrocode}
%<@@=xparse>
% \end{macrocode}
@@ -703,7 +711,7 @@
% \end{macrocode}
%
% \subsection{Variables and constants}
-%
+%
% \begin{variable}{\c_@@_no_value_tl}
% A special \enquote{awkward} token list: it contains two |-|~tokens with
% different category codes. This is used as the marker for nothing being
@@ -1661,12 +1669,14 @@
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_add_expandable_type_g:w
{
- \__msg_kernel_error:nnx { xparse } { invalid-expandable-argument-type } { g }
+ \__msg_kernel_error:nnx { xparse } { invalid-expandable-argument-type }
+ { g }
\@@_add_expandable_type_m:w
}
\cs_new_protected_nopar:Npn \@@_add_expandable_type_G:w #1
{
- \__msg_kernel_error:nnx { xparse } { invalid-expandable-argument-type } { G }
+ \__msg_kernel_error:nnx { xparse } { invalid-expandable-argument-type }
+ { G }
\@@_add_expandable_type_m:w
}
% \end{macrocode}
@@ -1679,7 +1689,8 @@
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_add_expandable_type_l:w
{
- \__msg_kernel_error:nnx { xparse } { invalid-expandable-argument-type } { l }
+ \__msg_kernel_error:nnx { xparse } { invalid-expandable-argument-type }
+ { l }
\@@_add_expandable_type_m:w
}
% \end{macrocode}
@@ -1753,7 +1764,8 @@
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_add_expandable_type_u:w #1
{
- \__msg_kernel_error:nnx { xparse } { invalid-expandable-argument-type } { u }
+ \__msg_kernel_error:nnx { xparse } { invalid-expandable-argument-type }
+ { u }
\@@_add_expandable_type_m:w
}
% \end{macrocode}
@@ -1764,7 +1776,8 @@
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_add_expandable_type_v:w
{
- \__msg_kernel_error:nnx { xparse } { invalid-expandable-argument-type } { v }
+ \__msg_kernel_error:nnx { xparse } { invalid-expandable-argument-type }
+ { v }
\@@_add_expandable_type_m:w
}
% \end{macrocode}
@@ -3143,20 +3156,20 @@
{
You~have~used~\NewDocumentCommand
with~a~command~that~already~has~a~definition. \\
- The~existing~definition~of~'#1'~will~be~overwritten.
+ The~existing~definition~of~'#1'~will~not~be~altered.
}
\__msg_kernel_new:nnnn { xparse } { command-not-yet-defined }
{ Command ~'#1'~not~yet~defined! }
{
You~have~used~\RenewDocumentCommand
- with~a~command~that~was~never~defined.\\
+ with~a~command~that~was~never~defined. \\
A~new~command~'#1'~will~be~created.
}
\__msg_kernel_new:nnnn { xparse } { environment-already-defined }
{ Environment~'#1'~already~defined! }
{
You~have~used~\NewDocumentEnvironment
- with~an~environment~that~already~has~a~definition.\\
+ with~an~environment~that~already~has~a~definition. \\
The~existing~definition~of~'#1'~will~be~overwritten.
}
\__msg_kernel_new:nnnn { xparse } { environment-mismatch }
@@ -3169,18 +3182,20 @@
{ Environment~'#1'~not~yet~defined! }
{
You~have~used~\RenewDocumentEnvironment
- with~an~environment~that~was~never~defined.\\
+ with~an~environment~that~was~never~defined. \\
A~new~environment~'#1'~will~be~created.
}
\__msg_kernel_new:nnnn { xparse } { environment-unknown }
{ Environment~'#1'~undefined. }
{
You~have~tried~to~start~an~environment~called~'#1',~
- but~this~has~never~been~defined.\\
+ but~this~has~never~been~defined. \\
The~command~will~be~ignored.
}
\__msg_kernel_new:nnnn { xparse } { expandable-ending-optional }
- { Argument~specification~for~expandable~command~ends~with~optional~argument. }
+ {
+ Argument~specification~for~expandable~command~ends~with~optional~argument.
+ }
{
\c_msg_coding_error_text_tl
Expandable~commands~must~have~a~final~mandatory~argument~
@@ -3449,7 +3464,7 @@
% \end{macro}
%
% \subsection{Package options}
-%
+%
% \begin{variable}{\l_@@_options_clist}
% \begin{variable}{\l_@@_log_bool}
% Key--value option to log information: done by hand to keep dependencies
diff --git a/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx b/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx
index 534ebfa4c28..bef0843c51c 100644
--- a/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx
+++ b/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx
@@ -4,7 +4,7 @@
%% David Carlisle
%% (C) Copyright 2004-2010 Frank Mittelbach,
%% The LaTeX3 Project
-%% (C) Copyright 2011-2013 The LaTeX3 Project
+%% (C) Copyright 2011-2014 The 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
@@ -41,8 +41,8 @@
%<*driver|package>
% The version of expl3 required is tested as early as possible, as
% some really old versions do not define \ProvidesExplPackage.
-\RequirePackage{expl3}[2013/12/31]
-%<package>\@ifpackagelater{expl3}{2013/12/31}
+\RequirePackage{expl3}[2014/05/05]
+%<package>\@ifpackagelater{expl3}{2014/05/05}
%<package> {}
%<package> {%
%<package> \PackageError{xtemplate}{Support package l3kernel too old}
@@ -54,7 +54,7 @@
%<package> }%
%<package> \endinput
%<package> }
-\GetIdInfo$Id: xtemplate.dtx 4634 2013-12-31 17:32:19Z joseph $
+\GetIdInfo$Id: xtemplate.dtx 4740 2014-05-05 14:04:24Z joseph $
{L3 Experimental prototype document functions}
%</driver|package>
%<*driver>
@@ -657,7 +657,7 @@
% \texttt{a}, \texttt{b} and \texttt{c}, plus code for an \texttt{unknown}
% branch.
% \end{function}
-%
+%
% \section{Collections}
%
% The implementation of templates includes a concept termed
@@ -671,7 +671,7 @@
% achieve this, at least with the current approach. As such, the collection
% functions should be regarded as deprecated: they remain available to support
% existing code, but will be removed when a better mechanism is developed.
-%
+%
%
% \begin{function}{\ShowCollectionInstanceValues}
% \begin{syntax}
@@ -691,7 +691,7 @@
% \begin{macrocode}
%<*package>
% \end{macrocode}
-%
+%
% \begin{macrocode}
%<@@=xtemplate>
% \end{macrocode}
@@ -2278,7 +2278,7 @@
% \begin{macro}[aux]{\@@_assign_tokenlist_aux:NN}
% Life would be easy here if it were not for \cs{KeyValue}. To deal
% correctly with that, we need to allow for the recovery a a stored value
-% at point of use.
+% at point of use.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_assign_tokenlist:
{