diff options
34 files changed, 685 insertions, 883 deletions
diff --git a/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf b/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf Binary files differindex 02a8e5ff343..33e0e3d0264 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/interface3.tex b/Master/texmf-dist/doc/latex/l3kernel/interface3.tex deleted file mode 100644 index f4c4fa4e2bf..00000000000 --- a/Master/texmf-dist/doc/latex/l3kernel/interface3.tex +++ /dev/null @@ -1,89 +0,0 @@ -% \iffalse meta-comment -% -%% File: interfaces3.tex Copyright (C) 1990-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 "expl3 bundle" (The Work in LPPL) -%% and all files in that bundle must be distributed together. -%% -%% The released version of this bundle is available from CTAN. -%% -%% ----------------------------------------------------------------------- -%% -%% The development version of the bundle can be found at -%% -%% http://www.latex-project.org/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 LaTeX3 Project. -%% -%% ----------------------------------------------------------------------- -% -% \fi - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% This document will typeset the LaTeX3 interface descriptions a single -% document. This will produce quite a large file (more than 170 pages -% currently). -% -% There is also a full version of the sources (source3.tex) which additionally -% also typesets the command implementations. -% -% Do not forget to generate the index (as explained on the terminal output -% near the end of the run)! -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - -\documentclass{l3doc} -\listfiles - -\begin{document} - -\title{The \LaTeX3 Interfaces} -\author{% - The \LaTeX3 Project\thanks - {% - E-mail: - \href{mailto:latex-team@latex-project.org} - {latex-team@latex-project.org}% - }% -} - -\pagenumbering{roman} -\maketitle - -% -% First load all modules and typeset the documentation parts -% - -\input{source3body} % all the individual modules - -\clearpage - -\begingroup - \def\endash{--} - \catcode`\-\active - \def-{\futurelet\temp\indexdash} - \def\indexdash{\ifx\temp-\endash\fi} - \DelayPrintIndex -\endgroup - -\end{document} - - diff --git a/Master/texmf-dist/doc/latex/l3kernel/source3.pdf b/Master/texmf-dist/doc/latex/l3kernel/source3.pdf Binary files differindex 4b77f6fff03..cf5bd891a30 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/source3.pdf +++ b/Master/texmf-dist/doc/latex/l3kernel/source3.pdf diff --git a/Master/texmf-dist/doc/latex/l3kernel/source3.tex b/Master/texmf-dist/doc/latex/l3kernel/source3.tex deleted file mode 100644 index 927e483cce9..00000000000 --- a/Master/texmf-dist/doc/latex/l3kernel/source3.tex +++ /dev/null @@ -1,106 +0,0 @@ -% \iffalse meta-comment -% -%% File: source3.tex Copyright (C) 1990-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 "expl3 bundle" (The Work in LPPL) -%% and all files in that bundle must be distributed together. -%% -%% The released version of this bundle is available from CTAN. -%% -%% ----------------------------------------------------------------------- -%% -%% The development version of the bundle can be found at -%% -%% http://www.latex-project.org/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 LaTeX3 Project. -%% -%% ----------------------------------------------------------------------- -% -% \fi - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% This document will typeset the LaTeX3 sources as a single document. -% This will produce quite a large file (more than 400 pages). -% -% There is also a shorter version (interface3.tex) that only typesets the -% command % interface descriptions. -% -% Do not forget to generate the index (as explained on the terminal output -% near the end of the run)! -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\documentclass{l3doc} -\listfiles - -\begin{document} - -\title{The \LaTeX3 Sources} -\author{% - The \LaTeX3 Project\thanks - {% - E-mail: - \href{mailto:latex-team@latex-project.org} - {latex-team@latex-project.org}% - }% -} - -\pagenumbering{roman} -\maketitle - -% -% First load all modules and typeset the documentation parts -% - -\input{source3body} % all the individual modules - -% -% Now reload all modules and typeset the implementation parts -% - -\part{Implementation} - -\def\maketitle{} -\EnableImplementation -\DisableDocumentation -\DocInputAgain - -\clearpage -\pagestyle{headings} - -% Make TeX shut up. -\hbadness=10000 -\newcount\hbadness -\hfuzz=\maxdimen - -\PrintChanges -\clearpage - -\begingroup - \def\endash{--} - \catcode`\-\active - \def-{\futurelet\temp\indexdash} - \def\indexdash{\ifx\temp-\endash\fi} - - \DelayPrintIndex -\endgroup - -\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/l3kernel/source3body.tex b/Master/texmf-dist/doc/latex/l3kernel/source3body.tex deleted file mode 100644 index fbffe013ae8..00000000000 --- a/Master/texmf-dist/doc/latex/l3kernel/source3body.tex +++ /dev/null @@ -1,376 +0,0 @@ -% \iffalse meta-comment -% -%% File: source3body.tex Copyright (C) 1990-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 "expl3 bundle" (The Work in LPPL) -%% and all files in that bundle must be distributed together. -%% -%% The released version of this bundle is available from CTAN. -%% -%% ----------------------------------------------------------------------- -%% -%% The development version of the bundle can be found at -%% -%% http://www.latex-project.org/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 LaTeX3 Project. -%% -%% ----------------------------------------------------------------------- -% -% \fi - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% This file is used by -% -% source3.tex % documentation including implementation -% -% interface3.tex % only interface documentation -% -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - -\begin{abstract} - -\setlength\parindent{0pt} -\setlength\parskip{\baselineskip} - -\noindent -This is the reference documentation for the \pkg{expl3} -programming environment. The \pkg{expl3} modules set up an experimental -naming scheme for \LaTeX{} commands, which allow the \LaTeX{} programmer -to systematically name functions and variables, and specify the argument -types of functions. - -The \TeX{} and \eTeX{} primitives are all given a new name according to -these conventions. However, in the main direct use of the primitives is -not required or encouraged: the \pkg{expl3} modules define an -independent low-level \LaTeX3 programming language. - -At present, the \pkg{expl3} modules are designed to be loaded on top of -\LaTeXe{}. In time, a \LaTeX3 format will be produced based on this code. -This allows the code to be used in \LaTeXe{} packages \emph{now} while a -stand-alone \LaTeX3 is developed. - -\begin{bfseries} - While \pkg{expl3} is still experimental, the bundle is now regarded as - broadly stable. The syntax conventions and functions provided are now - ready for wider use. There may still be changes to some functions, but - these will be minor when compared to the scope of \pkg{expl3}. - - New modules will be added to the distributed version of \pkg{expl3} as - they reach maturity. -\end{bfseries} - -\end{abstract} - -\clearpage - -{% - \def\\{:}% fix "newlines" in the ToC - \tableofcontents -} - -\clearpage -\pagenumbering{arabic} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% Each of the following \DocInput lines includes a file with extension -% .dtx. Each of these files may be typeset separately. For instance -% pdflatex l3box.dtx -% will typeset the source of the LaTeX3 box commands. If you use the -% Makefile, the index will be generated automatically; e.g., -% make doc F=l3box -% -% If this file is processed, each of these separate dtx files will be -% contained as a part of a single document. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\makeatletter -\def\partname{Part} -\def\maketitle{\part{\@title}} -\let\thanks\@gobble -\let\DelayPrintIndex\PrintIndex -\let\PrintIndex\@empty -\makeatother - -\part{Introduction to \pkg{expl3} and this document} - -This document is intended to act as a comprehensive reference manual -for the \pkg{expl3} language. A general guide to the \LaTeX3 -programming language is found in \href{expl3.pdf}{expl3.pdf}. - -\section{Naming functions and variables} - -\LaTeX3 does not use \texttt{@} as a \enquote{letter} for defining -internal macros. Instead, the symbols |_| and \texttt{:} -are used in internal macro names to provide structure. The name of -each \emph{function} is divided into logical units using \texttt{_}, -while \texttt{:} separates the \emph{name} of the function from the -\emph{argument specifier} (\enquote{arg-spec}). This describes the arguments -expected by the function. In most cases, each argument is represented -by a single letter. The complete list of arg-spec letters for a function -is referred to as the \emph{signature} of the function. - -Each function name starts with the \emph{module} to which it belongs. -Thus apart from a small number of very basic functions, all \pkg{expl3} -function names contain at least one underscore to divide the module -name from the descriptive name of the function. For example, all -functions concerned with comma lists are in module \texttt{clist} and -begin \cs{clist_}. - -Every function must include an argument specifier. For functions which -take no arguments, this will be blank and the function name will end -\texttt{:}. Most functions take one or more arguments, and use the -following argument specifiers: -\begin{description} - \item[\texttt{D}] The \texttt{D} specifier means \emph{do not use}. - All of the \TeX{} primitives are initially \cs{let} to a \texttt{D} - name, and some are then given a second name. Only the kernel - team should use anything with a \texttt{D} specifier! - \item[\texttt{N} and \texttt{n}] These mean \emph{no manipulation}, - of a single token for \texttt{N} and of a set of tokens given in - braces for \texttt{n}. Both pass the argument though exactly as - given. Usually, if you use a single token for an \texttt{n} argument, - all will be well. - \item[\texttt{c}] This means \emph{csname}, and indicates that the - argument will be turned into a csname before being used. So - So \cs{foo:c} |{ArgumentOne}| will act in the same way as \cs{foo:N} - \cs{ArgumentOne}. - \item[\texttt{V} and \texttt{v}] These mean \emph{value - of variable}. The \texttt{V} and \texttt{v} specifiers are used to - get the content of a variable without needing to worry about the - underlying \TeX{} structure containing the data. A \texttt{V} - argument will be a single token (similar to \texttt{N}), for example - \cs{foo:V} \cs{MyVariable}; on the other hand, using \texttt{v} a - csname is constructed first, and then the value is recovered, for - example \cs{foo:v} |{MyVariable}|. - \item[\texttt{o}] This means \emph{expansion once}. In general, the - \texttt{V} and \texttt{v} specifiers are favoured over \texttt{o} - for recovering stored information. However, \texttt{o} is useful - for correctly processing information with delimited arguments. - \item[\texttt{x}] The \texttt{x} specifier stands for \emph{exhaustive - expansion}: the plain \TeX{} \cs{edef}. - \item[\texttt{f}] The \texttt{f} specifier stands for \emph{full - expansion}, and in contrast to \emph{x} stops at the first - non-expandable item without trying to execute it. - \item[\texttt{T} and \texttt{F}] For logic tests, there are the branch - specifiers \texttt{T} (\emph{true}) and \texttt{F} (\emph{false}). - Both specifiers treat the input in the same way as \texttt{n} (no - change), but make the logic much easier to see. - \item[\texttt{p}] The letter \texttt{p} indicates \TeX{} - \emph{parameters}. Normally this will be used for delimited - functions as \pkg{expl3} provides better methods for creating simple - sequential arguments. - \item[\texttt{w}] Finally, there is the \texttt{w} specifier for - \emph{weird} arguments. This covers everything else, but mainly - applies to delimited values (where the argument must be terminated - by some arbitrary string). -\end{description} -Notice that the argument specifier describes how the argument is -processed prior to being passed to the underlying function. For example, -\cs{foo:c} will take its argument, convert it to a control sequence and -pass it to \cs{foo:N}. - -Variables are named in a similar manner to functions, but begin with -a single letter to define the type of variable: -\begin{description} - \item[\texttt{c}] Constant: global parameters whose value should not - be changed. - \item[\texttt{g}] Parameters whose value should only be set globally. - \item[\texttt{l}] Parameters whose value should only be set locally. -\end{description} -Each variable name is then build up in a similar way to that of a -function, typically starting with the module\footnote{The module names are - not used in case of generic scratch registers defined in the data - type modules, e.g., the - \texttt{int} module contains some scratch variables called \cs{l_tmpa_int}, - \cs{l_tmpb_int}, and so on. In such a case adding the module name up front - to denote the module - and in the back to indicate the type, as in - \cs{l_int_tmpa_int} would be very unreadable.} name -and then a descriptive part. -Variables end with a short identifier to show the variable type: -\begin{description} - \item[\texttt{bool}] Either true or false. - \item[\texttt{box}] Box register. - \item[\texttt{clist}] Comma separated list. - \item[\texttt{dim}] \enquote{Rigid} lengths. - \item[\texttt{int}] Integer-valued count register. - \item[\texttt{prop}] Property list. - \item[\texttt{skip}] \enquote{Rubber} lengths. - \item[\texttt{seq}] \enquote{Sequence}: a data-type used to implement lists - (with access at both ends) and stacks. - \item[\texttt{stream}] An input or output stream (for reading from or - writing to, respectively). - \item[\texttt{tl}] Token list variables: placeholder for a token list. - \item[\texttt{toks}] Token register. -\end{description} - -\subsection{Terminological inexactitude} - -A word of warning. In this document, and others referring to the \pkg{expl3} -programming modules, we often refer to \enquote{variables} and -\enquote{functions} as if they -were actual constructs from a real programming language. In truth, \TeX{} -is a macro processor, and functions are simply macros that may or may not take -arguments and expand to their replacement text. Many of the common variables -are \emph{also} macros, and if placed into the input stream will simply expand -to their definition as well~--- a \enquote{function} with no arguments and a -\enquote{token list variable} are in truth one and the same. On the other -hand, some \enquote{variables} are actually registers that must be -initialised and their values set and retrieved with specific functions. - -The conventions of the \pkg{expl3} code are designed to clearly separate the -ideas of \enquote{macros that contain data} and -\enquote{macros that contain code}, and a -consistent wrapper is applied to all forms of \enquote{data} whether they be -macros or -actually registers. This means that sometimes we will use phrases like -\enquote{the function returns a value}, when actually we just mean -\enquote{the macro expands to something}. Similarly, the term -\enquote{execute} might be used in place of \enquote{expand} -or it might refer to the more specific case of -\enquote{processing in \TeX's stomach} -(if you are familiar with the \TeX{}book parlance). - -If in doubt, please ask; chances are we've been hasty in writing certain -definitions and need to be told to tighten up our terminology. - -\section{Documentation conventions} - -This document is typeset with the experimental \pkg{l3doc} class; -several conventions are used to help describe the features of the code. -A number of conventions are used here to make the documentation clearer. - -Each group of related functions is given in a box. For a function with -a \enquote{user} name, this might read: -\begin{function}{\ExplSyntaxOn, \ExplSyntaxOff} - \begin{syntax} - \cs{ExplSyntaxOn} \dots{} \cs{ExplSyntaxOff} - \end{syntax} - The textual description of how the function works would appear here. The - syntax of the function is shown in mono-spaced text to the right of - the box. In this example, the function takes no arguments and so the - name of the function is simply reprinted. -\end{function} - -For programming functions, which use \texttt{_} and \texttt{:} in their name -there are a few additional conventions: If two related functions are given -with identical names but different argument specifiers, these are termed -\emph{variants} of each other, and the latter functions are printed in grey to -show this more clearly. They will carry out the same function but will take -different types of argument: -\begin{function}{\seq_new:N, \seq_new:c} - \begin{syntax} - \cs{seq_new:N} \meta{sequence} - \end{syntax} - When a number of variants are described, the arguments are usually - illustrated only for the base function. Here, \meta{sequence} indicates - that \cs{seq_new:N} expects the name of a sequence. From the argument - specifier, \cs{seq_new:c} also expects a sequence name, but as a - name rather than as a control sequence. Each argument given in the - illustration should be described in the following text. -\end{function} - -Some functions are fully expandable, which allows it to be used within -an \texttt{x}-type argument (in plain \TeX{} terms, inside an \cs{edef}). -These fully expandable functions are indicated in the documentation by -a star: -\begin{function}[EXP]{\cs_to_str:N} - \begin{syntax} - \cs{cs_to_str:N} \meta{cs} - \end{syntax} - As with other functions, some text should follow which explains how - the function works. Usually, only the star will indicate that the - function is expandable. In this case, the function expects a \meta{cs}, - shorthand for a \meta{control sequence}. -\end{function} - -Conditional (\texttt{if}) functions are normally defined in three variants, -with -\texttt{T}, \texttt{F} and \texttt{TF} argument specifiers. This allows -them to be used for different \enquote{true}/\enquote{false} branches, -depending on -which outcome the conditional is being used to test. To indicate this -without repetition, this information is given in a shortened form: -\begin{function}[EXP,pTF]{\xetex_if_engine:} - \begin{syntax} - \cs{xetex_if_engine:TF} \Arg{true code} \Arg{false code} - \end{syntax} - The underlining and italic of \texttt{TF} indicates that - \cs{xetex_if_engine:T}, \cs{xetex_if_engine:F} and - \cs{xetex_if_engine:TF} are all available. Usually, the illustration - will use the \texttt{TF} variant, and so both \meta{true code} - and \meta{false code} will be shown. The two variant forms \texttt{T} and - \texttt{F} take only \meta{true code} and \meta{false code}, respectively. - Here, the star also shows that this function is expandable. - With some minor exceptions, \emph{all} conditional functions in the - \pkg{expl3} modules should be defined in this way. -\end{function} - -Variables, constants and so on are described in a similar manner: -\begin{variable}{\l_tmpa_tl} - A short piece of text will describe the variable: there is no - syntax illustration in this case. -\end{variable} - -In some cases, the function is similar to one in \LaTeXe{} or plain \TeX{}. -In these cases, the text will include an extra \enquote{\textbf{\TeX{}hackers -note}} section: -\begin{function}[EXP]{\token_to_str:N} - \begin{syntax} - \cs{token_to_str:N} \meta{token} - \end{syntax} - The normal description text. - \begin{texnote} - Detail for the experienced \TeX{} or \LaTeXe\ programmer. In this - case, it would point out that this function is the \TeX{} primitive - \cs{string}. - \end{texnote} -\end{function} - -\DisableImplementation - -\DocInput{l3bootstrap.dtx} -\DocInput{l3names.dtx} -\DocInput{l3basics.dtx} -\DocInput{l3expan.dtx} -\DocInput{l3prg.dtx} -\DocInput{l3quark.dtx} -\DocInput{l3token.dtx} -\DocInput{l3int.dtx} -\DocInput{l3skip.dtx} -\DocInput{l3tl.dtx} -\DocInput{l3seq.dtx} -\DocInput{l3clist.dtx} -\DocInput{l3prop.dtx} -\DocInput{l3box.dtx} -\DocInput{l3io.dtx} -\DocInput{l3msg.dtx} -\DocInput{l3keyval.dtx} -\DocInput{l3keys.dtx} -\DocInput{l3file.dtx} -\DocInput{l3fp.dtx} -\DocInput{l3luatex.dtx} - -\endinput diff --git a/Master/texmf-dist/makeindex/l3kernel/l3doc.ist b/Master/texmf-dist/makeindex/l3kernel/l3doc.ist deleted file mode 100644 index e1496e34d73..00000000000 --- a/Master/texmf-dist/makeindex/l3kernel/l3doc.ist +++ /dev/null @@ -1,72 +0,0 @@ -%% -%% This is file `l3doc.ist', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% l3doc.dtx (with options: `docist') -%% -%% -%% EXPERIMENTAL CODE -%% -%% Do not distribute this file without also distributing the -%% source files specified above. -%% -%% Do not distribute a modified version of this file. -%% -%% -%% File: l3doc.dtx Copyright (C) 1990-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 "expl3 bundle" (The Work in LPPL) -%% and all files in that bundle must be distributed together. -%% -%% The released version of this bundle is available from CTAN. -%% -%% ----------------------------------------------------------------------- -%% -%% The development version of the bundle can be found at -%% -%% http://www.latex-project.org/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 LaTeX3 Project. -%% -%% ----------------------------------------------------------------------- -actual '=' -quote '!' -level '#' -preamble -"\n \\begin{theindex} \n \\makeatletter\\scan@allowedfalse\n" -postamble -"\n\n \\end{theindex}\n" -item_x1 "\\efill \n \\subitem " -item_x2 "\\efill \n \\subsubitem " -delim_0 "\\pfill " -delim_1 "\\pfill " -delim_2 "\\pfill " -lethead_prefix "{\\bfseries\\hfil " -lethead_suffix "\\hfil}\\nopagebreak\n" -lethead_flag 1 -heading_prefix "{\\bfseries\\hfil " -heading_suffix "\\hfil}\\nopagebreak\n" -headings_flag 1 - -page_precedence "rnaA" -%% -%% -%% End of file `l3doc.ist'. diff --git a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx index 48ef3aa0a54..6de2ed0c0d2 100644 --- a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx @@ -37,8 +37,8 @@ \RequirePackage{l3names} \def\ExplFileName{expl3} \def\ExplFileDescription{L3 Experimental code bundle wrapper} -\def\ExplFileDate{2011/08/13} -\def\ExplFileVersion{2564} +\def\ExplFileDate{2011/08/17} +\def\ExplFileVersion{2607} %</driver|package> %<*driver> \documentclass[full]{l3doc} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3.ins b/Master/texmf-dist/source/latex/l3kernel/l3.ins new file mode 100644 index 00000000000..9b28c54f15e --- /dev/null +++ b/Master/texmf-dist/source/latex/l3kernel/l3.ins @@ -0,0 +1,68 @@ +\iffalse meta-comment + +File l3.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 "expl3 bundle" (The Work in LPPL) +and all files in that bundle must be distributed together. + +The released version of this bundle is available from CTAN. + +\fi + +\input docstrip.tex +\askforoverwritefalse + +\preamble + +EXPERIMENTAL CODE + +Do not distribute this file without also distributing the +source files specified above. + +Do not distribute a modified version of this file. + +\endpreamble +% stop docstrip adding \endinput +\postamble +\endpostamble + +\keepsilent + +% ===== PACKAGE ONLY ====== +\generate{\file{expl3.sty} {\from{expl3.dtx} {package}}} +% ======================== +\generate{\file{l3bootstrap.sty}{\from{l3bootstrap.dtx}{package}}} +\generate{\file{l3names.sty} {\from{l3names.dtx} {package}}} +\generate{\file{l3basics.sty} {\from{l3basics.dtx} {package}}} +\generate{\file{l3expan.sty} {\from{l3expan.dtx} {package}}} +\generate{\file{l3tl.sty} {\from{l3tl.dtx} {package}}} +\generate{\file{l3seq.sty} {\from{l3seq.dtx} {package}}} +\generate{\file{l3int.sty} {\from{l3int.dtx} {package}}} +\generate{\file{l3quark.sty} {\from{l3quark.dtx} {package}}} +\generate{\file{l3prg.sty} {\from{l3prg.dtx} {package}}} +\generate{\file{l3clist.sty} {\from{l3clist.dtx} {package}}} +\generate{\file{l3token.sty} {\from{l3token.dtx} {package}}} +\generate{\file{l3prop.sty} {\from{l3prop.dtx} {package}}} +\generate{\file{l3msg.sty} {\from{l3msg.dtx} {package}}} +\generate{\file{l3io.sty} {\from{l3io.dtx} {package}}} +\generate{\file{l3file.sty} {\from{l3file.dtx} {package}}} +\generate{\file{l3skip.sty} {\from{l3skip.dtx} {package}}} +\generate{\file{l3box.sty} {\from{l3box.dtx} {package}}} +\generate{\file{l3keyval.sty} {\from{l3keyval.dtx} {package}}} +\generate{\file{l3keys.sty} {\from{l3keys.dtx} {package}}} +\generate{\file{l3fp.sty} {\from{l3fp.dtx} {package}}} +\generate{\file{l3luatex.sty} {\from{l3luatex.dtx} {package}}} + +\generate{\file{l3doc.cls} {\from{l3doc.dtx} {class}}} +\generate{\file{l3doc.ist} {\from{l3doc.dtx} {docist}}} + +\generate{\file{l3toks.sty} {\from{l3toks.dtx} {package}}} + +\endbatchfile diff --git a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx index 85313ce8791..c2fb953d45b 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3box.dtx 2526 2011-08-09 08:58:42Z joseph $ +\GetIdInfo$Id: l3box.dtx 2595 2011-08-16 00:58:34Z bruno $ {L3 Experimental boxes} %</driver|package> %<*driver> @@ -528,7 +528,7 @@ % % \begin{function}{\vbox_to_ht:nn} % \begin{syntax} -% \cs{vbox_to_ht:n} \Arg{contents} \Arg{dimexpr} +% \cs{vbox_to_ht:nn} \Arg{dimexpr} \Arg{contents} % \end{syntax} % Typesets the \meta{contents} into a vertical box of height % \meta{dimexpr} and then includes this box in the current list for diff --git a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx index e3dd82e210e..ed8f421b259 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx @@ -78,7 +78,7 @@ Do not distribute a modified version of this file. % \end{macrocode} % %<*driver|class> -\GetIdInfo$Id: l3doc.dtx 2540 2011-08-10 23:39:33Z bruno $ +\GetIdInfo$Id: l3doc.dtx 2601 2011-08-16 23:20:27Z bruno $ {L3 Experimental documentation class} %</driver|class> % @@ -955,8 +955,8 @@ Do not distribute a modified version of this file. $\star$ } \tl_set:Nx \g_doc_macro_tl { \tl_to_str:N \g_doc_macro_tl } - \exp_args:NNf \tl_replace_all_in:Nnn \g_doc_macro_tl {\token_to_str:N _} {/} - \exp_args:NNf \tl_replace_all_in:Nnn \g_doc_macro_tl {\@backslashchar} {} + \exp_args:NNf \tl_replace_all:Nnn \g_doc_macro_tl {\token_to_str:N _} {/} + \exp_args:NNf \tl_replace_all:Nnn \g_doc_macro_tl {\@backslashchar} {} \bool_if:NT \g_doc_full_bool { \exp_args:Nf\label{doc/function/\g_doc_macro_tl#3#2} } @@ -1146,8 +1146,8 @@ Do not distribute a modified version of this file. \bool_if:NF \l_doc_macro_aux_bool { \tl_gset:Nx \l_doc_macro_tl { \tl_to_str:n {#1} } - \exp_args:NNf \tl_greplace_all_in:Nnn \l_doc_macro_tl {\token_to_str:N _} {/} - \exp_args:NNf \tl_greplace_all_in:Nnn \l_doc_macro_tl {\@backslashchar} {} + \exp_args:NNf \tl_greplace_all:Nnn \l_doc_macro_tl {\token_to_str:N _} {/} + \exp_args:NNf \tl_greplace_all:Nnn \l_doc_macro_tl {\@backslashchar} {} } \use:x { diff --git a/Master/texmf-dist/source/latex/l3kernel/l3format.ins b/Master/texmf-dist/source/latex/l3kernel/l3format.ins new file mode 100644 index 00000000000..562695271fa --- /dev/null +++ b/Master/texmf-dist/source/latex/l3kernel/l3format.ins @@ -0,0 +1,72 @@ +\iffalse meta-comment + +File l3format.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 "expl3 bundle" (The Work in LPPL) +and all files in that bundle must be distributed together. + +The released version of this bundle is available from CTAN. + +\fi + +\input docstrip.tex +\askforoverwritefalse + +\preamble + +EXPERIMENTAL CODE + +Do not distribute this file without also distributing the +source files specified above. + +Do not distribute a modified version of this file. + +\endpreamble +% stop docstrip adding \endinput +\postamble +\endpostamble + +\keepsilent + +\generate + { + \file{l3format.ltx} + { + \from{l3bootstrap.dtx}{initex} + \from{l3names.dtx} {initex} + \from{l3basics.dtx} {initex} + \from{l3expan.dtx} {initex} + \from{l3tl.dtx} {initex} + \from{l3seq.dtx} {initex} + % ===== FORMAT ONLY ====== + \from{l3alloc.dtx} {initex} + % ======================== + \from{l3int.dtx} {initex} + \from{l3quark.dtx} {initex} + \from{l3prg.dtx} {initex} + \from{l3clist.dtx} {initex} + \from{l3token.dtx} {initex} + \from{l3prop.dtx} {initex} + \from{l3msg.dtx} {initex} + \from{l3io.dtx} {initex} + \from{l3file.dtx} {initex} + \from{l3skip.dtx} {initex} + \from{l3box.dtx} {initex} + \from{l3keyval.dtx} {initex} + \from{l3keys.dtx} {initex} + \from{l3fp.dtx} {initex} + \from{l3luatex.dtx} {initex} + % ===== FORMAT ONLY ====== + \from{l3final.dtx} {initex} + % ======================== + } + } + +\endbatchfile
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx index 89695862b2f..0719e0e86df 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3int.dtx 2551 2011-08-11 22:40:53Z bruno $ +\GetIdInfo$Id: l3int.dtx 2600 2011-08-16 22:31:24Z bruno $ {L3 Experimental integers} %</driver|package> %<*driver> @@ -631,16 +631,6 @@ % with category code $11$ (letter). % \end{function} % -% \begin{function}[EXP]{\int_to_symbol:n} -% \begin{syntax} -% \cs{int_to_symbol:n} \Arg{integer expression} -% \end{syntax} -% Calculates the value of the \meta{integer expression} and places -% the symbol representation of the result in the input stream. The -% list of symbols used is equivalent to \LaTeXe{}'s \cs{@fnsymbol} -% set. -% \end{function} -% % \section{Converting from other formats to integers} % % \begin{function}[EXP]{\int_from_alph:n} @@ -1613,89 +1603,95 @@ % % \begin{macro}{\int_to_base:nn} % \UnitTested -% \begin{macro}[aux]{\int_to_base_aux:nnn} +% \begin{macro}[aux]{\int_to_base_aux_i:nn, +% \int_to_base_aux_ii:nnN,\int_to_base_aux_iii:nnnN} % \begin{macro}[int]{\int_to_letter:n} % \UnitTested % Converting from base ten (|#1|) to a second base (|#2|) starts with -% a simple sign check. As the input is base $10$ \TeX{} can then -% do the actual work with the sign itself. +% computing |#1|: if it is a complicated calculation, we shouldn't +% perform it twice. Then check the sign, store it, either \texttt{-} +% or \cs{c_empty_tl}, and feed the absolute value to the next auxiliary +% function. % \begin{macrocode} -\cs_new:Npn \int_to_base:nn #1#2 +\cs_new:Npn \int_to_base:nn #1 + { \exp_args:Nf \int_to_base_aux_i:nn { \int_eval:n {#1} } } +\cs_new:Npn \int_to_base_aux_i:nn #1#2 { \int_compare:nNnTF {#1} < \c_zero - { - - - \exp_args:Nnf \int_to_base_aux:nnn - { } { \int_eval:n { 0 - ( #1 ) } } {#2} - } - { - \exp_args:Nnf \int_to_base_aux:nnn - { } { \int_eval:n {#1} } {#2} - } -} + { \exp_args:No \int_to_base_aux_ii:nnN { \use_none:n #1 } {#2} - } + { \int_to_base_aux_ii: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 build up as argument |#1|, which is why it -% starts off empty in the above. At each pass, the value in |#2| is -% checked to see if it is less than the new base (|#3|). If it is -% the it is converted directly and the rest of the output is added in. +% input. The output is built up after the end of the function. +% At each pass, the value in |#1| is checked to see if it is less +% than the new base (|#2|). If it is, then it is converted directly, +% putting the sign back in front. % On the other hand, if the value to convert is greater than or equal % to the new base then the modulus and remainder values are found. The -% modulus is converted to a symbol and the remainder is carried forward -% to the next round. +% modulus is converted to a symbol and put on the right, +% and the remainder is carried forward to the next round. % \begin{macrocode} -\cs_new:Npn \int_to_base_aux:nnn #1#2#3 { - \int_compare:nNnTF {#2} < {#3} - { - \int_to_letter:n {#2} - #1 - } - { - \exp_args:Nff \int_to_base_aux:nnn - { - \int_to_letter:n { \int_mod:nn {#2} {#3} } - #1 - } - { \int_div_truncate:nn {#2} {#3} } - {#3} - } +\cs_new:Npn \int_to_base_aux_ii:nnN #1#2#3 + { + \int_compare:nNnTF {#1} < {#2} + { \exp_last_unbraced:Nf #3 { \int_to_letter:n {#1} } } + { + \exp_args:Nf \int_to_base_aux_iii:nnnN + { \int_to_letter:n { \int_mod:nn {#1} {#2} } } + {#1} + {#2} + #3 + } + } +\cs_new:Npn \int_to_base_aux_iii:nnnN #1#2#3#4 + { + \exp_args:Nf \int_to_base_aux_ii: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. +% value unchanged. It would be cleaner to use \cs{prg_case_int:nnn}, +% but in our case, the cases are contiguous, so it is forty times faster +% to use the \cs{if_case:w} primitive. The first \cs{exp_after:wN} +% expands the conditional, jumping to the correct case, the second one +% expands after the resulting character to close the conditional. % \begin{macrocode} \cs_new:Npn \int_to_letter:n #1 { - \prg_case_int:nnn { #1 - 9 } - { - { 1 } { A } - { 2 } { B } - { 3 } { C } - { 4 } { D } - { 5 } { E } - { 6 } { F } - { 7 } { G } - { 8 } { H } - { 9 } { I } - { 10 } { J } - { 11 } { K } - { 12 } { L } - { 13 } { M } - { 14 } { N } - { 15 } { O } - { 16 } { P } - { 17 } { Q } - { 18 } { R } - { 19 } { S } - { 20 } { T } - { 21 } { U } - { 22 } { V } - { 23 } { W } - { 24 } { X } - { 25 } { Y } - { 26 } { Z } - } - {#1} + \exp_after:wN \exp_after:wN + \if_case:w \int_eval:w #1 - \c_ten \int_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: #1 + \fi: } % \end{macrocode} %\end{macro} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3io.dtx b/Master/texmf-dist/source/latex/l3kernel/l3io.dtx index bf71c3df878..7b6879ba613 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3io.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3io.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3io.dtx 2478 2011-06-19 21:34:23Z joseph $ +\GetIdInfo$Id: l3io.dtx 2595 2011-08-16 00:58:34Z bruno $ {L3 Experimental input-output operations} %</driver|package> %<*driver> @@ -498,10 +498,10 @@ %<*initex> \alloc_setup_type:nnn { ior } \c_zero \c_sixteen \cs_new_protected_nopar:Npn \ior_raw_new:N #1 - { \alloc_reg:NnNN g { ior } \tex_chardef:D #1 } + { \alloc_reg:nNN { ior } \tex_chardef:D #1 } \alloc_setup_type:nnn { iow } \c_zero \c_sixteen \cs_new_protected_nopar:Npn \iow_raw_new:N #1 - { \alloc_reg:NnNN g { iow } \tex_chardef:D #1 } + { \alloc_reg:nNN { iow } \tex_chardef:D #1 } %</initex> %<*package> \cs_set_eq:NN \iow_raw_new:N \newwrite diff --git a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx index cbc1fb62a7d..df988bea954 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3keys.dtx 2478 2011-06-19 21:34:23Z joseph $ +\GetIdInfo$Id: l3keys.dtx 2568 2011-08-14 05:03:32Z bruno $ {L3 Experimental key-value interfaces} %</driver|package> %<*driver> @@ -269,7 +269,7 @@ % \meta{key} .fp_set:N = \meta{floating point} % \end{syntax} % Defines \meta{key} to set \meta{floating point} to \meta{value} -% (which must a integer expression). If the variable does not exist, +% (which must a floating point number). If the variable does not exist, % it will be created at the point that the key is set up. The % \meta{integer} will be assigned locally. % \end{function} @@ -279,7 +279,7 @@ % \meta{key} .fp_gset:N = \meta{floating point} % \end{syntax} % Defines \meta{key} to set \meta{floating-point} to \meta{value} -% (which must a integer expression). If the variable does not exist, +% (which must a floating point number). If the variable does not exist, % it will be created at the point that the key is set up. The % \meta{integer} will be assigned globally. % \end{function} @@ -301,7 +301,7 @@ % \meta{key} .int_set:N = \meta{integer} % \end{syntax} % Defines \meta{key} to set \meta{integer} to \meta{value} (which -% must a integer expression). If the variable does not exist, it +% must be an integer expression). If the variable does not exist, it % will be created at the point that the key is set up. The % \meta{integer} will be assigned locally. % \end{function} @@ -311,7 +311,7 @@ % \meta{key} .int_gset:N = \meta{integer} % \end{syntax} % Defines \meta{key} to set \meta{integer} to \meta{value} (which -% must a integer expression). If the variable does not exist, it +% must be an integer expression). If the variable does not exist, it % will be created at the point that the key is set up. The % \meta{integer} will be assigned globally. % \end{function} @@ -331,7 +331,7 @@ % \meta{key} .skip_set:N = \meta{skip} % \end{syntax} % Defines \meta{key} to set \meta{skip} to \meta{value} (which -% must a skip expression). If the variable does not exist, it +% must be a skip expression). If the variable does not exist, it % will be created at the point that the key is set up. The % \meta{skip} will be assigned locally. % \end{function} @@ -341,7 +341,7 @@ % \meta{key} .skip_gset:N = \meta{skip} % \end{syntax} % Defines \meta{key} to set \meta{skip} to \meta{value} (which -% must a skip expression). If the variable does not exist, it +% must be a skip expression). If the variable does not exist, it % will be created at the point that the key is set up. The % \meta{skip} will be assigned globally. % \end{function} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3keyval.dtx b/Master/texmf-dist/source/latex/l3kernel/l3keyval.dtx index 999ae7e5b08..01adb3a033a 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3keyval.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3keyval.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3keyval.dtx 2478 2011-06-19 21:34:23Z joseph $ +\GetIdInfo$Id: l3keyval.dtx 2601 2011-08-16 23:20:27Z bruno $ {L3 Experimental key-value parsing} %</driver|package> %<*driver> @@ -203,8 +203,8 @@ \group_begin: \tl_clear:N \l_keyval_sanitise_tl \tl_set:Nn \l_keyval_sanitise_tl {#1} - \tl_replace_all_in:Nnn \l_keyval_sanitise_tl { = } { 8 } - \tl_replace_all_in:Nnn \l_keyval_sanitise_tl { , } { 9 } + \tl_replace_all:Nnn \l_keyval_sanitise_tl { = } { 8 } + \tl_replace_all:Nnn \l_keyval_sanitise_tl { , } { 9 } \tl_clear:N \l_keyval_parse_tl \exp_after:wN \keyval_parse_elt:w \exp_after:wN \q_no_value \l_keyval_sanitise_tl 9 \q_nil 9 diff --git a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx index 7e23d67b838..635c1a0a827 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3msg.dtx 2551 2011-08-11 22:40:53Z bruno $ +\GetIdInfo$Id: l3msg.dtx 2601 2011-08-16 23:20:27Z bruno $ {L3 Experimental messages} %</driver|package> %<*driver> @@ -624,6 +624,12 @@ % Issues an \enquote{Undefined error} message from \TeX{} itself, % and prints the \meta{error message}. The \meta{error message} % must be short: it is cropped at the end of one line. +% \begin{texnote} +% This function expands to an empty token list after two steps. +% Tokens inserted in response to \TeX{}'s prompt are read with +% the current category code setting, and inserted just after +% the place where the error message was issued. +% \end{texnote} % \end{function} % % \end{documentation} @@ -666,6 +672,7 @@ % \end{variable} % % \begin{macro}{\msg_new:nnnn, \msg_new:nnn} +% \begin{macro}{\msg_gset:nnnn,\msg_gset:nnn} % \begin{macro}{\msg_set:nnnn, \msg_set:nnn} % Setting a message simply means saving the appropriate text % into two functions. A sanity check first. @@ -677,7 +684,7 @@ \msg_kernel_error:nn { msg } { message-already-defined } {#1} {#2} } - \msg_set:nnnn {#1} {#2} + \msg_gset:nnnn {#1} {#2} } \cs_new_protected:Npn \msg_new:nnn #1#2#3 { \msg_new:nnnn {#1} {#2} {#3} { } } @@ -690,9 +697,19 @@ } \cs_new_protected:Npn \msg_set:nnn #1#2#3 { \msg_set:nnnn {#1} {#2} {#3} { } } +\cs_new_protected:Npn \msg_gset:nnnn #1#2#3#4 + { + \cs_gset:cpn { \c_msg_text_prefix_tl #1 / #2 } + ##1##2##3##4 {#3} + \cs_gset:cpn { \c_msg_more_text_prefix_tl #1 / #2 } + ##1##2##3##4 {#4} + } +\cs_new_protected:Npn \msg_gset:nnn #1#2#3 + { \msg_gset:nnnn {#1} {#2} {#3} { } } % \end{macrocode} % \end{macro} % \end{macro} +% \end{macro} % % \subsection{Messages: support functions and text} % @@ -863,8 +880,8 @@ % which is turned into a blank space. % \begin{macrocode} \group_begin: % { - \char_set_lccode:w `\} = `\ \scan_stop: - \char_set_lccode:w `\& = `\! \scan_stop: + \char_set_lccode:nn {`\}} {`\ } + \char_set_lccode:nn {`\&} {`\!} \char_set_catcode_active:N \& \tl_to_lowercase:n { @@ -1574,18 +1591,46 @@ % \subsection{Expandable errors} % % \begin{macro}{\msg_expandable_error:n} -% +% In expansion only context, we cannot use the normal means of +% reporting errors. Instead, we feed \TeX{} an undefined control +% sequence, \cs{LaTeX3 error:}. It is thus interrupted, and shows +% the context, which thanks to the odd-looking \cs{use:n} is +% \begin{verbatim} +% <argument> \LaTeX3 error: +% The error message. +% \end{verbatim} +% In other words, \TeX{} is processing the argument of \cs{use:n}, +% which is \cs{LaTeX3 error:} \meta{error message}. +% Then \cs{msg_expandable_error_aux:w} cleans up. In fact, there +% is an extra subtlety: if the user inserts tokens for error recovery, +% they should be kept. Thus we also use an odd space character +% (with category code $7$) and keep tokens until that space character, +% dropping everything else until \cs{q_stop}. The \cs{c_zero} prevents +% losing braces around the user-inserted text if any, and stops the +% expansion of \cs{tex_romannumeral:D}. % \begin{macrocode} \group_begin: -\cs_new:Npx \msg_expandable_error:n #1 +\char_set_catcode_math_superscript:N \^ +\char_set_lccode:nn {`^} {`\ } +\char_set_lccode:nn {`L} {`L} +\char_set_lccode:nn {`T} {`T} +\char_set_lccode:nn {`X} {`X} +\tl_to_lowercase:n { - \exp_not:n + \cs_new:Npx \msg_expandable_error:n #1 { - \exp_after:wN \exp_after:wN - \exp_after:wN \use_none_delimit_by_q_stop:w + \exp_not:n + { + \tex_romannumeral:D + \exp_after:wN \exp_after:wN + \exp_after:wN \msg_expandable_error_aux:w + \exp_after:wN \exp_after:wN + \exp_after:wN \c_zero + } + \exp_not:N \use:n { \exp_not:c { LaTeX3~error: } ^ #1 } + \exp_not:N \q_stop } - \exp_not:N \use:n { \exp_not:c { LaTeX3 ~ error : } #1 } - \exp_not:N \q_stop + \cs_new:Npn \msg_expandable_error_aux:w #1 ^ #2 \q_stop { #1 } } \group_end: % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx index 386b98b32dd..b63d2e5721b 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3prg.dtx 2553 2011-08-11 23:55:20Z bruno $ +\GetIdInfo$Id: l3prg.dtx 2601 2011-08-16 23:20:27Z bruno $ {L3 Experimental control structures} %</driver|package> %<*driver> @@ -2035,8 +2035,8 @@ % As we have restructured the structured variables, these are no % longer needed. % \begin{macrocode} -\cs_new_protected:Npn \prg_new_map_functions:Nn #1#2 { \deprectiated } -\cs_new_protected:Npn \prg_set_map_functions:Nn #1#2 { \deprectiated } +\cs_new_protected:Npn \prg_new_map_functions:Nn #1#2 { \deprecated } +\cs_new_protected:Npn \prg_set_map_functions:Nn #1#2 { \deprecated } % \end{macrocode} % \end{macro} % \end{macro} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx index 0babc835ec9..10692dcf430 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3seq.dtx 2556 2011-08-12 14:00:43Z bruno $ +\GetIdInfo$Id: l3seq.dtx 2586 2011-08-15 03:59:12Z bruno $ {L3 Experimental sequences and stacks} %</driver|package> %<*driver> @@ -722,6 +722,21 @@ % according to the variant chosen. % \end{function} % +% \begin{function} +% {\seq_set_split:Nnn,\seq_gset_split:Nnn} +% \begin{syntax} +% \cs{seq_set_split:Nnn} \meta{sequence} +% ~~\Arg{delimiter} \Arg{token list} +% \end{syntax} +% This function splits the \meta{token list} into \meta{items} +% separated by \meta{delimiter}, ignoring all explicit space +% characters from both sides of each \meta{item}, then removing +% one set of outer braces if any. The result is assigned to +% \meta{sequence}, locally or globally according to the function +% chosen. The \meta{delimiter} may not contain |{|, |}| or |#| +% (assuming \TeX{}'s normal category code r\'egime). +% \end{function} +% % \section{Internal sequence functions} % % \begin{function}{\seq_if_empty_err_break:N} @@ -1816,6 +1831,69 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\seq_set_split:Nnn,\seq_gset_split:Nnn} +% \begin{macro}[aux]{\seq_set_split_aux:NNnn} +% \begin{macro}[aux] +% { +% \seq_set_split_aux_i:w, \seq_set_split_aux_ii:w, +% \seq_set_split_aux_end: +% } +% The goal is to split a given token list at a marker, +% strip spaces from each item, and remove one set of +% outer braces if after removing leading and trailing +% spaces the item is enclosed within braces. After +% \cs{tl_replace_all:Nnn}, the token list \cs{l_seq_tmpa_tl} +% is a repetition of the pattern +% \cs{seq_set_split_aux_i:w} \cs{prg_do_nothing:} +% \meta{item with spaces} \cs{seq_set_split_aux_end:}. +% Then, \texttt{x}-expansion causes \cs{seq_set_split_aux_i:w} +% to trim spaces, and leaves its result as +% \cs{seq_set_split_aux_ii:w} \meta{trimmed item} +% \cs{seq_set_split_aux_end:}. This is then converted +% to the \pkg{l3seq} internal structure by another +% \texttt{x}-expansion. In the first step, we insert +% \cs{prg_do_nothing:} to avoid losing braces too early: +% that would cause space trimming to act within those +% lost braces. The second step is solely there to strip +% braces which are outermost after space trimming. +% \begin{macrocode} +\cs_new_protected_nopar:Npn \seq_set_split:Nnn + { \seq_set_split_aux:NNnn \tl_set:Nx } +\cs_new_protected_nopar:Npn \seq_gset_split:Nnn + { \seq_set_split_aux:NNnn \tl_gset:Nx } +\cs_new_protected_nopar:Npn \seq_set_split_aux:NNnn #1 #2 #3 #4 + { + \tl_if_empty:nTF {#4} + { #1 #2 { } } + { + \tl_set:Nn \l_seq_tmpa_tl + { + \seq_set_split_aux_i:w \prg_do_nothing: + #4 + \seq_set_split_aux_end: + } + \tl_replace_all:Nnn \l_seq_tmpa_tl { #3 } + { + \seq_set_split_aux_end: + \seq_set_split_aux_i:w \prg_do_nothing: + } + \tl_set:Nx \l_seq_tmpa_tl { \l_seq_tmpa_tl } + #1 #2 { \l_seq_tmpa_tl } + } + } +\cs_new:Npn \seq_set_split_aux_i:w #1 \seq_set_split_aux_end: + { + \exp_not:N \seq_set_split_aux_ii:w + \exp_args:No \tl_trim_spaces:n {#1} + \exp_not:N \seq_set_split_aux_end: + } +\cs_new:Npn \seq_set_split_aux_ii:w #1 \seq_set_split_aux_end: + { \exp_not:n { \seq_item:n {#1} } } +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% % \subsection{Deprecated interfaces} % % A few functions which are no longer documented: these were moved diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx index 3db13f9b400..f596eb1a263 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3tl.dtx 2563 2011-08-13 12:23:59Z joseph $ +\GetIdInfo$Id: l3tl.dtx 2566 2011-08-13 22:04:42Z bruno $ {L3 Experimental token lists} %</driver|package> %<*driver> @@ -786,25 +786,31 @@ % \begin{syntax} % \cs{tl_trim_spaces:n} \meta{token list} % \end{syntax} -% Removes any leading and trailing spaces from the \meta{token list} -% and leaves the result in the input stream. This process requires -% two expansions. +% Removes any leading and trailing explicit space characters +% from the \meta{token list} and leaves the result in the input +% stream. This process requires two expansions. +% \begin{texnote} +% The result is return within the \cs{etex_unexpanded:D} +% primitive (\cs{exp_not:n}), which means that the token +% list will not expand further when appearing in an x-type +% argument expansion. +% \end{texnote} % \end{function} % % \begin{function}{\tl_trim_spaces:N, \tl_trim_spaces:c} % \begin{syntax} % \cs{tl_trim_spaces:N} \meta{tl~var} % \end{syntax} -% Removes any leading and trailing spaces from the content of the -% \meta{tl~var} within the current \TeX{} group. +% Removes any leading and trailing explicit space characters +% from the content of the \meta{tl~var} within the current \TeX{} group. % \end{function} % % \begin{function}{\tl_gtrim_spaces:N, \tl_gtrim_spaces:c} % \begin{syntax} % \cs{tl_gtrim_spaces:N} \meta{tl~var} % \end{syntax} -% Removes any leading and trailing spaces from the content of the -% \meta{tl~var} globally. +% Removes any leading and trailing explicit space characters +% from the content of the \meta{tl~var} globally. % \end{function} % % \section{The first token from a token list} @@ -2017,39 +2023,76 @@ % \tl_trim_spaces:N, \tl_trim_spaces:c, % \tl_gtrim_spaces:N, \tl_gtrim_spaces:c % } -% \begin{macro}[aux]{\tl_trim_spaces_exp:n} -% \begin{macro}[aux]{\tl_trim_spaces_aux_i:w} -% \begin{macro}[aux]{\tl_trim_spaces_aux_ii:w} -% Trimming spaces from around the input uses the idea of a sufficiently -% odd token to allow for a delimited argument to do this. Here, the -% standard approach [a |Q| with category code 3 (math toggle)] is used. +% \begin{macro}[aux] +% { +% \tl_trim_spaces_aux_i:w, \tl_trim_spaces_aux_ii:w +% \tl_trim_spaces_aux_iii:w, \tl_trim_spaces_aux_iv:w +% } +% Trimming spaces from around the input is done using delimited +% arguments and quarks, and to get spaces at odd places in the +% definitions, we nest those in \cs{tl_tmp:w}, which then receives +% a single space as its argument: |#1| is \verb*+ +. +% Removing leading spaces is done with \cs{tl_trim_spaces_aux_i:w}, +% which loops until \cs{q_mark}\verb*+ + matches the end of the token +% list: then |##1| is the token list and |##3| is +% \cs{tl_trim_spaces_aux_ii:w}. This hands the relevant tokens to the +% loop \cs{tl_trim_spaces_aux_iii:w}, responsible for trimming +% trailing spaces. The end is reached when \verb*+ + \cs{q_nil} +% matches the one present in the definition of \cs{tl_trim_spacs:n}. +% Then \cs{tl_trim_spaces_aux_iv:w} puts the token list into a group, +% as the argument of the initial \cs{etex_unexpanded:D}. % The \cs{etex_unexpanded:D} here is used so that space trimming will % behave correctly within an \texttt{x}-type expansion. % \begin{macrocode} -\cs_new:Npn \tl_trim_spaces:n #1 +\cs_set:Npn \tl_tmp:w #1 { - \etex_unexpanded:D \exp_after:wN \exp_after:wN \exp_after:wN - { \tl_trim_spaces_exp:n {#1} } + \cs_new:Npn \tl_trim_spaces:n ##1 + { + \etex_unexpanded:D + \tl_trim_spaces_aux_i:w + \q_mark + ##1 + \q_nil + \q_mark #1 { } + \q_mark \tl_trim_spaces_aux_ii:w + \tl_trim_spaces_aux_iii:w + #1 \q_nil + \tl_trim_spaces_aux_iv:w + \q_stop + } + \cs_new:Npn \tl_trim_spaces_aux_i:w ##1 \q_mark #1 ##2 \q_mark ##3 + { + ##3 + \tl_trim_spaces_aux_i:w + \q_mark + ##2 + \q_mark #1 {##1} + } + \cs_new:Npn \tl_trim_spaces_aux_ii:w ##1 \q_mark \q_mark ##2 + { + \tl_trim_spaces_aux_iii:w + ##2 + } + \cs_new:Npn \tl_trim_spaces_aux_iii:w ##1 #1 \q_nil ##2 + { + ##2 + ##1 \q_nil + \tl_trim_spaces_aux_iii:w + } + \cs_new:Npn \tl_trim_spaces_aux_iv:w ##1 \q_nil ##2 \q_stop + { \exp_after:wN { \use_none:n ##1 } } } +\tl_tmp:w { ~ } \cs_new_protected:Npn \tl_trim_spaces:N #1 { \tl_set:Nx #1 { \exp_after:wN \tl_trim_spaces:n \exp_after:wN {#1} } } \cs_new_protected:Npn \tl_gtrim_spaces:N #1 { \tl_gset:Nx #1 { \exp_after:wN \tl_trim_spaces:n \exp_after:wN {#1} } } -\group_begin: - \tex_catcode:D `\Q = 3 \scan_stop: - \cs_new:Npn \tl_trim_spaces_exp:n #1 - { \tex_romannumeral:D - `0 \tl_trim_spaces_aux_i:w \exp_not:N #1 Q ~ Q } - \cs_new:Npn \tl_trim_spaces_aux_i:w #1 ~ Q { \tl_trim_spaces_aux_ii:w #1 Q } - \cs_new:Npn \tl_trim_spaces_aux_ii:w #1 Q #2 {#1} -\group_end: \cs_generate_variant:Nn \tl_trim_spaces:N { c } \cs_generate_variant:Nn \tl_gtrim_spaces:N { c } % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} -% \end{macro} -% \end{macro} % % \subsection{The first token from a token list} % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx index 153ca92f7e0..3aeca13b29d 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3token.dtx 2491 2011-07-02 11:49:37Z joseph $ +\GetIdInfo$Id: l3token.dtx 2579 2011-08-14 16:22:30Z bruno $ {L3 Experimental token manipulation} %</driver|package> %<*driver> @@ -1098,6 +1098,25 @@ % definition is global. % \end{function} % +% \begin{function}[TF]{\peek_N_type:} +% \begin{syntax} +% \cs{peek_N_type:TF} \Arg{true code} \Arg{false code} +% \end{syntax} +% Tests if the next \meta{token} in the input stream can be safely +% grabbed as an \texttt{N}-type argument. The test will be \meta{false} +% if the next \meta{token} is either an explicit or implicit +% begin-group or end-group token (with any character code), or +% an explicit or implicit space character (with character code $32$ +% and category code $10$), and \meta{true} in all other cases. +% Note that a \meta{true} result ensures that the next \meta{token} is +% a valid \texttt{N}-type argument. However, if the next \meta{token} +% is for instance \cs{c_space_token}, the test will take the +% \meta{false} branch, even though the next \meta{token} is in fact +% a valid \texttt{N}-type argument. The \meta{token} will be left +% in the input stream after the \meta{true code} or \meta{false code} +% (as appropriate to the result of the test). +% \end{function} +% % \end{documentation} % % \begin{implementation} @@ -2283,6 +2302,36 @@ % \end{macro} % \end{macro} % +% \begin{macro}[TF]{\peek_N_type:} +% \begin{macro}{\peek_execute_branches_N_type:} +% The next token is normal if it is neither a begin-group token, +% nor an end-group token, nor a charcode-$32$ space token. +% Note that implicit begin-group tokens, end-group tokens, and +% spaces are also recognized as non-\texttt{N}-type. +% Here, there is no \meta{search token}, so we feed a dummy +% \cs{scan_stop:} to the \cs{peek_token_generic::NN} functions. +% \begin{macrocode} +\cs_new_protected_nopar:Npn \peek_execute_branches_N_type: + { + \bool_if:nTF + { + \token_if_eq_catcode_p:NN \l_peek_token \c_group_begin_token || + \token_if_eq_catcode_p:NN \l_peek_token \c_group_end_token || + \token_if_eq_meaning_p:NN \l_peek_token \c_space_token + } + { \peek_false:w } + { \peek_true:w } + } +\cs_new_protected_nopar:Npn \peek_N_type:TF + { \peek_token_generic:NNTF \peek_execute_branches_N_type: \scan_stop: } +\cs_new_protected_nopar:Npn \peek_N_type:T + { \peek_token_generic:NNT \peek_execute_branches_N_type: \scan_stop: } +\cs_new_protected_nopar:Npn \peek_N_type:F + { \peek_token_generic:NNF \peek_execute_branches_N_type: \scan_stop: } +% \end{macrocode} +% \end{macro} +% \end{macro} +% % \subsection{Deprecated functions} % % Deprecated on 2011-05-27, for removal by 2011-08-31. diff --git a/Master/texmf-dist/source/latex/l3kernel/l3toks.dtx b/Master/texmf-dist/source/latex/l3kernel/l3toks.dtx index 62824848afc..2b5d5cd0880 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3toks.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3toks.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3toks.dtx 2478 2011-06-19 21:34:23Z joseph $ +\GetIdInfo$Id: l3toks.dtx 2601 2011-08-16 23:20:27Z bruno $ {L3 Experimental token registers} %</driver|package> %<*driver> @@ -67,7 +67,7 @@ % % \begin{documentation} % -% \textbf{THIS ENTIRE MODULE IS DEPRECIATED: DO NOT USE \cs{TOKS_\ldots} +% \textbf{THIS ENTIRE MODULE IS DEPRECATED: DO NOT USE \cs{TOKS_\ldots} % FUNCTIONS} % % \end{documentation} diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty index b802a008132..117c5ca5b4f 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty @@ -48,8 +48,8 @@ \RequirePackage{l3names} \def\ExplFileName{expl3} \def\ExplFileDescription{L3 Experimental code bundle wrapper} -\def\ExplFileDate{2011/08/13} -\def\ExplFileVersion{2564} +\def\ExplFileDate{2011/08/17} +\def\ExplFileVersion{2607} \RequirePackage{etex} \reserveinserts{32} \RequirePackage{calc} diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3box.sty b/Master/texmf-dist/tex/latex/l3kernel/l3box.sty index 2b2175e3d7c..c6bd2936aae 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3box.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3box.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3box.dtx 2526 2011-08-09 08:58:42Z joseph $ +\GetIdInfo$Id: l3box.dtx 2595 2011-08-16 00:58:34Z bruno $ {L3 Experimental boxes} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls index 00ef5ad8e58..8f91c9a54f6 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls +++ b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls @@ -6,7 +6,6 @@ %% %% l3doc.dtx (with options: `class') %% -%% %% EXPERIMENTAL CODE %% %% Do not distribute this file without also distributing the @@ -14,7 +13,6 @@ %% %% Do not distribute a modified version of this file. %% -%% %% File: l3doc.dtx Copyright (C) 1990-2011 The LaTeX3 project %% %% It may be distributed and/or modified under the conditions of the @@ -52,7 +50,7 @@ \let \filedateOld \ExplFileDate \let \fileversionOld \ExplFileVersion \let \filedescriptionOld \ExplFileDescription -\GetIdInfo$Id: l3doc.dtx 2540 2011-08-10 23:39:33Z bruno $ +\GetIdInfo$Id: l3doc.dtx 2601 2011-08-16 23:20:27Z bruno $ {L3 Experimental documentation class} \ProvidesExplClass {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -335,8 +333,8 @@ $\star$ } \tl_set:Nx \g_doc_macro_tl { \tl_to_str:N \g_doc_macro_tl } - \exp_args:NNf \tl_replace_all_in:Nnn \g_doc_macro_tl {\token_to_str:N _} {/} - \exp_args:NNf \tl_replace_all_in:Nnn \g_doc_macro_tl {\@backslashchar} {} + \exp_args:NNf \tl_replace_all:Nnn \g_doc_macro_tl {\token_to_str:N _} {/} + \exp_args:NNf \tl_replace_all:Nnn \g_doc_macro_tl {\@backslashchar} {} \bool_if:NT \g_doc_full_bool { \exp_args:Nf\label{doc/function/\g_doc_macro_tl#3#2} } @@ -473,8 +471,8 @@ \bool_if:NF \l_doc_macro_aux_bool { \tl_gset:Nx \l_doc_macro_tl { \tl_to_str:n {#1} } - \exp_args:NNf \tl_greplace_all_in:Nnn \l_doc_macro_tl {\token_to_str:N _} {/} - \exp_args:NNf \tl_greplace_all_in:Nnn \l_doc_macro_tl {\@backslashchar} {} + \exp_args:NNf \tl_greplace_all:Nnn \l_doc_macro_tl {\token_to_str:N _} {/} + \exp_args:NNf \tl_greplace_all:Nnn \l_doc_macro_tl {\@backslashchar} {} } \use:x { diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3int.sty b/Master/texmf-dist/tex/latex/l3kernel/l3int.sty index 809ed14ab66..070c9a3a6e6 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3int.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3int.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3int.dtx 2551 2011-08-11 22:40:53Z bruno $ +\GetIdInfo$Id: l3int.dtx 2600 2011-08-16 22:31:24Z bruno $ {L3 Experimental integers} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -415,67 +415,66 @@ { 26 } { Z } } } -\cs_new:Npn \int_to_base:nn #1#2 +\cs_new:Npn \int_to_base:nn #1 + { \exp_args:Nf \int_to_base_aux_i:nn { \int_eval:n {#1} } } +\cs_new:Npn \int_to_base_aux_i:nn #1#2 { \int_compare:nNnTF {#1} < \c_zero + { \exp_args:No \int_to_base_aux_ii:nnN { \use_none:n #1 } {#2} - } + { \int_to_base_aux_ii:nnN {#1} {#2} \c_empty_tl } + } +\cs_new:Npn \int_to_base_aux_ii:nnN #1#2#3 + { + \int_compare:nNnTF {#1} < {#2} + { \exp_last_unbraced:Nf #3 { \int_to_letter:n {#1} } } { - - - \exp_args:Nnf \int_to_base_aux:nnn - { } { \int_eval:n { 0 - ( #1 ) } } {#2} + \exp_args:Nf \int_to_base_aux_iii:nnnN + { \int_to_letter:n { \int_mod:nn {#1} {#2} } } + {#1} + {#2} + #3 } - { - \exp_args:Nnf \int_to_base_aux:nnn - { } { \int_eval:n {#1} } {#2} - } -} -\cs_new:Npn \int_to_base_aux:nnn #1#2#3 { - \int_compare:nNnTF {#2} < {#3} - { - \int_to_letter:n {#2} - #1 - } - { - \exp_args:Nff \int_to_base_aux:nnn - { - \int_to_letter:n { \int_mod:nn {#2} {#3} } - #1 - } - { \int_div_truncate:nn {#2} {#3} } - {#3} - } + } +\cs_new:Npn \int_to_base_aux_iii:nnnN #1#2#3#4 + { + \exp_args:Nf \int_to_base_aux_ii:nnN + { \int_div_truncate:nn {#2} {#3} } + {#3} + #4 + #1 } \cs_new:Npn \int_to_letter:n #1 { - \prg_case_int:nnn { #1 - 9 } - { - { 1 } { A } - { 2 } { B } - { 3 } { C } - { 4 } { D } - { 5 } { E } - { 6 } { F } - { 7 } { G } - { 8 } { H } - { 9 } { I } - { 10 } { J } - { 11 } { K } - { 12 } { L } - { 13 } { M } - { 14 } { N } - { 15 } { O } - { 16 } { P } - { 17 } { Q } - { 18 } { R } - { 19 } { S } - { 20 } { T } - { 21 } { U } - { 22 } { V } - { 23 } { W } - { 24 } { X } - { 25 } { Y } - { 26 } { Z } - } - {#1} + \exp_after:wN \exp_after:wN + \if_case:w \int_eval:w #1 - \c_ten \int_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: #1 + \fi: } \cs_new:Npn \int_to_binary:n #1 { \int_to_base:nn {#1} { 2 } } diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3io.sty b/Master/texmf-dist/tex/latex/l3kernel/l3io.sty index 7239fbae288..b3ae494e9fb 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3io.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3io.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3io.dtx 2478 2011-06-19 21:34:23Z joseph $ +\GetIdInfo$Id: l3io.dtx 2595 2011-08-16 00:58:34Z bruno $ {L3 Experimental input-output operations} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty b/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty index b12add10c9c..749a5791777 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3keys.dtx 2478 2011-06-19 21:34:23Z joseph $ +\GetIdInfo$Id: l3keys.dtx 2568 2011-08-14 05:03:32Z bruno $ {L3 Experimental key-value interfaces} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3keyval.sty b/Master/texmf-dist/tex/latex/l3kernel/l3keyval.sty index c42867b5b48..a2b5411e916 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3keyval.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3keyval.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3keyval.dtx 2478 2011-06-19 21:34:23Z joseph $ +\GetIdInfo$Id: l3keyval.dtx 2601 2011-08-16 23:20:27Z bruno $ {L3 Experimental key-value parsing} %\section{Parsing key--value lists} %\begin{function}{\keyval_parse:NNn} @@ -71,8 +71,8 @@ \group_begin: \tl_clear:N \l_keyval_sanitise_tl \tl_set:Nn \l_keyval_sanitise_tl {#1} - \tl_replace_all_in:Nnn \l_keyval_sanitise_tl { = } { 8 } - \tl_replace_all_in:Nnn \l_keyval_sanitise_tl { , } { 9 } + \tl_replace_all:Nnn \l_keyval_sanitise_tl { = } { 8 } + \tl_replace_all:Nnn \l_keyval_sanitise_tl { , } { 9 } \tl_clear:N \l_keyval_parse_tl \exp_after:wN \keyval_parse_elt:w \exp_after:wN \q_no_value \l_keyval_sanitise_tl 9 \q_nil 9 diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3msg.sty b/Master/texmf-dist/tex/latex/l3kernel/l3msg.sty index 43ccc081d3d..c98aad9f7c2 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3msg.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3msg.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3msg.dtx 2551 2011-08-11 22:40:53Z bruno $ +\GetIdInfo$Id: l3msg.dtx 2601 2011-08-16 23:20:27Z bruno $ {L3 Experimental messages} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -61,7 +61,7 @@ \msg_kernel_error:nn { msg } { message-already-defined } {#1} {#2} } - \msg_set:nnnn {#1} {#2} + \msg_gset:nnnn {#1} {#2} } \cs_new_protected:Npn \msg_new:nnn #1#2#3 { \msg_new:nnnn {#1} {#2} {#3} { } } @@ -74,6 +74,15 @@ } \cs_new_protected:Npn \msg_set:nnn #1#2#3 { \msg_set:nnnn {#1} {#2} {#3} { } } +\cs_new_protected:Npn \msg_gset:nnnn #1#2#3#4 + { + \cs_gset:cpn { \c_msg_text_prefix_tl #1 / #2 } + ##1##2##3##4 {#3} + \cs_gset:cpn { \c_msg_more_text_prefix_tl #1 / #2 } + ##1##2##3##4 {#4} + } +\cs_new_protected:Npn \msg_gset:nnn #1#2#3 + { \msg_gset:nnnn {#1} {#2} {#3} { } } \tl_const:Nn \c_msg_coding_error_text_tl { This~is~a~coding~error. @@ -160,8 +169,8 @@ \tex_errhelp:D \exp_after:wN { \l_msg_tmp_tl } } \group_begin: % { - \char_set_lccode:w `\} = `\ \scan_stop: - \char_set_lccode:w `\& = `\! \scan_stop: + \char_set_lccode:nn {`\}} {`\ } + \char_set_lccode:nn {`\&} {`\!} \char_set_catcode_active:N \& \tl_to_lowercase:n { @@ -564,15 +573,27 @@ \c_msg_return_text_tl } \group_begin: -\cs_new:Npx \msg_expandable_error:n #1 +\char_set_catcode_math_superscript:N \^ +\char_set_lccode:nn {`^} {`\ } +\char_set_lccode:nn {`L} {`L} +\char_set_lccode:nn {`T} {`T} +\char_set_lccode:nn {`X} {`X} +\tl_to_lowercase:n { - \exp_not:n + \cs_new:Npx \msg_expandable_error:n #1 { - \exp_after:wN \exp_after:wN - \exp_after:wN \use_none_delimit_by_q_stop:w + \exp_not:n + { + \tex_romannumeral:D + \exp_after:wN \exp_after:wN + \exp_after:wN \msg_expandable_error_aux:w + \exp_after:wN \exp_after:wN + \exp_after:wN \c_zero + } + \exp_not:N \use:n { \exp_not:c { LaTeX3~error: } ^ #1 } + \exp_not:N \q_stop } - \exp_not:N \use:n { \exp_not:c { LaTeX3 ~ error : } #1 } - \exp_not:N \q_stop + \cs_new:Npn \msg_expandable_error_aux:w #1 ^ #2 \q_stop { #1 } } \group_end: \cs_new_eq:NN \msg_class_new:nn \msg_class_set:nn diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3prg.sty b/Master/texmf-dist/tex/latex/l3kernel/l3prg.sty index 29ace90b700..a77391e1ec1 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3prg.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3prg.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3prg.dtx 2553 2011-08-11 23:55:20Z bruno $ +\GetIdInfo$Id: l3prg.dtx 2601 2011-08-16 23:20:27Z bruno $ {L3 Experimental control structures} %% \ProvidesExplPackage @@ -556,8 +556,8 @@ \prg_define_quicksort:nnn {prg}{}{} \cs_set:Npn \prg_quicksort_function:n {\ERROR} \cs_set:Npn \prg_quicksort_compare:nnTF {\ERROR} -\cs_new_protected:Npn \prg_new_map_functions:Nn #1#2 { \deprectiated } -\cs_new_protected:Npn \prg_set_map_functions:Nn #1#2 { \deprectiated } +\cs_new_protected:Npn \prg_new_map_functions:Nn #1#2 { \deprecated } +\cs_new_protected:Npn \prg_set_map_functions:Nn #1#2 { \deprecated } %% %% %% End of file `l3prg.sty'. diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty b/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty index ab1ec03f467..0f3aee34e2c 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3seq.dtx 2556 2011-08-12 14:00:43Z bruno $ +\GetIdInfo$Id: l3seq.dtx 2586 2011-08-15 03:59:12Z bruno $ {L3 Experimental sequences and stacks} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -541,6 +541,38 @@ \prg_do_nothing: \exp_not:n { \seq_item:n {#1} } } +\cs_new_protected_nopar:Npn \seq_set_split:Nnn + { \seq_set_split_aux:NNnn \tl_set:Nx } +\cs_new_protected_nopar:Npn \seq_gset_split:Nnn + { \seq_set_split_aux:NNnn \tl_gset:Nx } +\cs_new_protected_nopar:Npn \seq_set_split_aux:NNnn #1 #2 #3 #4 + { + \tl_if_empty:nTF {#4} + { #1 #2 { } } + { + \tl_set:Nn \l_seq_tmpa_tl + { + \seq_set_split_aux_i:w \prg_do_nothing: + #4 + \seq_set_split_aux_end: + } + \tl_replace_all:Nnn \l_seq_tmpa_tl { #3 } + { + \seq_set_split_aux_end: + \seq_set_split_aux_i:w \prg_do_nothing: + } + \tl_set:Nx \l_seq_tmpa_tl { \l_seq_tmpa_tl } + #1 #2 { \l_seq_tmpa_tl } + } + } +\cs_new:Npn \seq_set_split_aux_i:w #1 \seq_set_split_aux_end: + { + \exp_not:N \seq_set_split_aux_ii:w + \exp_args:No \tl_trim_spaces:n {#1} + \exp_not:N \seq_set_split_aux_end: + } +\cs_new:Npn \seq_set_split_aux_ii:w #1 \seq_set_split_aux_end: + { \exp_not:n { \seq_item:n {#1} } } \cs_new_eq:NN \seq_top:NN \seq_get_left:NN \cs_new_eq:NN \seq_top:cN \seq_get_left:cN \cs_new_eq:NN \seq_display:N \seq_show:N diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3tl.sty b/Master/texmf-dist/tex/latex/l3kernel/l3tl.sty index b37aa775085..463d9f6f6b7 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3tl.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3tl.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3tl.dtx 2563 2011-08-13 12:23:59Z joseph $ +\GetIdInfo$Id: l3tl.dtx 2566 2011-08-13 22:04:42Z bruno $ {L3 Experimental token lists} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -456,22 +456,49 @@ \tl_reverse_items_aux:nw #2 \q_recursion_stop {#1} } -\cs_new:Npn \tl_trim_spaces:n #1 +\cs_set:Npn \tl_tmp:w #1 { - \etex_unexpanded:D \exp_after:wN \exp_after:wN \exp_after:wN - { \tl_trim_spaces_exp:n {#1} } + \cs_new:Npn \tl_trim_spaces:n ##1 + { + \etex_unexpanded:D + \tl_trim_spaces_aux_i:w + \q_mark + ##1 + \q_nil + \q_mark #1 { } + \q_mark \tl_trim_spaces_aux_ii:w + \tl_trim_spaces_aux_iii:w + #1 \q_nil + \tl_trim_spaces_aux_iv:w + \q_stop + } + \cs_new:Npn \tl_trim_spaces_aux_i:w ##1 \q_mark #1 ##2 \q_mark ##3 + { + ##3 + \tl_trim_spaces_aux_i:w + \q_mark + ##2 + \q_mark #1 {##1} + } + \cs_new:Npn \tl_trim_spaces_aux_ii:w ##1 \q_mark \q_mark ##2 + { + \tl_trim_spaces_aux_iii:w + ##2 + } + \cs_new:Npn \tl_trim_spaces_aux_iii:w ##1 #1 \q_nil ##2 + { + ##2 + ##1 \q_nil + \tl_trim_spaces_aux_iii:w + } + \cs_new:Npn \tl_trim_spaces_aux_iv:w ##1 \q_nil ##2 \q_stop + { \exp_after:wN { \use_none:n ##1 } } } +\tl_tmp:w { ~ } \cs_new_protected:Npn \tl_trim_spaces:N #1 { \tl_set:Nx #1 { \exp_after:wN \tl_trim_spaces:n \exp_after:wN {#1} } } \cs_new_protected:Npn \tl_gtrim_spaces:N #1 { \tl_gset:Nx #1 { \exp_after:wN \tl_trim_spaces:n \exp_after:wN {#1} } } -\group_begin: - \tex_catcode:D `\Q = 3 \scan_stop: - \cs_new:Npn \tl_trim_spaces_exp:n #1 - { \tex_romannumeral:D - `0 \tl_trim_spaces_aux_i:w \exp_not:N #1 Q ~ Q } - \cs_new:Npn \tl_trim_spaces_aux_i:w #1 ~ Q { \tl_trim_spaces_aux_ii:w #1 Q } - \cs_new:Npn \tl_trim_spaces_aux_ii:w #1 Q #2 {#1} -\group_end: \cs_generate_variant:Nn \tl_trim_spaces:N { c } \cs_generate_variant:Nn \tl_gtrim_spaces:N { c } \cs_new:Npn \tl_head:w #1#2 \q_stop {#1} diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3token.sty b/Master/texmf-dist/tex/latex/l3kernel/l3token.sty index c4ca0549b2f..018240d7bfa 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3token.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3token.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3token.dtx 2491 2011-07-02 11:49:37Z joseph $ +\GetIdInfo$Id: l3token.dtx 2579 2011-08-14 16:22:30Z bruno $ {L3 Experimental token manipulation} %% \begin{function}[EXP,pTF]{\token_if_protected_long_macro:N} \ProvidesExplPackage @@ -655,6 +655,23 @@ \char_tmp:NN \char_active_set_eq:NN \cs_set_eq:NN \char_tmp:NN \char_active_gset_eq:NN \cs_gset_eq:NN \group_end: +\cs_new_protected_nopar:Npn \peek_execute_branches_N_type: + { + \bool_if:nTF + { + \token_if_eq_catcode_p:NN \l_peek_token \c_group_begin_token || + \token_if_eq_catcode_p:NN \l_peek_token \c_group_end_token || + \token_if_eq_meaning_p:NN \l_peek_token \c_space_token + } + { \peek_false:w } + { \peek_true:w } + } +\cs_new_protected_nopar:Npn \peek_N_type:TF + { \peek_token_generic:NNTF \peek_execute_branches_N_type: \scan_stop: } +\cs_new_protected_nopar:Npn \peek_N_type:T + { \peek_token_generic:NNT \peek_execute_branches_N_type: \scan_stop: } +\cs_new_protected_nopar:Npn \peek_N_type:F + { \peek_token_generic:NNF \peek_execute_branches_N_type: \scan_stop: } \cs_new_eq:NN \char_set_catcode:w \tex_catcode:D \cs_new_eq:NN \char_set_mathcode:w \tex_mathcode:D \cs_new_eq:NN \char_set_lccode:w \tex_lccode:D diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3toks.sty b/Master/texmf-dist/tex/latex/l3kernel/l3toks.sty index 1b1ab880687..484cdd401e8 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3toks.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3toks.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3toks.dtx 2478 2011-06-19 21:34:23Z joseph $ +\GetIdInfo$Id: l3toks.dtx 2601 2011-08-16 23:20:27Z bruno $ {L3 Experimental token registers} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} |