From a8821950ae08fd013ee64b64531ab848daf3a52d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 22 May 2014 22:00:03 +0000 Subject: l3kernel (22may14) git-svn-id: svn://tug.org/texlive/trunk@34204 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/l3kernel/expl3.pdf | Bin 689801 -> 689512 bytes .../texmf-dist/doc/latex/l3kernel/interface3.pdf | Bin 1304588 -> 1304307 bytes .../texmf-dist/doc/latex/l3kernel/l3docstrip.pdf | Bin 449467 -> 451369 bytes .../texmf-dist/doc/latex/l3kernel/l3styleguide.pdf | Bin 273228 -> 273228 bytes .../doc/latex/l3kernel/l3syntax-changes.pdf | Bin 220218 -> 220218 bytes Master/texmf-dist/doc/latex/l3kernel/source3.pdf | Bin 4053430 -> 4052259 bytes Master/texmf-dist/source/latex/l3kernel/expl3.dtx | 36 +++--- .../source/latex/l3kernel/l3bootstrap.dtx | 68 ++++++----- .../source/latex/l3kernel/l3docstrip.dtx | 20 ++++ Master/texmf-dist/source/latex/l3kernel/l3int.dtx | 4 +- Master/texmf-dist/source/latex/l3kernel/l3keys.dtx | 118 ++++++++----------- .../texmf-dist/tex/latex/l3kernel/expl3-code.tex | 128 +++++++++++---------- .../tex/latex/l3kernel/expl3-generic.tex | 18 ++- Master/texmf-dist/tex/latex/l3kernel/expl3.sty | 4 +- .../texmf-dist/tex/latex/l3kernel/l3docstrip.tex | 12 ++ 15 files changed, 227 insertions(+), 181 deletions(-) diff --git a/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf b/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf index 0e17ce2c322..8e4d51e335d 100644 Binary files a/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf and b/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf differ diff --git a/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf b/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf index 5eff5fa2934..8d8df4f8fd9 100644 Binary files a/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf and b/Master/texmf-dist/doc/latex/l3kernel/interface3.pdf differ diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf index 2dd8f272949..bee0b277eb5 100644 Binary files a/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf and b/Master/texmf-dist/doc/latex/l3kernel/l3docstrip.pdf differ diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf index 1ac2dfd418a..c74c81b5e09 100644 Binary files a/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf and b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf differ diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf index 325284f7319..15cea2500aa 100644 Binary files a/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf and b/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf differ diff --git a/Master/texmf-dist/doc/latex/l3kernel/source3.pdf b/Master/texmf-dist/doc/latex/l3kernel/source3.pdf index 871dea20c2f..0a3e63cf52f 100644 Binary files a/Master/texmf-dist/doc/latex/l3kernel/source3.pdf and b/Master/texmf-dist/doc/latex/l3kernel/source3.pdf differ diff --git a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx index 85a95511ca2..9a757ce9240 100644 --- a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx @@ -36,8 +36,8 @@ %<*driver|generic|package> \def\ExplFileName{expl3} \def\ExplFileDescription{L3 programming layer} -\def\ExplFileDate{2014/05/06} -\def\ExplFileVersion{4751} +\def\ExplFileDate{2014/05/20} +\def\ExplFileVersion{4814} % %<*driver> \documentclass[full]{l3doc} @@ -1067,17 +1067,17 @@ % \begin{macrocode} %<*!loader> \begingroup - \begingroup\expandafter\expandafter\expandafter\endgroup - \expandafter\ifx PackageError\endcsname\relax + \def\next{\endgroup} + \expandafter\ifx\csname PackageError\endcsname\relax \begingroup - \def\PackageError##1##2##3% + \def\next{\endgroup\endgroup} + \def\PackageError#1#2#3% {% \endgroup - \errhelp{##3}% - \errmessage{##1 Error: ##2!} + \errhelp{#3}% + \errmessage{#1 Error: #2!} } \fi - \def\next{} \expandafter\ifx\csname ExplLoaderFileVersion\endcsname\relax \def\next {% @@ -1086,11 +1086,11 @@ You have attempted to use the expl3 code directly rather than using the correct loader. Loading of expl3 will abort. } + \endgroup \endinput } \else \ifx\ExplLoaderFileVersion\ExplFileVersion - \def\next{} \else \def\next {% @@ -1100,11 +1100,11 @@ probably you have one or more files 'locally installed' which are in conflict. Loading of expl3 will abort. }% + \endgroup \endinput } \fi - \expandafter\fi -\expandafter\endgroup +\fi \next % % \end{macrocode} @@ -1633,8 +1633,17 @@ % 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 } } +\cs_set_protected:Npn \ProvidesExplFile + { + \group_begin: + \char_set_catcode_space:n { `\ } + \ProvidesExplFileAux + } +\cs_set_protected:Npn \ProvidesExplFileAux #1#2#3#4 + { + \group_end: + \iow_log:x { File:~#1~#2~v#3~#4 } + } \tex_input:D l3 \xetex_if_engine:TF @@ -1648,6 +1657,7 @@ } .def \scan_stop: \cs_undefine:N \ProvidesExplFile +\cs_undefine:N \ProvidesExplFileAux % \end{macrocode} % % For the generic loader, a few final steps to take. Turn of \cs{expl3} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx index 212e9ff56dc..9e27324cbc1 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx @@ -145,7 +145,7 @@ % \end{macro} % \end{macro} % \end{macro} -\GetIdInfo$Id: l3bootstrap.dtx 4750 2014-05-06 16:56:59Z joseph $ +\GetIdInfo$Id: l3bootstrap.dtx 4782 2014-05-16 22:12:19Z joseph $ {L3 Bootstrap code} % %<*driver> @@ -326,11 +326,11 @@ % % 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. +% then be picked up later. This definition may need to be done twice: one +% \enquote{now} and once at the start of every job. The latter can occur +% in package mode if for example a custom format is being constructed. +% To achieve this while not requiring a separate file, the Lua code is saved +% into a macro then used twice. % \begin{macrocode} \begingroup \expandafter\ifx\csname directlua\endcsname\relax @@ -339,14 +339,9 @@ \else \catcode`\_=11 % \catcode`\:=11 % -%<*initex> \def\tempa -% -%<*package> - \directlua -% {% - l3kernel = { } + l3kernel = l3kernel or { } function l3kernel.strcmp (A, B) if A == B then tex.write ("0") @@ -357,13 +352,23 @@ end end } -%<*initex> \directlua{\tempa} - \global\everyjob\expandafter - {% - \expandafter\luatex_directlua:D\expandafter{\tempa}% - } -% +% \end{macrocode} +% A test for \LuaTeX{} in Ini\TeX{} mode. +% \begin{macrocode} + \ifnum 0% + \directlua + {% + if status.ini_version then + tex.write("1") + end + }>0 % + \global\everyjob\expandafter + {% + \the\expandafter\everyjob + \expandafter\luatex_directlua:D\expandafter{\tempa}% + } + \fi \long\gdef\expl_pdfstrcmp#1#2% {% \luatex_directlua:D @@ -389,6 +394,7 @@ % must be available if it is. % \begin{macrocode} \begingroup + \def\next{\endgroup} \def\ShortText{Required primitives not found}% \def\LongText% {% @@ -406,9 +412,8 @@ \expandafter\ifx\csname expl_pdfstrcmp\endcsname\relax %<*initex> \def\LineBreak{^^J}% - \edef\Error% + \edef\next {% - \endgroup \newlinechar`\noexpand\^^J\relax \errhelp {% @@ -419,26 +424,33 @@ Format building will abort!\LineBreak }% \errmessage{\ShortText}% + \endgroup \noexpand\end }% % %<*package> \def\LineBreak{\noexpand\MessageBreak}% - \edef\Error% + \expandafter\ifx\csname PackageError\endcsname\relax + \def\LineBreak{^^J}% + \begingroup + \def\PackageError#1#2#3% + {% + \endgroup + \errhelp{#3}% + \errmessage{#1 Error: #2!} + }% + \fi + \edef\next {% - \endgroup \noexpand\PackageError{expl3}{\ShortText} {\LongText Loading of expl3 will abort!}% + \endgroup \noexpand\endinput }% % - \expandafter\expandafter\expandafter\Error - \else - \endgroup \fi -\else - \endgroup -\fi + \fi +\next % \end{macrocode} % % \subsection{Extending allocators} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx index 057b93d8acf..fd300d5ee45 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx @@ -271,6 +271,26 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\doOption} +% As \textsf{DocStrip} processes each line, a line starting with |%<| triggers (via \cs{checkOption} above) a look-ahead to establish the type of guard encountered. +% Of the branching possibilities, if we ignore the deprecated |+| and |-| and choose to do no replacement for the special verbatim mode, the only branch that we need to alter is that for a single-line guard such as\\ | % ...stats-only code to include...|. +% The original definition of \cs{doOption} did not use \cs{inLine} but I believe we're safe to do so. +% \begin{macrocode} +\def\doOption#1>#2\endLine{% + \maybeMsg{<#1 . >}% + \Evaluate{#1}% + \def\do##1##2##3{% + \if1\Expr{##2}% + \def\inLine{#2}% + \replaceModuleInLine + \StreamPut##1{\inLine}% + \fi + }% + \activefiles +} +% \end{macrocode} +% \end{macro} +% % \begin{macrocode} % % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx index 2fa99d37bc9..c5b6d966ae5 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx @@ -37,7 +37,7 @@ \documentclass[full]{l3doc} % %<*driver|package> -\GetIdInfo$Id: l3int.dtx 4728 2014-05-04 13:25:37Z joseph $ +\GetIdInfo$Id: l3int.dtx 4776 2014-05-16 14:46:44Z joseph $ {L3 Integers} % %<*driver> @@ -666,7 +666,7 @@ % % \begin{function}[EXP]{\int_from_alph:n} % \begin{syntax} -% \cs{int_from_alpa:n} \Arg{letters} +% \cs{int_from_alph:n} \Arg{letters} % \end{syntax} % Converts the \meta{letters} into the integer (base~$10$) % representation and leaves this in the input stream. The diff --git a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx index f49bd433df4..4aa9f0d1692 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx @@ -37,7 +37,7 @@ \documentclass[full]{l3doc} % %<*driver|package> -\GetIdInfo$Id: l3keys.dtx 4728 2014-05-04 13:25:37Z joseph $ +\GetIdInfo$Id: l3keys.dtx 4753 2014-05-08 20:12:49Z joseph $ {L3 Key-value interfaces} % %<*driver> @@ -884,7 +884,6 @@ \cs_new_protected:Npn \@@_parse:n #1 { \group_begin: - \tl_clear:N \l_@@_sanitise_tl \tl_set:Nn \l_@@_sanitise_tl {#1} \tl_replace_all:Nnn \l_@@_sanitise_tl { = } { 8 } \tl_replace_all:Nnn \l_@@_sanitise_tl { , } { 9 } @@ -901,39 +900,42 @@ % \begin{macro}{\@@_parse_elt:w} % Each item to be parsed will have \cs{q_nil} added to the front. % Hence the blank test here can always be used to find a totally -% empty argument. If this is the case, the system loops round. If there -% is something to parse, there is a check for the end of the input before -% handing off. +% empty argument. To allow rapid matching for an |=| while not stripping +% any braces, another \cs{q_nil} needed before the next phase of the +% parser. Finally, loop around for the next item, adding in the +% \cs{q_nil}: this happens whatever the nature of the current argument +% as the end-of-recursion will clear up in all cases. % \begin{macrocode} \cs_new_protected:Npn \@@_parse_elt:w #1 , { - \tl_if_blank:oTF { \use_none:n #1 } - { \@@_parse_elt:w \q_nil } + \tl_if_blank:oF { \use_none:n #1 } { - \quark_if_recursion_tail_stop:o { \use_ii:nn #1 } - \@@_split_key_value:w #1 = = \q_stop - \@@_parse_elt:w \q_nil + \quark_if_recursion_tail_stop:o { \use_none:n #1 } + \@@_split_key_value:w #1 \q_nil = = \q_stop } + \@@_parse_elt:w \q_nil } % \end{macrocode} % \end{macro} % % \begin{macro}{\@@_split_key_value:w} -% \begin{macro}[aux, EXP]{\@@_split_key_value:wTF} -% The key and value are handled separately. First the key is grabbed and -% saved as \cs{l_@@_key_tl}. Then a check is need to see if there is -% a value at all: if not then the key name is simply added to the output. -% If there is a value then there is a check to ensure that there was -% only one |=| in the input (remembering some extra ones are around at -% the moment to prevent errors). All being well, there is an -% hand-off to find the value: the \cs{q_nil} is there to prevent loss -% of braces. -% \begin{macrocode} -\cs_new_protected:Npn \@@_split_key_value:w #1 = #2 \q_stop +% \begin{macro}[aux]{\@@_split_key:w} +% Split the key and value using a delimited argument. The \cs{q_nil} +% values added earlier ensure that no braces will be stripped as part +% of this process. A blank test can then be used on |#3|: it is only +% empty if there was no |=| in the original input. In that case, strip +% a \cs{q_nil} from the end of the key name then hand on to remove other +% things and store as \cs{l_@@_key_tl} before adding to the output token +% list. In the case where there is an |=|, first tidy up the key, this time +% without a trailing \cs{q_nil}, then do a check to ensure that |#3| is +% exactly one token (|=|). With that done, the final stage is to hand off +% to tidy up the value. +% \begin{macrocode} +\cs_new_protected:Npn \@@_split_key_value:w #1 = #2 = #3 \q_stop { - \@@_split_key:n {#1} - \str_if_eq:nnTF {#2} { = } + \tl_if_blank:nTF {#3} { + \@@_split_key:w #1 \q_stop \tl_put_right:Nx \l_@@_parse_tl { \exp_not:c @@ -942,80 +944,56 @@ } } { - \@@_split_key_value:wTF #2 \q_no_value \q_stop - { \@@_split_value:w \q_nil #2 } + \@@_split:Nn \l_@@_key_tl {#1} + \tl_if_blank:oTF { \use_none:n #3 } + { \@@_split_value:w \q_nil #2 \q_stop } { \__msg_kernel_error:nn { kernel } { misplaced-equals-sign } } } } -\cs_new:Npn \@@_split_key_value:wTF #1 = #2#3 \q_stop - { \tl_if_head_eq_meaning:nNTF {#3} \q_no_value } +\cs_new_protected:Npn \@@_split_key:w #1 \q_nil \q_stop + { \@@_split:Nn \l_@@_key_tl {#1} } % \end{macrocode} % \end{macro} % \end{macro} % -% \begin{macro}{\@@_split_key:n} -% \begin{macro}[aux]{\@@_split_key:w} +% \begin{macro}{\@@_split:Nn} +% \begin{macro}[aux]{\@@_split:Nw} % There are two possible cases here. The first case is that |#1| is % surrounded by braces, in which case the |\use_none:nnn #1 \q_nil \q_nil| % will yield \cs{q_nil}. There, we can remove the leading \cs{q_nil}, the % braces and any spaces around the outside with \cs{use_ii:nnn}. On the % other hand, if there are no braces then the second branch removes the -% leading \cs{q_nil} and any surrounding spaces. (This code does not have -% to cover the case with no key, as that's already taken out above.) +% leading \cs{q_nil} and any surrounding spaces. % \begin{macrocode} -\cs_new_protected:Npn \@@_split_key:n #1 +\cs_new_protected:Npn \@@_split:Nn #1#2 { - \quark_if_nil:oTF { \use_none:nnn #1 \q_nil \q_nil } - { \tl_set:Nx \l_@@_key_tl { \exp_not:o { \use_ii:nnn #1 \q_nil } } } - { \@@_split_key:w #1 \q_stop } + \quark_if_nil:oTF { \use_none:nnn #2 \q_nil \q_nil } + { \tl_set:Nx #1 { \exp_not:o { \use_ii:nnn #2 \q_nil } } } + { \@@_split:Nw #1 #2 \q_stop } } -\cs_new_protected:Npn \@@_split_key:w \q_nil #1 \q_stop - { \tl_set:Nx \l_@@_key_tl { \tl_trim_spaces:n {#1} } } +\cs_new_protected:Npn \@@_split:Nw #1 \q_nil #2 \q_stop + { \tl_set:Nx #1 { \tl_trim_spaces:n {#2} } } % \end{macrocode} % \end{macro} % \end{macro} % % \begin{macro}{\@@_split_value:w} -% Here the value has to be separated from the equals signs and the -% leading \cs{q_nil} added in to keep the brace levels. Fist the -% processing function can be added to the output list. If there is no -% value, setting \cs{l_@@_value_tl} with three groups removed will -% leave nothing at all, and so an empty group can be added to the -% parsed list. On the other hand, if the value is entirely contained -% within a set of braces then \cs{l_@@_value_tl} will contain -% \cs{q_nil} only. In that case, strip off the leading quark using -% \cs{use_ii:nnn}, which also deals with any spaces. -% \begin{macrocode} -\cs_new_protected:Npn \@@_split_value:w #1 = = +% As this stage there is just the value to deal with. The leading and +% trailing \cs{q_nil} tokens are removed in two steps before storing the +% value with spaces stripped (see \cs{@@_split:Nn}). Doing the storage +% of key and value in one shot will put exactly the right number of +% brace groups into the output. +% \begin{macrocode} +\cs_new_protected:Npn \@@_split_value:w #1 \q_nil \q_stop { + \@@_split:Nn \l_@@_value_tl {#1} \tl_put_right:Nx \l_@@_parse_tl { \exp_not:c { @@_key_value_elt_ \int_use:N \g_@@_level_int :nn } { \exp_not:o \l_@@_key_tl } + { \exp_not:o \l_@@_value_tl } } - \tl_set:Nx \l_@@_value_tl - { \exp_not:o { \use_none:nnn #1 \q_nil \q_nil } } - \tl_if_empty:NTF \l_@@_value_tl - { \tl_put_right:Nn \l_@@_parse_tl { { } } } - { - \quark_if_nil:NTF \l_@@_value_tl - { - \tl_put_right:Nx \l_@@_parse_tl - { { \exp_not:o { \use_ii:nnn #1 \q_nil } } } - } - { \@@_split_value_aux:w #1 \q_stop } - } - } -% \end{macrocode} -% A similar idea to the key code: remove the spaces from each end and -% deal with one set of braces. -% \begin{macrocode} -\cs_new_protected:Npn \@@_split_value_aux:w \q_nil #1 \q_stop - { - \tl_set:Nx \l_@@_value_tl { \tl_trim_spaces:n {#1} } - \tl_put_right:Nx \l_@@_parse_tl - { { \exp_not:o \l_@@_value_tl } } } % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex index 563e66c32ad..5940982692f 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex @@ -81,20 +81,20 @@ %% ----------------------------------------------------------------------- \def\ExplFileName{expl3} \def\ExplFileDescription{L3 programming layer} -\def\ExplFileDate{2014/05/06} -\def\ExplFileVersion{4751} +\def\ExplFileDate{2014/05/20} +\def\ExplFileVersion{4814} \begingroup - \begingroup\expandafter\expandafter\expandafter\endgroup - \expandafter\ifx PackageError\endcsname\relax + \def\next{\endgroup} + \expandafter\ifx\csname PackageError\endcsname\relax \begingroup - \def\PackageError##1##2##3% + \def\next{\endgroup\endgroup} + \def\PackageError#1#2#3% {% \endgroup - \errhelp{##3}% - \errmessage{##1 Error: ##2!} + \errhelp{#3}% + \errmessage{#1 Error: #2!} } \fi - \def\next{} \expandafter\ifx\csname ExplLoaderFileVersion\endcsname\relax \def\next {% @@ -103,11 +103,11 @@ You have attempted to use the expl3 code directly rather than using the correct loader. Loading of expl3 will abort. } + \endgroup \endinput } \else \ifx\ExplLoaderFileVersion\ExplFileVersion - \def\next{} \else \def\next {% @@ -117,11 +117,11 @@ probably you have one or more files 'locally installed' which are in conflict. Loading of expl3 will abort. }% + \endgroup \endinput } \fi - \expandafter\fi -\expandafter\endgroup +\fi \next \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname ver@\ExplFileName -code.tex\endcsname\relax @@ -241,7 +241,7 @@ } } \endgroup -\GetIdInfo$Id: l3bootstrap.dtx 4750 2014-05-06 16:56:59Z joseph $ +\GetIdInfo$Id: l3bootstrap.dtx 4782 2014-05-16 22:12:19Z joseph $ {L3 Bootstrap code} \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname pdfstrcmp\endcsname\relax @@ -254,9 +254,9 @@ \else \catcode`\_=11 % \catcode`\:=11 % - \directlua + \def\tempa {% - l3kernel = { } + l3kernel = l3kernel or { } function l3kernel.strcmp (A, B) if A == B then tex.write ("0") @@ -267,6 +267,20 @@ end end } + \directlua{\tempa} + \ifnum 0% + \directlua + {% + if status.ini_version then + tex.write("1") + end + }>0 % + \global\everyjob\expandafter + {% + \the\expandafter\everyjob + \expandafter\luatex_directlua:D\expandafter{\tempa}% + } + \fi \long\gdef\expl_pdfstrcmp#1#2% {% \luatex_directlua:D @@ -282,6 +296,7 @@ \fi \endgroup \begingroup + \def\next{\endgroup} \def\ShortText{Required primitives not found}% \def\LongText% {% @@ -298,20 +313,26 @@ \catcode`\_=11 % \expandafter\ifx\csname expl_pdfstrcmp\endcsname\relax \def\LineBreak{\noexpand\MessageBreak}% - \edef\Error% + \expandafter\ifx\csname PackageError\endcsname\relax + \def\LineBreak{^^J}% + \begingroup + \def\PackageError#1#2#3% + {% + \endgroup + \errhelp{#3}% + \errmessage{#1 Error: #2!} + }% + \fi + \edef\next {% - \endgroup \noexpand\PackageError{expl3}{\ShortText} {\LongText Loading of expl3 will abort!}% + \endgroup \noexpand\endinput }% - \expandafter\expandafter\expandafter\Error - \else - \endgroup \fi -\else - \endgroup -\fi + \fi +\next \begingroup \def\@tempa{LaTeX2e} \def\next{} @@ -3604,7 +3625,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3int.dtx 4728 2014-05-04 13:25:37Z joseph $ +\GetIdInfo$Id: l3int.dtx 4776 2014-05-16 14:46:44Z joseph $ {L3 Integers} \cs_new_eq:NN \__int_value:w \tex_number:D \cs_new_eq:NN \__int_eval:w \etex_numexpr:D @@ -8122,7 +8143,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3keys.dtx 4728 2014-05-04 13:25:37Z joseph $ +\GetIdInfo$Id: l3keys.dtx 4753 2014-05-08 20:12:49Z joseph $ {L3 Key-value interfaces} \int_new:N \g__keyval_level_int \tl_new:N \l__keyval_key_tl @@ -8140,7 +8161,6 @@ \cs_new_protected:Npn \__keyval_parse:n #1 { \group_begin: - \tl_clear:N \l__keyval_sanitise_tl \tl_set:Nn \l__keyval_sanitise_tl {#1} \tl_replace_all:Nnn \l__keyval_sanitise_tl { = } { 8 } \tl_replace_all:Nnn \l__keyval_sanitise_tl { , } { 9 } @@ -8153,19 +8173,18 @@ } \cs_new_protected:Npn \__keyval_parse_elt:w #1 , { - \tl_if_blank:oTF { \use_none:n #1 } - { \__keyval_parse_elt:w \q_nil } + \tl_if_blank:oF { \use_none:n #1 } { - \quark_if_recursion_tail_stop:o { \use_ii:nn #1 } - \__keyval_split_key_value:w #1 = = \q_stop - \__keyval_parse_elt:w \q_nil + \quark_if_recursion_tail_stop:o { \use_none:n #1 } + \__keyval_split_key_value:w #1 \q_nil = = \q_stop } + \__keyval_parse_elt:w \q_nil } -\cs_new_protected:Npn \__keyval_split_key_value:w #1 = #2 \q_stop +\cs_new_protected:Npn \__keyval_split_key_value:w #1 = #2 = #3 \q_stop { - \__keyval_split_key:n {#1} - \str_if_eq:nnTF {#2} { = } + \tl_if_blank:nTF {#3} { + \__keyval_split_key:w #1 \q_stop \tl_put_right:Nx \l__keyval_parse_tl { \exp_not:c @@ -8174,47 +8193,32 @@ } } { - \__keyval_split_key_value:wTF #2 \q_no_value \q_stop - { \__keyval_split_value:w \q_nil #2 } + \__keyval_split:Nn \l__keyval_key_tl {#1} + \tl_if_blank:oTF { \use_none:n #3 } + { \__keyval_split_value:w \q_nil #2 \q_stop } { \__msg_kernel_error:nn { kernel } { misplaced-equals-sign } } } } -\cs_new:Npn \__keyval_split_key_value:wTF #1 = #2#3 \q_stop - { \tl_if_head_eq_meaning:nNTF {#3} \q_no_value } -\cs_new_protected:Npn \__keyval_split_key:n #1 +\cs_new_protected:Npn \__keyval_split_key:w #1 \q_nil \q_stop + { \__keyval_split:Nn \l__keyval_key_tl {#1} } +\cs_new_protected:Npn \__keyval_split:Nn #1#2 { - \quark_if_nil:oTF { \use_none:nnn #1 \q_nil \q_nil } - { \tl_set:Nx \l__keyval_key_tl { \exp_not:o { \use_ii:nnn #1 \q_nil } } } - { \__keyval_split_key:w #1 \q_stop } + \quark_if_nil:oTF { \use_none:nnn #2 \q_nil \q_nil } + { \tl_set:Nx #1 { \exp_not:o { \use_ii:nnn #2 \q_nil } } } + { \__keyval_split:Nw #1 #2 \q_stop } } -\cs_new_protected:Npn \__keyval_split_key:w \q_nil #1 \q_stop - { \tl_set:Nx \l__keyval_key_tl { \tl_trim_spaces:n {#1} } } -\cs_new_protected:Npn \__keyval_split_value:w #1 = = +\cs_new_protected:Npn \__keyval_split:Nw #1 \q_nil #2 \q_stop + { \tl_set:Nx #1 { \tl_trim_spaces:n {#2} } } +\cs_new_protected:Npn \__keyval_split_value:w #1 \q_nil \q_stop { + \__keyval_split:Nn \l__keyval_value_tl {#1} \tl_put_right:Nx \l__keyval_parse_tl { \exp_not:c { __keyval_key_value_elt_ \int_use:N \g__keyval_level_int :nn } { \exp_not:o \l__keyval_key_tl } + { \exp_not:o \l__keyval_value_tl } } - \tl_set:Nx \l__keyval_value_tl - { \exp_not:o { \use_none:nnn #1 \q_nil \q_nil } } - \tl_if_empty:NTF \l__keyval_value_tl - { \tl_put_right:Nn \l__keyval_parse_tl { { } } } - { - \quark_if_nil:NTF \l__keyval_value_tl - { - \tl_put_right:Nx \l__keyval_parse_tl - { { \exp_not:o { \use_ii:nnn #1 \q_nil } } } - } - { \__keyval_split_value_aux:w #1 \q_stop } - } - } -\cs_new_protected:Npn \__keyval_split_value_aux:w \q_nil #1 \q_stop - { - \tl_set:Nx \l__keyval_value_tl { \tl_trim_spaces:n {#1} } - \tl_put_right:Nx \l__keyval_parse_tl - { { \exp_not:o \l__keyval_value_tl } } } \cs_new_protected:Npn \keyval_parse:NNn #1#2#3 { diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex index 360099ac915..5f41e03a2d2 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex @@ -47,8 +47,8 @@ %% ----------------------------------------------------------------------- \def\ExplFileName{expl3} \def\ExplFileDescription{L3 programming layer} -\def\ExplFileDate{2014/05/06} -\def\ExplFileVersion{4751} +\def\ExplFileDate{2014/05/20} +\def\ExplFileVersion{4814} \let\ExplLoaderFileVersion\ExplFileVersion \begingroup \def\tempa{LaTeX2e} @@ -100,8 +100,17 @@ \input expl3-code.tex % \cs_set_eq:NN \__iow_wrap_set:Nx \tl_set:Nx \protected\def\GetIdInfoLog{} -\cs_set_protected:Npn \ProvidesExplFile #1#2#3#4 - { \iow_log:n { File:~#1~#2~v#3~#4 } } +\cs_set_protected:Npn \ProvidesExplFile + { + \group_begin: + \char_set_catcode_space:n { `\ } + \ProvidesExplFileAux + } +\cs_set_protected:Npn \ProvidesExplFileAux #1#2#3#4 + { + \group_end: + \iow_log:x { File:~#1~#2~v#3~#4 } + } \tex_input:D l3 \xetex_if_engine:TF @@ -115,6 +124,7 @@ } .def \scan_stop: \cs_undefine:N \ProvidesExplFile +\cs_undefine:N \ProvidesExplFileAux \ExplSyntaxOff \l@expl@tidy@tl %% diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty index fa30ff9d0e9..1b25d6f4498 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty @@ -47,8 +47,8 @@ %% ----------------------------------------------------------------------- \def\ExplFileName{expl3} \def\ExplFileDescription{L3 programming layer} -\def\ExplFileDate{2014/05/06} -\def\ExplFileVersion{4751} +\def\ExplFileDate{2014/05/20} +\def\ExplFileVersion{4814} \let\ExplLoaderFileVersion\ExplFileVersion \ProvidesPackage{\ExplFileName} [% diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3docstrip.tex b/Master/texmf-dist/tex/latex/l3kernel/l3docstrip.tex index a8d05a96841..c4cb4792191 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3docstrip.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/l3docstrip.tex @@ -101,6 +101,18 @@ \let\do\putline@do \activefiles } +\def\doOption#1>#2\endLine{% + \maybeMsg{<#1 . >}% + \Evaluate{#1}% + \def\do##1##2##3{% + \if1\Expr{##2}% + \def\inLine{#2}% + \replaceModuleInLine + \StreamPut##1{\inLine}% + \fi + }% + \activefiles +} %% %% %% End of file `l3docstrip.tex'. -- cgit v1.2.3