From 7a50f35d6fd3bd705c78298b1ccc085991638f87 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 29 Dec 2011 23:03:42 +0000 Subject: l3kernel 3109 (29dec11) git-svn-id: svn://tug.org/texlive/trunk@24971 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/l3kernel/README | 10 +- Master/texmf-dist/doc/latex/l3kernel/expl3.pdf | Bin 633603 -> 633438 bytes .../texmf-dist/doc/latex/l3kernel/interface3.pdf | Bin 1084198 -> 1091513 bytes .../texmf-dist/doc/latex/l3kernel/l3styleguide.pdf | Bin 265605 -> 265601 bytes .../texmf-dist/doc/latex/l3kernel/l3styleguide.tex | 2 +- .../doc/latex/l3kernel/l3syntax-changes.pdf | Bin 200418 -> 200418 bytes Master/texmf-dist/doc/latex/l3kernel/source3.pdf | Bin 2663986 -> 2682730 bytes Master/texmf-dist/source/latex/l3kernel/expl3.dtx | 29 +- .../texmf-dist/source/latex/l3kernel/l3alloc.dtx | 14 +- .../texmf-dist/source/latex/l3kernel/l3basics.dtx | 213 ++++++++------- Master/texmf-dist/source/latex/l3kernel/l3box.dtx | 53 ++-- .../texmf-dist/source/latex/l3kernel/l3clist.dtx | 62 ++++- .../texmf-dist/source/latex/l3kernel/l3coffins.dtx | 124 ++++----- .../texmf-dist/source/latex/l3kernel/l3drivers.dtx | 24 +- .../texmf-dist/source/latex/l3kernel/l3expan.dtx | 10 +- Master/texmf-dist/source/latex/l3kernel/l3file.dtx | 26 +- Master/texmf-dist/source/latex/l3kernel/l3fp.dtx | 292 ++++++++++----------- Master/texmf-dist/source/latex/l3kernel/l3int.dtx | 75 ++++-- Master/texmf-dist/source/latex/l3kernel/l3io.dtx | 161 ++++++------ Master/texmf-dist/source/latex/l3kernel/l3keys.dtx | 100 +++---- .../texmf-dist/source/latex/l3kernel/l3luatex.dtx | 75 +++--- Master/texmf-dist/source/latex/l3kernel/l3msg.dtx | 43 +-- Master/texmf-dist/source/latex/l3kernel/l3prg.dtx | 77 +++--- Master/texmf-dist/source/latex/l3kernel/l3prop.dtx | 6 +- .../texmf-dist/source/latex/l3kernel/l3quark.dtx | 102 ++++++- Master/texmf-dist/source/latex/l3kernel/l3seq.dtx | 135 ++++++++-- Master/texmf-dist/source/latex/l3kernel/l3skip.dtx | 16 +- Master/texmf-dist/source/latex/l3kernel/l3tl.dtx | 134 +++++----- .../texmf-dist/source/latex/l3kernel/l3token.dtx | 202 +++++++------- Master/texmf-dist/source/latex/l3kernel/l3toks.dtx | 18 +- Master/texmf-dist/tex/latex/l3kernel/expl3.sty | 14 +- Master/texmf-dist/tex/latex/l3kernel/l3basics.sty | 77 +++--- Master/texmf-dist/tex/latex/l3kernel/l3box.sty | 28 +- Master/texmf-dist/tex/latex/l3kernel/l3clist.sty | 28 +- Master/texmf-dist/tex/latex/l3kernel/l3coffins.sty | 116 ++++---- Master/texmf-dist/tex/latex/l3kernel/l3expan.sty | 10 +- Master/texmf-dist/tex/latex/l3kernel/l3file.sty | 24 +- Master/texmf-dist/tex/latex/l3kernel/l3fp.sty | 288 ++++++++++---------- Master/texmf-dist/tex/latex/l3kernel/l3int.sty | 49 ++-- Master/texmf-dist/tex/latex/l3kernel/l3io.sty | 97 ++++--- Master/texmf-dist/tex/latex/l3kernel/l3keys.sty | 100 +++---- Master/texmf-dist/tex/latex/l3kernel/l3luatex.sty | 58 ++-- Master/texmf-dist/tex/latex/l3kernel/l3msg.sty | 43 +-- Master/texmf-dist/tex/latex/l3kernel/l3prg.sty | 42 +-- Master/texmf-dist/tex/latex/l3kernel/l3prop.sty | 6 +- Master/texmf-dist/tex/latex/l3kernel/l3quark.sty | 19 +- Master/texmf-dist/tex/latex/l3kernel/l3seq.sty | 58 ++-- Master/texmf-dist/tex/latex/l3kernel/l3skip.sty | 2 +- Master/texmf-dist/tex/latex/l3kernel/l3tl.sty | 98 +++---- Master/texmf-dist/tex/latex/l3kernel/l3token.sty | 146 +++++------ 50 files changed, 1856 insertions(+), 1450 deletions(-) diff --git a/Master/texmf-dist/doc/latex/l3kernel/README b/Master/texmf-dist/doc/latex/l3kernel/README index cb1e76ed6e7..51a7f2857b0 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/README +++ b/Master/texmf-dist/doc/latex/l3kernel/README @@ -41,9 +41,9 @@ releases of these engines are supported. Discussion ---------- -Discussion concerning the approach, suggestions for improvements, +Discussion concerning the approach, suggestions for improvements, changes, additions, _etc._ should be addressed to the list -[LaTeX-L](http://news.gmane.org/group/gmane.comp.tex.latex.latex3). +[LaTeX-L](http://news.gmane.org/group/gmane.comp.tex.latex.latex3). You can subscribe to this list by sending mail to @@ -59,7 +59,7 @@ Bugs The issue tracker for LaTeX3 bugs is currently located at https://github.com/latex3/svn-mirror/issues - + Please report specific issues with LaTeX3 code there. More general discussion should be directed to the LaTeX-L lists. @@ -81,14 +81,14 @@ the team members are * Chris Rowley * Rainer Schöpf * Joseph Wright - + Former members of The LaTeX3 Project team were * Michael Downes * Denys Duchier * Alan Jeffrey * Martin Schröder - + The development team can be contacted by e-mail: ; for general LaTeX3 discussion the [LaTeX-L list](http://news.gmane.org/group/gmane.comp.tex.latex.latex3) diff --git a/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf b/Master/texmf-dist/doc/latex/l3kernel/expl3.pdf index 4c0b18a2777..e1a52595ed1 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 c528d14d5f8..8946bdc4320 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/l3styleguide.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.pdf index e807248c0db..95e249665b2 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/l3styleguide.tex b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex index 56c3135fbd3..c14d7d8eefd 100644 --- a/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex +++ b/Master/texmf-dist/doc/latex/l3kernel/l3styleguide.tex @@ -142,7 +142,7 @@ these lines are all part of the brace group. The result of these lay-out conventions is code which will in general look like the example: \begin{verbatim*} -\cs_new_nopar:Npn \module_foo:nn #1#2 +\cs_new:Npn \module_foo:nn #1#2 { \tl_if_empty:nTF {#1} { \module_foo_aux:n { X #2 } } diff --git a/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf b/Master/texmf-dist/doc/latex/l3kernel/l3syntax-changes.pdf index 6560e2358ad..fd085d096e0 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 e224a9283aa..021ed067d6f 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 2cd14966976..cbdbe3f76ba 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/12/07} -\def\ExplFileVersion{3036} +\def\ExplFileDate{2011/12/29} +\def\ExplFileVersion{3109} % %<*driver> \documentclass[full]{l3doc} @@ -337,6 +337,8 @@ % type for carrying out |box| alignment operations; % \item[dim] \enquote{rigid} lengths; % \item[fp] floating-point values; +% \item[ior] an input stream (for reading from a file); +% \item[iow] an output stream (for writing from a file); % \item[int] integer-valued count register; % \item[prop] property list; % \item[seq] sequence: a data-type used to implement lists (with @@ -803,13 +805,8 @@ % or the \LaTeX3 SVN repository. % \item At an internal level, most functions should be generated % \tn{long} (using \cs{cs_new:Npn}) rather than \enquote{short} (using -% \cs{cs_new_nopar:Npn}). The exceptions are: -% \begin{itemize} -% \item Functions which take no arguments; -% \item Functions which are used with pre-set arguments which -% therefore cannot be \tn{long}: this is mainly the case with -% auxiliary functions. -% \end{itemize} +% \cs{cs_new_nopar:Npn}). However, functions which take no arguments +% should be set \enquote{short}. % \item Where possible, declare all variables and functions (using % \cs{cs_new:Npn}, \cs{tl_new:N}, etc.) before use. % \item Prefer \enquote{higher-level} functions over \enquote{lower-level}, @@ -940,7 +937,7 @@ \ProcessOptions \relax % \end{macrocode} % \end{variable} -% +% % \begin{macrocode} \ifodd \l@expl@native@drivers@bool \relax \else @@ -1047,7 +1044,7 @@ } } % \end{macrocode} -% +% % \begin{macro}{\color} % If the native drivers are being used, they can be loaded now. The % \cs{color} macro must be defined for showing coffin poles, so @@ -1085,9 +1082,9 @@ % instead. % \begin{macrocode} { - \cs_set_protected_nopar:Npn \box_rotate:Nn #1#2 + \cs_set_protected:Npn \box_rotate:Nn #1#2 { \hbox_set:Nn #1 { \rotatebox {#2} { \box_use:N #1 } } } - \cs_set_protected_nopar:Npn \box_resize:Nnn #1#2#3 + \cs_set_protected:Npn \box_resize:Nnn #1#2#3 { \hbox_set:Nn #1 { @@ -1097,7 +1094,7 @@ { \box_use:N #1 } } } - \cs_set_protected_nopar:Npn \box_resize_to_ht_plus_dp:Nn #1#2 + \cs_set_protected:Npn \box_resize_to_ht_plus_dp:Nn #1#2 { \hbox_set:Nn #1 { @@ -1105,7 +1102,7 @@ { \box_use:N #1 } } } - \cs_set_protected_nopar:Npn \box_resize_to_wd:Nn #1#2 + \cs_set_protected:Npn \box_resize_to_wd:Nn #1#2 { \hbox_set:Nn #1 { @@ -1113,7 +1110,7 @@ { \box_use:N #1 } } } - \cs_set_protected_nopar:Npn \box_scale:Nnn #1#2#3 + \cs_set_protected:Npn \box_scale:Nnn #1#2#3 { \hbox_set:Nn #1 { \scalebox {#2} [#3] { \box_use:N #1 } } } } % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx index f76fdcd07df..130cff2671b 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3alloc.dtx 2896 2011-10-09 20:36:50Z joseph $ +\GetIdInfo$Id: l3alloc.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental register allocation} % %<*driver> @@ -146,7 +146,7 @@ \cs_new_protected:Npn \alloc_new:nnnN #1#2#3#4 { \alloc_setup_type:nnn {#1} {#2} {#3} - \cs_new_nopar:cpn { #1 _new:N } ##1 { \alloc_reg:nNN {#1} #4 ##1 } + \cs_new:cpn { #1 _new:N } ##1 { \alloc_reg:nNN {#1} #4 ##1 } } % \end{macrocode} % \end{macro} @@ -181,7 +181,9 @@ % need to have their allocators set up \enquote{early}. It therefore % makes sense to collect most of them together here. % \begin{macrocode} -\alloc_new:nnnN { box } \c_zero \c_max_register_int \tex_mathchardef:D +\luatex_if_engine:TF + { \alloc_new:nnnN { box } \c_zero \c_max_register_int \tex_chardef:D } + { \alloc_new:nnnN { box } \c_zero \c_max_register_int \tex_mathchardef:D } \alloc_new:nnnN { dim } \c_zero \c_max_register_int \tex_dimendef:D \alloc_new:nnnN { int } { 11 } \c_max_register_int \tex_countdef:D \alloc_new:nnnN { muskip } \c_zero \c_max_register_int \tex_muskipdef:D @@ -195,7 +197,7 @@ % \begin{macrocode} \alloc_new:nnnN { insert } { 221 } { 254 } \tex_chardef:D \group_begin: - \cs_set_protected_nopar:Npn \alloc_reserve_insert:n #1 + \cs_set_protected:Npn \alloc_reserve_insert:n #1 { \tex_ifnum:D #1 > \c_insert_allocation_max_tl \scan_stop: \exp_after:wN \use_none:n @@ -226,7 +228,7 @@ % \begin{macro}[int]{\alloc_reg:nNN} % This internal macro performs the actual allocation. % \begin{macrocode} -\cs_new_protected_nopar:Npn \alloc_reg:nNN #1#2#3 +\cs_new_protected:Npn \alloc_reg:nNN #1#2#3 { \chk_if_free_cs:N #3 \tex_global:D #2 #3 \tl_use:c { g_ #1 _allocation_tl } \scan_stop: @@ -247,7 +249,7 @@ % first but that needs an additional calculation.) There is a built-in % loop to handle reserved allocation positions. % \begin{macrocode} -\cs_new_protected_nopar:Npn \alloc_next:n #1 +\cs_new_protected:Npn \alloc_next:n #1 { \tl_gset:cx { g_ #1 _allocation_tl } { \int_eval:n { \tl_use:c { g_ #1 _allocation_tl } + 1 } } diff --git a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx index 7bd9da7f78a..c6f643eb75a 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3basics.dtx 3023 2011-12-04 07:25:04Z bruno $ +\GetIdInfo$Id: l3basics.dtx 3090 2011-12-23 03:12:53Z bruno $ {L3 Experimental basic definitions} % %<*driver> @@ -626,7 +626,7 @@ % % \subsection{Showing control sequences} % -% \begin{function}[EXP]{\cs_meaning:N, \cs_meaning:c} +% \begin{function}[EXP, updated = 2011-12-22]{\cs_meaning:N, \cs_meaning:c} % \begin{syntax} % \cs{cs_meaning:N} \meta{control sequence} % \end{syntax} @@ -635,10 +635,11 @@ % macro. % \begin{texnote} % This is \TeX{}'s \tn{meaning} primitive. +% The \texttt{c} variant correctly reports undefined arguments. % \end{texnote} % \end{function} % -% \begin{function}{\cs_show:N, \cs_show:c} +% \begin{function}[updated = 2011-12-22]{\cs_show:N, \cs_show:c} % \begin{syntax} % \cs{cs_show:N} \meta{control sequence} % \end{syntax} @@ -722,11 +723,13 @@ % characters with category code $12$ (other), except spaces, % of category code $10$. The sequence will \emph{not} include % the current escape token, \emph{cf.}~\cs{token_to_str:N}. -% Full expansion of this function requires a variable number -% of expansion steps (either 3 or 4), and so an -% \texttt{f}- or \texttt{x}-type expansion will be required to +% Full expansion of this function requires exactly $2$ expansion +% steps, and so an \texttt{x}-type expansion, or two +% \texttt{o}-type expansions will be required to % convert the \meta{control sequence} to a sequence of characters -% in the input stream. +% in the input stream. In most cases, an \texttt{f}-expansion +% will be correct as well, but this loses a space at the start +% of the result. % \end{function} % % \section{Using or removing tokens and arguments} @@ -1389,16 +1392,77 @@ % \begin{macro}{\token_to_str:c} % \begin{macro}{\cs_meaning:c} % \begin{macro}{\cs_show:c} -%% A small number of variants by hand. +% A small number of variants by hand. Some of the necessary functions +% (\cs{use_i:nn}, \cs{use_ii:nn}, and \cs{exp_args:NNc}) are not defined +% at that point yet, but will be defined before those variants are used. +% The \cs{cs_meaning:c} command must check for an undefined control +% sequence to avoid defining it mistakenly. +% The \cs{cs_show:c} command is \enquote{protected} because its action +% is not expandable. Also, the conversion of its argument to a control +% sequence is done within a group to avoid converting it to \tn{relax}. % \begin{macrocode} -\tex_def:D \cs_meaning:c { \exp_args:Nc \cs_meaning:N } \tex_def:D \token_to_str:c { \exp_args:Nc \token_to_str:N } -\tex_def:D \cs_show:c { \exp_args:Nc \cs_show:N } +\tex_long:D \tex_def:D \cs_meaning:c #1 + { + \if_cs_exist:w #1 \cs_end: + \exp_after:wN \use_i:nn + \else: + \exp_after:wN \use_ii:nn + \fi: + { \exp_args:Nc \cs_meaning:N {#1} } + { \tl_to_str:n {undefined} } + } +\tex_protected:D \tex_def:D \cs_show:c + { \group_begin: \exp_args:NNc \group_end: \cs_show:N } % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % +% \subsection{Defining some constants} +% +% \begin{macro}{\c_minus_one, \c_zero, \c_sixteen} +% \begin{macro}{\c_six, \c_seven, \c_twelve} +% We need the constants |\c_minus_one| and |\c_sixteen| now for +% writing information to the log and the terminal and |\c_zero| +% which is used by some functions in the \textsf{l3alloc} module. The +% rest are defined in the \textsf{l3int} module -- at least for the +% ones that can be defined with |\tex_chardef:D| or +% |\tex_mathchardef:D|. For other constants the \textsf{l3int} module is +% required but it can't be used until the allocation has been set +% up properly! The actual allocation mechanism is in +% \textsf{l3alloc} and as \TeX{} wants to reserve count registers +% 0--9, the first available one is~10 so we use that for +% |\c_minus_one|. +% \begin{macrocode} +%<*package> +\tex_let:D \c_minus_one \m@ne +% +%<*initex> +\tex_countdef:D \c_minus_one = 10 ~ +\c_minus_one = -1 ~ +% +\tex_chardef:D \c_sixteen = 16~ +\tex_chardef:D \c_zero = 0~ +\tex_chardef:D \c_six = 6~ +\tex_chardef:D \c_seven = 7~ +\tex_chardef:D \c_twelve = 12~ +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{variable}{\c_max_register_int} +% This is here as this particular integer is needed both in package +% mode and to bootstrap \pkg{l3alloc}. +% \begin{macrocode} +\etex_ifdefined:D \luatex_luatexversion:D + \tex_chardef:D \c_max_register_int = 65 535 ~ +\tex_else:D + \tex_mathchardef:D \c_max_register_int = 32 767 ~ +\tex_fi:D +% \end{macrocode} +% \end{variable} +% % \subsection{Defining functions} % % We start by providing functions for the typical definition @@ -1948,6 +2012,7 @@ % \subsection{Dissecting a control sequence} % % \begin{macro}{\cs_to_str:N} +% \begin{macro}[aux]{\cs_to_str_aux:N} % \begin{macro}[aux]{\cs_to_str_aux:w} % This converts a control sequence into the character string of its % name, removing the leading escape character. This turns out to be @@ -1968,43 +2033,39 @@ % lost in the process of converting to a string. So the approach adopted is % a little more intricate still. When the escape character is printable, % \verb*|\token_to_str:N \ | yields the escape character itself and a space. -% The escape sequence will terminate the expansion started by -% \cs{int_to_roman:w}, which is a negative number and so will not -% gobble the escape character even if it's a number. The \cs{if:w} -% test will then be \texttt{false}, and the na\"ive approach of gobbling -% the first character of the \cs{token_to_str:N} version of the control -% sequence will work, even if the first character is a space. -% The second case is that the escape character is itself a space. In this -% case, the escape character space is consumed terminating the first -% \cs{int_to_roman:w}, and \cs{cs_to_str_aux:w} is expanded. This -% inserts a space, making the \cs{if:w} test \texttt{true}. The -% second \cs{int_to_roman:w} will then execute the \cs{token_to_str:N}, -% with the escape-character space being consumed by the -% \cs{int_to_roman:w}, and thus leaving the control sequence name in the -% input stream. The final case is where the escape character is not -% printable. -% The flow here starts with the \verb*|\token_to_str:N \ | giving just a -% space, which terminates the first \cs{int_to_roman:w} but leaves no -% token for the \cs{if:w} test. This means that the \cs{int_to_roman:w} -% is executed before the test is finished. The result is that the -% \cs{fi:}, expanded before the \cs{if:w} is finished, becomes -% \cs{scan_stop:} \cs{fi:}, and the \cs{scan_stop:} is then used in -% the \cs{if:w} test. -% In this case, \cs{token_to_str:N} is therefore used with no gobbling at -% all, which is exactly what is needed in this case. +% The character codes are different, thus the \cs{if:w} test is false, +% and \TeX{} reads \cs{cs_to_str_aux:N} after turning the following +% control sequence into a string; this auxiliary removes the escape +% character, and stops the expansion of the initial \cs{int_to_roman:w}. +% The second case is that the escape character is not printable. Then +% the \cs{if:w} test is unfinished after reading a the space from +% \verb*|\token_to_str:N \ |, and the auxiliary \cs{cs_to_str_aux:w} +% is expanded, feeding |-| as a second character for the test; +% the test is false, and \TeX{} skips to \cs{fi:}, then performs +% \cs{token_to_str:N}, and stops the \cs{int_to_roman:w} with \cs{c_zero}. +% The last case is that the escape character is itself a space. In this +% case, the \cs{if:w} test is true, and the auxiliary \cs{cs_to_str_aux:w} +% comes into play, inserting |-\int_value:w|, which expands \cs{c_zero} +% to the character |0|. The initial \cs{int_to_roman:w} then sees +% |0|, which is not a terminated number, followed by the escape character, +% a space, which is removed, terminating the argument of +% \cs{int_to_roman:w}. +% In all three cases, \cs{cs_to_str:N} takes two expansion steps +% to be fully expanded. % \begin{macrocode} \cs_set_nopar:Npn \cs_to_str:N { - \if:w \int_to_roman:w - `0 \token_to_str:N \ % - \cs_to_str_aux:w - \fi: - \exp_after:wN \use_none:n \token_to_str:N - } -\cs_set_nopar:Npn \cs_to_str_aux:w #1 \use_none:n - { ~ \int_to_roman:w - `0 \fi: } + \int_to_roman:w + \if:w \token_to_str:N \ \cs_to_str_aux:w \fi: + \exp_after:wN \cs_to_str_aux:N \token_to_str:N + } +\cs_set:Npn \cs_to_str_aux:N #1 { \c_zero } +\cs_set:Npn \cs_to_str_aux:w #1 \cs_to_str_aux:N + { - \int_value:w \fi: \exp_after:wN \c_zero } % \end{macrocode} % \end{macro} % \end{macro} +% \end{macro} % % \begin{macro}{\cs_split_function:NN} % \begin{macro}[aux]{\cs_split_function_aux:w} @@ -2030,14 +2091,15 @@ { \group_end: % \end{macrocode} -% First ensure that we actually get a properly evaluated str as we -% don't know how many expansions |\cs_to_str:N| requires. Insert +% First ensure that we actually get a properly evaluated str +% by expanding |\cs_to_str:N| twice. Insert % extra colon to catch the error cases. % \begin{macrocode} \cs_set:Npn \cs_split_function:NN #1#2 { + \exp_after:wN \exp_after:wN \exp_after:wN \cs_split_function_aux:w - \int_to_roman:w - `\q \cs_to_str:N #1 @ a \q_stop #2 + \cs_to_str:N #1 @ a \q_stop #2 } % \end{macrocode} % If no colon in the name, |#2| is |a| with catcode 11 and |#3| is @@ -2200,44 +2262,6 @@ % % \subsection{Defining and checking (new) functions} % -% \begin{macro}{\c_minus_one, \c_zero, \c_sixteen} -% \begin{macro}{\c_six, \c_seven, \c_twelve} -% We need the constants |\c_minus_one| and |\c_sixteen| now for -% writing information to the log and the terminal and |\c_zero| -% which is used by some functions in the \textsf{l3alloc} module. The -% rest are defined in the \textsf{l3int} module -- at least for the -% ones that can be defined with |\tex_chardef:D| or -% |\tex_mathchardef:D|. For other constants the \textsf{l3int} module is -% required but it can't be used until the allocation has been set -% up properly! The actual allocation mechanism is in -% \textsf{l3alloc} and as \TeX{} wants to reserve count registers -% 0--9, the first available one is~10 so we use that for -% |\c_minus_one|. -% \begin{macrocode} -%<*package> -\tex_let:D \c_minus_one \m@ne -% -%<*initex> -\tex_countdef:D \c_minus_one = 10 ~ -\c_minus_one = -1 ~ -% -\tex_chardef:D \c_sixteen = 16~ -\tex_chardef:D \c_zero = 0~ -\tex_chardef:D \c_six = 6~ -\tex_chardef:D \c_seven = 7~ -\tex_chardef:D \c_twelve = 12~ -% \end{macrocode} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\c_max_register_int} -% This is here as this particular integer is needed both in package -% mode and to bootstrap \pkg{l3alloc} -% \begin{macrocode} -\tex_mathchardef:D \c_max_register_int = 32 767 \scan_stop: -% \end{macrocode} -% \end{macro} -% % We provide two kinds of functions that can be used to define % control sequences. On the one hand we have functions that check % if their argument doesn't already exist, they are called @@ -2270,7 +2294,7 @@ % can only happen if a coding error is made by the team, so this is % a reasonable response. % \begin{macrocode} -\cs_set_protected_nopar:Npn \msg_kernel_error:nnxx #1#2#3#4 +\cs_set_protected:Npn \msg_kernel_error:nnxx #1#2#3#4 { \tex_errmessage:D { @@ -2282,9 +2306,9 @@ } \tex_end:D } -\cs_set_protected_nopar:Npn \msg_kernel_error:nnx #1#2#3 +\cs_set_protected:Npn \msg_kernel_error:nnx #1#2#3 { \msg_kernel_error:nnxx {#1} {#2} {#3} { } } -\cs_set_protected_nopar:Npn \msg_kernel_error:nn #1#2 +\cs_set_protected:Npn \msg_kernel_error:nn #1#2 { \msg_kernel_error:nnxx {#1} {#2} { } { } } % \end{macrocode} % \end{macro} @@ -2308,7 +2332,7 @@ % issued. We have to make sure we don't put the argument into the % conditional processing since it may be an |\if...| type function! % \begin{macrocode} -\cs_set_protected_nopar:Npn \chk_if_free_cs:N #1 +\cs_set_protected:Npn \chk_if_free_cs:N #1 { \cs_if_free:NF #1 { @@ -2318,7 +2342,7 @@ } %<*package> \tex_ifodd:D \l@expl@log@functions@bool - \cs_set_protected_nopar:Npn \chk_if_free_cs:N #1 + \cs_set_protected:Npn \chk_if_free_cs:N #1 { \cs_if_free:NF #1 { @@ -2338,7 +2362,7 @@ % This function issues a warning message when the control sequence % in its argument does not exist. % \begin{macrocode} -\cs_set_protected_nopar:Npn \chk_if_exist_cs:N #1 +\cs_set_protected:Npn \chk_if_exist_cs:N #1 { \cs_if_exist:NF #1 { @@ -2365,7 +2389,7 @@ % \begin{macrocode} \cs_set:Npn \cs_tmp:w #1#2 { - \cs_set_protected_nopar:Npn #1 ##1 + \cs_set_protected:Npn #1 ##1 { \chk_if_free_cs:N ##1 #2 ##1 @@ -2563,9 +2587,9 @@ % to the hash table if it isn't there yet, and it also avoids nesting % \TeX{} conditionals in case |#1| is unbalanced in this matter. % \begin{macrocode} -\cs_new_protected_nopar:Npn \cs_undefine:N #1 +\cs_new_protected:Npn \cs_undefine:N #1 { \cs_gset_eq:NN #1 \c_undefined:D } -\cs_new_protected_nopar:Npn \cs_undefine:c #1 +\cs_new_protected:Npn \cs_undefine:c #1 { \if_cs_exist:w #1 \cs_end: \exp_after:wN \use:n @@ -2652,7 +2676,7 @@ {#2#1} {#4} } -\cs_new_protected_nopar:Npn +\cs_new_protected:Npn \cs_generate_from_arg_count_aux:nwn #1 #2 \fi: #3 { \fi: #3 #1 } % \end{macrocode} @@ -2909,7 +2933,7 @@ % % \begin{macro}{\kernel_register_show:N, \kernel_register_show:c} % \begin{macrocode} -\cs_new_nopar:Npn \kernel_register_show:N #1 +\cs_new:Npn \kernel_register_show:N #1 { \cs_if_exist:NTF #1 { \tex_showthe:D #1 } @@ -2918,7 +2942,8 @@ { \token_to_str:N #1 } } } -\cs_new_nopar:Npn \kernel_register_show:c { \exp_args:Nc \int_show:N } +\cs_new_nopar:Npn \kernel_register_show:c + { \exp_args:Nc \kernel_register_show:N } % \end{macrocode} % \end{macro} % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx index ef3c56615b1..89e41ce8b8b 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 3029 2011-12-06 22:47:30Z joseph $ +\GetIdInfo$Id: l3box.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental boxes} % %<*driver> @@ -581,7 +581,7 @@ % is that of the first item added. These tend to have a large depth and % small height, although the latter will typically be non-zero. % -% \begin{function}{\vbox:n} +% \begin{function}[updated = 2011-12-18]{\vbox:n} % \begin{syntax} % \cs{vbox:n} \Arg{contents} % \end{syntax} @@ -592,7 +592,7 @@ % \end{texnote} % \end{function} % -% \begin{function}{\vbox_top:n} +% \begin{function}[updated = 2011-12-18]{\vbox_top:n} % \begin{syntax} % \cs{vbox_top:n} \Arg{contents} % \end{syntax} @@ -605,7 +605,7 @@ % \end{texnote} % \end{function} % -% \begin{function}{\vbox_to_ht:nn} +% \begin{function}[updated = 2011-12-18]{\vbox_to_ht:nn} % \begin{syntax} % \cs{vbox_to_ht:nn} \Arg{dimexpr} \Arg{contents} % \end{syntax} @@ -614,7 +614,7 @@ % typesetting. % \end{function} % -% \begin{function}{\vbox_to_zero:n} +% \begin{function}[updated = 2011-12-18]{\vbox_to_zero:n} % \begin{syntax} % \cs{vbox_to_zero:n} \Arg{contents} % \end{syntax} @@ -622,7 +622,8 @@ % and then includes this box in the current list for typesetting. % \end{function} % -% \begin{function}{\vbox_set:Nn, \vbox_set:cn, \vbox_gset:Nn, \vbox_gset:cn} +% \begin{function}[updated = 2011-12-18] +% {\vbox_set:Nn, \vbox_set:cn, \vbox_gset:Nn, \vbox_gset:cn} % \begin{syntax} % \cs{vbox_set:Nn} \meta{box} \Arg{contents} % \end{syntax} @@ -630,7 +631,7 @@ % result inside the \meta{box}. % \end{function} % -% \begin{function} +% \begin{function}[updated = 2011-12-18] % {\vbox_set_top:Nn, \vbox_set_top:cn, \vbox_gset_top:Nn, \vbox_gset_top:cn} % \begin{syntax} % \cs{vbox_set_top:Nn} \meta{box} \Arg{contents} @@ -640,7 +641,7 @@ % to that of the \emph{first} item added to the box. % \end{function} % -% \begin{function} +% \begin{function}[updated = 2011-12-18] % { % \vbox_set_to_ht:Nnn, \vbox_set_to_ht:cnn, % \vbox_gset_to_ht:Nnn, \vbox_gset_to_ht:cnn @@ -652,7 +653,7 @@ % \meta{dimexpr} and then stores the result inside the \meta{box}. % \end{function} % -% \begin{function} +% \begin{function}[updated = 2011-12-18] % { % \vbox_set:Nw, \vbox_set:cw, % \vbox_set_end:, @@ -1214,7 +1215,11 @@ % \end{macro} % \end{macro} % -% \subsection{Vertical mode boxes} +% \subsection{Vertical mode boxes} +% +% \TeX{} ends these boxes directly with the internal \emph{end_graf} +% routine. This means that there is no \cs{par} at the end of vertical +% boxes unless we insert one. % % \begin{macro}{\vbox:n} % \TestFiles{m3box003.lvt} @@ -1222,8 +1227,8 @@ % \TestFiles{m3box003.lvt} % Put a vertical box directly into the input stream. % \begin{macrocode} -\cs_new_protected:Npn \vbox:n { \tex_vbox:D \scan_stop: } -\cs_new_protected:Npn \vbox_top:n { \tex_vtop:D \scan_stop: } +\cs_new_protected:Npn \vbox:n #1 { \tex_vbox:D { #1 \par } } +\cs_new_protected:Npn \vbox_top:n #1 { \tex_vtop:D { #1 \par } } % \end{macrocode} % \end{macro} % \end{macro} @@ -1234,8 +1239,9 @@ % Put a vertical box directly into the input stream. % \begin{macrocode} \cs_new_protected:Npn \vbox_to_ht:nn #1#2 - { \tex_vbox:D to \dim_eval:w #1 \dim_eval_end: {#2} } -\cs_new_protected:Npn \vbox_to_zero:n #1 { \tex_vbox:D to \c_zero_dim {#1} } + { \tex_vbox:D to \dim_eval:w #1 \dim_eval_end: { #2 \par } } +\cs_new_protected:Npn \vbox_to_zero:n #1 + { \tex_vbox:D to \c_zero_dim { #1 \par } } % \end{macrocode} % \end{macro} % \end{macro} @@ -1245,7 +1251,8 @@ % \testfile* % Storing material in a vertical box with a natural height. % \begin{macrocode} -\cs_new_protected:Npn \vbox_set:Nn #1#2 { \tex_setbox:D #1 \tex_vbox:D {#2} } +\cs_new_protected:Npn \vbox_set:Nn #1#2 + { \tex_setbox:D #1 \tex_vbox:D { #2 \par } } \cs_new_protected:Npn \vbox_gset:Nn { \tex_global:D \vbox_set:Nn } \cs_generate_variant:Nn \vbox_set:Nn { c } \cs_generate_variant:Nn \vbox_gset:Nn { c } @@ -1260,7 +1267,7 @@ % point at the baseline of the first object in the box. % \begin{macrocode} \cs_new_protected:Npn \vbox_set_top:Nn #1#2 - { \tex_setbox:D #1 \tex_vtop:D {#2} } + { \tex_setbox:D #1 \tex_vtop:D { #2 \par } } \cs_new_protected:Npn \vbox_gset_top:Nn { \tex_global:D \vbox_set_top:Nn } \cs_generate_variant:Nn \vbox_set_top:Nn { c } @@ -1275,7 +1282,7 @@ % Storing material in a vertical box with a specified height. % \begin{macrocode} \cs_new_protected:Npn \vbox_set_to_ht:Nnn #1#2#3 - { \tex_setbox:D #1 \tex_vbox:D to \dim_eval:w #2 \dim_eval_end: {#3} } + { \tex_setbox:D #1 \tex_vbox:D to \dim_eval:w #2 \dim_eval_end: { #3 \par } } \cs_new_protected:Npn \vbox_gset_to_ht:Nnn { \tex_global:D \vbox_set_to_ht:Nnn } \cs_generate_variant:Nn \vbox_set_to_ht:Nnn { c } @@ -1291,14 +1298,18 @@ % Storing material in a vertical box. This type is useful in % environment definitions. % \begin{macrocode} -\cs_new:Npn \vbox_set:Nw #1 +\cs_new_protected:Npn \vbox_set:Nw #1 { \tex_setbox:D #1 \tex_vbox:D \c_group_begin_token } \cs_new_protected:Npn \vbox_gset:Nw { \tex_global:D \vbox_set:Nw } \cs_generate_variant:Nn \vbox_set:Nw { c } \cs_generate_variant:Nn \vbox_gset:Nw { c } -\cs_new_eq:NN \vbox_set_end: \c_group_end_token -\cs_new_eq:NN \vbox_gset_end: \c_group_end_token +\cs_new_protected:Npn \vbox_set_end: + { + \par + \c_group_end_token + } +\cs_new_eq:NN \vbox_gset_end: \vbox_set_end: % \end{macrocode} % \end{macro} % \end{macro} @@ -1951,7 +1962,7 @@ \cs_generate_variant:Nn \box_viewport:Nnnnn { c } % \end{macrocode} % \end{macro} -% +% % \subsection{Deprecated functions} % % \begin{variable}{\l_last_box} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx index f1ef8dfe7b8..e04b2227944 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx @@ -36,7 +36,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3clist.dtx 3029 2011-12-06 22:47:30Z joseph $ +\GetIdInfo$Id: l3clist.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental comma separated lists} % %<*driver> @@ -132,7 +132,7 @@ % \cs{clist_set_eq:NN} \meta{comma list1} \meta{comma list2} % \end{syntax} % Sets the content of \meta{comma list1} equal to that of -% \meta{comma list2}. +% \meta{comma list2}. % \end{function} % % \begin{function} @@ -571,6 +571,19 @@ % \meta{comma list}. % \end{function} % +% \begin{function}[EXP, pTF, added = 2011-12-07]{\clist_if_empty:n} +% \begin{syntax} +% \cs{clist_if_empty_p:n} \Arg{comma list} +% \cs{clist_if_empty:nTF} \Arg{comma list} \Arg{true code} \Arg{false code} +% \end{syntax} +% Tests if the \meta{comma list} is empty (containing no items). +% The rules for space trimming are as for other \texttt{n}-type +% comma-list functions, hence the comma list |{~,~,,~}| (without +% outer braces) is empty, while |{~,{},}| (without outer braces) +% contains one element, which happens to be empty: the comma-list +% is not empty. +% \end{function} +% % \section{Internal comma-list functions} % % \begin{function}[added = 2011-07-09, rEXP]{\clist_trim_spaces:n} @@ -693,7 +706,7 @@ { \clist_concat_aux:NNNN \tl_set:Nx } \cs_new_protected_nopar:Npn \clist_gconcat:NNN { \clist_concat_aux:NNNN \tl_gset:Nx } -\cs_new_protected_nopar:Npn \clist_concat_aux:NNNN #1#2#3#4 +\cs_new_protected:Npn \clist_concat_aux:NNNN #1#2#3#4 { #1 #2 { @@ -867,7 +880,7 @@ % \UnitTested % \begin{macro}[aux]{\clist_put_right_aux:NNNn} % \begin{macrocode} -\cs_new_protected:Npn \clist_put_right:Nn +\cs_new_protected_nopar:Npn \clist_put_right:Nn { \clist_put_right_aux:NNNn \clist_concat:NNN \clist_set:Nn } \cs_new_protected_nopar:Npn \clist_gput_right:Nn { \clist_put_right_aux:NNNn \clist_gconcat:NNN \clist_gset:Nn } @@ -893,7 +906,7 @@ % Getting an item from the left of a comma list is pretty easy: just % trim off the first item using the comma. % \begin{macrocode} -\cs_new_protected_nopar:Npn \clist_get:NN #1#2 +\cs_new_protected:Npn \clist_get:NN #1#2 { \exp_after:wN \clist_get_aux:wN #1 , \q_stop #2 } \cs_new_protected:Npn \clist_get_aux:wN #1 , #2 \q_stop #3 { \tl_set:Nn #3 {#1} } @@ -917,7 +930,7 @@ { \clist_pop_aux:NNN \tl_set:Nf } \cs_new_protected_nopar:Npn \clist_gpop:NN { \clist_pop_aux:NNN \tl_gset:Nf } -\cs_new_protected_nopar:Npn \clist_pop_aux:NNN #1#2#3 +\cs_new_protected:Npn \clist_pop_aux:NNN #1#2#3 { \exp_after:wN \clist_pop_aux:wNNN #2 , \q_nil \q_stop #1#2#3 } @@ -1165,7 +1178,7 @@ % The auxiliary function \cs{clist_map_function_aux:Nw} is used % directly in \cs{clist_map_inline:Nn}. Change with care. % \begin{macrocode} -\cs_new_nopar:Npn \clist_map_function:NN #1#2 +\cs_new:Npn \clist_map_function:NN #1#2 { \clist_if_empty:NF #1 { @@ -1313,7 +1326,7 @@ % in a scratch variable, then show that variable, % omitting its name from the $4$-th argument. % \begin{macrocode} -\cs_new_protected_nopar:Npn \clist_show:N #1 +\cs_new_protected:Npn \clist_show:N #1 { \msg_aux_show:Nnx #1 @@ -1542,6 +1555,39 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}[EXP, pTF]{\clist_if_empty:n} +% \begin{macro}[aux, EXP]{\clist_if_empty_n_aux:w} +% \begin{macro}[aux, EXP]{\clist_if_empty_n_aux:wNw} +% As usual, we insert a token (here |?|) before grabbing +% any argument: this avoids losing braces. The argument +% of \cs{tl_if_empty:oTF} is empty if |#1| is |?| followed +% by blank spaces (besides, this particular variant of +% the emptyness test is optimized). If the item of the +% comma list is blank, grab the next one. As soon as one +% item is non-blank, exit: the second auxiliary will grab +% \cs{prg_return_false:} as |#2|, unless every item in +% the comma list was blank and the loop actually got broken +% by the trailing |\q_mark \prg_return_false:| item. +% \begin{macrocode} +\prg_new_conditional:Npnn \clist_if_empty:n #1 { p , T , F , TF } + { + \clist_if_empty_n_aux:w ? #1 + , \q_mark \prg_return_false: + , \q_mark \prg_return_true: + \q_stop + } +\cs_new:Npn \clist_if_empty_n_aux:w #1 , + { + \tl_if_empty:oTF { \use_none:nn #1 ? } + { \clist_if_empty_n_aux:w ? } + { \clist_if_empty_n_aux:wNw } + } +\cs_new:Npn \clist_if_empty_n_aux:wNw #1 \q_mark #2#3 \q_stop {#2} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% % \subsection{Deprecated interfaces} % % Deprecated on 2011-05-27, for removal by 2011-08-31. diff --git a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx index 34bbe53d2fd..75d48a6becb 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx @@ -36,7 +36,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3coffins.dtx 2963 2011-11-15 22:06:41Z joseph $ +\GetIdInfo$Id: l3coffins.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental coffin code layer} % %<*driver> @@ -280,7 +280,7 @@ % therefore analogous to carrying out an alignment where the % \enquote{parent} coffin is the current insertion point. % \end{function} -% +% % \section{Measuring coffins} % % \begin{function}{\coffin_dp:N, \coffin_dp:c} @@ -580,7 +580,7 @@ % Clearing coffins means emptying the box and resetting all of the % structures. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_clear:N #1 +\cs_new_protected:Npn \coffin_clear:N #1 { \coffin_if_exist:NT #1 { @@ -599,7 +599,7 @@ % This means that the usual rule about \cs{l_\ldots} variables has % to be broken. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_new:N #1 +\cs_new_protected:Npn \coffin_new:N #1 { \box_new:N #1 \prop_clear_new:c { l_coffin_corners_ \int_value:w #1 _prop } @@ -678,7 +678,7 @@ % These are the \enquote{begin}/\enquote{end} versions of the above: % watch the grouping! % \begin{macrocode} -\cs_new_protected_nopar:Npn \hcoffin_set:Nw #1 +\cs_new_protected:Npn \hcoffin_set:Nw #1 { \coffin_if_exist:NT #1 { @@ -703,7 +703,7 @@ % \begin{macro}{\vcoffin_set_end:} % The same for vertical coffins. % \begin{macrocode} -\cs_new_protected_nopar:Npn \vcoffin_set:Nnw #1#2 +\cs_new_protected:Npn \vcoffin_set:Nnw #1#2 { \coffin_if_exist:NT #1 { @@ -744,7 +744,7 @@ % } % Setting two coffins equal is just a wrapper around other functions. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_set_eq:NN #1#2 +\cs_new_protected:Npn \coffin_set_eq:NN #1#2 { \coffin_if_exist:NT #1 { @@ -771,16 +771,16 @@ % \end{variable} % \end{variable} % \end{variable} -% +% % \subsection{Measuring coffins} -% +% % \begin{macro} % { % \coffin_dp:N, \coffin_dp:c, \coffin_ht:N, \coffin_ht:c, % \coffin_wd:N, \coffin_wd:c % } % Coffins are just boxes when it comes to measurement. However, semantically -% a separate set of functions are required. +% a separate set of functions are required. % \begin{macrocode} \cs_new_eq:NN \coffin_dp:N \box_dp:N \cs_new_eq:NN \coffin_dp:c \box_dp:c @@ -797,7 +797,7 @@ % A simple wrapper around the recovery of a coffin pole, with some % error checking and recovery built-in. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_get_pole:NnN #1#2#3 +\cs_new_protected:Npn \coffin_get_pole:NnN #1#2#3 { \prop_get:cnNF { l_coffin_poles_ \int_value:w #1 _prop } {#2} #3 @@ -813,7 +813,7 @@ % \begin{macro}{\coffin_reset_structure:N} % Resetting the structure is a simple copy job. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_reset_structure:N #1 +\cs_new_protected:Npn \coffin_reset_structure:N #1 { \prop_set_eq:cN { l_coffin_corners_ \int_value:w #1 _prop } \c_coffin_corners_prop @@ -827,14 +827,14 @@ % Setting coffin structures equal simply means copying the property % list. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_set_eq_structure:NN #1#2 +\cs_new_protected:Npn \coffin_set_eq_structure:NN #1#2 { \prop_set_eq:cc { l_coffin_corners_ \int_value:w #1 _prop } { l_coffin_corners_ \int_value:w #2 _prop } \prop_set_eq:cc { l_coffin_poles_ \int_value:w #1 _prop } { l_coffin_poles_ \int_value:w #2 _prop } } -\cs_new_protected_nopar:Npn \coffin_gset_eq_structure:NN #1#2 +\cs_new_protected:Npn \coffin_gset_eq_structure:NN #1#2 { \prop_gset_eq:cc { l_coffin_corners_ \int_value:w #1 _prop } { l_coffin_corners_ \int_value:w #2 _prop } @@ -853,7 +853,7 @@ % These make design-level names for the dimensions of a coffin easy to % get at. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_set_user_dimensions:N #1 +\cs_new_protected:Npn \coffin_set_user_dimensions:N #1 { \cs_set_eq:NN \coffin_saved_Height: \Height \cs_set_eq:NN \coffin_saved_Depth: \Depth @@ -892,7 +892,7 @@ % the system, then to do the setting with full expansion. The % three-argument version is used internally to do a direct setting. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_set_horizontal_pole:Nnn #1#2#3 +\cs_new_protected:Npn \coffin_set_horizontal_pole:Nnn #1#2#3 { \coffin_if_exist:NT #1 { @@ -905,7 +905,7 @@ \coffin_end_user_dimensions: } } -\cs_new_protected_nopar:Npn \coffin_set_vertical_pole:Nnn #1#2#3 +\cs_new_protected:Npn \coffin_set_vertical_pole:Nnn #1#2#3 { \coffin_if_exist:NT #1 { @@ -918,7 +918,7 @@ \coffin_end_user_dimensions: } } -\cs_new_protected_nopar:Npn \coffin_set_pole:Nnn #1#2#3 +\cs_new_protected:Npn \coffin_set_pole:Nnn #1#2#3 { \prop_put:cnn { l_coffin_poles_ \int_value:w #1 _prop } {#2} {#3} } \cs_generate_variant:Nn \coffin_set_horizontal_pole:Nnn { c } \cs_generate_variant:Nn \coffin_set_vertical_pole:Nnn { c } @@ -933,7 +933,7 @@ % there can be no rotation. So the corners of the content are just those % of the underlying \TeX{} box. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_update_corners:N #1 +\cs_new_protected:Npn \coffin_update_corners:N #1 { \prop_put:cnx { l_coffin_corners_ \int_value:w #1 _prop } { tl } { { 0 pt } { \dim_use:N \box_ht:N #1 } } @@ -954,7 +954,7 @@ % It also does not set poles which are relevant only to vertical % coffins. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_update_poles:N #1 +\cs_new_protected:Npn \coffin_update_poles:N #1 { \prop_put:cnx { l_coffin_poles_ \int_value:w #1 _prop } { hc } { @@ -1001,7 +1001,7 @@ % may of course not be an intersection, for which an error trap is % needed. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_calculate_intersection:Nnn #1#2#3 +\cs_new_protected:Npn \coffin_calculate_intersection:Nnn #1#2#3 { \coffin_get_pole:NnN #1 {#2} \l_coffin_pole_a_tl \coffin_get_pole:NnN #1 {#3} \l_coffin_pole_b_tl @@ -1028,7 +1028,7 @@ % is either horizontal or vertical then one or more of $c$, $d$, % $c'$ and $d'$ will be zero and a special case is needed. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_calculate_intersection:nnnnnnnn +\cs_new_protected:Npn \coffin_calculate_intersection:nnnnnnnn #1#2#3#4#5#6#7#8 { \dim_compare:nNnTF {#3} = { \c_zero_dim } @@ -1174,7 +1174,7 @@ % Thus |#4| and |#5| should be the directions of the pole while % |#2| and |#3| are co-ordinates. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_calculate_intersection_aux:nnnnnN +\cs_new_protected:Npn \coffin_calculate_intersection_aux:nnnnnN #1#2#3#4#5#6 { \fp_set_from_dim:Nn \l_coffin_calc_result_fp {#1} @@ -1206,7 +1206,7 @@ % reset to standard values. First, the more basic alignment function is % used to get things started. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_join:NnnNnnnn #1#2#3#4#5#6#7#8 +\cs_new_protected:Npn \coffin_join:NnnNnnnn #1#2#3#4#5#6#7#8 { \coffin_align:NnnNnnnnN #1 {#2} {#3} #4 {#5} {#6} {#7} {#8} \l_coffin_aligned_coffin @@ -1275,7 +1275,7 @@ % a position is hear also as it is similar but without the structure % updates. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_attach:NnnNnnnn #1#2#3#4#5#6#7#8 +\cs_new_protected:Npn \coffin_attach:NnnNnnnn #1#2#3#4#5#6#7#8 { \coffin_align:NnnNnnnnN #1 {#2} {#3} #4 {#5} {#6} {#7} {#8} \l_coffin_aligned_coffin @@ -1293,7 +1293,7 @@ \coffin_update_vertical_poles:NNN #1 #4 \l_coffin_aligned_coffin \coffin_set_eq:NN #1 \l_coffin_aligned_coffin } -\cs_new_protected_nopar:Npn \coffin_attach_mark:NnnNnnnn #1#2#3#4#5#6#7#8 +\cs_new_protected:Npn \coffin_attach_mark:NnnNnnnn #1#2#3#4#5#6#7#8 { \coffin_align:NnnNnnnnN #1 {#2} {#3} #4 {#5} {#6} {#7} {#8} \l_coffin_aligned_coffin @@ -1318,7 +1318,7 @@ % input coffins. The default poles are then set up, but the final result % will depend on how the bounding box is being handled. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_align:NnnNnnnnN #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \coffin_align:NnnNnnnnN #1#2#3#4#5#6#7#8#9 { \coffin_calculate_intersection:Nnn #4 {#5} {#6} \dim_set:Nn \l_coffin_x_prime_dim { \l_coffin_x_dim } @@ -1352,12 +1352,12 @@ % or handle names, and that multiple alignments do not result in a % whole set of values. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_offset_poles:Nnn #1#2#3 +\cs_new_protected:Npn \coffin_offset_poles:Nnn #1#2#3 { \prop_map_inline:cn { l_coffin_poles_ \int_value:w #1 _prop } { \coffin_offset_pole:Nnnnnnn #1 {##1} ##2 {#2} {#3} } } -\cs_new_protected_nopar:Npn \coffin_offset_pole:Nnnnnnn #1#2#3#4#5#6#7#8 +\cs_new_protected:Npn \coffin_offset_pole:Nnnnnnn #1#2#3#4#5#6#7#8 { \dim_set:Nn \l_coffin_x_dim { #3 + #7 } \dim_set:Nn \l_coffin_y_dim { #4 + #8 } @@ -1381,12 +1381,12 @@ % there is no need to worry about naming: every corner can be saved % here as order is unimportant. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_offset_corners:Nnn #1#2#3 +\cs_new_protected:Npn \coffin_offset_corners:Nnn #1#2#3 { \prop_map_inline:cn { l_coffin_corners_ \int_value:w #1 _prop } { \coffin_offset_corner:Nnnnn #1 {##1} ##2 {#2} {#3} } } -\cs_new_protected_nopar:Npn \coffin_offset_corner:Nnnnn #1#2#3#4#5#6 +\cs_new_protected:Npn \coffin_offset_corner:Nnnnn #1#2#3#4#5#6 { \prop_put:cnx { l_coffin_corners_ \int_value:w \l_coffin_aligned_coffin _prop } @@ -1408,7 +1408,7 @@ % the poles, but this is of course only logical when the poles are % horizontal. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_update_vertical_poles:NNN #1#2#3 +\cs_new_protected:Npn \coffin_update_vertical_poles:NNN #1#2#3 { \coffin_get_pole:NnN #3 { #1 -T } \l_coffin_pole_a_tl \coffin_get_pole:NnN #3 { #2 -T } \l_coffin_pole_b_tl @@ -1419,7 +1419,7 @@ \exp_last_two_unbraced:Noo \coffin_update_B:nnnnnnnnN \l_coffin_pole_a_tl \l_coffin_pole_b_tl #3 } -\cs_new_protected_nopar:Npn \coffin_update_T:nnnnnnnnN #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \coffin_update_T:nnnnnnnnN #1#2#3#4#5#6#7#8#9 { \dim_compare:nNnTF {#2} < {#6} { @@ -1431,7 +1431,7 @@ { { 0 pt } {#2} { 1000 pt } { 0 pt } } } } -\cs_new_protected_nopar:Npn \coffin_update_B:nnnnnnnnN #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \coffin_update_B:nnnnnnnnN #1#2#3#4#5#6#7#8#9 { \dim_compare:nNnTF {#2} < {#6} { @@ -1453,7 +1453,7 @@ % which is done using a coffin with no content at all. As well as aligning to % the empty coffin, there is also a need to leave vertical mode, if necessary. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_typeset:Nnnnn #1#2#3#4#5 +\cs_new_protected:Npn \coffin_typeset:Nnnnn #1#2#3#4#5 { \coffin_align:NnnNnnnnN \c_empty_coffin { H } { l } #1 {#2} {#3} {#4} {#5} \l_coffin_aligned_coffin @@ -1505,7 +1505,7 @@ % \cs{l_coffin_cos_fp}, which are carried through unchanged for the rest % of the procedure. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_rotate:Nn #1#2 +\cs_new_protected:Npn \coffin_rotate:Nn #1#2 { \fp_set:Nn \l_coffin_tmp_fp {#2} \fp_div:Nn \l_coffin_tmp_fp { 180 } @@ -1579,7 +1579,7 @@ % is the same code as for the corners of the material itself, but % using a dedicated property list. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_set_bounding:N #1 +\cs_new_protected:Npn \coffin_set_bounding:N #1 { \prop_put:Nnx \l_coffin_bounding_prop { tl } { { 0 pt } { \dim_use:N \box_ht:N #1 } } @@ -1601,13 +1601,13 @@ % treatment is used for the corners of the material itself and the % bounding box. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_rotate_bounding:nnn #1#2#3 +\cs_new_protected:Npn \coffin_rotate_bounding:nnn #1#2#3 { \coffin_rotate_vector:nnNN {#2} {#3} \l_coffin_x_dim \l_coffin_y_dim \prop_put:Nnx \l_coffin_bounding_prop {#1} { { \dim_use:N \l_coffin_x_dim } { \dim_use:N \l_coffin_y_dim } } } -\cs_new_protected_nopar:Npn \coffin_rotate_corner:Nnnn #1#2#3#4 +\cs_new_protected:Npn \coffin_rotate_corner:Nnnn #1#2#3#4 { \coffin_rotate_vector:nnNN {#3} {#4} \l_coffin_x_dim \l_coffin_y_dim \prop_put:cnx { l_coffin_corners_ \int_value:w #1 _prop } {#2} @@ -1622,7 +1622,7 @@ % the pole and its direction. The rotation here is about the bottom-left % corner of the coffin. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_rotate_pole:Nnnnnn #1#2#3#4#5#6 +\cs_new_protected:Npn \coffin_rotate_pole:Nnnnnn #1#2#3#4#5#6 { \coffin_rotate_vector:nnNN {#3} {#4} \l_coffin_x_dim \l_coffin_y_dim \coffin_rotate_vector:nnNN {#5} {#6} @@ -1645,7 +1645,7 @@ % minimum: for any given rotation the sin and cosine values do no % change, after all. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_rotate_vector:nnNN #1#2#3#4 +\cs_new_protected:Npn \coffin_rotate_vector:nnNN #1#2#3#4 { \fp_set_from_dim:Nn \l_coffin_x_fp {#1} \fp_set_from_dim:Nn \l_coffin_y_fp {#2} @@ -1673,7 +1673,7 @@ % corners. The values start at the maximum dimensions so that the % case where all are positive or all are negative works out correctly. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_find_corner_maxima:N #1 +\cs_new_protected:Npn \coffin_find_corner_maxima:N #1 { \dim_set:Nn \l_coffin_top_corner_dim { -\c_max_dim } \dim_set:Nn \l_coffin_right_corner_dim { -\c_max_dim } @@ -1682,7 +1682,7 @@ \prop_map_inline:cn { l_coffin_corners_ \int_value:w #1 _prop } { \coffin_find_corner_maxima_aux:nn ##2 } } -\cs_new_protected_nopar:Npn \coffin_find_corner_maxima_aux:nn #1#2 +\cs_new_protected:Npn \coffin_find_corner_maxima_aux:nn #1#2 { \dim_set_min:Nn \l_coffin_left_corner_dim {#1} \dim_set_max:Nn \l_coffin_right_corner_dim {#1} @@ -1705,7 +1705,7 @@ \prop_map_inline:Nn \l_coffin_bounding_prop { \coffin_find_bounding_shift_aux:nn ##2 } } -\cs_new_protected_nopar:Npn \coffin_find_bounding_shift_aux:nn #1#2 +\cs_new_protected:Npn \coffin_find_bounding_shift_aux:nn #1#2 { \dim_set_min:Nn \l_coffin_bounding_shift_dim {#1} } % \end{macrocode} % \end{macro} @@ -1717,7 +1717,7 @@ % appropriate values from the $x$- and $y$-components. For % the poles, this means that the direction vector is unchanged. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_shift_corner:Nnnn #1#2#3#4 +\cs_new_protected:Npn \coffin_shift_corner:Nnnn #1#2#3#4 { \prop_put:cnx { l_coffin_corners_ \int_value:w #1 _ prop } {#2} { @@ -1725,7 +1725,7 @@ { \dim_eval:n { #4 - \l_coffin_bottom_corner_dim } } } } -\cs_new_protected_nopar:Npn \coffin_shift_pole:Nnnnnn #1#2#3#4#5#6 +\cs_new_protected:Npn \coffin_shift_pole:Nnnnnn #1#2#3#4#5#6 { \prop_put:cnx { l_coffin_poles_ \int_value:w #1 _ prop } {#2} { @@ -1767,7 +1767,7 @@ % underlying box, but that operation is grouped and so the same % calculation is done here. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_resize:Nnn #1#2#3 +\cs_new_protected:Npn \coffin_resize:Nnn #1#2#3 { \coffin_set_user_dimensions:N #1 \box_resize:Nnn #1 {#2} {#3} @@ -1787,7 +1787,7 @@ % The poles and corners of the coffin are scaled to the appropriate % places before actually resizing the underlying box. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_resize_common:Nnn #1#2#3 +\cs_new_protected:Npn \coffin_resize_common:Nnn #1#2#3 { \prop_map_inline:cn { l_coffin_corners_ \int_value:w #1 _prop } { \coffin_scale_corner:Nnnn #1 {##1} ##2 } @@ -1816,7 +1816,7 @@ % the \TeX{} way as this works properly with floating point values % without needing to use the \texttt{fp} module. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_scale:Nnn #1#2#3 +\cs_new_protected:Npn \coffin_scale:Nnn #1#2#3 { \box_scale:Nnn #1 {#2} {#3} \coffin_set_user_dimensions:N #1 @@ -1840,7 +1840,7 @@ % factors in $x$ and $y$. This is a much less complex operation % than rotation, and as a result the code is a lot clearer. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_scale_vector:nnNN #1#2#3#4 +\cs_new_protected:Npn \coffin_scale_vector:nnNN #1#2#3#4 { \fp_set_from_dim:Nn \l_coffin_tmp_fp {#1} \fp_mul:Nn \l_coffin_tmp_fp { \l_coffin_scale_x_fp } @@ -1857,13 +1857,13 @@ % Scaling both corners and poles is a simple calculation using the % preceding vector scaling. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_scale_corner:Nnnn #1#2#3#4 +\cs_new_protected:Npn \coffin_scale_corner:Nnnn #1#2#3#4 { \coffin_scale_vector:nnNN {#3} {#4} \l_coffin_x_dim \l_coffin_y_dim \prop_put:cnx { l_coffin_corners_ \int_value:w #1 _prop } {#2} { { \dim_use:N \l_coffin_x_dim } { \dim_use:N \l_coffin_y_dim } } } -\cs_new_protected_nopar:Npn \coffin_scale_pole:Nnnnnn #1#2#3#4#5#6 +\cs_new_protected:Npn \coffin_scale_pole:Nnnnnn #1#2#3#4#5#6 { \coffin_scale_vector:nnNN {#3} {#4} \l_coffin_x_dim \l_coffin_y_dim \coffin_set_pole:Nnx #1 {#2} @@ -1881,14 +1881,14 @@ % These functions correct for the $x$ displacement that takes % place with a negative horizontal scaling. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_x_shift_corner:Nnnn #1#2#3#4 +\cs_new_protected:Npn \coffin_x_shift_corner:Nnnn #1#2#3#4 { \prop_put:cnx { l_coffin_corners_ \int_value:w #1 _prop } {#2} { { \dim_eval:n { #3 + \box_wd:N #1 } } {#4} } } -\cs_new_protected_nopar:Npn \coffin_x_shift_pole:Nnnnnn #1#2#3#4#5#6 +\cs_new_protected:Npn \coffin_x_shift_pole:Nnnnnn #1#2#3#4#5#6 { \prop_put:cnx { l_coffin_poles_ \int_value:w #1 _prop } {#2} { @@ -2019,7 +2019,7 @@ % Contrast with the more optimised version for showing all handles which % comes next. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_mark_handle:Nnnn #1#2#3#4 +\cs_new_protected:Npn \coffin_mark_handle:Nnnn #1#2#3#4 { \hcoffin_set:Nn \l_coffin_display_pole_coffin { @@ -2066,7 +2066,7 @@ \l_coffin_tmp_tl #1 {#2} {#3} } } -\cs_new_protected_nopar:Npn \coffin_mark_handle_aux:nnnnNnn #1#2#3#4#5#6#7 +\cs_new_protected:Npn \coffin_mark_handle_aux:nnnnNnn #1#2#3#4#5#6#7 { \coffin_attach_mark:NnnNnnnn #5 {#6} {#7} \l_coffin_display_coord_coffin {#1} {#2} @@ -2088,7 +2088,7 @@ % handles for all of these poles. This is done such that poles are % removed during the loops to avoid duplication. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_display_handles:Nn #1#2 +\cs_new_protected:Npn \coffin_display_handles:Nn #1#2 { \hcoffin_set:Nn \l_coffin_display_pole_coffin { @@ -2124,7 +2124,7 @@ % and used to align the pole coffin with the main coffin for output. % The positions are recovered from the preset list if available. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_display_handles_aux:nnnnnn #1#2#3#4#5#6 +\cs_new_protected:Npn \coffin_display_handles_aux:nnnnnn #1#2#3#4#5#6 { \prop_map_inline:Nn \l_coffin_display_poles_prop { @@ -2173,7 +2173,7 @@ } } } -\cs_new_protected_nopar:Npn \coffin_display_handles_aux:nnnn #1#2#3#4 +\cs_new_protected:Npn \coffin_display_handles_aux:nnnn #1#2#3#4 { \coffin_display_attach:Nnnnn \l_coffin_display_coord_coffin {#1} {#2} @@ -2187,7 +2187,7 @@ % and stored for the display coffin the code simply uses it directly, % with no calculation. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_display_attach:Nnnnn #1#2#3#4#5 +\cs_new_protected:Npn \coffin_display_attach:Nnnnn #1#2#3#4#5 { \coffin_calculate_intersection:Nnn #1 {#2} {#3} \dim_set:Nn \l_coffin_x_prime_dim { \l_coffin_x_dim } @@ -2224,7 +2224,7 @@ % a way that keeps things relatively readable. If there is no apparent % structure then the code complains. % \begin{macrocode} -\cs_new_protected_nopar:Npn \coffin_show_structure:N #1 +\cs_new_protected:Npn \coffin_show_structure:N #1 { \cs_if_exist:cTF { l_coffin_poles_ \int_value:w #1 _prop } { @@ -2256,7 +2256,7 @@ \iow_newline: > \c_space_tl \c_space_tl #1 \c_space_tl \c_space_tl => \c_space_tl \c_space_tl \exp_not:n {#2} } -\cs_new_nopar:Npn \coffin_show_aux:w #1 > ~ { } +\cs_new:Npn \coffin_show_aux:w #1 > ~ { } \cs_generate_variant:Nn \coffin_show_structure:N { c } % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx index 5159746f515..3ea31aac59d 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx @@ -36,7 +36,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3drivers.dtx 2959 2011-11-14 21:47:18Z joseph $ +\GetIdInfo$Id: l3drivers.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental drivers} % %<*driver> @@ -86,9 +86,9 @@ % functions here are closely tied to the immediate level \enquote{up}: % several variable values must be in the correct locations for the driver % code to function. -% +% % \section{Box clipping} -% +% % \begin{function}[added = 2011-11-11]{\driver_box_use_clip:N} % \begin{syntax} % \cs{driver_box_use_clip:N} \meta{box} @@ -155,7 +155,7 @@ % \begin{macrocode} %<*initex|package> % \end{macrocode} -% +% % \begin{macrocode} %<*package> \ProvidesExplFile @@ -205,9 +205,9 @@ % % % \end{macrocode} -% +% % \subsection{Driver utility functions} -% +% % \begin{macro}{\driver_graphic_state_save:} % \begin{macro}{\driver_graphic_state_restore:} % All of the drivers have a stack for saving the graphic state. These @@ -246,14 +246,14 @@ %<*pdfmode|xdvipdfmx> \cs_new_protected:Npn \driver_pdf_literal:n #1 %<*pdfmode> - { \pdftex_pdfliteral:D {#1} } + { \pdftex_pdfliteral:D {#1} } % %<*xdvipdfmx> { \tex_special:D { pdf:content~ #1 } } % \cs_new_protected:Npn \driver_pdf_literal_direct:n #1 %<*pdfmode> - { \pdftex_pdfliteral:D direct~{#1} } + { \pdftex_pdfliteral:D direct~{#1} } % %<*xdvipdfmx> { \tex_special:D { pdf:literal~direct~ #1 } } @@ -261,20 +261,20 @@ % % \end{macrocode} % \end{macro} -% +% % \begin{macro}{\driver_ps_literal:n} % The same concept for PostScript: these are \enquote{direct} by default, % but by keeping the same name life should be a little clearer. % \begin{macrocode} %<*dvips> \cs_new_protected:Npn \driver_ps_literal:n #1 - { \tex_special:D { ps: #1 } } + { \tex_special:D { ps: #1 } } % % \end{macrocode} % \end{macro} -% +% % \subsection{Box clipping} -% +% % \begin{macro}{\driver_box_use_clip:N} % The overall logic to clipping a box is the same in all cases. The general % method is to save the current location, define a clipping path equivalent diff --git a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx index a183e194f1b..be9c3ea942e 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3expan.dtx 3031 2011-12-07 05:27:05Z bruno $ +\GetIdInfo$Id: l3expan.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental argument expansion} % %<*driver> @@ -826,7 +826,7 @@ % |\exp_not:N| will temporarily turn it into the primitive % |\scan_stop:|. % \begin{macrocode} -\cs_new_nopar:Npn \exp_eval_register:N #1 +\cs_new:Npn \exp_eval_register:N #1 { \exp_after:wN \if_meaning:w \exp_not:N #1 #1 % \end{macrocode} @@ -859,7 +859,7 @@ \fi: \exp_after:wN \c_zero \tex_the:D #1 } -\cs_new_nopar:Npn \exp_eval_register:c #1 +\cs_new:Npn \exp_eval_register:c #1 { \exp_after:wN \exp_eval_register:N \cs:w #1 \cs_end: } % \end{macrocode} % Clean up nicely, then call the undefined control sequence. The @@ -983,7 +983,7 @@ \cs:w #2 \exp_after:wN \cs_end: \exp_after:wN { \tex_romannumeral:D -`0 #3 } } -\cs_new_nopar:Npn \exp_args:NVV #1#2#3 +\cs_new:Npn \exp_args:NVV #1#2#3 { \exp_after:wN #1 \exp_after:wN { \tex_romannumeral:D \exp_after:wN @@ -1385,7 +1385,7 @@ \tex_lowercase:D { \group_end: - \cs_new_nopar:Npn \cs_generate_variant_aux:N #1 + \cs_new:Npn \cs_generate_variant_aux:N #1 { \exp_after:wN \cs_generate_variant_aux:w \token_to_meaning:N #1 diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx index 79c83e830de..30c212d3015 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3file.dtx 2896 2011-10-09 20:36:50Z joseph $ +\GetIdInfo$Id: l3file.dtx 3095 2011-12-26 22:33:23Z joseph $ {L3 Experimental file operations} % %<*driver> @@ -290,7 +290,7 @@ % \end{variable} % % \begin{macro}{\file_add_path:nN} -% \begin{variable}{\g_file_test_stream} +% \begin{variable}{\g_file_test_ior} % \begin{macro}[aux]{\file_add_path_search:nN} % The way to test if a file exists is to try to open it: if it does not % exist then \TeX{} will report end-of-file. For files which are in the @@ -299,17 +299,17 @@ % location is of course treated as the correct one. If nothing is found, % |#2| is returned empty. % \begin{macrocode} -\cs_new_protected_nopar:Npn \file_add_path:nN #1#2 +\cs_new_protected:Npn \file_add_path:nN #1#2 { - \ior_open:Nn \g_file_test_stream {#1} - \ior_if_eof:NTF \g_file_test_stream + \ior_open:Nn \g_file_test_ior {#1} + \ior_if_eof:NTF \g_file_test_ior { \file_add_path_search:nN {#1} #2 } { - \ior_close:N \g_file_test_stream + \ior_close:N \g_file_test_ior \tl_set:Nx #2 {#1} } } -\cs_new_protected_nopar:Npn \file_add_path_search:nN #1#2 +\cs_new_protected:Npn \file_add_path_search:nN #1#2 { \tl_clear:N #2 %<*package> @@ -323,8 +323,8 @@ % \seq_map_inline:Nn \l_file_search_path_seq { - \ior_open:Nn \g_file_test_stream { ##1 #1 } - \ior_if_eof:NF \g_file_test_stream + \ior_open:Nn \g_file_test_ior { ##1 #1 } + \ior_if_eof:NF \g_file_test_ior { \tl_set:Nx #2 { ##1 #1 } \seq_map_break: @@ -334,7 +334,7 @@ \cs_if_exist:NT \input@path { \seq_set_eq:NN \l_file_search_path_seq \l_file_search_path_saved_seq } % - \ior_close:N \g_file_test_stream + \ior_close:N \g_file_test_ior } % \end{macrocode} % \end{macro} @@ -361,7 +361,7 @@ % Loading a file is done in a safe way, checking first that the file % exists and loading only if it does. % \begin{macrocode} -\cs_new_protected_nopar:Npn \file_input:n #1 +\cs_new_protected:Npn \file_input:n #1 { \file_add_path:nN {#1} \l_file_name_tl \tl_if_empty:NF \l_file_name_tl @@ -385,12 +385,12 @@ % \begin{macro}{\file_path_remove:n} % Wrapper functions to manage the search path. % \begin{macrocode} -\cs_new_protected_nopar:Npn \file_path_include:n #1 +\cs_new_protected:Npn \file_path_include:n #1 { \seq_if_in:NnF \l_file_search_path_seq {#1} { \seq_put_right:Nn \l_file_search_path_seq {#1} } } -\cs_new_protected_nopar:Npn \file_path_remove:n #1 +\cs_new_protected:Npn \file_path_remove:n #1 { \seq_remove_all:Nn \l_file_search_path_seq {#1} } % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx index 7e22c24e8b5..82c1a9f6f59 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3fp.dtx 3029 2011-12-06 22:47:30Z joseph $ +\GetIdInfo$Id: l3fp.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental floating-point operations} % %<*driver> @@ -162,7 +162,7 @@ % Sets the \meta{floating point variable} to the distance represented % by the \meta{dimension expression} in the units points. This means % that distances given in other units are first converted to points -% before being assigned to the \meta{floating point variable}. +% before being assigned to the \meta{floating point variable}. % \end{function} % % \begin{function}[rEXP]{\fp_use:N, \fp_use:c} @@ -272,7 +272,7 @@ % \cs{fp_round_places:Nn} \meta{floating point variable} \Arg{target} % \end{syntax} % Rounds the \meta{floating point variable} to the \meta{target} number -% of decimal places (an integer expression). +% of decimal places (an integer expression). % \end{function} % % \section{Floating-point conditionals} @@ -858,9 +858,9 @@ % match the delimited function. This is always used to read the first % value (register |a|). % \begin{macrocode} -\cs_new_protected_nopar:Npn \fp_read:N #1 +\cs_new_protected:Npn \fp_read:N #1 { \exp_after:wN \fp_read_aux:w #1 \q_stop } -\cs_new_protected_nopar:Npn \fp_read_aux:w #1#2 . #3 e #4 \q_stop +\cs_new_protected:Npn \fp_read_aux:w #1#2 . #3 e #4 \q_stop { \if:w #1 - \l_fp_input_a_sign_int \c_minus_one @@ -893,7 +893,7 @@ % the decimal-finding code. The later will allow the decimal to be too % long, truncating the result. % \begin{macrocode} -\cs_new_protected_nopar:Npn \fp_split:Nn #1#2 +\cs_new_protected:Npn \fp_split:Nn #1#2 { \tl_set:Nx \l_fp_tmp_tl {#2} \tl_set_rescan:Nno \l_fp_tmp_tl { \char_set_catcode_ignore:n { 32 } } @@ -928,7 +928,7 @@ \fi: \fi: } -\cs_new_protected_nopar:Npn \fp_split_exponent:w #1 e #2 e #3 \q_stop #4 +\cs_new_protected:Npn \fp_split_exponent:w #1 e #2 e #3 \q_stop #4 { \use:c { l_fp_input_ #4 _exponent_int } \int_eval:w 0 #2 \scan_stop: @@ -936,19 +936,19 @@ \use:c { l_fp_input_ #4 _integer_int } \int_eval:w 0 #1 . . \q_stop #4 } -\cs_new_protected_nopar:Npn \fp_split_aux_i:w #1 . #2 . #3 \q_stop +\cs_new_protected:Npn \fp_split_aux_i:w #1 . #2 . #3 \q_stop { \fp_split_aux_ii:w #2 000000000 \q_stop } -\cs_new_protected_nopar:Npn \fp_split_aux_ii:w #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \fp_split_aux_ii:w #1#2#3#4#5#6#7#8#9 { \fp_split_aux_iii:w {#1#2#3#4#5#6#7#8#9} } -\cs_new_protected_nopar:Npn \fp_split_aux_iii:w #1#2 \q_stop +\cs_new_protected:Npn \fp_split_aux_iii:w #1#2 \q_stop { \l_fp_tmp_int 1 #1 \scan_stop: \exp_after:wN \fp_split_decimal:w \int_use:N \l_fp_tmp_int 000000000 \q_stop } -\cs_new_protected_nopar:Npn \fp_split_decimal:w #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \fp_split_decimal:w #1#2#3#4#5#6#7#8#9 { \fp_split_decimal_aux:w {#2#3#4#5#6#7#8#9} } -\cs_new_protected_nopar:Npn \fp_split_decimal_aux:w #1#2#3 \q_stop #4 +\cs_new_protected:Npn \fp_split_decimal_aux:w #1#2#3 \q_stop #4 { \use:c { l_fp_input_ #4 _decimal_int } #1#2 \scan_stop: \if_int_compare:w @@ -983,7 +983,7 @@ % is done using \TeX{} tokens where possible, as this is faster than % arithmetic. % \begin{macrocode} -\cs_new_protected_nopar:Npn \fp_standardise:NNNN #1#2#3#4 +\cs_new_protected:Npn \fp_standardise:NNNN #1#2#3#4 { \if_int_compare:w \int_eval:w #2 + #3 = \c_zero @@ -995,7 +995,7 @@ \fi: #1#2#3#4 } -\cs_new_protected_nopar:Npn \fp_standardise_aux:NNNN #1#2#3#4 +\cs_new_protected:Npn \fp_standardise_aux:NNNN #1#2#3#4 { \cs_set_protected_nopar:Npn \fp_standardise_aux: { @@ -1006,7 +1006,7 @@ \exp_after:wN \fp_standardise_aux: \fi: } - \cs_set_protected_nopar:Npn + \cs_set_protected:Npn \fp_standardise_aux:w ##1##2##3##4##5##6##7##8##9 \q_stop { #2 ##2 \scan_stop: @@ -1023,7 +1023,7 @@ \exp_after:wN \fp_standardise_aux: \fi: } - \cs_set_protected_nopar:Npn + \cs_set_protected:Npn \fp_standardise_aux:w ##1##2##3##4##5##6##7##8##9 { #2 ##1##2##3##4##5##6##7##8 \scan_stop: @@ -1087,7 +1087,7 @@ \exp_after:wN \fp_level_input_exponents_a: \fi: } -\cs_new_protected_nopar:Npn \fp_level_input_exponents_a:NNNNNNNNN +\cs_new_protected:Npn \fp_level_input_exponents_a:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \l_fp_input_b_integer_int #1#2#3#4#5#6#7#8 \scan_stop: @@ -1112,7 +1112,7 @@ \exp_after:wN \fp_level_input_exponents_b: \fi: } -\cs_new_protected_nopar:Npn \fp_level_input_exponents_b:NNNNNNNNN +\cs_new_protected:Npn \fp_level_input_exponents_b:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \l_fp_input_a_integer_int #1#2#3#4#5#6#7#8 \scan_stop: @@ -1138,7 +1138,7 @@ % Used for output of results, cutting down on \cs{exp_after:wN}. % This is just a place holder definition. % \begin{macrocode} -\cs_new_protected_nopar:Npn \fp_tmp:w #1#2 { } +\cs_new_protected:Npn \fp_tmp:w #1#2 { } % \end{macrocode} % \end{macro} % @@ -1156,7 +1156,7 @@ % Fixed-points always have a value, and of course this has to be % initialised globally. % \begin{macrocode} -\cs_new_protected_nopar:Npn \fp_new:N #1 +\cs_new_protected:Npn \fp_new:N #1 { \tl_new:N #1 \tl_gset_eq:NN #1 \c_zero_fp @@ -1168,7 +1168,7 @@ % \begin{macro}{\fp_const:Nn, \fp_const:cn} % A simple wrapper. % \begin{macrocode} -\cs_new_protected_nopar:Npn \fp_const:Nn #1#2 +\cs_new_protected:Npn \fp_const:Nn #1#2 { \fp_new:N #1 \fp_gset:Nn #1 {#2} @@ -1183,9 +1183,9 @@ % \UnitTested % Zeroing fixed-points is pretty obvious. % \begin{macrocode} -\cs_new_protected_nopar:Npn \fp_zero:N #1 +\cs_new_protected:Npn \fp_zero:N #1 { \tl_set_eq:NN #1 \c_zero_fp } -\cs_new_protected_nopar:Npn \fp_gzero:N #1 +\cs_new_protected:Npn \fp_gzero:N #1 { \tl_gset_eq:NN #1 \c_zero_fp } \cs_generate_variant:Nn \fp_zero:N { c } \cs_generate_variant:Nn \fp_gzero:N { c } @@ -1205,7 +1205,7 @@ % \begin{macrocode} \cs_new_protected_nopar:Npn \fp_set:Nn { \fp_set_aux:NNn \tl_set:Nn } \cs_new_protected_nopar:Npn \fp_gset:Nn { \fp_set_aux:NNn \tl_gset:Nn } -\cs_new_protected_nopar:Npn \fp_set_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_set_aux:NNn #1#2#3 { \group_begin: \fp_split:Nn a {#3} @@ -1263,7 +1263,7 @@ { \fp_set_from_dim_aux:NNn \tl_set:Nx } \cs_new_protected_nopar:Npn \fp_gset_from_dim:Nn { \fp_set_from_dim_aux:NNn \tl_gset:Nx } -\cs_new_protected_nopar:Npn \fp_set_from_dim_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_set_from_dim_aux:NNn #1#2#3 { \group_begin: \l_fp_tmp_skip \etex_glueexpr:D #3 \scan_stop: @@ -1301,7 +1301,7 @@ } \cs_set_protected_nopar:Npx \fp_set_from_dim_aux:w { - \cs_set_nopar:Npn \exp_not:N \fp_set_from_dim_aux:w + \cs_set:Npn \exp_not:N \fp_set_from_dim_aux:w ##1 \tl_to_str:n { pt } {##1} } \fp_set_from_dim_aux:w @@ -1366,10 +1366,10 @@ % expandable manner. The first step is to deal with the sign, then % work out how big the input is. % \begin{macrocode} -\cs_new_nopar:Npn \fp_use:N #1 +\cs_new:Npn \fp_use:N #1 { \exp_after:wN \fp_use_aux:w #1 \q_stop } \cs_generate_variant:Nn \fp_use:N { c } -\cs_new_nopar:Npn \fp_use_aux:w #1#2 e #3 \q_stop +\cs_new:Npn \fp_use_aux:w #1#2 e #3 \q_stop { \if:w #1 - - @@ -1389,12 +1389,12 @@ % \end{macrocode} % When the exponent is zero, the input is simply returned as output. % \begin{macrocode} -\cs_new_nopar:Npn \fp_use_none:w #1 e #2 \q_stop {#1} +\cs_new:Npn \fp_use_none:w #1 e #2 \q_stop {#1} % \end{macrocode} % For small numbers (less than $1$) the correct number of zeros % have to be inserted, but the decimal point is easy. % \begin{macrocode} -\cs_new_nopar:Npn \fp_use_small:w #1 . #2 e #3 \q_stop +\cs_new:Npn \fp_use_small:w #1 . #2 e #3 \q_stop { 0 . \prg_replicate:nn { -#3 - 1 } { 0 } @@ -1404,7 +1404,7 @@ % Life is more complex for large numbers. The decimal point needs to % be shuffled, with potentially some zero-filling for very large values. % \begin{macrocode} -\cs_new_nopar:Npn \fp_use_large:w #1 . #2 e #3 \q_stop +\cs_new:Npn \fp_use_large:w #1 . #2 e #3 \q_stop { \if_int_compare:w #3 < \c_ten \exp_after:wN \fp_use_large_aux_i:w @@ -1413,28 +1413,28 @@ \fi: #1#2 e #3 \q_stop } -\cs_new_nopar:Npn \fp_use_large_aux_i:w #1#2 e #3 \q_stop +\cs_new:Npn \fp_use_large_aux_i:w #1#2 e #3 \q_stop { #1 \use:c { fp_use_large_aux_ #3 :w } #2 \q_stop } -\cs_new_nopar:cpn { fp_use_large_aux_1:w } #1#2 \q_stop { #1 . #2 } -\cs_new_nopar:cpn { fp_use_large_aux_2:w } #1#2#3 \q_stop +\cs_new:cpn { fp_use_large_aux_1:w } #1#2 \q_stop { #1 . #2 } +\cs_new:cpn { fp_use_large_aux_2:w } #1#2#3 \q_stop { #1#2 . #3 } -\cs_new_nopar:cpn { fp_use_large_aux_3:w } #1#2#3#4 \q_stop +\cs_new:cpn { fp_use_large_aux_3:w } #1#2#3#4 \q_stop { #1#2#3 . #4 } -\cs_new_nopar:cpn { fp_use_large_aux_4:w } #1#2#3#4#5 \q_stop +\cs_new:cpn { fp_use_large_aux_4:w } #1#2#3#4#5 \q_stop { #1#2#3#4 . #5 } -\cs_new_nopar:cpn { fp_use_large_aux_5:w } #1#2#3#4#5#6 \q_stop +\cs_new:cpn { fp_use_large_aux_5:w } #1#2#3#4#5#6 \q_stop { #1#2#3#4#5 . #6 } -\cs_new_nopar:cpn { fp_use_large_aux_6:w } #1#2#3#4#5#6#7 \q_stop +\cs_new:cpn { fp_use_large_aux_6:w } #1#2#3#4#5#6#7 \q_stop { #1#2#3#4#5#6 . #7 } -\cs_new_nopar:cpn { fp_use_large_aux_7:w } #1#2#3#4#5#6#7#8 \q_stop +\cs_new:cpn { fp_use_large_aux_7:w } #1#2#3#4#5#6#7#8 \q_stop { #1#2#3#4#6#7 . #8 } -\cs_new_nopar:cpn { fp_use_large_aux_8:w } #1#2#3#4#5#6#7#8#9 \q_stop +\cs_new:cpn { fp_use_large_aux_8:w } #1#2#3#4#5#6#7#8#9 \q_stop { #1#2#3#4#5#6#7#8 . #9 } -\cs_new_nopar:cpn { fp_use_large_aux_9:w } #1 \q_stop { #1 . } -\cs_new_nopar:Npn \fp_use_large_aux_ii:w #1 e #2 \q_stop +\cs_new:cpn { fp_use_large_aux_9:w } #1 \q_stop { #1 . } +\cs_new:Npn \fp_use_large_aux_ii:w #1 e #2 \q_stop { #1 \prg_replicate:nn { #2 - 9 } { 0 } @@ -1467,7 +1467,7 @@ % \begin{macro}{\fp_to_dim:N, \fp_to_dim:c} % A very simple wrapper. % \begin{macrocode} -\cs_new_nopar:Npn \fp_to_dim:N #1 { \fp_use:N #1 pt } +\cs_new:Npn \fp_to_dim:N #1 { \fp_use:N #1 pt } \cs_generate_variant:Nn \fp_to_dim:N { c } % \end{macrocode} % \end{macro} @@ -1494,10 +1494,10 @@ % Converting to integers in an expandable manner is very similar to % simply using floating point variables, particularly in the lead-off. % \begin{macrocode} -\cs_new_nopar:Npn \fp_to_int:N #1 +\cs_new:Npn \fp_to_int:N #1 { \exp_after:wN \fp_to_int_aux:w #1 \q_stop } \cs_generate_variant:Nn \fp_to_int:N { c } -\cs_new_nopar:Npn \fp_to_int_aux:w #1#2 e #3 \q_stop +\cs_new:Npn \fp_to_int_aux:w #1#2 e #3 \q_stop { \if:w #1 - - @@ -1513,7 +1513,7 @@ % For small numbers, if the decimal part is greater than a half then % there is rounding up to do. % \begin{macrocode} -\cs_new_nopar:Npn \fp_to_int_small:w #1 . #2 e #3 \q_stop +\cs_new:Npn \fp_to_int_small:w #1 . #2 e #3 \q_stop { \if_int_compare:w #3 > \c_one \else: @@ -1528,7 +1528,7 @@ % For large numbers, the idea is to split off the part for rounding, % do the rounding and fill if needed. % \begin{macrocode} -\cs_new_nopar:Npn \fp_to_int_large:w #1 . #2 e #3 \q_stop +\cs_new:Npn \fp_to_int_large:w #1 . #2 e #3 \q_stop { \if_int_compare:w #3 < \c_ten \exp_after:wN \fp_to_int_large_aux_i:w @@ -1537,26 +1537,26 @@ \fi: #1#2 e #3 \q_stop } -\cs_new_nopar:Npn \fp_to_int_large_aux_i:w #1#2 e #3 \q_stop +\cs_new:Npn \fp_to_int_large_aux_i:w #1#2 e #3 \q_stop { \use:c { fp_to_int_large_aux_ #3 :w } #2 \q_stop {#1} } -\cs_new_nopar:cpn { fp_to_int_large_aux_1:w } #1#2 \q_stop +\cs_new:cpn { fp_to_int_large_aux_1:w } #1#2 \q_stop { \fp_to_int_large_aux:nnn { #2 0 } {#1} } -\cs_new_nopar:cpn { fp_to_int_large_aux_2:w } #1#2#3 \q_stop +\cs_new:cpn { fp_to_int_large_aux_2:w } #1#2#3 \q_stop { \fp_to_int_large_aux:nnn { #3 00 } {#1#2} } -\cs_new_nopar:cpn { fp_to_int_large_aux_3:w } #1#2#3#4 \q_stop +\cs_new:cpn { fp_to_int_large_aux_3:w } #1#2#3#4 \q_stop { \fp_to_int_large_aux:nnn { #4 000 } {#1#2#3} } -\cs_new_nopar:cpn { fp_to_int_large_aux_4:w } #1#2#3#4#5 \q_stop +\cs_new:cpn { fp_to_int_large_aux_4:w } #1#2#3#4#5 \q_stop { \fp_to_int_large_aux:nnn { #5 0000 } {#1#2#3#4} } -\cs_new_nopar:cpn { fp_to_int_large_aux_5:w } #1#2#3#4#5#6 \q_stop +\cs_new:cpn { fp_to_int_large_aux_5:w } #1#2#3#4#5#6 \q_stop { \fp_to_int_large_aux:nnn { #6 00000 } {#1#2#3#4#5} } -\cs_new_nopar:cpn { fp_to_int_large_aux_6:w } #1#2#3#4#5#6#7 \q_stop +\cs_new:cpn { fp_to_int_large_aux_6:w } #1#2#3#4#5#6#7 \q_stop { \fp_to_int_large_aux:nnn { #7 000000 } {#1#2#3#4#5#6} } -\cs_new_nopar:cpn { fp_to_int_large_aux_7:w } #1#2#3#4#5#6#7#8 \q_stop +\cs_new:cpn { fp_to_int_large_aux_7:w } #1#2#3#4#5#6#7#8 \q_stop { \fp_to_int_large_aux:nnn { #8 0000000 } {#1#2#3#4#5#6#7} } -\cs_new_nopar:cpn { fp_to_int_large_aux_8:w } #1#2#3#4#5#6#7#8#9 \q_stop +\cs_new:cpn { fp_to_int_large_aux_8:w } #1#2#3#4#5#6#7#8#9 \q_stop { \fp_to_int_large_aux:nnn { #9 00000000 } {#1#2#3#4#5#6#7#8} } -\cs_new_nopar:cpn { fp_to_int_large_aux_9:w } #1 \q_stop {#1} -\cs_new_nopar:Npn \fp_to_int_large_aux:nnn #1#2#3 +\cs_new:cpn { fp_to_int_large_aux_9:w } #1 \q_stop {#1} +\cs_new:Npn \fp_to_int_large_aux:nnn #1#2#3 { \if_int_compare:w #1 < \c_five_hundred_million #3#2 @@ -1564,7 +1564,7 @@ \int_value:w \int_eval:w #3#2 + 1 \int_eval_end: \fi: } -\cs_new_nopar:Npn \fp_to_int_large_aux_ii:w #1 e #2 \q_stop +\cs_new:Npn \fp_to_int_large_aux_ii:w #1 e #2 \q_stop { #1 \prg_replicate:nn { #2 - 9 } { 0 } @@ -1618,10 +1618,10 @@ % Converting to integers in an expandable manner is very similar to % simply using floating point variables, particularly in the lead-off. % \begin{macrocode} -\cs_new_nopar:Npn \fp_to_tl:N #1 +\cs_new:Npn \fp_to_tl:N #1 { \exp_after:wN \fp_to_tl_aux:w #1 \q_stop } \cs_generate_variant:Nn \fp_to_tl:N { c } -\cs_new_nopar:Npn \fp_to_tl_aux:w #1#2 e #3 \q_stop +\cs_new:Npn \fp_to_tl_aux:w #1#2 e #3 \q_stop { \if:w #1 - - @@ -1640,7 +1640,7 @@ % for intermediate exponent values the decimal needs to be moved, then % zeros can be dropped. % \begin{macrocode} -\cs_new_nopar:Npn \fp_to_tl_large:w #1 e #2 \q_stop +\cs_new:Npn \fp_to_tl_large:w #1 e #2 \q_stop { \if_int_compare:w #2 < \c_ten \exp_after:wN \fp_to_tl_large_aux_i:w @@ -1649,72 +1649,72 @@ \fi: #1 e #2 \q_stop } -\cs_new_nopar:Npn \fp_to_tl_large_aux_i:w #1 e #2 \q_stop +\cs_new:Npn \fp_to_tl_large_aux_i:w #1 e #2 \q_stop { \use:c { fp_to_tl_large_ #2 :w } #1 \q_stop } -\cs_new_nopar:Npn \fp_to_tl_large_aux_ii:w #1 . #2 e #3 \q_stop +\cs_new:Npn \fp_to_tl_large_aux_ii:w #1 . #2 e #3 \q_stop { #1 \fp_to_tl_large_zeros:NNNNNNNNN #2 e #3 } -\cs_new_nopar:cpn { fp_to_tl_large_0:w } #1 . #2 \q_stop +\cs_new:cpn { fp_to_tl_large_0:w } #1 . #2 \q_stop { #1 \fp_to_tl_large_zeros:NNNNNNNNN #2 } -\cs_new_nopar:cpn { fp_to_tl_large_1:w } #1 . #2#3 \q_stop +\cs_new:cpn { fp_to_tl_large_1:w } #1 . #2#3 \q_stop { #1#2 \fp_to_tl_large_zeros:NNNNNNNNN #3 0 } -\cs_new_nopar:cpn { fp_to_tl_large_2:w } #1 . #2#3#4 \q_stop +\cs_new:cpn { fp_to_tl_large_2:w } #1 . #2#3#4 \q_stop { #1#2#3 \fp_to_tl_large_zeros:NNNNNNNNN #4 00 } -\cs_new_nopar:cpn { fp_to_tl_large_3:w } #1 . #2#3#4#5 \q_stop +\cs_new:cpn { fp_to_tl_large_3:w } #1 . #2#3#4#5 \q_stop { #1#2#3#4 \fp_to_tl_large_zeros:NNNNNNNNN #5 000 } -\cs_new_nopar:cpn { fp_to_tl_large_4:w } #1 . #2#3#4#5#6 \q_stop +\cs_new:cpn { fp_to_tl_large_4:w } #1 . #2#3#4#5#6 \q_stop { #1#2#3#4#5 \fp_to_tl_large_zeros:NNNNNNNNN #6 0000 } -\cs_new_nopar:cpn { fp_to_tl_large_5:w } #1 . #2#3#4#5#6#7 \q_stop +\cs_new:cpn { fp_to_tl_large_5:w } #1 . #2#3#4#5#6#7 \q_stop { #1#2#3#4#5#6 \fp_to_tl_large_zeros:NNNNNNNNN #7 00000 } -\cs_new_nopar:cpn { fp_to_tl_large_6:w } #1 . #2#3#4#5#6#7#8 \q_stop +\cs_new:cpn { fp_to_tl_large_6:w } #1 . #2#3#4#5#6#7#8 \q_stop { #1#2#3#4#5#6#7 \fp_to_tl_large_zeros:NNNNNNNNN #8 000000 } -\cs_new_nopar:cpn { fp_to_tl_large_7:w } #1 . #2#3#4#5#6#7#8#9 \q_stop +\cs_new:cpn { fp_to_tl_large_7:w } #1 . #2#3#4#5#6#7#8#9 \q_stop { #1#2#3#4#5#6#7#8 \fp_to_tl_large_zeros:NNNNNNNNN #9 0000000 } -\cs_new_nopar:cpn { fp_to_tl_large_8:w } #1 . +\cs_new:cpn { fp_to_tl_large_8:w } #1 . { #1 \use:c { fp_to_tl_large_8_aux:w } } -\cs_new_nopar:cpn { fp_to_tl_large_8_aux:w } #1#2#3#4#5#6#7#8#9 \q_stop +\cs_new:cpn { fp_to_tl_large_8_aux:w } #1#2#3#4#5#6#7#8#9 \q_stop { #1#2#3#4#5#6#7#8 \fp_to_tl_large_zeros:NNNNNNNNN #9 00000000 } -\cs_new_nopar:cpn { fp_to_tl_large_9:w } #1 . #2 \q_stop {#1#2} +\cs_new:cpn { fp_to_tl_large_9:w } #1 . #2 \q_stop {#1#2} % \end{macrocode} % Dealing with small numbers is a bit more complex as there has to be % rounding. This makes life rather awkward, as there need to be a series % of tests and calculations, as things cannot be stored in an % expandable system. % \begin{macrocode} -\cs_new_nopar:Npn \fp_to_tl_small:w #1 e #2 \q_stop +\cs_new:Npn \fp_to_tl_small:w #1 e #2 \q_stop { \if_int_compare:w #2 = \c_minus_one \exp_after:wN \fp_to_tl_small_one:w @@ -1727,7 +1727,7 @@ \fi: #1 e #2 \q_stop } -\cs_new_nopar:Npn \fp_to_tl_small_one:w #1 . #2 e #3 \q_stop +\cs_new:Npn \fp_to_tl_small_one:w #1 . #2 e #3 \q_stop { \if_int_compare:w \fp_use_ix:NNNNNNNNN #2 > \c_four \if_int_compare:w @@ -1746,7 +1746,7 @@ \fp_to_tl_small_zeros:NNNNNNNNN #2 \fi: } -\cs_new_nopar:Npn \fp_to_tl_small_two:w #1 . #2 e #3 \q_stop +\cs_new:Npn \fp_to_tl_small_two:w #1 . #2 e #3 \q_stop { \if_int_compare:w \fp_use_iix_ix:NNNNNNNNN #2 > \c_forty_four \if_int_compare:w @@ -1766,7 +1766,7 @@ \fp_to_tl_small_zeros:NNNNNNNNN #2 \fi: } -\cs_new_nopar:Npn \fp_to_tl_small_aux:w #1 . #2 e #3 \q_stop +\cs_new:Npn \fp_to_tl_small_aux:w #1 . #2 e #3 \q_stop { #1 \fp_to_tl_large_zeros:NNNNNNNNN #2 @@ -1777,7 +1777,7 @@ % are written out long-hand. The difference between the two is only the % need for a decimal marker. % \begin{macrocode} -\cs_new_nopar:Npn \fp_to_tl_large_zeros:NNNNNNNNN #1#2#3#4#5#6#7#8#9 +\cs_new:Npn \fp_to_tl_large_zeros:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \if_int_compare:w #9 = \c_zero \if_int_compare:w #8 = \c_zero @@ -1816,7 +1816,7 @@ . #1#2#3#4#5#6#7#8#9 \fi: } -\cs_new_nopar:Npn \fp_to_tl_small_zeros:NNNNNNNNN #1#2#3#4#5#6#7#8#9 +\cs_new:Npn \fp_to_tl_small_zeros:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \if_int_compare:w #9 = \c_zero \if_int_compare:w #8 = \c_zero @@ -1858,11 +1858,11 @@ % \end{macrocode} % Some quick \enquote{return a few} functions. % \begin{macrocode} -\cs_new_nopar:Npn \fp_use_iix_ix:NNNNNNNNN #1#2#3#4#5#6#7#8#9 {#8#9} -\cs_new_nopar:Npn \fp_use_ix:NNNNNNNNN #1#2#3#4#5#6#7#8#9 {#9} -\cs_new_nopar:Npn \fp_use_i_to_vii:NNNNNNNNN #1#2#3#4#5#6#7#8#9 +\cs_new:Npn \fp_use_iix_ix:NNNNNNNNN #1#2#3#4#5#6#7#8#9 {#8#9} +\cs_new:Npn \fp_use_ix:NNNNNNNNN #1#2#3#4#5#6#7#8#9 {#9} +\cs_new:Npn \fp_use_i_to_vii:NNNNNNNNN #1#2#3#4#5#6#7#8#9 {#1#2#3#4#5#6#7} -\cs_new_nopar:Npn \fp_use_i_to_iix:NNNNNNNNN #1#2#3#4#5#6#7#8#9 +\cs_new:Npn \fp_use_i_to_iix:NNNNNNNNN #1#2#3#4#5#6#7#8#9 {#1#2#3#4#5#6#7#8} % \end{macrocode} % \end{macro} @@ -1911,7 +1911,7 @@ \cs_new_protected_nopar:Npn \fp_ground_figures:Nn { \fp_round_figures_aux:NNn \tl_gset:Nn } \cs_generate_variant:Nn \fp_ground_figures:Nn { c } -\cs_new_protected_nopar:Npn \fp_round_figures_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_round_figures_aux:NNn #1#2#3 { \group_begin: \fp_read:N #2 @@ -1959,7 +1959,7 @@ \cs_new_protected_nopar:Npn \fp_ground_places:Nn { \fp_round_places_aux:NNn \tl_gset:Nn } \cs_generate_variant:Nn \fp_ground_places:Nn { c } -\cs_new_protected_nopar:Npn \fp_round_places_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_round_places_aux:NNn #1#2#3 { \group_begin: \fp_read:N #2 @@ -2013,7 +2013,7 @@ \exp_after:wN \use_i:nn \exp_after:wN \fp_round_aux:NNNNNNNNN \int_use:N \l_fp_input_a_decimal_int } -\cs_new_protected_nopar:Npn \fp_round_aux:NNNNNNNNN #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \fp_round_aux:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \fp_round_loop:N #9#8#7#6#5#4#3#2#1 \bool_if:NT \l_fp_round_carry_bool @@ -2026,7 +2026,7 @@ \tex_advance:D \l_fp_input_a_exponent_int \c_one \fi: } -\cs_new_protected_nopar:Npn \fp_round_loop:N #1 +\cs_new_protected:Npn \fp_round_loop:N #1 { \if_int_compare:w \l_fp_round_position_int < \l_fp_round_target_int \bool_if:NTF \l_fp_round_carry_bool @@ -2071,7 +2071,7 @@ \cs_new_protected_nopar:Npn \fp_gabs:N { \fp_abs_aux:NN \tl_gset:Nn } \cs_generate_variant:Nn \fp_abs:N { c } \cs_generate_variant:Nn \fp_gabs:N { c } -\cs_new_protected_nopar:Npn \fp_abs_aux:NN #1#2 +\cs_new_protected:Npn \fp_abs_aux:NN #1#2 { \group_begin: \fp_read:N #2 @@ -2109,7 +2109,7 @@ \cs_new_protected_nopar:Npn \fp_gneg:N { \fp_neg_aux:NN \tl_gset:Nn } \cs_generate_variant:Nn \fp_neg:N { c } \cs_generate_variant:Nn \fp_gneg:N { c } -\cs_new_protected_nopar:Npn \fp_neg_aux:NN #1#2 +\cs_new_protected:Npn \fp_neg_aux:NN #1#2 { \group_begin: \fp_read:N #2 @@ -2160,7 +2160,7 @@ % hand, if the signs are different the calculation finds this % difference. % \begin{macrocode} -\cs_new_protected_nopar:Npn \fp_add_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_add_aux:NNn #1#2#3 { \group_begin: \fp_read:N #2 @@ -2190,7 +2190,7 @@ \l_fp_output_integer_int \l_fp_output_decimal_int \l_fp_output_exponent_int - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: ##1 ##2 @@ -2290,7 +2290,7 @@ \cs_new_protected_nopar:Npn \fp_gsub:Nn { \fp_sub_aux:NNn \tl_gset:Nn } \cs_generate_variant:Nn \fp_sub:Nn { c } \cs_generate_variant:Nn \fp_gsub:Nn { c } -\cs_new_protected_nopar:Npn \fp_sub_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_sub_aux:NNn #1#2#3 { \group_begin: \fp_read:N #2 @@ -2333,7 +2333,7 @@ % three digits in the output, there is a carry step. The very lowest % digits are not calculated, while % \begin{macrocode} -\cs_new_protected_nopar:Npn \fp_mul_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_mul_aux:NNn #1#2#3 { \group_begin: \fp_read:N #2 @@ -2424,10 +2424,10 @@ % the input: notice that |##9| contains the last two digits of the % smallest part of the input. % \begin{macrocode} -\cs_new_protected_nopar:Npn \fp_mul_split:NNNN #1#2#3#4 +\cs_new_protected:Npn \fp_mul_split:NNNN #1#2#3#4 { \tex_advance:D #1 \c_one_thousand_million - \cs_set_protected_nopar:Npn \fp_mul_split_aux:w + \cs_set_protected:Npn \fp_mul_split_aux:w ##1##2##3##4##5##6##7##8##9 \q_stop { #2 ##2##3##4 \scan_stop: #3 ##5##6##7 \scan_stop: @@ -2436,7 +2436,7 @@ \exp_after:wN \fp_mul_split_aux:w \int_use:N #1 \q_stop \tex_advance:D #1 -\c_one_thousand_million } -\cs_new_protected_nopar:Npn \fp_mul_product:NN #1#2 +\cs_new_protected:Npn \fp_mul_product:NN #1#2 { \l_fp_mul_output_int \int_eval:w \l_fp_mul_output_int + #1 * #2 \scan_stop: @@ -2452,7 +2452,7 @@ \exp_after:wN \use_i:nn \exp_after:wN \fp_mul_end_level:NNNNNNNNN \int_use:N \l_fp_mul_output_int } -\cs_new_protected_nopar:Npn \fp_mul_end_level:NNNNNNNNN #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \fp_mul_end_level:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \tl_set:Nx \l_fp_mul_output_tl { #7#8#9 \l_fp_mul_output_tl } \l_fp_mul_output_int #1#2#3#4#5#6 \scan_stop: @@ -2491,7 +2491,7 @@ % zero then the result must be $0.0$ and can be given with no % further work. % \begin{macrocode} -\cs_new_protected_nopar:Npn \fp_div_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_div_aux:NNn #1#2#3 { \group_begin: \fp_read:N #2 @@ -2505,7 +2505,7 @@ \int_eval:w \l_fp_input_b_integer_int + \l_fp_input_b_decimal_int = \c_zero - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: #1 \exp_not:N #2 { \c_undefined_fp } @@ -2515,7 +2515,7 @@ \int_eval:w \l_fp_input_a_integer_int + \l_fp_input_a_decimal_int = \c_zero - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: #1 \exp_not:N #2 { \c_zero_fp } @@ -2550,7 +2550,7 @@ \l_fp_output_integer_int \l_fp_output_decimal_int \l_fp_output_exponent_int - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: ##1 ##2 @@ -2659,7 +2659,7 @@ \int_eval_end: \tex_divide:D \l_fp_div_offset_int \c_ten } -\cs_new_protected_nopar:Npn \fp_div_loop_step:w #1#2#3#4#5#6#7#8#9 \q_stop +\cs_new_protected:Npn \fp_div_loop_step:w #1#2#3#4#5#6#7#8#9 \q_stop { \l_fp_input_a_integer_int \int_eval:w #2 + \l_fp_input_a_integer_int \int_eval_end: @@ -2704,7 +2704,7 @@ % The internal sum is always exactly that: it is always a sum and there % is no sign check. % \begin{macrocode} -\cs_new_protected_nopar:Npn \fp_add:NNNNNNNNN #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \fp_add:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { #7 \int_eval:w #1 + #4 \int_eval_end: #8 \int_eval:w #2 + #5 \int_eval_end: @@ -2729,7 +2729,7 @@ % a good job as there are no arguments left. The flipping flag is % used in the rare case where a sign change is possible. % \begin{macrocode} -\cs_new_protected_nopar:Npn \fp_sub:NNNNNNNNN #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \fp_sub:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { #7 \int_eval:w #1 - #4 \int_eval_end: #8 \int_eval:w #2 - #5 \int_eval_end: @@ -2759,7 +2759,7 @@ % Decimal-part only multiplication but with higher accuracy than the % user version. % \begin{macrocode} -\cs_new_protected_nopar:Npn \fp_mul:NNNNNN #1#2#3#4#5#6 +\cs_new_protected:Npn \fp_mul:NNNNNN #1#2#3#4#5#6 { \fp_mul_split:NNNN #1 \l_fp_mul_a_i_int \l_fp_mul_a_ii_int \l_fp_mul_a_iii_int @@ -2811,7 +2811,7 @@ % retained. This means of course that this code is quite slow, and so % is only used when necessary. % \begin{macrocode} -\cs_new_protected_nopar:Npn \fp_mul:NNNNNNNNN #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \fp_mul:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \fp_mul_split:NNNN #2 \l_fp_mul_a_i_int \l_fp_mul_a_ii_int \l_fp_mul_a_iii_int @@ -2881,7 +2881,7 @@ % then do the real division of the two parts before adding in what % is needed for the remainder. % \begin{macrocode} -\cs_new_protected_nopar:Npn \fp_div_integer:NNNNN #1#2#3#4#5 +\cs_new_protected:Npn \fp_div_integer:NNNNN #1#2#3#4#5 { \l_fp_tmp_int #1 \tex_divide:D \l_fp_tmp_int #3 @@ -2928,7 +2928,7 @@ \exp_after:wN \fp_extended_normalise_aux_i: \fi: } -\cs_new_protected_nopar:Npn \fp_extended_normalise_aux_i:w +\cs_new_protected:Npn \fp_extended_normalise_aux_i:w #1#2#3#4#5#6#7#8#9 \q_stop { \l_fp_input_a_integer_int @@ -2938,7 +2938,7 @@ \exp_after:wN \fp_extended_normalise_aux_ii:w \int_use:N \l_fp_input_a_extended_int \q_stop } -\cs_new_protected_nopar:Npn \fp_extended_normalise_aux_ii:w +\cs_new_protected:Npn \fp_extended_normalise_aux_ii:w #1#2#3#4#5#6#7#8#9 \q_stop { \l_fp_input_a_decimal_int @@ -2956,7 +2956,7 @@ \exp_after:wN \fp_extended_normalise_aux_ii: \fi: } -\cs_new_protected_nopar:Npn \fp_extended_normalise_ii_aux:NNNNNNNNN +\cs_new_protected:Npn \fp_extended_normalise_ii_aux:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \if_int_compare:w \l_fp_input_a_integer_int = \c_zero @@ -3005,7 +3005,7 @@ \exp_after:wN \fp_extended_normalise_output: \fi: } -\cs_new_protected_nopar:Npn \fp_extended_normalise_output_aux_i:NNNNNNNNN +\cs_new_protected:Npn \fp_extended_normalise_output_aux_i:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \l_fp_output_integer_int #1#2#3#4#5#6#7#8 \scan_stop: @@ -3019,13 +3019,13 @@ \exp_after:wN \fp_extended_normalise_output_aux_ii:NNNNNNNNN \l_fp_tmp_tl } -\cs_new_protected_nopar:Npn \fp_extended_normalise_output_aux_ii:NNNNNNNNN +\cs_new_protected:Npn \fp_extended_normalise_output_aux_ii:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \l_fp_output_decimal_int #1#2#3#4#5#6#7#8#9 \scan_stop: \fp_extended_normalise_output_aux:N } -\cs_new_protected_nopar:Npn \fp_extended_normalise_output_aux:N #1 +\cs_new_protected:Npn \fp_extended_normalise_output_aux:N #1 { \tex_advance:D \l_fp_output_extended_int \c_one_thousand_million \tex_divide:D \l_fp_output_extended_int \c_ten @@ -3095,7 +3095,7 @@ % Here, there may be a sign change but there will never be any % variation in the input. So a dedicated function can be used. % \begin{macrocode} -\cs_new_protected_nopar:Npn \fp_trig_sub:NNN #1#2#3 +\cs_new_protected:Npn \fp_trig_sub:NNN #1#2#3 { \l_fp_input_a_integer_int \int_eval:w \l_fp_input_a_integer_int - #1 \int_eval_end: @@ -3231,7 +3231,7 @@ % For very small values it is best to simply return the input as the % sine: the cut-off is $ 1 \times 10^{-5} $. % \begin{macrocode} -\cs_new_protected_nopar:Npn \fp_sin_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_sin_aux:NNn #1#2#3 { \group_begin: \fp_split:Nn a {#3} @@ -3350,7 +3350,7 @@ \cs_new_protected_nopar:Npn \fp_gcos:Nn { \fp_cos_aux:NNn \tl_gset:Nn } \cs_generate_variant:Nn \fp_cos:Nn { c } \cs_generate_variant:Nn \fp_gcos:Nn { c } -\cs_new_protected_nopar:Npn \fp_cos_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_cos_aux:NNn #1#2#3 { \group_begin: \fp_split:Nn a {#3} @@ -3592,7 +3592,7 @@ \cs_new_protected_nopar:Npn \fp_gtan:Nn { \fp_tan_aux:NNn \tl_gset:Nn } \cs_generate_variant:Nn \fp_tan:Nn { c } \cs_generate_variant:Nn \fp_gtan:Nn { c } -\cs_new_protected_nopar:Npn \fp_tan_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_tan_aux:NNn #1#2#3 { \group_begin: \fp_split:Nn a {#3} @@ -3919,7 +3919,7 @@ \cs_new_protected_nopar:Npn \fp_gexp:Nn { \fp_exp_aux:NNn \tl_gset:Nn } \cs_generate_variant:Nn \fp_exp:Nn { c } \cs_generate_variant:Nn \fp_gexp:Nn { c } -\cs_new_protected_nopar:Npn \fp_exp_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_exp_aux:NNn #1#2#3 { \group_begin: \fp_split:Nn a {#3} @@ -4130,13 +4130,13 @@ % Recovery of the stored constant values into the separate registers % is done with a simple expansion then assignment. % \begin{macrocode} -\cs_new_protected_nopar:Npn \fp_exp_integer_const:n #1 +\cs_new_protected:Npn \fp_exp_integer_const:n #1 { \exp_after:wN \exp_after:wN \exp_after:wN \fp_exp_integer_const:nnnn \cs:w c_fp_exp_ #1 _tl \cs_end: } -\cs_new_protected_nopar:Npn \fp_exp_integer_const:nnnn #1#2#3#4 +\cs_new_protected:Npn \fp_exp_integer_const:nnnn #1#2#3#4 { \l_fp_exp_integer_int #1 \scan_stop: \l_fp_exp_decimal_int #2 \scan_stop: @@ -4277,7 +4277,7 @@ % This is set up as a function so that the power code can redirect % the effect. % \begin{macrocode} -\cs_new_protected_nopar:Npn \fp_exp_const:Nx #1#2 +\cs_new_protected:Npn \fp_exp_const:Nx #1#2 { \tl_new:N #1 \tl_gset:Nx #1 {#2} @@ -4372,7 +4372,7 @@ \cs_new_protected_nopar:Npn \fp_gln:Nn { \fp_ln_aux:NNn \tl_gset:Nn } \cs_generate_variant:Nn \fp_ln:Nn { c } \cs_generate_variant:Nn \fp_gln:Nn { c } -\cs_new_protected_nopar:Npn \fp_ln_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_ln_aux:NNn #1#2#3 { \group_begin: \fp_split:Nn a {#3} @@ -4388,7 +4388,7 @@ > \c_zero \exp_after:wN \exp_after:wN \exp_after:wN \fp_ln_aux: \else: - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: ##1 \exp_not:N ##2 { \c_zero_fp } @@ -4396,7 +4396,7 @@ \exp_after:wN \exp_after:wN \exp_after:wN \fp_ln_error_msg: \fi: \else: - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: ##1 \exp_not:N ##2 { \c_zero_fp } @@ -4429,7 +4429,7 @@ \else: \exp_after:wN \fp_ln_exponent: \fi: - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: ##1 \exp_not:N ##2 @@ -4509,7 +4509,7 @@ \fi: \fp_ln_exponent_units: } -\cs_new_protected_nopar:Npn \fp_ln_exponent_tens:NN #1 #2 +\cs_new_protected:Npn \fp_ln_exponent_tens:NN #1 #2 { \l_fp_input_a_exponent_int #2 \scan_stop: \fp_ln_const:nn { 10 } { #1 } @@ -4557,7 +4557,7 @@ \l_fp_output_exponent_int \l_fp_exp_exponent_int \fi: } -\cs_new_protected_nopar:Npn \fp_ln_normalise_aux:NNNNNNNNN #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \fp_ln_normalise_aux:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \if_int_compare:w \l_fp_exp_integer_int = \c_zero \l_fp_exp_decimal_int #1#2#3#4#5#6#7#8 \scan_stop: @@ -4638,7 +4638,7 @@ % Recovering constants makes use of the same auxiliary code as for % exponents. % \begin{macrocode} -\cs_new_protected_nopar:Npn \fp_ln_const:nn #1#2 +\cs_new_protected:Npn \fp_ln_const:nn #1#2 { \exp_after:wN \exp_after:wN \exp_after:wN \fp_exp_integer_const:nnnn @@ -4764,7 +4764,7 @@ \exp_after:wN \fp_ln_fixed: \fi: } -\cs_new_protected_nopar:Npn \fp_ln_fixed_aux:NNNNNNNNN #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \fp_ln_fixed_aux:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \if_int_compare:w \l_fp_output_integer_int = \c_zero \l_fp_output_decimal_int #1#2#3#4#5#6#7#8 \scan_stop: @@ -4857,7 +4857,7 @@ \cs_new_protected_nopar:Npn \fp_gpow:Nn { \fp_pow_aux:NNn \tl_gset:Nn } \cs_generate_variant:Nn \fp_pow:Nn { c } \cs_generate_variant:Nn \fp_gpow:Nn { c } -\cs_new_protected_nopar:Npn \fp_pow_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_pow_aux:NNn #1#2#3 { \group_begin: \fp_read:N #2 @@ -4879,13 +4879,13 @@ \int_eval:w \l_fp_input_a_integer_int + \l_fp_input_a_decimal_int = \c_zero - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: ##1 ##2 { \c_undefined_fp } } \else: - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: ##1 ##2 { \c_zero_fp } @@ -4896,7 +4896,7 @@ \int_eval:w \l_fp_input_a_integer_int + \l_fp_input_a_decimal_int = \c_zero - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: ##1 ##2 { \c_one_fp } @@ -4935,14 +4935,14 @@ \exp_after:wN \fp_pow_aux_ii: \else: \group_end: - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: ##1 ##2 { \c_undefined_fp } } \fi: \else: - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: ##1 ##2 { \c_undefined_fp } @@ -4996,7 +4996,7 @@ \fp_pow_aux_iv: \fi: \fi: - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: ##1 ##2 @@ -5173,7 +5173,7 @@ \fp_read:N #1 \fp_compare_aux:N #2 } -\cs_new_protected_nopar:Npn \fp_compare_aux:N #1 +\cs_new_protected:Npn \fp_compare_aux:N #1 { \cs_if_exist:cTF { fp_compare_#1: } { \use:c { fp_compare_#1: } } @@ -5404,43 +5404,43 @@ } \l_fp_tmp_tl } -\cs_new_protected_nopar:Npn \fp_compare_aux_i:w #1 == #2 == #3 \q_stop +\cs_new_protected:Npn \fp_compare_aux_i:w #1 == #2 == #3 \q_stop { \quark_if_nil:nTF {#2} { \fp_compare_aux_ii:w #1 != \q_nil != \q_stop } { \fp_compare:nNnTF {#1} = {#2} \prg_return_true: \prg_return_false: } } -\cs_new_protected_nopar:Npn \fp_compare_aux_ii:w #1 != #2 != #3 \q_stop +\cs_new_protected:Npn \fp_compare_aux_ii:w #1 != #2 != #3 \q_stop { \quark_if_nil:nTF {#2} { \fp_compare_aux_iii:w #1 <= \q_nil <= \q_stop } { \fp_compare:nNnTF {#1} = {#2} \prg_return_false: \prg_return_true: } } -\cs_new_protected_nopar:Npn \fp_compare_aux_iii:w #1 <= #2 <= #3 \q_stop +\cs_new_protected:Npn \fp_compare_aux_iii:w #1 <= #2 <= #3 \q_stop { \quark_if_nil:nTF {#2} { \fp_compare_aux_iv:w #1 >= \q_nil >= \q_stop } { \fp_compare:nNnTF {#1} > {#2} \prg_return_false: \prg_return_true: } } -\cs_new_protected_nopar:Npn \fp_compare_aux_iv:w #1 >= #2 >= #3 \q_stop +\cs_new_protected:Npn \fp_compare_aux_iv:w #1 >= #2 >= #3 \q_stop { \quark_if_nil:nTF {#2} { \fp_compare_aux_v:w #1 = \q_nil \q_stop } { \fp_compare:nNnTF {#1} < {#2} \prg_return_false: \prg_return_true: } } -\cs_new_protected_nopar:Npn \fp_compare_aux_v:w #1 = #2 = #3 \q_stop +\cs_new_protected:Npn \fp_compare_aux_v:w #1 = #2 = #3 \q_stop { \quark_if_nil:nTF {#2} { \fp_compare_aux_vi:w #1 < \q_nil < \q_stop } { \fp_compare:nNnTF {#1} = {#2} \prg_return_true: \prg_return_false: } } -\cs_new_protected_nopar:Npn \fp_compare_aux_vi:w #1 < #2 < #3 \q_stop +\cs_new_protected:Npn \fp_compare_aux_vi:w #1 < #2 < #3 \q_stop { \quark_if_nil:nTF {#2} { \fp_compare_aux_vii:w #1 > \q_nil > \q_stop } { \fp_compare:nNnTF {#1} < {#2} \prg_return_true: \prg_return_false: } } -\cs_new_protected_nopar:Npn \fp_compare_aux_vii:w #1 > #2 > #3 \q_stop +\cs_new_protected:Npn \fp_compare_aux_vii:w #1 > #2 > #3 \q_stop { \quark_if_nil:nTF {#2} { \prg_return_false: } diff --git a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx index 7f51f1d50f5..2d5be22ab66 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 3029 2011-12-06 22:47:30Z joseph $ +\GetIdInfo$Id: l3int.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental integers} % %<*driver> @@ -185,6 +185,16 @@ % Sets \meta{integer} to $0$. % \end{function} % +% \begin{function}[added = 2011-12-13] +% {\int_zero_new:N, \int_zero_new:c, \int_gzero_new:N, \int_gzero_new:c} +% \begin{syntax} +% \cs{int_zero_new:N} \meta{integer} +% \end{syntax} +% Ensures that the \meta{integer} exists globally by applying +% \cs{int_new:N} if necessary, then applies \cs{int_(g)zero:N} to leave +% the \meta{integer} is set to zero. +% \end{function} +% % \begin{function} % { % \int_set_eq:NN, \int_set_eq:cN, \int_set_eq:Nc, \int_set_eq:cc, @@ -966,7 +976,7 @@ % package. % \begin{macrocode} %<*package> -\cs_new_protected_nopar:Npn \int_new:N #1 +\cs_new_protected:Npn \int_new:N #1 { \chk_if_free_cs:N #1 \newcount #1 @@ -977,22 +987,25 @@ % \end{macro} % % \begin{macro}{\int_const:Nn, \int_const:cn} +% \begin{macro}[aux]{\int_constdef:Nw} +% \begin{variable}{\c_max_const_int} % \UnitTested % As stated, most constants can be defined as \tn{chardef} or -% \tn{mathchardef} but that's engine dependent. +% \tn{mathchardef} but that's engine dependent. As a result, there is some +% set up code to determine what can be done. % \begin{macrocode} \cs_new_protected:Npn \int_const:Nn #1#2 { \int_compare:nNnTF {#2} > \c_minus_one { - \int_compare:nNnTF {#2} > \c_max_register_int + \int_compare:nNnTF {#2} > \c_max_const_int { \int_new:N #1 \int_gset:Nn #1 {#2} } { \chk_if_free_cs:N #1 - \tex_global:D \tex_mathchardef:D #1 = + \tex_global:D \int_constdef:Nw #1 = \int_eval:w #2 \int_eval_end: } } @@ -1002,8 +1015,19 @@ } } \cs_generate_variant:Nn \int_const:Nn { c } +\pdftex_if_engine:TF + { + \cs_new_eq:NN \int_constdef:Nw \tex_mathchardef:D + \tex_mathchardef:D \c_max_const_int 32 767 ~ + } + { + \cs_new_eq:NN \int_constdef:Nw \tex_chardef:D + \tex_chardef:D \c_max_const_int 1 114 111 ~ + } % \end{macrocode} -% \end{macro} +% \end{variable} +% \end{macro} +% \end{macro} % % \begin{macro}{\int_zero:N, \int_zero:c} % \UnitTested @@ -1011,14 +1035,27 @@ % \UnitTested % Functions that reset an \meta{integer} register to zero. % \begin{macrocode} -\cs_new_protected_nopar:Npn \int_zero:N #1 { #1 = \c_zero } -\cs_new_protected_nopar:Npn \int_gzero:N #1 { \tex_global:D #1 = \c_zero } +\cs_new_protected:Npn \int_zero:N #1 { #1 = \c_zero } +\cs_new_protected:Npn \int_gzero:N #1 { \tex_global:D #1 = \c_zero } \cs_generate_variant:Nn \int_zero:N { c } \cs_generate_variant:Nn \int_gzero:N { c } % \end{macrocode} % \end{macro} % \end{macro} % +% \begin{macro} +% {\int_zero_new:N, \int_zero_new:c, \int_gzero_new:N, \int_gzero_new:c} +% Create a register if needed, otherwise clear it. +% \begin{macrocode} +\cs_new_protected:Npn \int_zero_new:N #1 + { \cs_if_exist:NTF #1 { \int_zero:N #1 } { \int_new:N #1 } } +\cs_new_protected:Npn \int_gzero_new:N #1 + { \cs_if_exist:NTF #1 { \int_gzero:N #1 } { \int_new:N #1 } } +\cs_generate_variant:Nn \int_zero_new:N { c } +\cs_generate_variant:Nn \int_gzero_new:N { c } +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\int_set_eq:NN,\int_set_eq:cN, \int_set_eq:Nc,\int_set_eq:cc} % \UnitTested % \begin{macro} @@ -1027,10 +1064,10 @@ % Setting equal means using one integer inside the set function of % another. % \begin{macrocode} -\cs_new_protected_nopar:Npn \int_set_eq:NN #1#2 { #1 = #2 } +\cs_new_protected:Npn \int_set_eq:NN #1#2 { #1 = #2 } \cs_generate_variant:Nn \int_set_eq:NN { c } \cs_generate_variant:Nn \int_set_eq:NN { Nc , cc } -\cs_new_protected_nopar:Npn \int_gset_eq:NN #1#2 { \tex_global:D #1 = #2 } +\cs_new_protected:Npn \int_gset_eq:NN #1#2 { \tex_global:D #1 = #2 } \cs_generate_variant:Nn \int_gset_eq:NN { c } \cs_generate_variant:Nn \int_gset_eq:NN { Nc , cc } % \end{macrocode} @@ -1078,9 +1115,9 @@ % Incrementing and decrementing of integer registers is done with % the following functions. % \begin{macrocode} -\cs_new_protected_nopar:Npn \int_incr:N #1 +\cs_new_protected:Npn \int_incr:N #1 { \tex_advance:D #1 \c_one } -\cs_new_protected_nopar:Npn \int_decr:N #1 +\cs_new_protected:Npn \int_decr:N #1 { \tex_advance:D #1 \c_minus_one } \cs_new_protected_nopar:Npn \int_gincr:N { \tex_global:D \int_incr:N } @@ -1655,7 +1692,7 @@ \exp_after:wN \int_to_roman_aux:N \int_to_roman:w \int_eval:n {#1} Q } -\cs_new_nopar:Npn \int_to_roman_aux:N #1 +\cs_new:Npn \int_to_roman_aux:N #1 { \use:c { int_to_roman_ #1 :w } \int_to_roman_aux:N @@ -1665,7 +1702,7 @@ \exp_after:wN \int_to_Roman_aux:N \int_to_roman:w \int_eval:n {#1} Q } -\cs_new_nopar:Npn \int_to_Roman_aux:N #1 +\cs_new:Npn \int_to_Roman_aux:N #1 { \use:c { int_to_Roman_ #1 :w } \int_to_Roman_aux:N @@ -1685,7 +1722,7 @@ \cs_new_nopar:Npn \int_to_Roman_c:w { C } \cs_new_nopar:Npn \int_to_Roman_d:w { D } \cs_new_nopar:Npn \int_to_Roman_m:w { M } -\cs_new_nopar:Npn \int_to_Roman_Q:w #1 { } +\cs_new:Npn \int_to_Roman_Q:w #1 { } % \end{macrocode} % \end{macro} % \end{macro} @@ -1885,7 +1922,7 @@ % appropriate value for each letter and building up a sum. This is % then evaluated by \TeX{}. % \begin{macrocode} -\cs_new_nopar:Npn \int_from_roman:n #1 +\cs_new:Npn \int_from_roman:n #1 { \tl_if_blank:nF {#1} { @@ -1894,7 +1931,7 @@ \int_from_roman_aux:NN #1 Q \q_stop } } -\cs_new_nopar:Npn \int_from_roman_aux:NN #1#2 +\cs_new:Npn \int_from_roman_aux:NN #1#2 { \str_if_eq:nnTF {#1} { Q } {#1#2} @@ -1928,9 +1965,9 @@ } } } -\cs_new_nopar:Npn \int_from_roman_end:w #1 Q #2 \q_stop +\cs_new:Npn \int_from_roman_end:w #1 Q #2 \q_stop { \tl_if_empty:nTF {#2} {#1} {#2} } -\cs_new_nopar:Npn \int_from_roman_clean_up:w #1 Q { + 0 Q -1 } +\cs_new:Npn \int_from_roman_clean_up:w #1 Q { + 0 Q -1 } % \end{macrocode} % \end{macro} % \end{macro} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3io.dtx b/Master/texmf-dist/source/latex/l3kernel/l3io.dtx index 991e02e6af8..4eb4829b4df 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 3005 2011-11-25 13:19:47Z bruno $ +\GetIdInfo$Id: l3io.dtx 3096 2011-12-27 09:09:18Z joseph $ {L3 Experimental input-output operations} % %<*driver> @@ -87,8 +87,8 @@ % the file name is needed when the file is opened). % % \section{Managing streams} -% -% \begin{function}[added = 2011-09-26] +% +% \begin{function}[added = 2011-09-26, updated = 2011-12-27] % {\ior_new:N, \ior_new:c, \iow_new:N, \io_new:c} % \begin{syntax} % \cs{ior_new:Nn} \meta{stream} @@ -100,7 +100,7 @@ % error. % \end{function} % -% \begin{function}[updated = 2011-09-26]{\ior_open:Nn, \ior_open:cn} +% \begin{function}[updated = 2011-12-27]{\ior_open:Nn, \ior_open:cn} % \begin{syntax} % \cs{ior_open:Nn} \meta{stream} \Arg{file name} % \end{syntax} @@ -112,7 +112,7 @@ % is given or the file ends. % \end{function} % -% \begin{function}[updated = 2011-09-26]{\iow_open:Nn, \iow_open:cn} +% \begin{function}[updated = 2011-12-27]{\iow_open:Nn, \iow_open:cn} % \begin{syntax} % \cs{iow_open:Nn} \meta{stream} \Arg{file name} % \end{syntax} @@ -126,7 +126,7 @@ % additive). % \end{function} % -% \begin{function}[updated = 2011-09-26]{\ior_close:N, \ior_close:c} +% \begin{function}[updated = 2011-12-27]{\ior_close:N, \ior_close:c} % \begin{syntax} % \cs{ior_close:N} \meta{stream} % \end{syntax} @@ -135,7 +135,7 @@ % to other programmer. % \end{function} % -% \begin{function}[updated = 2011-09-26]{\iow_close:N, \iow_close:c} +% \begin{function}[updated = 2011-12-27]{\iow_close:N, \iow_close:c} % \begin{syntax} % \cs{iow_close:N} \meta{stream} % \end{syntax} @@ -228,7 +228,7 @@ % write difficult characters such as "%", "{", "}", % \emph{etc}.~in messages, for example: % \begin{verbatim} -% \iow_now:Nx \g_my_stream { \iow_char:N \{ text \iow_char:N \} } +% \iow_now:Nx \g_my_iow { \iow_char:N \{ text \iow_char:N \} } % \end{verbatim} % The function has no effect if writing is taking place without % expansion (\emph{e.g.}~in the second argument of \cs{iow_now:Nn}). @@ -384,6 +384,22 @@ % a \meta{stream} does not exist at all. %\end{function} % +% \section{Constants} +% +% \begin{variable}{\c_ior_term_ior} +% Constant input stream for reading from the terminal. Reading from this +% stream using \cs{ior_to:NN} or similar will result in a prompt from +% \TeX{} of the form +% \begin{verbatim} +% = +% \end{verbatim} +% \end{variable} +% +% \begin{variable}{\c_iow_log_iow, \c_iow_term_iow} +% Constant output streams for writing to the log and to the terminal +% (plus the log), respectively. +% \end{variable} +% % \section{Internal input--output functions} % % \begin{function}[EXP]{\if_eof:w} @@ -447,21 +463,25 @@ % \end{macro} % % \subsection{Variables and constants} +% +% \begin{variable}{\c_term_ior} +% Reading from the terminal (with a prompt) is done using a positive +% but non-existent stream number. Unlike writing, there is no concept +% of reading from the log. +% \begin{macrocode} +\cs_new_eq:NN \c_term_ior \c_sixteen +% \end{macrocode} +% \end{variable} % -% \begin{variable}{\c_iow_term_stream, \c_ior_term_stream} -% \begin{variable}{\c_iow_log_stream, \c_ior_log_stream} +% \begin{variable}{\c_log_iow, \c_term_iow} % Here we allocate two output streams for writing to the transcript -% file only (\cs{c_iow_log_stream}) and to both the terminal and -% transcript file (\cs{c_iow_term_stream}). Both can be used to read -% from and have equivalent \cs{c_ior} versions. +% file only (\cs{c_log_iow}) and to both the terminal and +% transcript file (\cs{c_term_iow}). % \begin{macrocode} -\cs_new_eq:NN \c_iow_term_stream \c_sixteen -\cs_new_eq:NN \c_ior_term_stream \c_sixteen -\cs_new_eq:NN \c_iow_log_stream \c_minus_one -\cs_new_eq:NN \c_ior_log_stream \c_minus_one +\cs_new_eq:NN \c_log_iow \c_minus_one +\cs_new_eq:NN \c_term_iow \c_sixteen % \end{macrocode} % \end{variable} -% \end{variable} % % \begin{variable}{\c_iow_streams_tl, \c_ior_streams_tl} % The list of streams available, by number. @@ -525,10 +545,10 @@ % \begin{macrocode} %<*initex> \alloc_setup_type:nnn { ior } \c_zero \c_sixteen -\cs_new_protected_nopar:Npn \ior_raw_new:N #1 +\cs_new_protected:Npn \ior_raw_new:N #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 +\cs_new_protected:Npn \iow_raw_new:N #1 { \alloc_reg:nNN { iow } \tex_chardef:D #1 } % %<*package> @@ -540,18 +560,14 @@ % \end{macrocode} % \end{macro} % \end{macro} -% +% % \begin{macro}{\ior_new:N, \ior_new:c, \iow_new:N, \iow_new:c} -% Reserving a new stream is done by defining the stream as the $16$ (which -% must be in error). +% Reserving a new stream is done by defining the name as equal to using the +% terminal. % \begin{macrocode} -\cs_new_protected_nopar:Npn \ior_new:N #1 - { - \chk_if_free_cs:N #1 - \tex_global:D \tex_chardef:D #1 16 ~ - } -\cs_new_eq:NN \iow_new:N \ior_new:N +\cs_new_protected:Npn \ior_new:N #1 { \cs_new_eq:NN #1 \c_term_ior } \cs_generate_variant:Nn \ior_new:N { c } +\cs_new_protected:Npn \iow_new:N #1 { \cs_new_eq:NN #1 \c_term_iow } \cs_generate_variant:Nn \iow_new:N { c } % \end{macrocode} % \end{macro} @@ -564,26 +580,26 @@ % When one is found the allocation can take place, the information % can be stored and finally the file can actually be opened. % \begin{macrocode} -\cs_new_protected_nopar:Npn \ior_open:Nn #1#2 +\cs_new_protected:Npn \ior_open:Nn #1#2 { \ior_close:N #1 \int_set:Nn \l_ior_stream_int \c_sixteen \tl_map_function:NN \c_ior_streams_tl \ior_alloc_read:n \int_compare:nNnTF \l_ior_stream_int = \c_sixteen - { \msg_kernel_error:nn { ior } { streams-exhausted } } + { \msg_kernel_fatal:nn { ior } { streams-exhausted } } { \ior_stream_alloc:N #1 \prop_gput:NVn \g_ior_streams_prop \l_ior_stream_int {#2} \tex_openin:D #1#2 \scan_stop: } } -\cs_new_protected_nopar:Npn \iow_open:Nn #1#2 +\cs_new_protected:Npn \iow_open:Nn #1#2 { \iow_close:N #1 \int_set:Nn \l_iow_stream_int \c_sixteen \tl_map_function:NN \c_iow_streams_tl \iow_alloc_write:n \int_compare:nNnTF \l_iow_stream_int = \c_sixteen - { \msg_kernel_error:nn { iow } { streams-exhausted } } + { \msg_kernel_fatal:nn { iow } { streams-exhausted } } { \iow_stream_alloc:N #1 \prop_gput:NVn \g_iow_streams_prop \l_iow_stream_int {#2} @@ -602,7 +618,7 @@ % The property list contains file names for streams in use, so % any unused ones are for the taking. % \begin{macrocode} -\cs_new_protected_nopar:Npn \iow_alloc_write:n #1 +\cs_new_protected:Npn \iow_alloc_write:n #1 { \prop_if_in:NnF \g_iow_streams_prop {#1} { @@ -610,7 +626,7 @@ \tl_map_break: } } -\cs_new_protected_nopar:Npn \ior_alloc_read:n #1 +\cs_new_protected:Npn \ior_alloc_read:n #1 { \prop_if_in:NnF \g_iow_streams_prop {#1} { @@ -638,26 +654,25 @@ % one is needed, we get the number allocated by \LaTeXe{} to get % \enquote{back on track} with allocation. % \begin{macrocode} -\cs_new_protected_nopar:Npn \iow_stream_alloc:N #1 +\cs_new_protected:Npn \iow_stream_alloc:N #1 { - \cs_if_exist:cTF { g_iow_ \int_use:N \l_iow_stream_int _stream } - { \cs_gset_eq:Nc #1 { g_iow_ \int_use:N \l_iow_stream_int _stream } } + \cs_if_exist:cTF { g_iow_ \int_use:N \l_iow_stream_int _iow } + { \cs_gset_eq:Nc #1 { g_iow_ \int_use:N \l_iow_stream_int _iow } } { %<*package> \iow_stream_alloc_aux: \int_compare:nNnT \l_iow_stream_int = \c_sixteen { - \iow_raw_new:N \g_iow_tmp_stream - \int_set:Nn \l_iow_stream_int { \g_iow_tmp_stream } + \iow_raw_new:N \g_iow_tmp_iow + \int_set:Nn \l_iow_stream_int { \g_iow_tmp_iow } \cs_gset_eq:cN - { g_iow_ \int_use:N \l_iow_stream_int _stream } - \g_iow_tmp_stream + { g_iow_ \int_use:N \l_iow_stream_int _iow } \g_iow_tmp_iow } % %<*initex> - \iow_raw_new:c { g_iow_ \int_use:N \l_iow_stream_int _stream } + \iow_raw_new:c { g_iow_ \int_use:N \l_iow_stream_int _iow } % - \cs_gset_eq:Nc #1 { g_iow_ \int_use:N \l_iow_stream_int _stream } + \cs_gset_eq:Nc #1 { g_iow_ \int_use:N \l_iow_stream_int _iow } } } %<*package> @@ -666,7 +681,7 @@ \int_incr:N \l_iow_stream_int \int_compare:nNnT \l_iow_stream_int < \c_sixteen { - \cs_if_exist:cTF { g_iow_ \int_use:N \l_iow_stream_int _stream } + \cs_if_exist:cTF { g_iow_ \int_use:N \l_iow_stream_int _iow } { \prop_if_in:NVT \g_iow_streams_prop \l_iow_stream_int { \iow_stream_alloc_aux: } @@ -675,26 +690,25 @@ } } % -\cs_new_protected_nopar:Npn \ior_stream_alloc:N #1 +\cs_new_protected:Npn \ior_stream_alloc:N #1 { - \cs_if_exist:cTF { g_ior_ \int_use:N \l_ior_stream_int _stream } - { \cs_gset_eq:Nc #1 { g_ior_ \int_use:N \l_ior_stream_int _stream } } + \cs_if_exist:cTF { g_ior_ \int_use:N \l_ior_stream_int _ior } + { \cs_gset_eq:Nc #1 { g_ior_ \int_use:N \l_ior_stream_int _ior } } { %<*package> \ior_stream_alloc_aux: \int_compare:nNnT \l_ior_stream_int = \c_sixteen { - \ior_raw_new:N \g_ior_tmp_stream - \int_set:Nn \l_ior_stream_int { \g_ior_tmp_stream } + \ior_raw_new:N \g_ior_tmp_ior + \int_set:Nn \l_ior_stream_int { \g_ior_tmp_ior } \cs_gset_eq:cN - { g_ior_ \int_use:N \l_iow_stream_int _stream } - \g_ior_tmp_stream + { g_ior_ \int_use:N \l_iow_stream_int _ior } \g_ior_tmp_ior } % %<*initex> - \ior_raw_new:c { g_ior_ \int_use:N \l_ior_stream_int _stream } + \ior_raw_new:c { g_ior_ \int_use:N \l_ior_stream_int _ior } % - \cs_gset_eq:Nc #1 { g_ior_ \int_use:N \l_ior_stream_int _stream } + \cs_gset_eq:Nc #1 { g_ior_ \int_use:N \l_ior_stream_int _ior } } } %<*package> @@ -703,7 +717,7 @@ \int_incr:N \l_ior_stream_int \int_compare:nNnT \l_ior_stream_int < \c_sixteen { - \cs_if_exist:cTF { g_ior_ \int_use:N \l_ior_stream_int _stream } + \cs_if_exist:cTF { g_ior_ \int_use:N \l_ior_stream_int _ior } { \prop_if_in:NVT \g_ior_streams_prop \l_ior_stream_int { \ior_stream_alloc_aux: } @@ -727,7 +741,7 @@ % stream is actually a number we can use it directly to show that the % slot has been freed up. % \begin{macrocode} -\cs_new_protected_nopar:Npn \ior_close:N #1 +\cs_new_protected:Npn \ior_close:N #1 { \cs_if_exist:NT #1 { @@ -736,11 +750,11 @@ \int_compare:nNnF #1 = \c_sixteen { \tex_closein:D #1 } \prop_gdel:NV \g_ior_streams_prop #1 - \tex_global:D \tex_chardef:D #1 16 ~ + \cs_gset_eq:NN #1 \c_term_ior } } } -\cs_new_protected_nopar:Npn \iow_close:N #1 +\cs_new_protected:Npn \iow_close:N #1 { \cs_if_exist:NT #1 { @@ -749,7 +763,7 @@ \int_compare:nNnF #1 = \c_sixteen { \tex_closein:D #1 } \prop_gdel:NV \g_iow_streams_prop #1 - \tex_global:D \tex_chardef:D #1 16 ~ + \cs_gset_eq:NN #1 \c_term_iow } } } @@ -759,7 +773,6 @@ % \end{macro} % \end{macro} % -% % \begin{macro}{\ior_list_streams:} % Show the property lists, but with some \enquote{pretty printing}. % See the \pkg{l3msg} module. If there are no open read streams, @@ -813,7 +826,7 @@ % \begin{macro}{\iow_shipout:Nn, \iow_shipout:Nx} % With \eTeX{} available deferred writing is easy. % \begin{macrocode} -\cs_new_protected_nopar:Npn \iow_shipout:Nn #1#2 +\cs_new_protected:Npn \iow_shipout:Nn #1#2 { \iow_shipout_x:Nn #1 { \exp_not:n {#2} } } \cs_generate_variant:Nn \iow_shipout:Nn { Nx } % \end{macrocode} @@ -835,7 +848,7 @@ % instead. If the first argument is no output stream at all, we get an % internal error. % \begin{macrocode} -\cs_new_protected_nopar:Npn \iow_now:Nn #1#2 +\cs_new_protected:Npn \iow_now:Nn #1#2 { \iow_now:Nx #1 { \exp_not:n {#2} } } % \end{macrocode} % \end{macro} @@ -844,10 +857,10 @@ % \begin{macro}{\iow_term:n, \iow_term:x} % Writing to the log and the terminal directly are relatively easy. % \begin{macrocode} -\cs_set_protected_nopar:Npn \iow_log:x { \iow_now:Nx \c_iow_log_stream } -\cs_new_protected_nopar:Npn \iow_log:n { \iow_now:Nn \c_iow_log_stream } -\cs_set_protected_nopar:Npn \iow_term:x { \iow_now:Nx \c_iow_term_stream } -\cs_new_protected_nopar:Npn \iow_term:n { \iow_now:Nn \c_iow_term_stream } +\cs_set_protected_nopar:Npn \iow_log:x { \iow_now:Nx \c_log_iow } +\cs_new_protected_nopar:Npn \iow_log:n { \iow_now:Nn \c_log_iow } +\cs_set_protected_nopar:Npn \iow_term:x { \iow_now:Nx \c_term_iow } +\cs_new_protected_nopar:Npn \iow_term:n { \iow_now:Nn \c_term_iow } % \end{macrocode} %\end{macro} %\end{macro} @@ -855,9 +868,9 @@ % \begin{macro}{\iow_now_when_avail:Nn, \iow_now_when_avail:Nx} % For writing only if the stream requested is open at all. % \begin{macrocode} -\cs_new_protected_nopar:Npn \iow_now_when_avail:Nn #1 +\cs_new_protected:Npn \iow_now_when_avail:Nn #1 { \cs_if_free:NTF #1 { \use_none:n } { \iow_now:Nn #1 } } -\cs_new_protected_nopar:Npn \iow_now_when_avail:Nx #1 +\cs_new_protected:Npn \iow_now_when_avail:Nx #1 { \cs_if_free:NTF #1 { \use_none:n } { \iow_now:Nx #1 } } % \end{macrocode} % \end{macro} @@ -1167,7 +1180,7 @@ % At the end, we simply save the last line (without the run-on text), % and prevent the loop. % \begin{macrocode} -\cs_new_protected_nopar:Npn \iow_wrap_special:w #1 ~ #2 ~ #3 ~ % +\cs_new_protected:Npn \iow_wrap_special:w #1 ~ #2 ~ #3 ~ % { \use:c { iow_wrap_#1: } \str_if_eq:xxTF { #2~#3 } { ~ \c_iow_wrap_marker_tl } @@ -1250,7 +1263,7 @@ { \if_int_compare:w #1 = \c_sixteen \prg_return_true: - \else: + \else: \if_eof:w #1 \prg_return_true: \else: @@ -1267,9 +1280,9 @@ % \begin{macro}{\ior_gto:NN} % And here we read from files. % \begin{macrocode} -\cs_new_protected_nopar:Npn \ior_to:NN #1#2 +\cs_new_protected:Npn \ior_to:NN #1#2 { \tex_read:D #1 to #2 } -\cs_new_protected_nopar:Npn \ior_gto:NN #1#2 +\cs_new_protected:Npn \ior_gto:NN #1#2 { \tex_global:D \tex_read:D #1 to #2 } % \end{macrocode} % \end{macro} @@ -1279,9 +1292,9 @@ % \begin{macro}{\ior_str_gto:NN} % Reading as strings is also a primitive wrapper. % \begin{macrocode} -\cs_new_protected_nopar:Npn \ior_str_to:NN #1#2 +\cs_new_protected:Npn \ior_str_to:NN #1#2 { \etex_readline:D #1 to #2 } -\cs_new_protected_nopar:Npn \ior_str_gto:NN #1#2 +\cs_new_protected:Npn \ior_str_gto:NN #1#2 { \tex_global:D \etex_readline:D #1 to #2 } % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx index c2069873a77..42e32bb9ac5 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 2800 2011-09-10 16:54:36Z will $ +\GetIdInfo$Id: l3keys.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental key-value interfaces} % %<*driver> @@ -1147,7 +1147,7 @@ % a property in the current key name, then a check to make sure it is % known before the code hands off to the next step. % \begin{macrocode} -\cs_new_protected_nopar:Npn \keys_define_elt:n #1 +\cs_new_protected:Npn \keys_define_elt:n #1 { \bool_set_true:N \l_keys_no_value_bool \keys_define_elt_aux:nn {#1} { } @@ -1177,14 +1177,14 @@ % and storing the text before and after it. Everything is turned into % strings, so there is no problem using an \texttt{x}-type expansion. % \begin{macrocode} -\cs_new_protected_nopar:Npn \keys_property_find:n #1 +\cs_new_protected:Npn \keys_property_find:n #1 { \tl_set:Nx \l_keys_path_tl { \l_keys_module_tl / } \tl_if_in:nnTF {#1} { . } { \keys_property_find_aux:w #1 \q_stop } { \msg_kernel_error:nnx { keys } { key-no-property } {#1} } } -\cs_new_protected_nopar:Npn \keys_property_find_aux:w #1 . #2 \q_stop +\cs_new_protected:Npn \keys_property_find_aux:w #1 . #2 \q_stop { \tl_set:Nx \l_keys_path_tl { \l_keys_path_tl \tl_to_str:n {#1} } \tl_if_in:nnTF {#2} { . } @@ -1234,7 +1234,7 @@ % second argument here is the scope: either empty or \texttt{g} for % global. % \begin{macrocode} -\cs_new_nopar:Npn \keys_bool_set:NN #1#2 +\cs_new:Npn \keys_bool_set:NN #1#2 { \cs_if_exist:NF #1 { \bool_new:N #1 } \keys_choice_make: @@ -1255,7 +1255,7 @@ % \begin{macro}[int]{\keys_bool_set_inverse:NN} % Inverse boolean setting is much the same. % \begin{macrocode} -\cs_new_nopar:Npn \keys_bool_set_inverse:NN #1#2 +\cs_new:Npn \keys_bool_set_inverse:NN #1#2 { \cs_if_exist:NF #1 { \bool_new:N #1 } \keys_choice_make: @@ -1332,7 +1332,7 @@ { generate-choices-before-code } { \l_keys_path_tl } } } -\cs_new_protected_nopar:Npn \keys_choices_generate_aux:n #1 +\cs_new_protected:Npn \keys_choices_generate_aux:n #1 { \keys_cmd_set:nx { \l_keys_path_tl / #1 } { @@ -1380,7 +1380,7 @@ \keys_cmd_set_aux:n {#1} \cs_set:cpx { \c_keys_code_root_tl #1 } ##1 {#2} } -\cs_new_protected_nopar:Npn \keys_cmd_set_aux:n #1 +\cs_new_protected:Npn \keys_cmd_set_aux:n #1 { \tl_clear_new:c { \c_keys_vars_root_tl #1 .default } \tl_set:cn { \c_keys_vars_root_tl #1 .default } { \q_no_value } @@ -1402,12 +1402,12 @@ % \begin{macro}{\keys_meta_make:n, \keys_meta_make:x} % To create a meta-key, simply set up to pass data through. % \begin{macrocode} -\cs_new_protected_nopar:Npn \keys_meta_make:n #1 +\cs_new_protected:Npn \keys_meta_make:n #1 { \exp_args:NNo \keys_cmd_set:nn \l_keys_path_tl { \exp_after:wN \keys_set:nn \exp_after:wN { \l_keys_module_tl } {#1} } } -\cs_new_protected_nopar:Npn \keys_meta_make:x #1 +\cs_new_protected:Npn \keys_meta_make:x #1 { \keys_cmd_set:nx { \l_keys_path_tl } { \exp_not:N \keys_set:nn { \l_keys_module_tl } {#1} } @@ -1423,7 +1423,7 @@ % map across a comma-separated list. This then requires that the appropriate % set up takes place elsewhere. % \begin{macrocode} -\cs_new_nopar:Npn \keys_multichoice_find:n #1 +\cs_new:Npn \keys_multichoice_find:n #1 { \clist_map_function:nN {#1} \keys_choice_find:n } \cs_new_protected_nopar:Npn \keys_multichoice_make: { @@ -1460,7 +1460,7 @@ % Values can be required or forbidden by having the appropriate marker % set. % \begin{macrocode} -\cs_new_protected_nopar:Npn \keys_value_requirement:n #1 +\cs_new_protected:Npn \keys_value_requirement:n #1 { \tl_set_eq:cc { \c_keys_vars_root_tl \l_keys_path_tl .req } @@ -1476,13 +1476,13 @@ % version is set up so that the use of |{ }| as an \texttt{N}-type % variable is only done once! % \begin{macrocode} -\cs_new_protected_nopar:Npn \keys_variable_set:NnNN #1#2#3#4 +\cs_new_protected:Npn \keys_variable_set:NnNN #1#2#3#4 { \cs_if_exist:NF #1 { \use:c { #2 _new:N } #1 } \keys_cmd_set:nx { \l_keys_path_tl } { \exp_not:c { #2 _ #3 set:N #4 } \exp_not:N #1 {##1} } } -\cs_new_protected_nopar:Npn \keys_variable_set:NnN #1#2#3 +\cs_new_protected:Npn \keys_variable_set:NnN #1#2#3 { \keys_variable_set:NnNN #1 {#2} { } #3 } \cs_generate_variant:Nn \keys_variable_set:NnNN { c } \cs_generate_variant:Nn \keys_variable_set:NnN { c } @@ -1499,9 +1499,9 @@ % \begin{macro}{.bool_gset:N} % One function for this. % \begin{macrocode} -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .bool_set:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .bool_set:N } #1 { \keys_bool_set:NN #1 { } } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .bool_gset:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .bool_gset:N } #1 { \keys_bool_set:NN #1 g } % \end{macrocode} % \end{macro} @@ -1511,9 +1511,9 @@ % \begin{macro}{.bool_gset_inverse:N} % One function for this. % \begin{macrocode} -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .bool_set_inverse:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .bool_set_inverse:N } #1 { \keys_bool_set_inverse:NN #1 { } } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .bool_gset_inverse:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .bool_gset_inverse:N } #1 { \keys_bool_set_inverse:NN #1 g } % \end{macrocode} % \end{macro} @@ -1563,13 +1563,13 @@ % \begin{macro}{.clist_set:N, .clist_set:c} % \begin{macro}{.clist_gset:N, .clist_gset:c} % \begin{macrocode} -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .clist_set:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .clist_set:N } #1 { \keys_variable_set:NnN #1 { clist } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .clist_set:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .clist_set:c } #1 { \keys_variable_set:cnN {#1} { clist } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .clist_gset:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .clist_gset:N } #1 { \keys_variable_set:NnNN #1 { clist } g n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .clist_gset:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .clist_gset:c } #1 { \keys_variable_set:cnNN {#1} { clist } g n } % \end{macrocode} % \end{macro} @@ -1589,13 +1589,13 @@ % \begin{macro}{.dim_gset:N, .dim_gset:c} % Setting a variable is very easy: just pass the data along. % \begin{macrocode} -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .dim_set:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .dim_set:N } #1 { \keys_variable_set:NnN #1 { dim } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .dim_set:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .dim_set:c } #1 { \keys_variable_set:cnN {#1} { dim } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .dim_gset:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .dim_gset:N } #1 { \keys_variable_set:NnNN #1 { dim } g n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .dim_gset:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .dim_gset:c } #1 { \keys_variable_set:cnNN {#1} { dim } g n } % \end{macrocode} % \end{macro} @@ -1605,13 +1605,13 @@ % \begin{macro}{.fp_gset:N, .fp_gset:c} % Setting a variable is very easy: just pass the data along. % \begin{macrocode} -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .fp_set:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .fp_set:N } #1 { \keys_variable_set:NnN #1 { fp } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .fp_set:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .fp_set:c } #1 { \keys_variable_set:cnN {#1} { fp } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .fp_gset:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .fp_gset:N } #1 { \keys_variable_set:NnNN #1 { fp } g n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .fp_gset:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .fp_gset:c } #1 { \keys_variable_set:cnNN {#1} { fp } g n } % \end{macrocode} % \end{macro} @@ -1629,13 +1629,13 @@ % \begin{macro}{.int_gset:N, .int_gset:c} % Setting a variable is very easy: just pass the data along. % \begin{macrocode} -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .int_set:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .int_set:N } #1 { \keys_variable_set:NnN #1 { int } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .int_set:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .int_set:c } #1 { \keys_variable_set:cnN {#1} { int } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .int_gset:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .int_gset:N } #1 { \keys_variable_set:NnNN #1 { int } g n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .int_gset:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .int_gset:c } #1 { \keys_variable_set:cnNN {#1} { int } g n } % \end{macrocode} % \end{macro} @@ -1668,13 +1668,13 @@ % \begin{macro}{.skip_gset:N, .skip_gset:c} % Setting a variable is very easy: just pass the data along. % \begin{macrocode} -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .skip_set:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .skip_set:N } #1 { \keys_variable_set:NnN #1 { skip } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .skip_set:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .skip_set:c } #1 { \keys_variable_set:cnN {#1} { skip } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .skip_gset:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .skip_gset:N } #1 { \keys_variable_set:NnNN #1 { skip } g n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .skip_gset:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .skip_gset:c } #1 { \keys_variable_set:cnNN {#1} { skip } g n } % \end{macrocode} % \end{macro} @@ -1687,21 +1687,21 @@ % \begin{macro}{.tl_gset_x:N, .tl_gset_x:c} % Setting a variable is very easy: just pass the data along. % \begin{macrocode} -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .tl_set:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .tl_set:N } #1 { \keys_variable_set:NnN #1 { tl } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .tl_set:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .tl_set:c } #1 { \keys_variable_set:cnN {#1} { tl } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .tl_set_x:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .tl_set_x:N } #1 { \keys_variable_set:NnN #1 { tl } x } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .tl_set_x:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .tl_set_x:c } #1 { \keys_variable_set:cnN {#1} { tl } x } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .tl_gset:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .tl_gset:N } #1 { \keys_variable_set:NnNN #1 { tl } g n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .tl_gset:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .tl_gset:c } #1 { \keys_variable_set:cnNN {#1} { tl } g n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .tl_gset_x:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .tl_gset_x:N } #1 { \keys_variable_set:NnNN #1 { tl } g x } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .tl_gset_x:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .tl_gset_x:c } #1 { \keys_variable_set:cnNN {#1} { tl } g x } % \end{macrocode} % \end{macro} @@ -1773,7 +1773,7 @@ % required or forbidden. If everything passes, move on to execute the % code. % \begin{macrocode} -\cs_new_protected_nopar:Npn \keys_set_elt:n #1 +\cs_new_protected:Npn \keys_set_elt:n #1 { \bool_set_true:N \l_keys_no_value_bool \keys_set_elt_aux:nn {#1} { } @@ -1882,7 +1882,7 @@ { = { \exp_not:o \l_keys_value_tl } } } } -\cs_new_nopar:Npn \keys_execute:nn #1#2 +\cs_new:Npn \keys_execute:nn #1#2 { \cs_if_exist:cTF { \c_keys_code_root_tl #1 } { @@ -1901,7 +1901,7 @@ % if that fails call the unknown key. That will exist, as it is created % when a choice is first made. So there is no need for any escape code. % \begin{macrocode} -\cs_new_nopar:Npn \keys_choice_find:n #1 +\cs_new:Npn \keys_choice_find:n #1 { \keys_execute:nn { \l_keys_path_tl / \tl_to_str:n {#1} } { \keys_execute:nn { \l_keys_path_tl / unknown } { } } @@ -1938,7 +1938,7 @@ % \begin{macro}{\keys_show:nn} % Showing a key is just a question of using the correct name. % \begin{macrocode} -\cs_new_nopar:Npn \keys_show:nn #1#2 +\cs_new:Npn \keys_show:nn #1#2 { \cs_show:c { \c_keys_code_root_tl #1 / \tl_to_str:n {#2} } } % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx index 430a018ca85..baf21f14990 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3luatex.dtx 2995 2011-11-23 16:15:19Z bruno $ +\GetIdInfo$Id: l3luatex.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental LuaTeX-specific functions} % %<*driver> @@ -205,7 +205,7 @@ % (other). % \end{variable} % -% \begin{variable}{\c_string_cctab} +% \begin{variable}{\c_str_cctab} % Category code table where all characters have category code $12$ % (other) with the exception of spaces, which have category code % $10$ (space). @@ -235,8 +235,8 @@ \msg_kernel_new:nnnn { luatex } { bad-engine } { LuaTeX~engine~not~in~use!~Ignoring~#1. } { - The~feature~you~are~using~is~only~available\ - with~the~luaTeX~engine.~LaTeX3~ignored~`#1#2'. + The~feature~you~are~using~is~only~available~ + with~the~LuaTeX~engine.~LaTeX3~ignored~`#1#2'. } % \end{macrocode} % @@ -287,7 +287,7 @@ % dynamic tables themselves. % \begin{macrocode} \int_new:N \g_cctab_allocate_int -\int_set:Nn \g_cctab_allocate_int { -1 } +\int_set:Nn \g_cctab_allocate_int { \c_minus_one } \int_new:N \g_cctab_stack_int \seq_new:N \g_cctab_stack_seq % \end{macrocode} @@ -304,27 +304,21 @@ % tables, and even ones for the stack. Here, therefore, the odd numbers % are allocated. % \begin{macrocode} -\cs_new_protected_nopar:Npn \cctab_new:N #1 +\cs_new_protected:Npn \cctab_new:N #1 { - \cs_if_free:NTF #1 - { - \int_gadd:Nn \g_cctab_allocate_int { 2 } - \int_compare:nNnTF - { \g_cctab_allocate_int } < { \c_max_register_int + 1 } - { - \tex_global:D \tex_mathchardef:D #1 \g_cctab_allocate_int - \luatex_initcatcodetable:D #1 - } - { \msg_kernel_fatal:nnx { alloc } { out-of-registers } { cctab } } - } + \chk_if_free_cs:N #1 + \int_gadd:Nn \g_cctab_allocate_int { \c_two } + \int_compare:nNnTF + \g_cctab_allocate_int < { \c_max_register_int + \c_one } { - \msg_kernel_error:nnx { code } { variable-already-defined } - { \token_to_str:N #1 } + \tex_global:D \tex_chardef:D #1 \g_cctab_allocate_int + \luatex_initcatcodetable:D #1 } + { \msg_kernel_fatal:nnx { alloc } { out-of-registers } { cctab } } } \luatex_if_engine:F { - \cs_set_protected_nopar:Npn \cctab_new:N #1 + \cs_set_protected:Npn \cctab_new:N #1 { \msg_kernel_error:nnx { luatex } { bad-engine } { \exp_not:N \cctab_new:N } @@ -333,8 +327,9 @@ %<*package> \luatex_if_engine:T { - \cs_set_protected_nopar:Npn \cctab_new:N #1 + \cs_set_protected:Npn \cctab_new:N #1 { + \chk_if_free_cs:N #1 \newcatcodetable #1 \luatex_initcatcodetable:D #1 } @@ -350,27 +345,27 @@ % done by using a stack of tables which are not read only, and actually % having them as \enquote{in use} copies. % \begin{macrocode} -\cs_new_protected_nopar:Npn \cctab_begin:N #1 +\cs_new_protected:Npn \cctab_begin:N #1 { \seq_gpush:Nx \g_cctab_stack_seq { \tex_the:D \luatex_catcodetable:D } \luatex_catcodetable:D #1 - \int_gadd:Nn \g_cctab_stack_int { 2 } - \int_compare:nNnT { \g_cctab_stack_int } > { 268 435 453 } - { \msg_kernel_error:nn { code } { cctab-stack-full } } + \int_gadd:Nn \g_cctab_stack_int { \c_two } + \int_compare:nNnT \g_cctab_stack_int > \c_max_register_int + { \msg_kernel_fatal:nn { code } { cctab-stack-full } } \luatex_savecatcodetable:D \g_cctab_stack_int \luatex_catcodetable:D \g_cctab_stack_int } \cs_new_protected_nopar:Npn \cctab_end: { - \int_gsub:Nn \g_cctab_stack_int { 2 } - \seq_gpop:NN \g_cctab_stack_seq \l_cctab_tmp_tl - \quark_if_no_value:NT \l_cctab_tmp_tl + \int_gsub:Nn \g_cctab_stack_int { \c_two } + \seq_if_empty:NTF \g_cctab_stack_seq { \tl_set:Nn \l_cctab_tmp_tl { 0 } } + { \seq_gpop:NN \g_cctab_stack_seq \l_cctab_tmp_tl } \luatex_catcodetable:D \l_cctab_tmp_tl \scan_stop: } \luatex_if_engine:F { - \cs_set_protected_nopar:Npn \cctab_begin:N #1 + \cs_set_protected:Npn \cctab_begin:N #1 { \msg_kernel_error:nnxx { luatex } { bad-engine } { \exp_not:N \cctab_begin:N } {#1} @@ -384,7 +379,7 @@ %<*package> \luatex_if_engine:T { - \cs_set_protected_nopar:Npn \cctab_begin:N #1 { \BeginCatcodeRegime #1 } + \cs_set_protected:Npn \cctab_begin:N #1 { \BeginCatcodeRegime #1 } \cs_set_protected_nopar:Npn \cctab_end: { \EndCatcodeRegime } } % @@ -408,7 +403,7 @@ } \luatex_if_engine:F { - \cs_set_protected_nopar:Npn \cctab_gset:Nn #1#2 + \cs_set_protected:Npn \cctab_gset:Nn #1#2 { \msg_kernel_error:nnxx { luatex } { bad-engine } { \exp_not:N \cctab_gset:Nn } { #1 {#2} } @@ -421,7 +416,7 @@ % \begin{variable}{\c_document_cctab} % \begin{variable}{\c_initex_cctab} % \begin{variable}{\c_other_cctab} -% \begin{variable}{\c_string_cctab} +% \begin{variable}{\c_str_cctab} % Creating category code tables is easy using the function above. % The \texttt{other} and \texttt{string} ones are done by completely % ignoring the existing codes as this makes life a lot less complex. The @@ -440,7 +435,7 @@ \cs_new_eq:NN \c_document_cctab \CatcodeTableLaTeX \cs_new_eq:NN \c_initex_cctab \CatcodeTableIniTeX \cs_new_eq:NN \c_other_cctab \CatcodeTableOther - \cs_new_eq:NN \c_string_cctab \CatcodeTableString + \cs_new_eq:NN \c_str_cctab \CatcodeTableString } % %<*initex> @@ -448,7 +443,7 @@ { \cctab_new:N \c_document_cctab \cctab_new:N \c_other_cctab - \cctab_new:N \c_string_cctab + \cctab_new:N \c_str_cctab \cctab_gset:Nn \c_document_cctab { \char_set_catcode_space:n { 9 } @@ -462,7 +457,7 @@ \prg_stepwise_inline:nnnn { 0 } { 1 } { 127 } { \char_set_catcode_other:n {#1} } } - \cctab_gset:Nn \c_string_cctab + \cctab_gset:Nn \c_str_cctab { \prg_stepwise_inline:nnnn { 0 } { 1 } { 127 } { \char_set_catcode_other:n {#1} } @@ -477,6 +472,16 @@ % \end{variable} % \end{variable} % +% \subsection{Deprecated functions} +% +% Deprecated 2011-12-21, for removal by 2012-03-31. +% +% \begin{variable}{\c_string_cctab} +% \begin{macrocode} +\cs_new_eq:NN \c_string_cctab \c_str_cctab +% \end{macrocode} +% \end{variable} +% % \begin{macrocode} % % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx index 36d9e6d9d48..89b6953da83 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 3029 2011-12-06 22:47:30Z joseph $ +\GetIdInfo$Id: l3msg.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental messages} % %<*driver> @@ -1024,18 +1024,18 @@ % A function for issuing messages: both the text and order could % in principal vary. % \begin{macrocode} -\cs_new_nopar:Npn \msg_fatal_text:n #1 { Fatal~#1~error } -\cs_new_nopar:Npn \msg_critical_text:n #1 { Critical~#1~error } -\cs_new_nopar:Npn \msg_error_text:n #1 { #1~error } -\cs_new_nopar:Npn \msg_warning_text:n #1 { #1~warning } -\cs_new_nopar:Npn \msg_info_text:n #1 { #1~info } +\cs_new:Npn \msg_fatal_text:n #1 { Fatal~#1~error } +\cs_new:Npn \msg_critical_text:n #1 { Critical~#1~error } +\cs_new:Npn \msg_error_text:n #1 { #1~error } +\cs_new:Npn \msg_warning_text:n #1 { #1~warning } +\cs_new:Npn \msg_info_text:n #1 { #1~info } % \end{macrocode} % \end{macro} % % \begin{macro}{\msg_see_documentation_text:n} % Contextual footer information. % \begin{macrocode} -\cs_new_nopar:Npn \msg_see_documentation_text:n #1 +\cs_new:Npn \msg_see_documentation_text:n #1 { \\ \\ See~the~#1~documentation~for~further~information. } % \end{macrocode} % \end{macro} @@ -1054,7 +1054,7 @@ % is cleared, and the various message functions are created % to simply use the code stored for the message. % \begin{macrocode} -\cs_new_protected_nopar:Npn \msg_class_set:nn #1#2 +\cs_new_protected:Npn \msg_class_set:nn #1#2 { \prop_clear_new:c { l_msg_redirect_ #1 _prop } \cs_set_protected:cpn { msg_ #1 :nnxxxx } ##1##2##3##4##5##6 @@ -1308,7 +1308,7 @@ % The first auxiliary macro looks for a match by name: the most % restrictive check. % \begin{macrocode} -\cs_new_protected_nopar:Npn \msg_use_aux:nnn #1#2#3 +\cs_new_protected:Npn \msg_use_aux:nnn #1#2#3 { \tl_set:Nn \l_msg_current_class_tl {#1} \tl_set:Nn \l_msg_current_module_tl {#2} @@ -1320,7 +1320,7 @@ % The second function checks for general matches by module or for % all modules. % \begin{macrocode} -\cs_new_protected_nopar:Npn \msg_use_aux:nn #1#2 +\cs_new_protected:Npn \msg_use_aux:nn #1#2 { \prop_if_in:cnTF { l_msg_redirect_ #1 _prop } {#2} { \msg_use_loop_check:nn {#1} {#2} } @@ -1357,7 +1357,7 @@ % \begin{macro}{\msg_redirect_class:nn} % Converts class one into class two. % \begin{macrocode} -\cs_new_protected_nopar:Npn \msg_redirect_class:nn #1#2 +\cs_new_protected:Npn \msg_redirect_class:nn #1#2 { \prop_put:cnn { l_msg_redirect_ #1 _prop } { * } {#2} } % \end{macrocode} % \end{macro} @@ -1365,7 +1365,7 @@ % \begin{macro}{\msg_redirect_module:nnn} % For when all messages of a class should be altered for a given module. % \begin{macrocode} -\cs_new_protected_nopar:Npn \msg_redirect_module:nnn #1#2#3 +\cs_new_protected:Npn \msg_redirect_module:nnn #1#2#3 { \prop_put:cnn { l_msg_redirect_ #2 _prop } {#1} {#3} } % \end{macrocode} % \end{macro} @@ -1373,7 +1373,7 @@ % \begin{macro}{\msg_redirect_name:nnn} % Named message will always use the given class. % \begin{macrocode} -\cs_new_protected_nopar:Npn \msg_redirect_name:nnn #1#2#3 +\cs_new_protected:Npn \msg_redirect_name:nnn #1#2#3 { \prop_put:Nnn \l_msg_redirect_names_prop { // #1 / #2 / } {#3} } % \end{macrocode} % \end{macro} @@ -1388,13 +1388,13 @@ % pre-built functions. Two functions are provided: one more general % and one which only has the short text part. % \begin{macrocode} -\cs_new_protected_nopar:Npn \msg_kernel_new:nnnn #1#2 +\cs_new_protected:Npn \msg_kernel_new:nnnn #1#2 { \msg_new:nnnn { LaTeX } { #1 / #2 } } -\cs_new_protected_nopar:Npn \msg_kernel_new:nnn #1#2 +\cs_new_protected:Npn \msg_kernel_new:nnn #1#2 { \msg_new:nnn { LaTeX } { #1 / #2 } } -\cs_new_protected_nopar:Npn \msg_kernel_set:nnnn #1#2 +\cs_new_protected:Npn \msg_kernel_set:nnnn #1#2 { \msg_set:nnnn { LaTeX } { #1 / #2 } } -\cs_new_protected_nopar:Npn \msg_kernel_set:nnn #1#2 +\cs_new_protected:Npn \msg_kernel_set:nnn #1#2 { \msg_set:nnn { LaTeX } { #1 / #2 } } % \end{macrocode} % \end{macro} @@ -1635,6 +1635,13 @@ LaTeX~has~been~asked~to~replace~an~empty~pattern~by~'#1':~that~% would~lead~to~an~infinite~loop! } +\msg_kernel_new:nnnn { scan } { already-defined } + { Scan~mark~#1~already~defined. } + { + \c_msg_coding_error_text_tl + LaTeX~has~been~asked~to~create~a~new~scan~mark~'#1'~ + but~this~name~has~already~been~used~for~a~scan~mark. + } % \end{macrocode} % % Some errors only appear in expandable settings, @@ -1646,6 +1653,8 @@ { Erroneous~variable~#1 used! } \msg_kernel_new:nnn { prg } { zero-step } { Zero~step~size~for~stepwise~function~#1. } +\msg_kernel_new:nnn { prg } { replicate-neg } + { Negative~argument~for~\prg_replicate:nn. } % \end{macrocode} % % Messages used by the \enquote{\texttt{show}} functions. diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx index 79585b9c36c..c849e21ab77 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 3014 2011-11-27 06:55:43Z bruno $ +\GetIdInfo$Id: l3prg.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental control structures} % %<*driver> @@ -173,9 +173,9 @@ % } % \begin{syntax} % \cs{prg_set_protected_conditional:Npnn} -% ~~\cs{\meta{name}:\meta{arg spec}} \meta{parameters} \meta{conditions} \Arg{code} \\ +% ~~\cs{\meta{name}:\meta{arg spec}} \meta{parameters} \Arg{conditions} \Arg{code} \\ % \cs{prg_set_protected_conditional:Nnn} -% ~~\cs{\meta{name}:\meta{arg spec}} \meta{conditions} \Arg{code} +% ~~\cs{\meta{name}:\meta{arg spec}} \Arg{conditions} \Arg{code} % \end{syntax} % These functions creates a family of conditionals using the same % \Arg{code} to perform the test created. The \texttt{new} version will @@ -214,29 +214,18 @@ % the test. \cs{prg_set_protected_conditional:Npn} will generate % a family of protected conditional functions, and so \meta{code} % does not need to be expandable. All of the functions are created -% globally.% -% \begin{function}{\prg_new_eq_conditional:NN, \prg_set_eq_conditional:NN} +% globally. +% +% \begin{function}{\prg_new_eq_conditional:NNn, \prg_set_eq_conditional:NNn} % \begin{syntax} -% \cs{prg_new_eq_conditional:NN} \cs{\meta{name1}:\meta{arg spec1}} \cs{\meta{name2}:\meta{arg spec2}} +% \cs{prg_new_eq_conditional:NNn} \cs{\meta{name1}:\meta{arg spec1}} \cs{\meta{name2}:\meta{arg spec2}} \Arg{conditions} % \end{syntax} -% These will set the definitions of the functions -% \begin{itemize}\parskip=0pt -% \item \cs{\meta{name1}_p:\meta{arg spec1}} -% \item \cs{\meta{name1}:\meta{arg spec1}T} -% \item \cs{\meta{name1}:\meta{arg spec1}F} -% \item \cs{\meta{name1}:\meta{arg spec1}TF} -% \end{itemize} -% equal to those for -% \begin{itemize}\parskip=0pt -% \item \cs{\meta{name2}_p:\meta{arg spec2}} -% \item \cs{\meta{name2}:\meta{arg spec2}T} -% \item \cs{\meta{name2}:\meta{arg spec2}F} -% \item \cs{\meta{name2}:\meta{arg spec2}TF} -% \end{itemize} -% In most cases, the two \meta{arg specs} will be identical, although -% this is not enforced. In the case of the \texttt{new} function, a -% check is made for any existing definitions for \meta{name1}. The -% functions are set globally. +% These functions copies a family of conditionals. The \texttt{new} version +% will check for existing definitions (\emph{cf.}~\cs{cs_new:Npn}) whereas +% the \texttt{set} version will not (\emph{cf.}~\cs{cs_set:Npn}). The +% conditionals copied are depended on the comma-separated list of +% \meta{conditions}, which should be one or more of \texttt{p}, \texttt{T}, +% \texttt{F} and \texttt{TF}. % \end{function} % % \begin{function}[EXP]{\prg_return_true:, \prg_return_false:} @@ -896,7 +885,7 @@ % Boolean variables have to be initiated when they are created. Other % than that there is not much to say here. % \begin{macrocode} -\cs_new_protected_nopar:Npn \bool_new:N #1 { \cs_new_eq:NN #1 \c_false_bool } +\cs_new_protected:Npn \bool_new:N #1 { \cs_new_eq:NN #1 \c_false_bool } \cs_generate_variant:Nn \bool_new:N { c } % \end{macrocode} % \end{macro} @@ -911,13 +900,13 @@ % \UnitTested % Setting is already pretty easy. % \begin{macrocode} -\cs_new_protected_nopar:Npn \bool_set_true:N #1 +\cs_new_protected:Npn \bool_set_true:N #1 { \cs_set_eq:NN #1 \c_true_bool } -\cs_new_protected_nopar:Npn \bool_set_false:N #1 +\cs_new_protected:Npn \bool_set_false:N #1 { \cs_set_eq:NN #1 \c_false_bool } -\cs_new_protected_nopar:Npn \bool_gset_true:N #1 +\cs_new_protected:Npn \bool_gset_true:N #1 { \cs_gset_eq:NN #1 \c_true_bool } -\cs_new_protected_nopar:Npn \bool_gset_false:N #1 +\cs_new_protected:Npn \bool_gset_false:N #1 { \cs_gset_eq:NN #1 \c_false_bool } \cs_generate_variant:Nn \bool_set_true:N { c } \cs_generate_variant:Nn \bool_set_false:N { c } @@ -1228,8 +1217,8 @@ % Branching the six way switch. % Reversals should be reasonably straightforward. % \begin{macrocode} -\cs_new_nopar:Npn \bool_choose:NN #1#2 { \use:c { bool_ #2 _ #1 :w } } -\cs_new_nopar:Npn \bool_not_choose:NN #1#2 { \use:c { bool_not_ #2 _ #1 :w } } +\cs_new:Npn \bool_choose:NN #1#2 { \use:c { bool_ #2 _ #1 :w } } +\cs_new:Npn \bool_not_choose:NN #1#2 { \use:c { bool_not_ #2 _ #1 :w } } % \end{macrocode} % Continues scanning. Must remove the second "&" or \verb"|". % \begin{macrocode} @@ -1630,22 +1619,22 @@ % pool. Also, it is considerably slower than what we use here so the % few extra csnames are well spent I would say. % \begin{macrocode} -\cs_new_nopar:Npn \prg_replicate:nn #1 +\cs_new:Npn \prg_replicate:nn #1 { \int_to_roman:w \exp_after:wN \prg_replicate_first_aux:N \int_value:w \int_eval:w #1 \int_eval_end: \cs_end: } -\cs_new_nopar:Npn \prg_replicate_aux:N #1 +\cs_new:Npn \prg_replicate_aux:N #1 { \cs:w prg_replicate_#1 :n \prg_replicate_aux:N } -\cs_new_nopar:Npn \prg_replicate_first_aux:N #1 +\cs_new:Npn \prg_replicate_first_aux:N #1 { \cs:w prg_replicate_first_ #1 :n \prg_replicate_aux:N } % \end{macrocode} % Then comes all the functions that do the hard work of inserting all % the copies. % \begin{macrocode} -\cs_new_nopar:Npn \prg_replicate_ :n #1 { \cs_end: } +\cs_new:Npn \prg_replicate_ :n #1 { \cs_end: } \cs_new:cpn { prg_replicate_0:n } #1 { \cs_end: {#1#1#1#1#1#1#1#1#1#1} } \cs_new:cpn { prg_replicate_1:n } #1 { \cs_end: {#1#1#1#1#1#1#1#1#1#1} #1 } \cs_new:cpn { prg_replicate_2:n } #1 { \cs_end: {#1#1#1#1#1#1#1#1#1#1} #1#1 } @@ -1667,7 +1656,8 @@ % Users shouldn't ask for something to be replicated once or even % not at all but\dots % \begin{macrocode} -\cs_new:cpn { prg_replicate_first_-:n } #1 { \c_zero \negative_replication } +\cs_new:cpn { prg_replicate_first_-:n } #1 + { \c_zero \msg_expandable_kernel_error:nn { prg } { replicate-neg } } \cs_new:cpn { prg_replicate_first_0:n } #1 { \c_zero } \cs_new:cpn { prg_replicate_first_1:n } #1 { \c_zero #1 } \cs_new:cpn { prg_replicate_first_2:n } #1 { \c_zero #1#1 } @@ -1895,12 +1885,13 @@ \tl_to_lowercase:n { \group_end: - \cs_new_nopar:Npn \prg_variable_get_scope:N #1 + \cs_new:Npn \prg_variable_get_scope:N #1 { - \exp_last_unbraced:Nf \prg_variable_get_scope_aux:w - { \cs_to_str:N #1 \exp_stop_f: \q_stop } + \exp_after:wN \exp_after:wN + \exp_after:wN \prg_variable_get_scope_aux:w + \cs_to_str:N #1 \exp_stop_f: \q_stop } - \cs_new_nopar:Npn \prg_variable_get_scope_aux:w #1#2 \q_stop + \cs_new:Npn \prg_variable_get_scope_aux:w #1#2 \q_stop { \token_if_eq_meaning:NNT & #1 { g } } } \group_begin: @@ -1909,12 +1900,12 @@ \tl_to_lowercase:n { \group_end: - \cs_new_nopar:Npn \prg_variable_get_type:N #1 + \cs_new:Npn \prg_variable_get_type:N #1 { \exp_after:wN \prg_variable_get_type_aux:w \token_to_str:N #1 & a \q_stop } - \cs_new_nopar:Npn \prg_variable_get_type_aux:w #1 & #2#3 \q_stop + \cs_new:Npn \prg_variable_get_type_aux:w #1 & #2#3 \q_stop { \token_if_eq_meaning:NNTF a #2 {#1} @@ -1973,7 +1964,7 @@ % by Bernd Raichle. Firstly we define the function for parsing the % initial list and then the braced list afterwards. % \begin{macrocode} -\cs_new_protected_nopar:Npn \prg_define_quicksort:nnn #1#2#3 { +\cs_new_protected:Npn \prg_define_quicksort:nnn #1#2#3 { \cs_set:cpx{#1_quicksort:n}##1{ \exp_not:c{#1_quicksort_start_partition:w} ##1 \exp_not:n{#2\q_nil#3\q_stop} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx index 2cec56bc55e..273e2d102eb 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3prop.dtx 3029 2011-12-06 22:47:30Z joseph $ +\GetIdInfo$Id: l3prop.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental property lists} % %<*driver> @@ -927,7 +927,7 @@ % \cs{if_meaning:w} test: the keys are strings, and thus % cannot match the marker \cs{q_recursion_tail}. % \begin{macrocode} -\cs_new_nopar:Npn \prop_map_function:NN #1#2 +\cs_new:Npn \prop_map_function:NN #1#2 { \exp_last_unbraced:NNo \prop_map_function_aux:Nwn #2 #1 \q_recursion_tail \q_prop { } @@ -982,7 +982,7 @@ % to sequences and comma lists, we use \cs{msg_aux_show:nn} % to format both the key and the value for each pair. % \begin{macrocode} -\cs_new_protected_nopar:Npn \prop_show:N #1 +\cs_new_protected:Npn \prop_show:N #1 { \msg_aux_show:Nnx #1 diff --git a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx index 1709da93420..cc865cccb6c 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3quark.dtx 3014 2011-11-27 06:55:43Z bruno $ +\GetIdInfo$Id: l3quark.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental quarks} % %<*driver> @@ -67,12 +67,17 @@ % % \begin{documentation} % -% A special type of constants in \LaTeX3 are \enquote{quarks}. These are -% control -% sequences that expand to themselves and should therefore \emph{never} be -% executed directly in the code. This would result in an endless loop! +% Two special types of constants in \LaTeX3 are \enquote{quarks} and +% \enquote{scan marks}. By convention all constants of type quark +% start out with |\q_|, and scan marks start with |\s_|. % -% They are meant to be used as delimiter is weird functions (for +% \emph{Scan marks are an experimental feature.} +% +% Quarks are control sequences that expand to themselves and should +% therefore \emph{never} be executed directly in the code. +% This would result in an endless loop! +% +% They are meant to be used as delimiter in weird functions (for % example as the stop token (\emph{i.e.}~\cs{q_stop}). They also permit the % following ingenious trick: when you pick up a token in a temporary, % and you want to know whether you have picked up a particular quark, @@ -81,7 +86,15 @@ % below. All the quark testing functions are expandable although the % ones testing only single tokens are much faster. % -% By convention all constants of type quark start out with |\q_|. +% Scan marks are control sequences set equal to \cs{scan_stop:}, +% hence will never expand. +% +% Since they are harmless when executed by \TeX{} in non-expandable +% contexts, they can be used to mark the end of a set of instructions. +% This allows to skip to that point if the end of the instructions +% should not be performed (see \pkg{l3regex}). +% +%^^A todo: talk about the use of scan marks in galley and fp. % % \section{Defining quarks} % @@ -243,6 +256,30 @@ % The recursion end should be marked by \cs{prg_break_point:n}. % \end{function} % +% \section{Scan marks} +% +% \begin{function}{\scan_new:N} +% \begin{syntax} +% \cs{scan_new:N} \meta{scan mark} +% \end{syntax} +% Creates a new \meta{scan mark} which is set equal to \cs{scan_stop:}. +% The \meta{scan mark} will be defined globally, and an error message +% will be raised if the name was already taken by another scan mark. +% \end{function} +% +% \begin{variable}{\s_stop} +% Used at the end of a set of instructions, as a marker +% that can be jumped to using \cs{use_none_delimit_by_s_stop:w}. +% \end{variable} +% +% \begin{function}{\use_none_delimit_by_s_stop:w} +% \begin{variable} +% \cs{use_none_delimit_by_s_stop:w} \meta{tokens} \cs{s_stop} +% \end{variable} +% Removes the \meta{tokens} and \cs{s_stop} from the input stream. +% This leads to a low-level \TeX{} error if \cs{s_stop} is absent. +% \end{function} +% % \section{Internal quark functions} % % \begin{function}{\use_none_delimit_by_q_recursion_stop:w} @@ -285,11 +322,13 @@ % % \end{macrocode} % +% \subsection{Quarks} +% % \begin{macro}{\quark_new:N} % \UnitTested % Allocate a new quark. % \begin{macrocode} -\cs_new_protected_nopar:Npn \quark_new:N #1 { \tl_const:Nn #1 {#1} } +\cs_new_protected:Npn \quark_new:N #1 { \tl_const:Nn #1 {#1} } % \end{macrocode} % \end{macro} % @@ -475,6 +514,53 @@ % \end{macrocode} % \end{variable} % +% \subsection{Scan marks} +% +% \begin{variable}{\g_scan_marks_tl} +% \UnitTested +% The list of all scan marks currently declared. +% \begin{macrocode} +\tl_new:N \g_scan_marks_tl +% \end{macrocode} +% \end{variable} +% +% \begin{macro}{\scan_new:N} +% \UnitTested +% Check whether the variable is already a scan mark, +% then declare it to be equal to \cs{scan_stop:} globally. +% \begin{macrocode} +\cs_new_protected:Npn \scan_new:N #1 + { + \tl_if_in:NnTF \g_scan_marks_tl { #1 } + { + \msg_kernel_error:nnx { scan } { already-defined } + { \token_to_str:N #1 } + } + { + \tl_gput_right:Nn \g_scan_marks_tl {#1} + \cs_new_eq:NN #1 \scan_stop: + } + } +% \end{macrocode} +% \end{macro} +% +% \begin{variable}{\s_stop} +% \UnitTested +% We only declare one scan mark here, more can be defined +% by specific modules. +% \begin{macrocode} +\scan_new:N \s_stop +% \end{macrocode} +% \end{variable} +% +% \begin{macro}{\use_none_delimit_by_s_stop:w} +% \UnitTested +% Similar to \cs{use_none_delimit_by_q_stop:w}. +% \begin{macrocode} +\cs_new:Npn \use_none_delimit_by_s_stop:w #1 \s_stop { } +% \end{macrocode} +% \end{macro} +% % \begin{macrocode} % % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx index df4beb9ae68..72e6250c070 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 3033 2011-12-07 10:12:21Z joseph $ +\GetIdInfo$Id: l3seq.dtx 3085 2011-12-22 16:29:26Z bruno $ {L3 Experimental sequences and stacks} % %<*driver> @@ -301,10 +301,11 @@ % Tests if the \meta{sequence} is empty (containing no items). % \end{function} % -% \begin{function}[TF]{ -% \seq_if_in:Nn, \seq_if_in:NV, \seq_if_in:Nv, \seq_if_in:No, \seq_if_in:Nx, -% \seq_if_in:cn, \seq_if_in:cV, \seq_if_in:cv, \seq_if_in:co, \seq_if_in:cx -% } +% \begin{function}[TF] +% { +% \seq_if_in:Nn, \seq_if_in:NV, \seq_if_in:Nv, \seq_if_in:No, \seq_if_in:Nx, +% \seq_if_in:cn, \seq_if_in:cV, \seq_if_in:cv, \seq_if_in:co, \seq_if_in:cx +% } % \begin{syntax} % \cs{seq_if_in:NnTF} \meta{sequence} \Arg{item} \Arg{true code} \Arg{false code} % \end{syntax} @@ -632,6 +633,40 @@ % according to the variant chosen. % \end{function} % +% \begin{function}[added = 2011-12-22] +% {\seq_set_filter:NNn, \seq_gset_filter:NNn} +% \begin{syntax} +% \cs{seq_set_filter:NNn} \meta{sequence1} \meta{sequence2} \Arg{inline boolexpr} +% \end{syntax} +% Evaluates the \meta{inline boolexpr} for every \meta{item} stored +% within the \meta{sequence2}. The \meta{inline boolexpr} will +% receive the \meta{item} as |#1|. The sequence of all \meta{items} +% for which the \meta{inline boolexpr} evaluated to \texttt{true} +% is assigned to \meta{sequence1}. +% \begin{texnote} +% Contrarily to other mapping functions, \cs{seq_map_break:} cannot +% be used in this function, and will lead to low-level \TeX{} errors. +% \end{texnote} +% \end{function} +% +% \begin{function}[added = 2011-12-22] +% {\seq_set_map:NNn, \seq_gset_map:NNn} +% \begin{syntax} +% \cs{seq_set_map:NNn} \meta{sequence1} \meta{sequence2} \Arg{inline function} +% \end{syntax} +% Applies \meta{inline function} to every \meta{item} stored +% within the \meta{sequence2}. The \meta{inline function} should +% consist of code which will receive the \meta{item} as |#1|. +% The sequence resulting from \texttt{x}-expanding +% \meta{inline function} applied to each \meta{item} +% is assigned to \meta{sequence1}. As such, the code +% in \meta{inline function} should be expandable. +% \begin{texnote} +% Contrarily to other mapping functions, \cs{seq_map_break:} cannot +% be used in this function, and will lead to low-level \TeX{} errors. +% \end{texnote} +% \end{function} +% % \section{Internal sequence functions} % % \begin{function}{\seq_if_empty_err_break:N} @@ -801,7 +836,6 @@ % \end{macrocode} % \end{macro} % \end{macro} -% % % \begin{macro}{\seq_set_split:Nnn,\seq_gset_split:Nnn} % \begin{macro}[aux]{\seq_set_split_aux:NNnn} @@ -833,7 +867,7 @@ { \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 +\cs_new_protected:Npn \seq_set_split_aux:NNnn #1 #2 #3 #4 { \tl_if_empty:nTF {#3} { #1 #2 { \tl_map_function:nN {#4} \seq_wrap_item:n } } @@ -872,9 +906,9 @@ % \UnitTested % Concatenating sequences is easy. % \begin{macrocode} -\cs_new_protected_nopar:Npn \seq_concat:NNN #1#2#3 +\cs_new_protected:Npn \seq_concat:NNN #1#2#3 { \tl_set:Nx #1 { \exp_not:o {#2} \exp_not:o {#3} } } -\cs_new_protected_nopar:Npn \seq_gconcat:NNN #1#2#3 +\cs_new_protected:Npn \seq_gconcat:NNN #1#2#3 { \tl_gset:Nx #1 { \exp_not:o {#2} \exp_not:o {#3} } } \cs_generate_variant:Nn \seq_concat:NNN { ccc } \cs_generate_variant:Nn \seq_gconcat:NNN { ccc } @@ -1047,10 +1081,11 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}[TF]{ -% \seq_if_in:Nn, \seq_if_in:NV, \seq_if_in:Nv, \seq_if_in:No, \seq_if_in:Nx, -% \seq_if_in:cn, \seq_if_in:cV, \seq_if_in:cv, \seq_if_in:co, \seq_if_in:cx -% } +% \begin{macro}[TF] +% { +% \seq_if_in:Nn, \seq_if_in:NV, \seq_if_in:Nv, \seq_if_in:No, \seq_if_in:Nx, +% \seq_if_in:cn, \seq_if_in:cV, \seq_if_in:cv, \seq_if_in:co, \seq_if_in:cx +% } % \UnitTested % \begin{macro}[aux]{\seq_if_in_aux:} % The approach here is to define \cs{seq_item:n} to compare its @@ -1098,7 +1133,7 @@ % trim off the first item after removing the \cs{seq_item:n} at % the start. % \begin{macrocode} -\cs_new_protected_nopar:Npn \seq_get_left:NN #1#2 +\cs_new_protected:Npn \seq_get_left:NN #1#2 { \seq_if_empty_err_break:N #1 \exp_after:wN \seq_get_left_aux:NnwN #1 \q_stop #2 @@ -1126,7 +1161,7 @@ { \seq_pop_left_aux:NNN \tl_set:Nn } \cs_new_protected_nopar:Npn \seq_gpop_left:NN { \seq_pop_left_aux:NNN \tl_gset:Nn } -\cs_new_protected_nopar:Npn \seq_pop_left_aux:NNN #1#2#3 +\cs_new_protected:Npn \seq_pop_left_aux:NNN #1#2#3 { \seq_if_empty_err_break:N #2 \exp_after:wN \seq_pop_left_aux:NnwNNN #2 \q_stop #1#2#3 @@ -1158,13 +1193,13 @@ % before a tidying-up step takes place to remove the loop and reset the % meaning of \cs{seq_item:n}. % \begin{macrocode} -\cs_new_protected_nopar:Npn \seq_get_right:NN #1#2 +\cs_new_protected:Npn \seq_get_right:NN #1#2 { \seq_if_empty_err_break:N #1 \seq_get_right_aux:NN #1#2 \prg_break_point:n { } } -\cs_new_protected_nopar:Npn \seq_get_right_aux:NN #1#2 +\cs_new_protected:Npn \seq_get_right_aux:NN #1#2 { \seq_push_item_def:n { } \exp_after:wN \exp_after:wN \exp_after:wN \seq_get_right_loop:nn @@ -1210,13 +1245,13 @@ { \seq_pop_right_aux:NNN \tl_set:Nx } \cs_new_protected_nopar:Npn \seq_gpop_right:NN { \seq_pop_right_aux:NNN \tl_gset:Nx } -\cs_new_protected_nopar:Npn \seq_pop_right_aux:NNN #1#2#3 +\cs_new_protected:Npn \seq_pop_right_aux:NNN #1#2#3 { \seq_if_empty_err_break:N #2 \seq_pop_right_aux_ii:NNN #1 #2 #3 \prg_break_point:n { } } -\cs_new_protected_nopar:Npn \seq_pop_right_aux_ii:NNN #1#2#3 +\cs_new_protected:Npn \seq_pop_right_aux_ii:NNN #1#2#3 { \seq_push_item_def:n { \seq_wrap_item:n {##1} } #1 #2 { \if_false: } \fi: @@ -1267,7 +1302,7 @@ % A function to check that sequences really have some content. This % is optimised for speed, hence the direct primitive use. % \begin{macrocode} -\cs_new_protected_nopar:Npn \seq_if_empty_err_break:N #1 +\cs_new_protected:Npn \seq_if_empty_err_break:N #1 { \if_meaning:w #1 \c_empty_tl \msg_kernel_error:nnx { seq } { empty-sequence } { \token_to_str:N #1 } @@ -1445,7 +1480,7 @@ % \UnitTested % Apply the general \cs{msg_aux_show:Nnx}. % \begin{macrocode} -\cs_new_protected_nopar:Npn \seq_show:N #1 +\cs_new_protected:Npn \seq_show:N #1 { \msg_aux_show:Nnx #1 @@ -1462,7 +1497,7 @@ % The name says it all: of the sequence is empty, returns logical % \texttt{false}. % \begin{macrocode} -\cs_new_nopar:Npn \seq_if_empty_break_return_false:N #1 +\cs_new:Npn \seq_if_empty_break_return_false:N #1 { \if_meaning:w #1 \c_empty_tl \prg_return_false: @@ -1580,7 +1615,7 @@ % then the stop code |{ ? \seq_break: } { }| will be used by the auxiliary, % terminating the loop and returning nothing at all. % \begin{macrocode} -\cs_new_nopar:Npn \seq_item:Nn #1#2 +\cs_new:Npn \seq_item:Nn #1#2 { \exp_last_unbraced:Nfo \seq_item_aux:nnn { @@ -1596,7 +1631,7 @@ { } \prg_break_point:n { } } -\cs_new_nopar:Npn \seq_item_aux:nnn #1#2#3 +\cs_new:Npn \seq_item_aux:nnn #1#2#3 { \use_none:n #2 \int_compare:nNnTF {#1} = \c_zero @@ -1611,7 +1646,7 @@ % \begin{macro}{\seq_use:N, \seq_use:c} % A simple short cut for a mapping. % \begin{macrocode} -\cs_new_nopar:Npn \seq_use:N #1 { \seq_map_function:NN #1 \use:n } +\cs_new:Npn \seq_use:N #1 { \seq_map_function:NN #1 \use:n } \cs_generate_variant:Nn \seq_use:N { c } % \end{macrocode} % \end{macro} @@ -1633,7 +1668,7 @@ % avoids needing to find the length of the two sequences, or worrying about % which is longer. % \begin{macrocode} -\cs_new_nopar:Npn \seq_mapthread_function:NNN #1#2#3 +\cs_new:Npn \seq_mapthread_function:NNN #1#2#3 { \exp_after:wN \seq_mapthread_function_aux:NN \exp_after:wN #3 @@ -1642,7 +1677,7 @@ { ? \seq_break: } { } \prg_break_point:n { } } -\cs_new_nopar:Npn \seq_mapthread_function_aux:NN #1#2 +\cs_new:Npn \seq_mapthread_function_aux:NN #1#2 { \exp_after:wN \seq_mapthread_function_aux:Nnnwnn \exp_after:wN #1 @@ -1750,7 +1785,7 @@ { \seq_reverse_aux:NN \tl_set:Nx } \cs_new_protected_nopar:Npn \seq_greverse:N { \seq_reverse_aux:NN \tl_gset:Nx } -\cs_new_protected_nopar:Npn \seq_reverse_aux:NN #1 #2 +\cs_new_protected:Npn \seq_reverse_aux:NN #1 #2 { \cs_set_eq:NN \seq_tmp:w \seq_item:n \cs_set_eq:NN \seq_item:n \seq_reverse_aux_item:nwn @@ -1769,6 +1804,50 @@ % \end{macro} % \end{macro} % +% \begin{macro}{\seq_set_filter:NNn, \seq_gset_filter:NNn} +% \begin{macro}[aux]{\seq_set_filter_aux:NNNn} +% Similar to \cs{seq_map_inline:Nn}, without a +% \cs{prg_break_point:n} because the user's code +% is performed within the evaluation of a boolean expression, +% and skipping out of that would break horribly. +% The \cs{seq_wrap_item:n} function inserts the relevant +% \cs{seq_item:n} without expansion in the input stream, +% hence in the \texttt{x}-expanding assignment. +% \begin{macrocode} +\cs_new_protected_nopar:Npn \seq_set_filter:NNn + { \seq_set_filter_aux:NNNn \tl_set:Nx } +\cs_new_protected_nopar:Npn \seq_gset_filter:NNn + { \seq_set_filter_aux:NNNn \tl_gset:Nx } +\cs_new_protected:Npn \seq_set_filter_aux:NNNn #1#2#3#4 + { + \seq_push_item_def:n { \bool_if:nT {#4} { \seq_wrap_item:n {##1} } } + #1 #2 { #3 \prg_break_point:n { } } + \seq_pop_item_def: + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\seq_set_map:NNn,\seq_gset_map:NNn} +% \begin{macro}[aux]{\seq_set_map_aux:NNNn} +% Very similar to \cs{seq_set_filter:NNn}. We could actually +% merge the two within a single function, but it would have weird +% semantics. +% \begin{macrocode} +\cs_new_protected_nopar:Npn \seq_set_map:NNn + { \seq_set_map_aux:NNNn \tl_set:Nx } +\cs_new_protected_nopar:Npn \seq_gset_map:NNn + { \seq_set_map_aux:NNNn \tl_gset:Nx } +\cs_new_protected:Npn \seq_set_map_aux:NNNn #1#2#3#4 + { + \seq_push_item_def:n { \exp_not:N \seq_item:n {#4} } + #1 #2 { #3 } + \seq_pop_item_def: + } +% \end{macrocode} +% \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/l3skip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx index 3c5f7951b21..419cb6398f6 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3skip.dtx 3029 2011-12-06 22:47:30Z joseph $ +\GetIdInfo$Id: l3skip.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental dimensions and skips} % %<*driver> @@ -157,7 +157,7 @@ % \end{function} % % \section{Utilities for dimension calculations} -% +% % \begin{function}[updated = 2011-10-22, EXP]{\dim_abs:n} % \begin{syntax} % \cs{dim_abs:n} \Arg{dimexpr} @@ -749,7 +749,7 @@ % and place |#2| into the input stream: this is usually an error or % warning message of some sort. % \end{function} -% +% % \section{Internal functions} % % \begin{function}[added = 2011-11-11, EXP] @@ -765,7 +765,7 @@ % result, expressed in big points (\texttt{bp}) or points (\texttt{pt}), % will be left in the input stream with \emph{no units}. If the decimal % part of the magnitude is zero, this will be omitted. -% +% % If the \Arg{dimension expression} contains additional units, these will % be ignored, so for example % \begin{verbatim} @@ -914,7 +914,7 @@ % \end{macro} % % \subsection{Utilities for dimension calculations} -% +% % \begin{macro}{\dim_abs:n} % Similar to the \cs{int_abs:n} function, but here an additional % \meta{dimexpr} is needed as \TeX{} won't simply tidy up an additional @@ -928,7 +928,7 @@ - \fi: \dim_eval:w #1 \dim_eval_end: - \dim_eval_end: + \dim_eval_end: } % \end{macrocode} % \end{macro} @@ -1166,14 +1166,14 @@ { \dim_use:N \dim_eval:w #1 \dim_eval_end: } % \end{macrocode} % \end{macro} -% +% % \begin{macro}[EXP]{\dim_strip_bp:n} % \begin{macrocode} \cs_new:Npn \dim_strip_bp:n #1 { \dim_strip_pt:n { 0.996 26 \dim_eval:w #1 \dim_eval_end: } } % \end{macrocode} % \end{macro} -% +% % \begin{macro}[EXP]{\dim_strip_pt:n} % \begin{macro}[EXP, aux]{\dim_strip_pt:w} % A function which comes up often enough to deserve a place in the kernel. diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx index 1b029fc3611..1424199ecd6 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 3034 2011-12-07 11:40:25Z bruno $ +\GetIdInfo$Id: l3tl.dtx 3091 2011-12-25 16:22:59Z bruno $ {L3 Experimental token lists} % %<*driver> @@ -178,7 +178,6 @@ % \tl_put_left:cn, \tl_put_left:cV, \tl_put_left:co, \tl_put_left:cx, % \tl_gput_left:Nn, \tl_gput_left:NV, \tl_gput_left:No, \tl_gput_left:Nx, % \tl_gput_left:cn, \tl_gput_left:cV, \tl_gput_left:co, \tl_gput_left:cx - % } % \begin{syntax} % \cs{tl_put_left:Nn} \meta{tl~var} \Arg{tokens} @@ -272,7 +271,7 @@ % % \section{Reassigning token list category codes} % -% \begin{function}[updated = 2011-11-20] +% \begin{function}[updated = 2011-12-18] % { % \tl_set_rescan:Nnn, \tl_set_rescan:Nno, \tl_set_rescan:Nnx, % \tl_set_rescan:cnn, \tl_set_rescan:cno, \tl_set_rescan:cnx, @@ -290,7 +289,7 @@ % \cs{tl_rescan:nn}. % \end{function} % -% \begin{function}[updated = 2011-08-11]{\tl_rescan:nn} +% \begin{function}[updated = 2011-12-18]{\tl_rescan:nn} % \begin{syntax} % \cs{tl_rescan:nn} \Arg{setup} \Arg{tokens} % \end{syntax} @@ -355,13 +354,16 @@ % (\emph{i.e.}~contains no tokens at all). % \end{function} % -% \begin{function}[EXP,pTF]{\tl_if_empty:n, \tl_if_empty:V, \tl_if_empty:o} +% \begin{function}[EXP,pTF] +% {\tl_if_empty:n, \tl_if_empty:V, \tl_if_empty:o, \tl_if_empty:x} % \begin{syntax} % \cs{tl_if_empty_p:n} \Arg{token list} % \cs{tl_if_empty:nTF} \Arg{token list} \Arg{true code} \Arg{false code} % \end{syntax} % Tests if the \meta{token list} is entirely empty % (\emph{i.e.}~contains no tokens at all). +% All versions of these functions are fully expandable +% (including those involving an \texttt{x}-type expansion). % \end{function} % % \begin{function}[EXP,pTF] @@ -666,7 +668,6 @@ % Removes any leading and trailing explicit space characters % from the content of the \meta{tl~var}. % \end{function} - % % \section{The first token from a token list} % @@ -1003,7 +1004,7 @@ % Creating new token list variables is a case of checking for an % existing definition and if free doing the definition. % \begin{macrocode} -\cs_new_protected_nopar:Npn \tl_new:N #1 +\cs_new_protected:Npn \tl_new:N #1 { \chk_if_free_cs:N #1 \cs_gset_eq:NN #1 \c_empty_tl @@ -1043,9 +1044,9 @@ % Clearing a token list variable means setting it to an empty value. % Error checking will be sorted out by the parent function. % \begin{macrocode} -\cs_new_protected_nopar:Npn \tl_clear:N #1 +\cs_new_protected:Npn \tl_clear:N #1 { \tl_set_eq:NN #1 \c_empty_tl } -\cs_new_protected_nopar:Npn \tl_gclear:N #1 +\cs_new_protected:Npn \tl_gclear:N #1 { \tl_gset_eq:NN #1 \c_empty_tl } \cs_generate_variant:Nn \tl_clear:N { c } \cs_generate_variant:Nn \tl_gclear:N { c } @@ -1058,9 +1059,9 @@ % Clearing a token list variable means setting it to an empty value. % Error checking will be sorted out by the parent function. % \begin{macrocode} -\cs_new_protected_nopar:Npn \tl_clear_new:N #1 +\cs_new_protected:Npn \tl_clear_new:N #1 { \cs_if_exist:NTF #1 { \tl_clear:N #1 } { \tl_new:N #1 } } -\cs_new_protected_nopar:Npn \tl_gclear_new:N #1 +\cs_new_protected:Npn \tl_gclear_new:N #1 { \cs_if_exist:NTF #1 { \tl_gclear:N #1 } { \tl_new:N #1 } } \cs_generate_variant:Nn \tl_clear_new:N { c } \cs_generate_variant:Nn \tl_gclear_new:N { c } @@ -1227,13 +1228,6 @@ % \end{macrocode} % \end{variable} % -% \begin{variable}{\l_tl_rescan_tl} -% A token list variable to actually store the material being processed. -% \begin{macrocode} -\tl_new:N \l_tl_rescan_tl -% \end{macrocode} -% \end{variable} -% % \begin{macro} % { % \tl_set_rescan:Nnn, \tl_set_rescan:Nno, \tl_set_rescan:Nnx, @@ -1244,6 +1238,7 @@ % \tl_gset_rescan:Nnn, \tl_gset_rescan:Nno, \tl_gset_rescan:Nnx, % \tl_gset_rescan:cnn, \tl_gset_rescan:cno, \tl_gset_rescan:cnx % } +% \begin{macro}{\tl_rescan:nn} % \begin{macro}[aux]{\tl_set_rescan_aux:NNnn} % \begin{macro}[aux]{\tl_rescan_aux:w} % The idea here is to deal cleanly with the problem that @@ -1267,23 +1262,31 @@ { \tl_set_rescan_aux:NNnn \tl_set:Nn } \cs_new_protected_nopar:Npn \tl_gset_rescan:Nnn { \tl_set_rescan_aux:NNnn \tl_gset:Nn } +\cs_new_protected_nopar:Npn \tl_rescan:nn + { \tl_set_rescan_aux:NNnn \prg_do_nothing: \use:n } \cs_new_protected:Npn \tl_set_rescan_aux:NNnn #1#2#3#4 { \group_begin: - \exp_args:No \etex_everyeof:D { \c_tl_rescan_marker_tl } + \exp_args:No \etex_everyeof:D { \c_tl_rescan_marker_tl \exp_not:N } \tex_endlinechar:D \c_minus_one \tex_newlinechar:D \c_minus_one #3 - \tl_clear:N \l_tl_rescan_tl - \exp_after:wN \tl_rescan_aux:w \etex_scantokens:D {#4} - \exp_args:NNNo \group_end: - #1 #2 \l_tl_rescan_tl + \use:x + { + \group_end: + #1 \exp_not:N #2 + { + \exp_after:wN \tl_rescan_aux:w + \exp_after:wN \prg_do_nothing: + \etex_scantokens:D {#4} + } + } } \use:x { - \cs_new_protected:Npn \exp_not:N \tl_rescan_aux:w ##1 + \cs_new:Npn \exp_not:N \tl_rescan_aux:w ##1 \c_tl_rescan_marker_tl - { \tl_set:Nn \exp_not:N \l_tl_rescan_tl {##1} } + { \exp_not:N \exp_not:o { ##1 } } } \cs_generate_variant:Nn \tl_set_rescan:Nnn { Nno , Nnx } \cs_generate_variant:Nn \tl_set_rescan:Nnn { c , cno , cnx } @@ -1294,22 +1297,6 @@ % \end{macro} % \end{macro} % \end{macro} -% -% \begin{macro}{\tl_rescan:nn} -% The same idea is also applied to in line token lists. -% \begin{macrocode} -\cs_new_protected:Npn \tl_rescan:nn #1#2 - { - \group_begin: - \exp_args:No \etex_everyeof:D { \c_tl_rescan_marker_tl } - \tex_endlinechar:D \c_minus_one - \tex_newlinechar:D \c_minus_one - #1 - \exp_after:wN \tl_rescan_aux:w \etex_scantokens:D {#2} - \exp_args:No \group_end: - \l_tl_rescan_tl - } -% \end{macrocode} % \end{macro} % % \subsection{Reassigning token list character codes} @@ -1386,6 +1373,7 @@ { \tl_to_str:n {#5} } } { + \group_align_safe_begin: \cs_set:Npx \tl_tmp:w ##1##2 #4 { ##2 @@ -1394,6 +1382,7 @@ \exp_not:n { \exp_not:n {#5} } ##1 } + \group_align_safe_end: #2 #3 { \exp_after:wN #1 @@ -1441,9 +1430,9 @@ % \begin{macro}{\tl_gremove_once:Nn, \tl_gremove_once:cn} % Removal is just a special case of replacement. % \begin{macrocode} -\cs_new_protected_nopar:Npn \tl_remove_once:Nn #1#2 +\cs_new_protected:Npn \tl_remove_once:Nn #1#2 { \tl_replace_once:Nnn #1 {#2} { } } -\cs_new_protected_nopar:Npn \tl_gremove_once:Nn #1#2 +\cs_new_protected:Npn \tl_gremove_once:Nn #1#2 { \tl_greplace_once:Nnn #1 {#2} { } } \cs_generate_variant:Nn \tl_remove_once:Nn { c } \cs_generate_variant:Nn \tl_gremove_once:Nn { c } @@ -1455,9 +1444,9 @@ % \begin{macro}{\tl_gremove_all:Nn, \tl_gremove_all:cn} % Removal is just a special case of replacement. % \begin{macrocode} -\cs_new_protected_nopar:Npn \tl_remove_all:Nn #1#2 +\cs_new_protected:Npn \tl_remove_all:Nn #1#2 { \tl_replace_all:Nnn #1 {#2} { } } -\cs_new_protected_nopar:Npn \tl_gremove_all:Nn #1#2 +\cs_new_protected:Npn \tl_gremove_all:Nn #1#2 { \tl_greplace_all:Nnn #1 {#2} { } } \cs_generate_variant:Nn \tl_remove_all:Nn { c } \cs_generate_variant:Nn \tl_gremove_all:Nn { c } @@ -1754,7 +1743,7 @@ % These functions return the replacement text of a token list as a % string. % \begin{macrocode} -\cs_new_nopar:Npn \tl_to_str:N #1 { \etex_detokenize:D \exp_after:wN {#1} } +\cs_new:Npn \tl_to_str:N #1 { \etex_detokenize:D \exp_after:wN {#1} } \cs_generate_variant:Nn \tl_to_str:N { c } % \end{macrocode} % \end{macro} @@ -1764,7 +1753,7 @@ % error here. No such luck for ones equal to \cs{scan_stop:} so % instead a test is made and if there is an issue an error is forced. % \begin{macrocode} -\cs_new_nopar:Npn \tl_use:N #1 +\cs_new:Npn \tl_use:N #1 { \cs_if_exist:NTF #1 {#1} { \msg_expandable_kernel_error:nnn { kernel } { bad-var } {#1} } @@ -1789,7 +1778,7 @@ \int_eval:n { 0 \tl_map_function:nN {#1} \tl_length_aux:n } } -\cs_new_nopar:Npn \tl_length:N #1 +\cs_new:Npn \tl_length:N #1 { \int_eval:n { 0 \tl_map_function:NN #1 \tl_length_aux:n } @@ -1935,6 +1924,7 @@ % % \begin{macro}{\str_head:n, \str_tail:n} % \begin{macro}[aux]{\str_head_aux:w} +% \begin{macro}[aux]{\str_tail_aux:w} % After \cs{tl_to_str:n}, we have a list of character tokens, % all with category code 12, except the space, which has category % code 10. Directly using \cs{tl_head:w} would thus lose leading spaces. @@ -1962,7 +1952,7 @@ \tl_to_str:n {#1} { { } } ~ \q_stop } -\cs_new_nopar:Npn \str_head_aux:w #1 ~ % +\cs_new:Npn \str_head_aux:w #1 ~ % { \tl_head:w #1 { ~ } } \cs_new:Npn \str_tail:n #1 { @@ -1970,10 +1960,11 @@ \reverse_if:N \if_charcode:w \scan_stop: \tl_to_str:n {#1} X X \q_stop } -\cs_new_nopar:Npn \str_tail_aux:w #1 X #2 \q_stop { \fi: #1 } +\cs_new:Npn \str_tail_aux:w #1 X #2 \q_stop { \fi: #1 } % \end{macrocode} % \end{macro} % \end{macro} +% \end{macro} % % \begin{macro}[pTF]{\tl_if_head_eq_meaning:nN} % \begin{macro}[pTF]{\tl_if_head_eq_charcode:nN} @@ -2096,7 +2087,11 @@ % an empty argument, whose head is not \enquote{normal}. % \begin{macrocode} \prg_new_conditional:Npnn \tl_if_head_N_type:n #1 { p , T , F , TF } - { \str_if_eq_return:on { \use:n #1 { } } { #1 { } } } + { + \str_if_eq_return:xx + { \exp_not:o { \use:n #1 { } } } + { \exp_not:n { #1 { } } } + } % \end{macrocode} % \end{macro} % @@ -2227,17 +2222,15 @@ % % \subsection{Experimental functions} % -% \begin{macro}[EXP,pTF]{\str_if_eq_return:on} +% \begin{macro}[EXP]{\str_if_eq_return:xx} % It turns out that we often need to compare a token list % with the result of applying some function to it, and % return with \cs{prg_return_true/false:}. This test is % similar to \cs{str_if_eq:nnTF}, but hard-coded for speed. % \begin{macrocode} -\cs_new:Npn \str_if_eq_return:on #1 #2 +\cs_new:Npn \str_if_eq_return:xx #1 #2 { - \if_int_compare:w - \pdftex_strcmp:D { \exp_not:o {#1} } { \exp_not:n {#2} } - = \c_zero + \if_int_compare:w \pdftex_strcmp:D {#1} {#2} = \c_zero \prg_return_true: \else: \prg_return_false: @@ -2266,7 +2259,7 @@ % trailing spaces. % \begin{macrocode} \prg_new_conditional:Npnn \tl_if_single:n #1 { p , T , F , TF } - { \str_if_eq_return:on { \use_none:nn #1 ?? } {?} } + { \str_if_eq_return:xx { \exp_not:o { \use_none:nn #1 ?? } } {?} } % \end{macrocode} % \end{macro} % @@ -2280,8 +2273,8 @@ \prg_new_conditional:Npnn \tl_if_single_token:n #1 { p , T , F , TF } { \tl_if_head_N_type:nTF {#1} - { \str_if_eq_return:on { \use_none:n #1 } { } } - { \str_if_eq_return:on { ~ } { #1 } } + { \str_if_eq_return:xx { \exp_not:o { \use_none:n #1 } } { } } + { \str_if_eq_return:xx { \exp_not:n {#1} } { ~ } } } % \end{macrocode} % \end{macro} @@ -2311,6 +2304,7 @@ \cs_new:Npn \tl_act:NNNnn { \tex_romannumeral:D \tl_act_aux:NNNnn } \cs_new:Npn \tl_act_aux:NNNnn #1 #2 #3 #4 #5 { + \group_align_safe_begin: \tl_act_loop:w #5 \q_tl_act_mark \q_tl_act_stop {#4} #1 #2 #3 \tl_act_result:n { } @@ -2348,7 +2342,8 @@ \tl_act_loop:w #2 \q_tl_act_stop {#3} #4 } -\cs_new:Npn \tl_act_end:wn #1 \tl_act_result:n #2 { \c_zero #2 } +\cs_new:Npn \tl_act_end:wn #1 \tl_act_result:n #2 + { \group_align_safe_end: \c_zero #2 } \cs_new:Npn \tl_act_group:nwnNNN #1 #2 \q_tl_act_stop #3#4#5 { #5 {#3} {#1} @@ -2451,9 +2446,9 @@ % This reverses the list, leaving \cs{exp_stop_f:} in front, % which stops the \texttt{f}-expansion. % \begin{macrocode} -\cs_new_protected_nopar:Npn \tl_reverse:N #1 +\cs_new_protected:Npn \tl_reverse:N #1 { \tl_set:Nf #1 { \tl_reverse:o { #1 \exp_stop_f: } } } -\cs_new_protected_nopar:Npn \tl_greverse:N #1 +\cs_new_protected:Npn \tl_greverse:N #1 { \tl_gset:Nf #1 { \tl_reverse:o { #1 \exp_stop_f: } } } \cs_generate_variant:Nn \tl_reverse:N { c } \cs_generate_variant:Nn \tl_greverse:N { c } @@ -2573,7 +2568,7 @@ \q_recursion_tail \prg_break_point:n { } } -\cs_new_nopar:Npn \tl_item_aux:nn #1#2 +\cs_new:Npn \tl_item_aux:nn #1#2 { \quark_if_recursion_tail_break:n {#2} \int_compare:nNnTF {#1} = \c_zero @@ -2586,6 +2581,17 @@ % \end{macro} % \end{macro} % +% \begin{macro}[pTF]{\tl_if_empty:x} +% We can test expandably the emptyness of an expanded token list +% thanks to the primitive \tn{pdfstrcmp} which expands its argument: +% a token list is empty if and only if its string representation is +% empty. +% \begin{macrocode} +\prg_new_conditional:Npnn \tl_if_empty:x #1 { p , T , F , TF } + { \str_if_eq_return:xx { } {#1} } +% \end{macrocode} +% \end{macro} +% % \subsection{Deprecated functions} % % \begin{macro}{\tl_new:Nn, \tl_new:cn, \tl_new:Nx} @@ -2610,7 +2616,7 @@ %<*deprecated> \cs_new_protected_nopar:Npn \tl_gset:Nc { \tex_global:D \tl_set:Nc } -\cs_new_protected_nopar:Npn \tl_set:Nc #1#2 +\cs_new_protected:Npn \tl_set:Nc #1#2 { \tl_set:No #1 { \cs:w #2 \cs_end: } } % % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx index a3737fd0c74..2dcccabbb4e 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 2931 2011-10-22 13:48:28Z bruno $ +\GetIdInfo$Id: l3token.dtx 3099 2011-12-27 21:41:02Z joseph $ {L3 Experimental token manipulation} % %<*driver> @@ -910,44 +910,56 @@ % % \section{Experimental token functions} % -% \begin{function}{\char_active_set:Npn, \char_active_set:Npx} +% \begin{function}[added = 2011-12-27] +% {\char_set_active:Npn, \char_set_active:Npx} % \begin{syntax} -% \cs{char_active_set:Npn} \meta{char} \meta{parameters} \Arg{code} +% \cs{char_set_active:Npn} \meta{char} \meta{parameters} \Arg{code} % \end{syntax} % Makes \meta{char} an active character to expand to \meta{code} as % replacement text. % Within the \meta{code}, the \meta{parameters} (|#1|, |#2|, -% \emph{etc.}) will be replaced by those absorbed -% This definition is local to the current \TeX{} group. +% \emph{etc.}) will be replaced by those absorbed. The \meta{char} is +% made active within the current \TeX{} group level, and the definition +% is also local. % \end{function} -% -% \begin{function}{\char_active_gset:Npn, \char_active_gset:Npx} +% +% \begin{function}[added = 2011-12-27] +% {\char_gset_active:Npn, \char_gset_active:Npx} % \begin{syntax} -% \cs{char_active_gset:Npn} \meta{char} \meta{parameters} \Arg{code} +% \cs{char_gset_active:Npn} \meta{char} \meta{parameters} \Arg{code} % \end{syntax} % Makes \meta{char} an active character to expand to \meta{code} as % replacement text. % Within the \meta{code}, the \meta{parameters} (|#1|, |#2|, -% \emph{etc.}) will be replaced by those absorbed -% This definition is global. +% \emph{etc.}) will be replaced by those absorbed. The \meta{char} is +% made active within the current \TeX{} group level, but the definition +% is global. This function is therefore suited to cases where an active +% character definition should be applied only in some context (where the +% \meta{char} is again made active). % \end{function} % -% \begin{function}{\char_active_set_eq:NN} +% \begin{function}[added = 2011-12-27] +% {\char_set_active_eq:NN} % \begin{syntax} -% \cs{char_active_set_eq:NN} \meta{char} \meta{function} +% \cs{char_set_active_eq:NN} \meta{char} \meta{function} % \end{syntax} % Makes \meta{char} an active character equivalent in meaning to the -% \meta{fiucntion} (which may itself be an active character). This -% definition is local to the current \TeX{} group. +% \meta{function} (which may itself be an active character). The \meta{char} +% is made active within the current \TeX{} group level, and the definition +% is also local. % \end{function} -% -% \begin{function}{\char_active_gset_eq:NN} +% +% \begin{function}[added = 2011-12-27] +% {\char_gset_active_eq:NN} % \begin{syntax} -% \cs{char_active_gset_eq:NN} \meta{char} \meta{function} +% \cs{char_gset_active_eq:NN} \meta{char} \meta{function} % \end{syntax} % Makes \meta{char} an active character equivalent in meaning to the -% \meta{fiucntion} (which may itself be an active character). This -% definition is global. +% \meta{function} (which may itself be an active character). The \meta{char} +% is made active within the current \TeX{} group level, but the definition +% is global. This function is therefore suited to cases where an active +% character definition should be applied only in some context (where the +% \meta{char} is again made active). % \end{function} % % \begin{function}[added = 2011-08-14,TF]{\peek_N_type:} @@ -994,11 +1006,11 @@ % \begin{macro}{\char_show_value_catcode:n} % Category code changes. % \begin{macrocode} -\cs_new_protected_nopar:Npn \char_set_catcode:nn #1#2 +\cs_new_protected:Npn \char_set_catcode:nn #1#2 { \tex_catcode:D #1 = \int_eval:w #2 \int_eval_end: } -\cs_new_nopar:Npn \char_value_catcode:n #1 +\cs_new:Npn \char_value_catcode:n #1 { \tex_the:D \tex_catcode:D \int_eval:w #1\int_eval_end: } -\cs_new_nopar:Npn \char_show_value_catcode:n #1 +\cs_new_protected:Npn \char_show_value_catcode:n #1 { \tex_showthe:D \tex_catcode:D \int_eval:w #1 \int_eval_end: } % \end{macrocode} % \end{macro} @@ -1025,37 +1037,37 @@ % \char_set_catcode_invalid:N % } % \begin{macrocode} -\cs_new_protected_nopar:Npn \char_set_catcode_escape:N #1 +\cs_new_protected:Npn \char_set_catcode_escape:N #1 { \char_set_catcode:nn { `#1 } \c_zero } -\cs_new_protected_nopar:Npn \char_set_catcode_group_begin:N #1 +\cs_new_protected:Npn \char_set_catcode_group_begin:N #1 { \char_set_catcode:nn { `#1 } \c_one } -\cs_new_protected_nopar:Npn \char_set_catcode_group_end:N #1 +\cs_new_protected:Npn \char_set_catcode_group_end:N #1 { \char_set_catcode:nn { `#1 } \c_two } -\cs_new_protected_nopar:Npn \char_set_catcode_math_toggle:N #1 +\cs_new_protected:Npn \char_set_catcode_math_toggle:N #1 { \char_set_catcode:nn { `#1 } \c_three } -\cs_new_protected_nopar:Npn \char_set_catcode_alignment:N #1 +\cs_new_protected:Npn \char_set_catcode_alignment:N #1 { \char_set_catcode:nn { `#1 } \c_four } -\cs_new_protected_nopar:Npn \char_set_catcode_end_line:N #1 +\cs_new_protected:Npn \char_set_catcode_end_line:N #1 { \char_set_catcode:nn { `#1 } \c_five } -\cs_new_protected_nopar:Npn \char_set_catcode_parameter:N #1 +\cs_new_protected:Npn \char_set_catcode_parameter:N #1 { \char_set_catcode:nn { `#1 } \c_six } -\cs_new_protected_nopar:Npn \char_set_catcode_math_superscript:N #1 +\cs_new_protected:Npn \char_set_catcode_math_superscript:N #1 { \char_set_catcode:nn { `#1 } \c_seven } -\cs_new_protected_nopar:Npn \char_set_catcode_math_subscript:N #1 +\cs_new_protected:Npn \char_set_catcode_math_subscript:N #1 { \char_set_catcode:nn { `#1 } \c_eight } -\cs_new_protected_nopar:Npn \char_set_catcode_ignore:N #1 +\cs_new_protected:Npn \char_set_catcode_ignore:N #1 { \char_set_catcode:nn { `#1 } \c_nine } -\cs_new_protected_nopar:Npn \char_set_catcode_space:N #1 +\cs_new_protected:Npn \char_set_catcode_space:N #1 { \char_set_catcode:nn { `#1 } \c_ten } -\cs_new_protected_nopar:Npn \char_set_catcode_letter:N #1 +\cs_new_protected:Npn \char_set_catcode_letter:N #1 { \char_set_catcode:nn { `#1 } \c_eleven } -\cs_new_protected_nopar:Npn \char_set_catcode_other:N #1 +\cs_new_protected:Npn \char_set_catcode_other:N #1 { \char_set_catcode:nn { `#1 } \c_twelve } -\cs_new_protected_nopar:Npn \char_set_catcode_active:N #1 +\cs_new_protected:Npn \char_set_catcode_active:N #1 { \char_set_catcode:nn { `#1 } \c_thirteen } -\cs_new_protected_nopar:Npn \char_set_catcode_comment:N #1 +\cs_new_protected:Npn \char_set_catcode_comment:N #1 { \char_set_catcode:nn { `#1 } \c_fourteen } -\cs_new_protected_nopar:Npn \char_set_catcode_invalid:N #1 +\cs_new_protected:Npn \char_set_catcode_invalid:N #1 { \char_set_catcode:nn { `#1 } \c_fifteen } % \end{macrocode} % \end{macro} @@ -1080,37 +1092,37 @@ % \char_set_catcode_invalid:n % } % \begin{macrocode} -\cs_new_protected_nopar:Npn \char_set_catcode_escape:n #1 +\cs_new_protected:Npn \char_set_catcode_escape:n #1 { \char_set_catcode:nn {#1} \c_zero } -\cs_new_protected_nopar:Npn \char_set_catcode_group_begin:n #1 +\cs_new_protected:Npn \char_set_catcode_group_begin:n #1 { \char_set_catcode:nn {#1} \c_one } -\cs_new_protected_nopar:Npn \char_set_catcode_group_end:n #1 +\cs_new_protected:Npn \char_set_catcode_group_end:n #1 { \char_set_catcode:nn {#1} \c_two } -\cs_new_protected_nopar:Npn \char_set_catcode_math_toggle:n #1 +\cs_new_protected:Npn \char_set_catcode_math_toggle:n #1 { \char_set_catcode:nn {#1} \c_three } -\cs_new_protected_nopar:Npn \char_set_catcode_alignment:n #1 +\cs_new_protected:Npn \char_set_catcode_alignment:n #1 { \char_set_catcode:nn {#1} \c_four } -\cs_new_protected_nopar:Npn \char_set_catcode_end_line:n #1 +\cs_new_protected:Npn \char_set_catcode_end_line:n #1 { \char_set_catcode:nn {#1} \c_five } -\cs_new_protected_nopar:Npn \char_set_catcode_parameter:n #1 +\cs_new_protected:Npn \char_set_catcode_parameter:n #1 { \char_set_catcode:nn {#1} \c_six } -\cs_new_protected_nopar:Npn \char_set_catcode_math_superscript:n #1 +\cs_new_protected:Npn \char_set_catcode_math_superscript:n #1 { \char_set_catcode:nn {#1} \c_seven } -\cs_new_protected_nopar:Npn \char_set_catcode_math_subscript:n #1 +\cs_new_protected:Npn \char_set_catcode_math_subscript:n #1 { \char_set_catcode:nn {#1} \c_eight } -\cs_new_protected_nopar:Npn \char_set_catcode_ignore:n #1 +\cs_new_protected:Npn \char_set_catcode_ignore:n #1 { \char_set_catcode:nn {#1} \c_nine } -\cs_new_protected_nopar:Npn \char_set_catcode_space:n #1 +\cs_new_protected:Npn \char_set_catcode_space:n #1 { \char_set_catcode:nn {#1} \c_ten } -\cs_new_protected_nopar:Npn \char_set_catcode_letter:n #1 +\cs_new_protected:Npn \char_set_catcode_letter:n #1 { \char_set_catcode:nn {#1} \c_eleven } -\cs_new_protected_nopar:Npn \char_set_catcode_other:n #1 +\cs_new_protected:Npn \char_set_catcode_other:n #1 { \char_set_catcode:nn {#1} \c_twelve } -\cs_new_protected_nopar:Npn \char_set_catcode_active:n #1 +\cs_new_protected:Npn \char_set_catcode_active:n #1 { \char_set_catcode:nn {#1} \c_thirteen } -\cs_new_protected_nopar:Npn \char_set_catcode_comment:n #1 +\cs_new_protected:Npn \char_set_catcode_comment:n #1 { \char_set_catcode:nn {#1} \c_fourteen } -\cs_new_protected_nopar:Npn \char_set_catcode_invalid:n #1 +\cs_new_protected:Npn \char_set_catcode_invalid:n #1 { \char_set_catcode:nn {#1} \c_fifteen } % \end{macrocode} % \end{macro} @@ -1129,29 +1141,29 @@ % \begin{macro}{\char_show_value_sfcode:n} % Pretty repetitive, but necessary! % \begin{macrocode} -\cs_new_protected_nopar:Npn \char_set_mathcode:nn #1#2 +\cs_new_protected:Npn \char_set_mathcode:nn #1#2 { \tex_mathcode:D #1 = \int_eval:w #2 \int_eval_end: } -\cs_new_nopar:Npn \char_value_mathcode:n #1 +\cs_new:Npn \char_value_mathcode:n #1 { \tex_the:D \tex_mathcode:D \int_eval:w #1\int_eval_end: } -\cs_new_nopar:Npn \char_show_value_mathcode:n #1 +\cs_new_protected:Npn \char_show_value_mathcode:n #1 { \tex_showthe:D \tex_mathcode:D \int_eval:w #1 \int_eval_end: } -\cs_new_protected_nopar:Npn \char_set_lccode:nn #1#2 +\cs_new_protected:Npn \char_set_lccode:nn #1#2 { \tex_lccode:D #1 = \int_eval:w #2 \int_eval_end: } -\cs_new_nopar:Npn \char_value_lccode:n #1 +\cs_new:Npn \char_value_lccode:n #1 { \tex_the:D \tex_lccode:D \int_eval:w #1\int_eval_end: } -\cs_new_nopar:Npn \char_show_value_lccode:n #1 +\cs_new_protected:Npn \char_show_value_lccode:n #1 { \tex_showthe:D \tex_lccode:D \int_eval:w #1 \int_eval_end: } -\cs_new_protected_nopar:Npn \char_set_uccode:nn #1#2 +\cs_new_protected:Npn \char_set_uccode:nn #1#2 { \tex_uccode:D #1 = \int_eval:w #2 \int_eval_end: } -\cs_new_nopar:Npn \char_value_uccode:n #1 +\cs_new:Npn \char_value_uccode:n #1 { \tex_the:D \tex_uccode:D \int_eval:w #1\int_eval_end: } -\cs_new_nopar:Npn \char_show_value_uccode:n #1 +\cs_new_protected:Npn \char_show_value_uccode:n #1 { \tex_showthe:D \tex_uccode:D \int_eval:w #1 \int_eval_end: } -\cs_new_protected_nopar:Npn \char_set_sfcode:nn #1#2 +\cs_new_protected:Npn \char_set_sfcode:nn #1#2 { \tex_sfcode:D #1 = \int_eval:w #2 \int_eval_end: } -\cs_new_nopar:Npn \char_value_sfcode:n #1 +\cs_new:Npn \char_value_sfcode:n #1 { \tex_the:D \tex_sfcode:D \int_eval:w #1\int_eval_end: } -\cs_new_nopar:Npn \char_show_value_sfcode:n #1 +\cs_new_protected:Npn \char_show_value_sfcode:n #1 { \tex_showthe:D \tex_sfcode:D \int_eval:w #1 \int_eval_end: } % \end{macrocode} % \end{macro} @@ -1172,7 +1184,7 @@ % \begin{macro}{\token_new:Nn} % Creates a new token. % \begin{macrocode} -\cs_new_protected_nopar:Npn \token_new:Nn #1#2 { \cs_new_eq:NN #1 #2 } +\cs_new_protected:Npn \token_new:Nn #1#2 { \cs_new_eq:NN #1 #2 } % \end{macrocode} % \end{macro} % @@ -1438,7 +1450,7 @@ \exp_after:wN \token_if_macro_p_aux:w \token_to_meaning:N #1 MA; \q_stop } - \cs_new_nopar:Npn \token_if_macro_p_aux:w #1 MA #2 ; #3 \q_stop + \cs_new:Npn \token_if_macro_p_aux:w #1 MA #2 ; #3 \q_stop { \if_int_compare:w \pdftex_strcmp:D { #2 } { cro } = \c_zero \prg_return_true: @@ -1529,7 +1541,7 @@ \exp_after:wN \token_if_chardef_aux:w \token_to_meaning:N #1 ?CHAR" \q_stop } - \cs_new_nopar:Npn \token_if_chardef_aux:w #1 ?CHAR" #2 \q_stop + \cs_new:Npn \token_if_chardef_aux:w #1 ?CHAR" #2 \q_stop { \tl_if_empty:nTF {#1} { \prg_return_true: } { \prg_return_false: } } % \end{macrocode} % @@ -1539,7 +1551,7 @@ \exp_after:wN \token_if_mathchardef_aux:w \token_to_meaning:N #1 ?MAYHCHAR" \q_stop } - \cs_new_nopar:Npn \token_if_mathchardef_aux:w #1 ?MAYHCHAR" #2 \q_stop + \cs_new:Npn \token_if_mathchardef_aux:w #1 ?MAYHCHAR" #2 \q_stop { \tl_if_empty:nTF {#1} { \prg_return_true: } { \prg_return_false: } } % \end{macrocode} % Integer registers are a little more difficult since they expand to @@ -1555,7 +1567,7 @@ \token_to_meaning:N #1 ?COUXY \q_stop \fi: } - \cs_new_nopar:Npn \token_if_int_register_aux:w #1 ?COUXY #2 \q_stop + \cs_new:Npn \token_if_int_register_aux:w #1 ?COUXY #2 \q_stop { \tl_if_empty:nTF {#1} { \prg_return_true: } { \prg_return_false: } } % \end{macrocode} % Skip registers are done the same way as the integer registers. @@ -1569,7 +1581,7 @@ \token_to_meaning:N #1?SKIP\q_stop \fi: } - \cs_new_nopar:Npn \token_if_skip_register_aux:w #1 ?SKIP #2 \q_stop + \cs_new:Npn \token_if_skip_register_aux:w #1 ?SKIP #2 \q_stop { \tl_if_empty:nTF {#1} { \prg_return_true: } { \prg_return_false: } } % \end{macrocode} % Dim registers. No news here @@ -1583,7 +1595,7 @@ \token_to_meaning:N #1 ?ZIMEX \q_stop \fi: } - \cs_new_nopar:Npn \token_if_dim_register_aux:w #1 ?ZIMEX #2 \q_stop + \cs_new:Npn \token_if_dim_register_aux:w #1 ?ZIMEX #2 \q_stop { \tl_if_empty:nTF {#1} { \prg_return_true: } { \prg_return_false: } } % \end{macrocode} % Toks registers. @@ -1597,7 +1609,7 @@ \token_to_meaning:N #1 ?YOKS \q_stop \fi: } - \cs_new_nopar:Npn \token_if_toks_register_aux:w #1 ?YOKS #2 \q_stop + \cs_new:Npn \token_if_toks_register_aux:w #1 ?YOKS #2 \q_stop { \tl_if_empty:nTF {#1} { \prg_return_true: } { \prg_return_false: } } % \end{macrocode} % Protected macros. @@ -1608,7 +1620,7 @@ \exp_after:wN \token_if_protected_macro_aux:w \token_to_meaning:N #1 ?PROYECYEZ~MACRO \q_stop } - \cs_new_nopar:Npn \token_if_protected_macro_aux:w + \cs_new:Npn \token_if_protected_macro_aux:w #1 ?PROYECYEZ~MACRO #2 \q_stop { \tl_if_empty:nTF {#1} { \prg_return_true: } { \prg_return_false: } } % \end{macrocode} @@ -1619,7 +1631,7 @@ \exp_after:wN \token_if_long_macro_aux:w \token_to_meaning:N #1 ?LOXG~MACRO \q_stop } - \cs_new_nopar:Npn \token_if_long_macro_aux:w #1 ?LOXG~MACRO #2 \q_stop + \cs_new:Npn \token_if_long_macro_aux:w #1 ?LOXG~MACRO #2 \q_stop { \tl_if_empty:nTF {#1} { \prg_return_true: } { \prg_return_false: } } % \end{macrocode} % Finally protected long macros where we for once don't have to add an @@ -1631,7 +1643,7 @@ \exp_after:wN \token_if_protected_long_macro_aux:w \token_to_meaning:N #1 ?PROYECYEZ?LOXG~MACRO \q_stop } - \cs_new_nopar:Npn \token_if_protected_long_macro_aux:w + \cs_new:Npn \token_if_protected_long_macro_aux:w #1 ?PROYECYEZ?LOXG~MACRO #2 \q_stop { \tl_if_empty:nTF {#1} { \prg_return_true: } { \prg_return_false: } } % \end{macrocode} @@ -1711,14 +1723,14 @@ \token_to_meaning:N #1 ; ; ; \q_stop #1 } } - \cs_new_nopar:Npn \token_if_primitive_aux:NNw #1#2 #3 ; #4 \q_stop + \cs_new:Npn \token_if_primitive_aux:NNw #1#2 #3 ; #4 \q_stop { \tl_if_empty:oTF { \token_if_primitive_aux_space:w #3 ~ } { \token_if_primitive_aux_loop:N #3 ; \q_stop } { \token_if_primitive_aux_nullfont:N } } } -\cs_new_nopar:Npn \token_if_primitive_aux_space:w #1 ~ { } +\cs_new:Npn \token_if_primitive_aux_space:w #1 ~ { } \cs_new:Npn \token_if_primitive_aux_nullfont:N #1 { \if_meaning:w \tex_nullfont:D #1 @@ -1727,7 +1739,7 @@ \prg_return_false: \fi: } -\cs_new_nopar:Npn \token_if_primitive_aux_loop:N #1 +\cs_new:Npn \token_if_primitive_aux_loop:N #1 { \if_num:w `#1 < \c_token_A_int % \exp_after:wN \token_if_primitive_auxii:Nw @@ -1736,7 +1748,7 @@ \exp_after:wN \token_if_primitive_aux_loop:N \fi: } -\cs_new_nopar:Npn \token_if_primitive_auxii:Nw #1 #2 \q_stop +\cs_new:Npn \token_if_primitive_auxii:Nw #1 #2 \q_stop { \if:w : #1 \exp_after:wN \token_if_primitive_aux_undefined:N @@ -1792,7 +1804,7 @@ % The token to search for as an explicit token: % \emph{cf.}~\cs{l_peek_search_token}. % \begin{macrocode} -\cs_new_nopar:Npn \l_peek_search_tl { } +\tl_new:N \l_peek_search_tl % \end{macrocode} % \end{variable} % @@ -1973,13 +1985,13 @@ % things are a bit complicated. % \begin{macrocode} \group_begin: - \cs_set_nopar:Npn \peek_def:nnnn #1#2#3#4 + \cs_set:Npn \peek_def:nnnn #1#2#3#4 { \peek_def_aux:nnnnn {#1} {#2} {#3} {#4} { TF } \peek_def_aux:nnnnn {#1} {#2} {#3} {#4} { T } \peek_def_aux:nnnnn {#1} {#2} {#3} {#4} { F } } - \cs_set_nopar:Npn \peek_def_aux:nnnnn #1#2#3#4#5 + \cs_set:Npn \peek_def_aux:nnnnn #1#2#3#4#5 { \cs_gset_nopar:cpx { #1 #5 } { @@ -2088,7 +2100,7 @@ % returned instead. % \begin{macrocode} \exp_args:Nno \use:nn - { \cs_new_nopar:Npn \token_get_prefix_arg_replacement_aux:wN #1 } + { \cs_new:Npn \token_get_prefix_arg_replacement_aux:wN #1 } { \tl_to_str:n { macro : } #2 -> #3 \q_stop #4 } { #4 {#1} {#2} {#3} } \cs_new:Npn \token_get_prefix_spec:N #1 @@ -2126,9 +2138,9 @@ % % \subsection{Experimental token functions} % -% \begin{macro}{\char_active_set:Npn,\char_active_set:Npx} -% \begin{macro}{\char_active_set:Npn,\char_active_set:Npx} -% \begin{macro}{\char_active_set_eq:NN,\char_active_gset_eq:NN} +% \begin{macro}{\char_set_active:Npn,\char_set_active:Npx} +% \begin{macro}{\char_set_active:Npn,\char_set_active:Npx} +% \begin{macro}{\char_set_active_eq:NN,\char_gset_active_eq:NN} % \begin{macrocode} \group_begin: \char_set_catcode_active:N \^^@ @@ -2142,12 +2154,12 @@ \tl_to_lowercase:n { \group_end: #2 ^^@ } } } - \char_tmp:NN \char_active_set:Npn \cs_set:Npn - \char_tmp:NN \char_active_set:Npx \cs_set:Npx - \char_tmp:NN \char_active_gset:Npn \cs_gset:Npn - \char_tmp:NN \char_active_gset:Npx \cs_gset:Npx - \char_tmp:NN \char_active_set_eq:NN \cs_set_eq:NN - \char_tmp:NN \char_active_gset_eq:NN \cs_gset_eq:NN + \char_tmp:NN \char_set_active:Npn \cs_set:Npn + \char_tmp:NN \char_set_active:Npx \cs_set:Npx + \char_tmp:NN \char_gset_active:Npn \cs_gset:Npn + \char_tmp:NN \char_gset_active:Npx \cs_gset:Npx + \char_tmp:NN \char_set_active_eq:NN \cs_set_eq:NN + \char_tmp:NN \char_gset_active_eq:NN \cs_gset_eq:NN \group_end: % \end{macrocode} % \end{macro} @@ -2361,7 +2373,7 @@ \cs_new_eq:NN \char_make_math_subscript:n \char_set_catcode_math_subscript:n \cs_new_eq:NN \char_make_ignore:n \char_set_catcode_ignore:n -\cs_new_eq:NN \char_make_space:n \char_set_catcode_space:n +\cs_new_eq:NN \char_make_space:n \char_set_catcode_space:n \cs_new_eq:NN \char_make_letter:n \char_set_catcode_letter:n \cs_new_eq:NN \char_make_other:n \char_set_catcode_other:n \cs_new_eq:NN \char_make_active:n \char_set_catcode_active:n diff --git a/Master/texmf-dist/source/latex/l3kernel/l3toks.dtx b/Master/texmf-dist/source/latex/l3kernel/l3toks.dtx index a7e14bc472c..3943db6ac1d 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 2818 2011-09-12 14:47:38Z will $ +\GetIdInfo$Id: l3toks.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental token registers} % %<*driver> @@ -98,7 +98,7 @@ % % \begin{macrocode} %<*package> -\cs_new_protected_nopar:Npn \toks_new:N #1 { +\cs_new_protected:Npn \toks_new:N #1 { \chk_if_free_cs:N #1 \newtoks #1 } @@ -138,7 +138,7 @@ % and fully. % \begin{macrocode} %<*check> -\cs_new_protected_nopar:Npn \toks_set:Nn #1 { \chk_local:N #1 #1 } +\cs_new_protected:Npn \toks_set:Nn #1 { \chk_local:N #1 #1 } \cs_generate_variant:Nn \toks_set:Nn {No,Nf} % % \end{macrocode} @@ -190,7 +190,7 @@ % \begin{macro}{\toks_gset:cx} % These functions are the global variants of the above. % \begin{macrocode} -%\cs_new_protected_nopar:Npn \toks_gset:Nn #1 { \chk_global:N #1 \tex_global:D #1 } +%\cs_new_protected:Npn \toks_gset:Nn #1 { \chk_global:N #1 \tex_global:D #1 } %\cs_new_eq:NN \toks_gset:Nn \tex_global:D \cs_generate_variant:Nn \toks_gset:Nn {NV,No,Nx,cn,cV,co,cx} % \end{macrocode} @@ -215,12 +215,12 @@ % in \meta{toks1}. % \begin{macrocode} %<*check> -\cs_new_protected_nopar:Npn\toks_set_eq:NN #1#2 { +\cs_new_protected:Npn\toks_set_eq:NN #1#2 { \chk_local:N #1 \chk_var_or_const:N #2 #1 #2 } -\cs_new_protected_nopar:Npn\toks_gset_eq:NN #1#2 { +\cs_new_protected:Npn\toks_gset_eq:NN #1#2 { \chk_global:N #1 \chk_var_or_const:N #2 \tex_global:D #1 #2 @@ -245,7 +245,7 @@ % \begin{macro}{\toks_clear:N,\toks_gclear:N,\toks_clear:c,\toks_gclear:c} % These functions clear a token register, either locally or globally. % \begin{macrocode} -\cs_new_protected_nopar:Npn \toks_clear:N #1 { +\cs_new_protected:Npn \toks_clear:N #1 { #1\c_empty_toks %\chk_local_or_tex_global:N #1 } @@ -276,7 +276,7 @@ % interfere with following tokens. In other words, the contents of % the register might operate on what follows in the input stream. % \begin{macrocode} -\cs_new_protected_nopar:Npn \toks_use_clear:N #1 { +\cs_new_protected:Npn \toks_use_clear:N #1 { \exp_last_unbraced:NNV \toks_clear:N #1 #1 } % \end{macrocode} @@ -331,7 +331,7 @@ % tokens once. We need to look out for brace stripping so we add a % token, which is then later removed. % \begin{macrocode} -\cs_new_protected_nopar:Npn \toks_put_left:Nn #1 { +\cs_new_protected:Npn \toks_put_left:Nn #1 { \exp_after:wN \toks_put_left_aux:w \exp_after:wN \q_nil \toks_use:N #1 \q_stop #1 } diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty index b54a9d1255f..906b5d1fc9f 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/12/07} -\def\ExplFileVersion{3036} +\def\ExplFileDate{2011/12/29} +\def\ExplFileVersion{3109} \RequirePackage{etex} \reserveinserts{32} \RequirePackage{calc} @@ -163,9 +163,9 @@ } } { - \cs_set_protected_nopar:Npn \box_rotate:Nn #1#2 + \cs_set_protected:Npn \box_rotate:Nn #1#2 { \hbox_set:Nn #1 { \rotatebox {#2} { \box_use:N #1 } } } - \cs_set_protected_nopar:Npn \box_resize:Nnn #1#2#3 + \cs_set_protected:Npn \box_resize:Nnn #1#2#3 { \hbox_set:Nn #1 { @@ -175,7 +175,7 @@ { \box_use:N #1 } } } - \cs_set_protected_nopar:Npn \box_resize_to_ht_plus_dp:Nn #1#2 + \cs_set_protected:Npn \box_resize_to_ht_plus_dp:Nn #1#2 { \hbox_set:Nn #1 { @@ -183,7 +183,7 @@ { \box_use:N #1 } } } - \cs_set_protected_nopar:Npn \box_resize_to_wd:Nn #1#2 + \cs_set_protected:Npn \box_resize_to_wd:Nn #1#2 { \hbox_set:Nn #1 { @@ -191,7 +191,7 @@ { \box_use:N #1 } } } - \cs_set_protected_nopar:Npn \box_scale:Nnn #1#2#3 + \cs_set_protected:Npn \box_scale:Nnn #1#2#3 { \hbox_set:Nn #1 { \scalebox {#2} [#3] { \box_use:N #1 } } } } \cs_set_protected_nopar:Npn \ExplSyntaxOn diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3basics.sty b/Master/texmf-dist/tex/latex/l3kernel/l3basics.sty index c9e56e990e1..6faa1110ad1 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3basics.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3basics.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3basics.dtx 3023 2011-12-04 07:25:04Z bruno $ +\GetIdInfo$Id: l3basics.dtx 3090 2011-12-23 03:12:53Z bruno $ {L3 Experimental basic definitions} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -86,10 +86,30 @@ \tex_let:D \tex_long:D \tex_long:D \tex_let:D \tex_protected:D \etex_protected:D \tex_long:D \tex_def:D \exp_args:Nc #1#2 { \exp_after:wN #1 \cs:w #2 \cs_end: } -%% A small number of variants by hand. -\tex_def:D \cs_meaning:c { \exp_args:Nc \cs_meaning:N } \tex_def:D \token_to_str:c { \exp_args:Nc \token_to_str:N } -\tex_def:D \cs_show:c { \exp_args:Nc \cs_show:N } +\tex_long:D \tex_def:D \cs_meaning:c #1 + { + \if_cs_exist:w #1 \cs_end: + \exp_after:wN \use_i:nn + \else: + \exp_after:wN \use_ii:nn + \fi: + { \exp_args:Nc \cs_meaning:N {#1} } + { \tl_to_str:n {undefined} } + } +\tex_protected:D \tex_def:D \cs_show:c + { \group_begin: \exp_args:NNc \group_end: \cs_show:N } +\tex_let:D \c_minus_one \m@ne +\tex_chardef:D \c_sixteen = 16~ +\tex_chardef:D \c_zero = 0~ +\tex_chardef:D \c_six = 6~ +\tex_chardef:D \c_seven = 7~ +\tex_chardef:D \c_twelve = 12~ +\etex_ifdefined:D \luatex_luatexversion:D + \tex_chardef:D \c_max_register_int = 65 535 ~ +\tex_else:D + \tex_mathchardef:D \c_max_register_int = 32 767 ~ +\tex_fi:D \tex_let:D \cs_set_nopar:Npn \tex_def:D \tex_let:D \cs_set_nopar:Npx \tex_edef:D \tex_protected:D \cs_set_nopar:Npn \cs_set:Npn @@ -327,13 +347,13 @@ \tex_chardef:D \c_false_bool = 0~ \cs_set_nopar:Npn \cs_to_str:N { - \if:w \int_to_roman:w - `0 \token_to_str:N \ % - \cs_to_str_aux:w - \fi: - \exp_after:wN \use_none:n \token_to_str:N - } -\cs_set_nopar:Npn \cs_to_str_aux:w #1 \use_none:n - { ~ \int_to_roman:w - `0 \fi: } + \int_to_roman:w + \if:w \token_to_str:N \ \cs_to_str_aux:w \fi: + \exp_after:wN \cs_to_str_aux:N \token_to_str:N + } +\cs_set:Npn \cs_to_str_aux:N #1 { \c_zero } +\cs_set:Npn \cs_to_str_aux:w #1 \cs_to_str_aux:N + { - \int_value:w \fi: \exp_after:wN \c_zero } \group_begin: \tex_lccode:D `\@ = `\: \scan_stop: \tex_catcode:D `\@ = 12~ @@ -342,8 +362,9 @@ \group_end: \cs_set:Npn \cs_split_function:NN #1#2 { + \exp_after:wN \exp_after:wN \exp_after:wN \cs_split_function_aux:w - \int_to_roman:w - `\q \cs_to_str:N #1 @ a \q_stop #2 + \cs_to_str:N #1 @ a \q_stop #2 } \cs_set:Npn \cs_split_function_aux:w #1 @ #2#3 \q_stop #4 { @@ -434,18 +455,11 @@ { \cs_if_exist:cTF {#1} { \use:c {#1} #2 } { } } \cs_set:Npn \cs_if_exist_use:c #1 { \cs_if_exist:cTF {#1} { \use:c {#1} } { } } -\tex_let:D \c_minus_one \m@ne -\tex_chardef:D \c_sixteen = 16~ -\tex_chardef:D \c_zero = 0~ -\tex_chardef:D \c_six = 6~ -\tex_chardef:D \c_seven = 7~ -\tex_chardef:D \c_twelve = 12~ -\tex_mathchardef:D \c_max_register_int = 32 767 \scan_stop: \cs_set_protected_nopar:Npn \iow_log:x { \tex_immediate:D \tex_write:D \c_minus_one } \cs_set_protected_nopar:Npn \iow_term:x { \tex_immediate:D \tex_write:D \c_sixteen } -\cs_set_protected_nopar:Npn \msg_kernel_error:nnxx #1#2#3#4 +\cs_set_protected:Npn \msg_kernel_error:nnxx #1#2#3#4 { \tex_errmessage:D { @@ -457,13 +471,13 @@ } \tex_end:D } -\cs_set_protected_nopar:Npn \msg_kernel_error:nnx #1#2#3 +\cs_set_protected:Npn \msg_kernel_error:nnx #1#2#3 { \msg_kernel_error:nnxx {#1} {#2} {#3} { } } -\cs_set_protected_nopar:Npn \msg_kernel_error:nn #1#2 +\cs_set_protected:Npn \msg_kernel_error:nn #1#2 { \msg_kernel_error:nnxx {#1} {#2} { } { } } \cs_set_nopar:Npn \msg_line_context: { on~line~\tex_the:D \tex_inputlineno:D } -\cs_set_protected_nopar:Npn \chk_if_free_cs:N #1 +\cs_set_protected:Npn \chk_if_free_cs:N #1 { \cs_if_free:NF #1 { @@ -472,7 +486,7 @@ } } \tex_ifodd:D \l@expl@log@functions@bool - \cs_set_protected_nopar:Npn \chk_if_free_cs:N #1 + \cs_set_protected:Npn \chk_if_free_cs:N #1 { \cs_if_free:NF #1 { @@ -484,7 +498,7 @@ \fi: \cs_set_protected_nopar:Npn \chk_if_free_cs:c { \exp_args:Nc \chk_if_free_cs:N } -\cs_set_protected_nopar:Npn \chk_if_exist_cs:N #1 +\cs_set_protected:Npn \chk_if_exist_cs:N #1 { \cs_if_exist:NF #1 { @@ -496,7 +510,7 @@ { \exp_args:Nc \chk_if_exist_cs:N } \cs_set:Npn \cs_tmp:w #1#2 { - \cs_set_protected_nopar:Npn #1 ##1 + \cs_set_protected:Npn #1 ##1 { \chk_if_free_cs:N ##1 #2 ##1 @@ -552,9 +566,9 @@ \cs_new_protected_nopar:Npn \cs_gset_eq:Nc { \exp_args:NNc \cs_gset_eq:NN } \cs_new_protected_nopar:Npn \cs_gset_eq:cN { \exp_args:Nc \cs_gset_eq:NN } \cs_new_protected_nopar:Npn \cs_gset_eq:cc { \exp_args:Ncc \cs_gset_eq:NN } -\cs_new_protected_nopar:Npn \cs_undefine:N #1 +\cs_new_protected:Npn \cs_undefine:N #1 { \cs_gset_eq:NN #1 \c_undefined:D } -\cs_new_protected_nopar:Npn \cs_undefine:c #1 +\cs_new_protected:Npn \cs_undefine:c #1 { \if_cs_exist:w #1 \cs_end: \exp_after:wN \use:n @@ -601,7 +615,7 @@ {#2#1} {#4} } -\cs_new_protected_nopar:Npn +\cs_new_protected:Npn \cs_generate_from_arg_count_aux:nwn #1 #2 \fi: #3 { \fi: #3 #1 } \cs_new_nopar:Npn \cs_generate_from_arg_count:cNnn @@ -693,7 +707,7 @@ \cs_new_nopar:Npn \cs_if_eq:ccTF { \exp_args:Ncc \cs_if_eq:NNTF } \cs_new_nopar:Npn \cs_if_eq:ccT { \exp_args:Ncc \cs_if_eq:NNT } \cs_new_nopar:Npn \cs_if_eq:ccF { \exp_args:Ncc \cs_if_eq:NNF } -\cs_new_nopar:Npn \kernel_register_show:N #1 +\cs_new:Npn \kernel_register_show:N #1 { \cs_if_exist:NTF #1 { \tex_showthe:D #1 } @@ -702,7 +716,8 @@ { \token_to_str:N #1 } } } -\cs_new_nopar:Npn \kernel_register_show:c { \exp_args:Nc \int_show:N } +\cs_new_nopar:Npn \kernel_register_show:c + { \exp_args:Nc \kernel_register_show:N } \cs_new_eq:NN \luatex_if_engine:T \use_none:n \cs_new_eq:NN \luatex_if_engine:F \use:n \cs_new_eq:NN \luatex_if_engine:TF \use_ii:nn diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3box.sty b/Master/texmf-dist/tex/latex/l3kernel/l3box.sty index acf0671deb3..14f032e0ea5 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 3029 2011-12-06 22:47:30Z joseph $ +\GetIdInfo$Id: l3box.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental boxes} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -205,35 +205,41 @@ \cs_new_eq:NN \hbox_unpack_clear:N \tex_unhbox:D \cs_generate_variant:Nn \hbox_unpack:N { c } \cs_generate_variant:Nn \hbox_unpack_clear:N { c } -\cs_new_protected:Npn \vbox:n { \tex_vbox:D \scan_stop: } -\cs_new_protected:Npn \vbox_top:n { \tex_vtop:D \scan_stop: } +\cs_new_protected:Npn \vbox:n #1 { \tex_vbox:D { #1 \par } } +\cs_new_protected:Npn \vbox_top:n #1 { \tex_vtop:D { #1 \par } } \cs_new_protected:Npn \vbox_to_ht:nn #1#2 - { \tex_vbox:D to \dim_eval:w #1 \dim_eval_end: {#2} } -\cs_new_protected:Npn \vbox_to_zero:n #1 { \tex_vbox:D to \c_zero_dim {#1} } -\cs_new_protected:Npn \vbox_set:Nn #1#2 { \tex_setbox:D #1 \tex_vbox:D {#2} } + { \tex_vbox:D to \dim_eval:w #1 \dim_eval_end: { #2 \par } } +\cs_new_protected:Npn \vbox_to_zero:n #1 + { \tex_vbox:D to \c_zero_dim { #1 \par } } +\cs_new_protected:Npn \vbox_set:Nn #1#2 + { \tex_setbox:D #1 \tex_vbox:D { #2 \par } } \cs_new_protected:Npn \vbox_gset:Nn { \tex_global:D \vbox_set:Nn } \cs_generate_variant:Nn \vbox_set:Nn { c } \cs_generate_variant:Nn \vbox_gset:Nn { c } \cs_new_protected:Npn \vbox_set_top:Nn #1#2 - { \tex_setbox:D #1 \tex_vtop:D {#2} } + { \tex_setbox:D #1 \tex_vtop:D { #2 \par } } \cs_new_protected:Npn \vbox_gset_top:Nn { \tex_global:D \vbox_set_top:Nn } \cs_generate_variant:Nn \vbox_set_top:Nn { c } \cs_generate_variant:Nn \vbox_gset_top:Nn { c } \cs_new_protected:Npn \vbox_set_to_ht:Nnn #1#2#3 - { \tex_setbox:D #1 \tex_vbox:D to \dim_eval:w #2 \dim_eval_end: {#3} } + { \tex_setbox:D #1 \tex_vbox:D to \dim_eval:w #2 \dim_eval_end: { #3 \par } } \cs_new_protected:Npn \vbox_gset_to_ht:Nnn { \tex_global:D \vbox_set_to_ht:Nnn } \cs_generate_variant:Nn \vbox_set_to_ht:Nnn { c } \cs_generate_variant:Nn \vbox_gset_to_ht:Nnn { c } -\cs_new:Npn \vbox_set:Nw #1 +\cs_new_protected:Npn \vbox_set:Nw #1 { \tex_setbox:D #1 \tex_vbox:D \c_group_begin_token } \cs_new_protected:Npn \vbox_gset:Nw { \tex_global:D \vbox_set:Nw } \cs_generate_variant:Nn \vbox_set:Nw { c } \cs_generate_variant:Nn \vbox_gset:Nw { c } -\cs_new_eq:NN \vbox_set_end: \c_group_end_token -\cs_new_eq:NN \vbox_gset_end: \c_group_end_token +\cs_new_protected:Npn \vbox_set_end: + { + \par + \c_group_end_token + } +\cs_new_eq:NN \vbox_gset_end: \vbox_set_end: \cs_new_eq:NN \vbox_set_inline_begin:N \vbox_set:Nw \cs_new_eq:NN \vbox_set_inline_begin:c \vbox_set:cw \cs_new_eq:NN \vbox_set_inline_end: \vbox_set_end: diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3clist.sty b/Master/texmf-dist/tex/latex/l3kernel/l3clist.sty index 3dd557d6b8a..611599be6bd 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3clist.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3clist.sty @@ -47,7 +47,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3clist.dtx 3029 2011-12-06 22:47:30Z joseph $ +\GetIdInfo$Id: l3clist.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental comma separated lists} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -76,7 +76,7 @@ { \clist_concat_aux:NNNN \tl_set:Nx } \cs_new_protected_nopar:Npn \clist_gconcat:NNN { \clist_concat_aux:NNNN \tl_gset:Nx } -\cs_new_protected_nopar:Npn \clist_concat_aux:NNNN #1#2#3#4 +\cs_new_protected:Npn \clist_concat_aux:NNNN #1#2#3#4 { #1 #2 { @@ -147,7 +147,7 @@ \cs_generate_variant:Nn \clist_put_left:Nn { c , cV , co , cx } \cs_generate_variant:Nn \clist_gput_left:Nn { NV , No , Nx } \cs_generate_variant:Nn \clist_gput_left:Nn { c , cV , co , cx } -\cs_new_protected:Npn \clist_put_right:Nn +\cs_new_protected_nopar:Npn \clist_put_right:Nn { \clist_put_right_aux:NNNn \clist_concat:NNN \clist_set:Nn } \cs_new_protected_nopar:Npn \clist_gput_right:Nn { \clist_put_right_aux:NNNn \clist_gconcat:NNN \clist_gset:Nn } @@ -160,7 +160,7 @@ \cs_generate_variant:Nn \clist_put_right:Nn { c , cV , co , cx } \cs_generate_variant:Nn \clist_gput_right:Nn { NV , No , Nx } \cs_generate_variant:Nn \clist_gput_right:Nn { c , cV , co , cx } -\cs_new_protected_nopar:Npn \clist_get:NN #1#2 +\cs_new_protected:Npn \clist_get:NN #1#2 { \exp_after:wN \clist_get_aux:wN #1 , \q_stop #2 } \cs_new_protected:Npn \clist_get_aux:wN #1 , #2 \q_stop #3 { \tl_set:Nn #3 {#1} } @@ -169,7 +169,7 @@ { \clist_pop_aux:NNN \tl_set:Nf } \cs_new_protected_nopar:Npn \clist_gpop:NN { \clist_pop_aux:NNN \tl_gset:Nf } -\cs_new_protected_nopar:Npn \clist_pop_aux:NNN #1#2#3 +\cs_new_protected:Npn \clist_pop_aux:NNN #1#2#3 { \exp_after:wN \clist_pop_aux:wNNN #2 , \q_nil \q_stop #1#2#3 } @@ -281,7 +281,7 @@ \cs_generate_variant:Nn \clist_if_in:nnT { nV , no } \cs_generate_variant:Nn \clist_if_in:nnF { nV , no } \cs_generate_variant:Nn \clist_if_in:nnTF { nV , no } -\cs_new_nopar:Npn \clist_map_function:NN #1#2 +\cs_new:Npn \clist_map_function:NN #1#2 { \clist_if_empty:NF #1 { @@ -355,7 +355,7 @@ \cs_generate_variant:Nn \clist_map_variable:NNn { c } \cs_new_eq:NN \clist_map_break: \prg_map_break: \cs_new_eq:NN \clist_map_break:n \prg_map_break:n -\cs_new_protected_nopar:Npn \clist_show:N #1 +\cs_new_protected:Npn \clist_show:N #1 { \msg_aux_show:Nnx #1 @@ -488,6 +488,20 @@ \cs_new_protected:Npn \clist_const:Nn #1#2 { \tl_const:Nx #1 { \clist_trim_spaces:n {#2} } } \cs_generate_variant:Nn \clist_const:Nn { c , Nx , cx } +\prg_new_conditional:Npnn \clist_if_empty:n #1 { p , T , F , TF } + { + \clist_if_empty_n_aux:w ? #1 + , \q_mark \prg_return_false: + , \q_mark \prg_return_true: + \q_stop + } +\cs_new:Npn \clist_if_empty_n_aux:w #1 , + { + \tl_if_empty:oTF { \use_none:nn #1 ? } + { \clist_if_empty_n_aux:w ? } + { \clist_if_empty_n_aux:wNw } + } +\cs_new:Npn \clist_if_empty_n_aux:wNw #1 \q_mark #2#3 \q_stop {#2} \cs_new_protected:Npn \clist_trim_spaces:N #1 { \clist_set:No #1 {#1} } \cs_new_protected:Npn \clist_gtrim_spaces:N #1 { \clist_gset:No #1 {#1} } \cs_generate_variant:Nn \clist_trim_spaces:N { c } diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3coffins.sty b/Master/texmf-dist/tex/latex/l3kernel/l3coffins.sty index 01a360b3861..5edde5b4de8 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3coffins.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3coffins.sty @@ -47,7 +47,7 @@ %% ----------------------------------------------------------------------- %% \RequirePackage{l3names} -\GetIdInfo$Id: l3coffins.dtx 2963 2011-11-15 22:06:41Z joseph $ +\GetIdInfo$Id: l3coffins.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental coffin code layer} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -117,7 +117,7 @@ { \token_to_str:N #1 } } } -\cs_new_protected_nopar:Npn \coffin_clear:N #1 +\cs_new_protected:Npn \coffin_clear:N #1 { \coffin_if_exist:NT #1 { @@ -126,7 +126,7 @@ } } \cs_generate_variant:Nn \coffin_clear:N { c } -\cs_new_protected_nopar:Npn \coffin_new:N #1 +\cs_new_protected:Npn \coffin_new:N #1 { \box_new:N #1 \prop_clear_new:c { l_coffin_corners_ \int_value:w #1 _prop } @@ -181,7 +181,7 @@ } } \cs_generate_variant:Nn \vcoffin_set:Nnn { c } -\cs_new_protected_nopar:Npn \hcoffin_set:Nw #1 +\cs_new_protected:Npn \hcoffin_set:Nw #1 { \coffin_if_exist:NT #1 { @@ -198,7 +198,7 @@ } \cs_new_protected_nopar:Npn \hcoffin_set_end: { } \cs_generate_variant:Nn \hcoffin_set:Nw { c } -\cs_new_protected_nopar:Npn \vcoffin_set:Nnw #1#2 +\cs_new_protected:Npn \vcoffin_set:Nnw #1#2 { \coffin_if_exist:NT #1 { @@ -228,7 +228,7 @@ } \cs_new_protected_nopar:Npn \vcoffin_set_end: { } \cs_generate_variant:Nn \vcoffin_set:Nnw { c } -\cs_new_protected_nopar:Npn \coffin_set_eq:NN #1#2 +\cs_new_protected:Npn \coffin_set_eq:NN #1#2 { \coffin_if_exist:NT #1 { @@ -247,7 +247,7 @@ \cs_new_eq:NN \coffin_ht:c \box_ht:c \cs_new_eq:NN \coffin_wd:N \box_wd:N \cs_new_eq:NN \coffin_wd:c \box_wd:c -\cs_new_protected_nopar:Npn \coffin_get_pole:NnN #1#2#3 +\cs_new_protected:Npn \coffin_get_pole:NnN #1#2#3 { \prop_get:cnNF { l_coffin_poles_ \int_value:w #1 _prop } {#2} #3 @@ -257,28 +257,28 @@ \tl_set:Nn #3 { { 0 pt } { 0 pt } { 0 pt } { 0 pt } } } } -\cs_new_protected_nopar:Npn \coffin_reset_structure:N #1 +\cs_new_protected:Npn \coffin_reset_structure:N #1 { \prop_set_eq:cN { l_coffin_corners_ \int_value:w #1 _prop } \c_coffin_corners_prop \prop_set_eq:cN { l_coffin_poles_ \int_value:w #1 _prop } \c_coffin_poles_prop } -\cs_new_protected_nopar:Npn \coffin_set_eq_structure:NN #1#2 +\cs_new_protected:Npn \coffin_set_eq_structure:NN #1#2 { \prop_set_eq:cc { l_coffin_corners_ \int_value:w #1 _prop } { l_coffin_corners_ \int_value:w #2 _prop } \prop_set_eq:cc { l_coffin_poles_ \int_value:w #1 _prop } { l_coffin_poles_ \int_value:w #2 _prop } } -\cs_new_protected_nopar:Npn \coffin_gset_eq_structure:NN #1#2 +\cs_new_protected:Npn \coffin_gset_eq_structure:NN #1#2 { \prop_gset_eq:cc { l_coffin_corners_ \int_value:w #1 _prop } { l_coffin_corners_ \int_value:w #2 _prop } \prop_gset_eq:cc { l_coffin_poles_ \int_value:w #1 _prop } { l_coffin_poles_ \int_value:w #2 _prop } } -\cs_new_protected_nopar:Npn \coffin_set_user_dimensions:N #1 +\cs_new_protected:Npn \coffin_set_user_dimensions:N #1 { \cs_set_eq:NN \coffin_saved_Height: \Height \cs_set_eq:NN \coffin_saved_Depth: \Depth @@ -300,7 +300,7 @@ \cs_set_eq:NN \TotalHeight \coffin_saved_TotalHeight: \cs_set_eq:NN \Width \coffin_saved_Width: } -\cs_new_protected_nopar:Npn \coffin_set_horizontal_pole:Nnn #1#2#3 +\cs_new_protected:Npn \coffin_set_horizontal_pole:Nnn #1#2#3 { \coffin_if_exist:NT #1 { @@ -313,7 +313,7 @@ \coffin_end_user_dimensions: } } -\cs_new_protected_nopar:Npn \coffin_set_vertical_pole:Nnn #1#2#3 +\cs_new_protected:Npn \coffin_set_vertical_pole:Nnn #1#2#3 { \coffin_if_exist:NT #1 { @@ -326,12 +326,12 @@ \coffin_end_user_dimensions: } } -\cs_new_protected_nopar:Npn \coffin_set_pole:Nnn #1#2#3 +\cs_new_protected:Npn \coffin_set_pole:Nnn #1#2#3 { \prop_put:cnn { l_coffin_poles_ \int_value:w #1 _prop } {#2} {#3} } \cs_generate_variant:Nn \coffin_set_horizontal_pole:Nnn { c } \cs_generate_variant:Nn \coffin_set_vertical_pole:Nnn { c } \cs_generate_variant:Nn \coffin_set_pole:Nnn { Nnx } -\cs_new_protected_nopar:Npn \coffin_update_corners:N #1 +\cs_new_protected:Npn \coffin_update_corners:N #1 { \prop_put:cnx { l_coffin_corners_ \int_value:w #1 _prop } { tl } { { 0 pt } { \dim_use:N \box_ht:N #1 } } @@ -342,7 +342,7 @@ \prop_put:cnx { l_coffin_corners_ \int_value:w #1 _prop } { br } { { \dim_use:N \box_wd:N #1 } { \dim_eval:n { - \box_dp:N #1 } } } } -\cs_new_protected_nopar:Npn \coffin_update_poles:N #1 +\cs_new_protected:Npn \coffin_update_poles:N #1 { \prop_put:cnx { l_coffin_poles_ \int_value:w #1 _prop } { hc } { @@ -376,7 +376,7 @@ { 0 pt } } } -\cs_new_protected_nopar:Npn \coffin_calculate_intersection:Nnn #1#2#3 +\cs_new_protected:Npn \coffin_calculate_intersection:Nnn #1#2#3 { \coffin_get_pole:NnN #1 {#2} \l_coffin_pole_a_tl \coffin_get_pole:NnN #1 {#3} \l_coffin_pole_b_tl @@ -391,7 +391,7 @@ \dim_zero:N \l_coffin_y_dim } } -\cs_new_protected_nopar:Npn \coffin_calculate_intersection:nnnnnnnn +\cs_new_protected:Npn \coffin_calculate_intersection:nnnnnnnn #1#2#3#4#5#6#7#8 { \dim_compare:nNnTF {#3} = { \c_zero_dim } @@ -477,7 +477,7 @@ } } } -\cs_new_protected_nopar:Npn \coffin_calculate_intersection_aux:nnnnnN +\cs_new_protected:Npn \coffin_calculate_intersection_aux:nnnnnN #1#2#3#4#5#6 { \fp_set_from_dim:Nn \l_coffin_calc_result_fp {#1} @@ -491,7 +491,7 @@ \fp_add:Nn \l_coffin_calc_result_fp { \l_coffin_calc_b_fp } \dim_set:Nn #6 { \fp_to_dim:N \l_coffin_calc_result_fp } } -\cs_new_protected_nopar:Npn \coffin_join:NnnNnnnn #1#2#3#4#5#6#7#8 +\cs_new_protected:Npn \coffin_join:NnnNnnnn #1#2#3#4#5#6#7#8 { \coffin_align:NnnNnnnnN #1 {#2} {#3} #4 {#5} {#6} {#7} {#8} \l_coffin_aligned_coffin @@ -528,7 +528,7 @@ \coffin_set_eq:NN #1 \l_coffin_aligned_coffin } \cs_generate_variant:Nn \coffin_join:NnnNnnnn { c , Nnnc , cnnc } -\cs_new_protected_nopar:Npn \coffin_attach:NnnNnnnn #1#2#3#4#5#6#7#8 +\cs_new_protected:Npn \coffin_attach:NnnNnnnn #1#2#3#4#5#6#7#8 { \coffin_align:NnnNnnnnN #1 {#2} {#3} #4 {#5} {#6} {#7} {#8} \l_coffin_aligned_coffin @@ -546,7 +546,7 @@ \coffin_update_vertical_poles:NNN #1 #4 \l_coffin_aligned_coffin \coffin_set_eq:NN #1 \l_coffin_aligned_coffin } -\cs_new_protected_nopar:Npn \coffin_attach_mark:NnnNnnnn #1#2#3#4#5#6#7#8 +\cs_new_protected:Npn \coffin_attach_mark:NnnNnnnn #1#2#3#4#5#6#7#8 { \coffin_align:NnnNnnnnN #1 {#2} {#3} #4 {#5} {#6} {#7} {#8} \l_coffin_aligned_coffin @@ -556,7 +556,7 @@ \box_set_eq:NN #1 \l_coffin_aligned_coffin } \cs_generate_variant:Nn \coffin_attach:NnnNnnnn { c , Nnnc , cnnc } -\cs_new_protected_nopar:Npn \coffin_align:NnnNnnnnN #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \coffin_align:NnnNnnnnN #1#2#3#4#5#6#7#8#9 { \coffin_calculate_intersection:Nnn #4 {#5} {#6} \dim_set:Nn \l_coffin_x_prime_dim { \l_coffin_x_dim } @@ -575,12 +575,12 @@ } \coffin_set_eq:NN #9 \l_coffin_aligned_internal_coffin } -\cs_new_protected_nopar:Npn \coffin_offset_poles:Nnn #1#2#3 +\cs_new_protected:Npn \coffin_offset_poles:Nnn #1#2#3 { \prop_map_inline:cn { l_coffin_poles_ \int_value:w #1 _prop } { \coffin_offset_pole:Nnnnnnn #1 {##1} ##2 {#2} {#3} } } -\cs_new_protected_nopar:Npn \coffin_offset_pole:Nnnnnnn #1#2#3#4#5#6#7#8 +\cs_new_protected:Npn \coffin_offset_pole:Nnnnnnn #1#2#3#4#5#6#7#8 { \dim_set:Nn \l_coffin_x_dim { #3 + #7 } \dim_set:Nn \l_coffin_y_dim { #4 + #8 } @@ -594,12 +594,12 @@ {#5} {#6} } } -\cs_new_protected_nopar:Npn \coffin_offset_corners:Nnn #1#2#3 +\cs_new_protected:Npn \coffin_offset_corners:Nnn #1#2#3 { \prop_map_inline:cn { l_coffin_corners_ \int_value:w #1 _prop } { \coffin_offset_corner:Nnnnn #1 {##1} ##2 {#2} {#3} } } -\cs_new_protected_nopar:Npn \coffin_offset_corner:Nnnnn #1#2#3#4#5#6 +\cs_new_protected:Npn \coffin_offset_corner:Nnnnn #1#2#3#4#5#6 { \prop_put:cnx { l_coffin_corners_ \int_value:w \l_coffin_aligned_coffin _prop } @@ -609,7 +609,7 @@ { \dim_eval:n { #4 + #6 } } } } -\cs_new_protected_nopar:Npn \coffin_update_vertical_poles:NNN #1#2#3 +\cs_new_protected:Npn \coffin_update_vertical_poles:NNN #1#2#3 { \coffin_get_pole:NnN #3 { #1 -T } \l_coffin_pole_a_tl \coffin_get_pole:NnN #3 { #2 -T } \l_coffin_pole_b_tl @@ -620,7 +620,7 @@ \exp_last_two_unbraced:Noo \coffin_update_B:nnnnnnnnN \l_coffin_pole_a_tl \l_coffin_pole_b_tl #3 } -\cs_new_protected_nopar:Npn \coffin_update_T:nnnnnnnnN #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \coffin_update_T:nnnnnnnnN #1#2#3#4#5#6#7#8#9 { \dim_compare:nNnTF {#2} < {#6} { @@ -632,7 +632,7 @@ { { 0 pt } {#2} { 1000 pt } { 0 pt } } } } -\cs_new_protected_nopar:Npn \coffin_update_B:nnnnnnnnN #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \coffin_update_B:nnnnnnnnN #1#2#3#4#5#6#7#8#9 { \dim_compare:nNnTF {#2} < {#6} { @@ -644,7 +644,7 @@ { { 0 pt } {#6} { 1000 pt } { 0 pt } } } } -\cs_new_protected_nopar:Npn \coffin_typeset:Nnnnn #1#2#3#4#5 +\cs_new_protected:Npn \coffin_typeset:Nnnnn #1#2#3#4#5 { \coffin_align:NnnNnnnnN \c_empty_coffin { H } { l } #1 {#2} {#3} {#4} {#5} \l_coffin_aligned_coffin @@ -658,7 +658,7 @@ \dim_new:N \l_coffin_right_corner_dim \dim_new:N \l_coffin_bottom_corner_dim \dim_new:N \l_coffin_top_corner_dim -\cs_new_protected_nopar:Npn \coffin_rotate:Nn #1#2 +\cs_new_protected:Npn \coffin_rotate:Nn #1#2 { \fp_set:Nn \l_coffin_tmp_fp {#2} \fp_div:Nn \l_coffin_tmp_fp { 180 } @@ -693,7 +693,7 @@ { \coffin_shift_pole:Nnnnnn #1 {##1} ##2 } } \cs_generate_variant:Nn \coffin_rotate:Nn { c } -\cs_new_protected_nopar:Npn \coffin_set_bounding:N #1 +\cs_new_protected:Npn \coffin_set_bounding:N #1 { \prop_put:Nnx \l_coffin_bounding_prop { tl } { { 0 pt } { \dim_use:N \box_ht:N #1 } } @@ -705,19 +705,19 @@ \prop_put:Nnx \l_coffin_bounding_prop { br } { { \dim_use:N \box_wd:N #1 } { \dim_use:N \l_coffin_tmp_dim } } } -\cs_new_protected_nopar:Npn \coffin_rotate_bounding:nnn #1#2#3 +\cs_new_protected:Npn \coffin_rotate_bounding:nnn #1#2#3 { \coffin_rotate_vector:nnNN {#2} {#3} \l_coffin_x_dim \l_coffin_y_dim \prop_put:Nnx \l_coffin_bounding_prop {#1} { { \dim_use:N \l_coffin_x_dim } { \dim_use:N \l_coffin_y_dim } } } -\cs_new_protected_nopar:Npn \coffin_rotate_corner:Nnnn #1#2#3#4 +\cs_new_protected:Npn \coffin_rotate_corner:Nnnn #1#2#3#4 { \coffin_rotate_vector:nnNN {#3} {#4} \l_coffin_x_dim \l_coffin_y_dim \prop_put:cnx { l_coffin_corners_ \int_value:w #1 _prop } {#2} { { \dim_use:N \l_coffin_x_dim } { \dim_use:N \l_coffin_y_dim } } } -\cs_new_protected_nopar:Npn \coffin_rotate_pole:Nnnnnn #1#2#3#4#5#6 +\cs_new_protected:Npn \coffin_rotate_pole:Nnnnnn #1#2#3#4#5#6 { \coffin_rotate_vector:nnNN {#3} {#4} \l_coffin_x_dim \l_coffin_y_dim \coffin_rotate_vector:nnNN {#5} {#6} @@ -729,7 +729,7 @@ { \dim_use:N \l_coffin_y_prime_dim } } } -\cs_new_protected_nopar:Npn \coffin_rotate_vector:nnNN #1#2#3#4 +\cs_new_protected:Npn \coffin_rotate_vector:nnNN #1#2#3#4 { \fp_set_from_dim:Nn \l_coffin_x_fp {#1} \fp_set_from_dim:Nn \l_coffin_y_fp {#2} @@ -746,7 +746,7 @@ \dim_set:Nn #3 { \fp_to_dim:N \l_coffin_x_prime_fp } \dim_set:Nn #4 { \fp_to_dim:N \l_coffin_y_prime_fp } } -\cs_new_protected_nopar:Npn \coffin_find_corner_maxima:N #1 +\cs_new_protected:Npn \coffin_find_corner_maxima:N #1 { \dim_set:Nn \l_coffin_top_corner_dim { -\c_max_dim } \dim_set:Nn \l_coffin_right_corner_dim { -\c_max_dim } @@ -755,7 +755,7 @@ \prop_map_inline:cn { l_coffin_corners_ \int_value:w #1 _prop } { \coffin_find_corner_maxima_aux:nn ##2 } } -\cs_new_protected_nopar:Npn \coffin_find_corner_maxima_aux:nn #1#2 +\cs_new_protected:Npn \coffin_find_corner_maxima_aux:nn #1#2 { \dim_set_min:Nn \l_coffin_left_corner_dim {#1} \dim_set_max:Nn \l_coffin_right_corner_dim {#1} @@ -768,9 +768,9 @@ \prop_map_inline:Nn \l_coffin_bounding_prop { \coffin_find_bounding_shift_aux:nn ##2 } } -\cs_new_protected_nopar:Npn \coffin_find_bounding_shift_aux:nn #1#2 +\cs_new_protected:Npn \coffin_find_bounding_shift_aux:nn #1#2 { \dim_set_min:Nn \l_coffin_bounding_shift_dim {#1} } -\cs_new_protected_nopar:Npn \coffin_shift_corner:Nnnn #1#2#3#4 +\cs_new_protected:Npn \coffin_shift_corner:Nnnn #1#2#3#4 { \prop_put:cnx { l_coffin_corners_ \int_value:w #1 _ prop } {#2} { @@ -778,7 +778,7 @@ { \dim_eval:n { #4 - \l_coffin_bottom_corner_dim } } } } -\cs_new_protected_nopar:Npn \coffin_shift_pole:Nnnnnn #1#2#3#4#5#6 +\cs_new_protected:Npn \coffin_shift_pole:Nnnnnn #1#2#3#4#5#6 { \prop_put:cnx { l_coffin_poles_ \int_value:w #1 _ prop } {#2} { @@ -791,7 +791,7 @@ \fp_new:N \l_coffin_scale_y_fp \dim_new:N \l_coffin_scaled_total_height_dim \dim_new:N \l_coffin_scaled_width_dim -\cs_new_protected_nopar:Npn \coffin_resize:Nnn #1#2#3 +\cs_new_protected:Npn \coffin_resize:Nnn #1#2#3 { \coffin_set_user_dimensions:N #1 \box_resize:Nnn #1 {#2} {#3} @@ -804,7 +804,7 @@ \coffin_resize_common:Nnn #1 {#2} {#3} } \cs_generate_variant:Nn \coffin_resize:Nnn { c } -\cs_new_protected_nopar:Npn \coffin_resize_common:Nnn #1#2#3 +\cs_new_protected:Npn \coffin_resize_common:Nnn #1#2#3 { \prop_map_inline:cn { l_coffin_corners_ \int_value:w #1 _prop } { \coffin_scale_corner:Nnnn #1 {##1} ##2 } @@ -819,7 +819,7 @@ } \coffin_end_user_dimensions: } -\cs_new_protected_nopar:Npn \coffin_scale:Nnn #1#2#3 +\cs_new_protected:Npn \coffin_scale:Nnn #1#2#3 { \box_scale:Nnn #1 {#2} {#3} \coffin_set_user_dimensions:N #1 @@ -835,7 +835,7 @@ { \l_coffin_scaled_width_dim } { \l_coffin_scaled_total_height_dim } } \cs_generate_variant:Nn \coffin_scale:Nnn { c } -\cs_new_protected_nopar:Npn \coffin_scale_vector:nnNN #1#2#3#4 +\cs_new_protected:Npn \coffin_scale_vector:nnNN #1#2#3#4 { \fp_set_from_dim:Nn \l_coffin_tmp_fp {#1} \fp_mul:Nn \l_coffin_tmp_fp { \l_coffin_scale_x_fp } @@ -844,13 +844,13 @@ \fp_mul:Nn \l_coffin_tmp_fp { \l_coffin_scale_y_fp } \dim_set:Nn #4 { \fp_to_dim:N \l_coffin_tmp_fp } } -\cs_new_protected_nopar:Npn \coffin_scale_corner:Nnnn #1#2#3#4 +\cs_new_protected:Npn \coffin_scale_corner:Nnnn #1#2#3#4 { \coffin_scale_vector:nnNN {#3} {#4} \l_coffin_x_dim \l_coffin_y_dim \prop_put:cnx { l_coffin_corners_ \int_value:w #1 _prop } {#2} { { \dim_use:N \l_coffin_x_dim } { \dim_use:N \l_coffin_y_dim } } } -\cs_new_protected_nopar:Npn \coffin_scale_pole:Nnnnnn #1#2#3#4#5#6 +\cs_new_protected:Npn \coffin_scale_pole:Nnnnnn #1#2#3#4#5#6 { \coffin_scale_vector:nnNN {#3} {#4} \l_coffin_x_dim \l_coffin_y_dim \coffin_set_pole:Nnx #1 {#2} @@ -859,14 +859,14 @@ {#5} {#6} } } -\cs_new_protected_nopar:Npn \coffin_x_shift_corner:Nnnn #1#2#3#4 +\cs_new_protected:Npn \coffin_x_shift_corner:Nnnn #1#2#3#4 { \prop_put:cnx { l_coffin_corners_ \int_value:w #1 _prop } {#2} { { \dim_eval:n { #3 + \box_wd:N #1 } } {#4} } } -\cs_new_protected_nopar:Npn \coffin_x_shift_pole:Nnnnnn #1#2#3#4#5#6 +\cs_new_protected:Npn \coffin_x_shift_pole:Nnnnnn #1#2#3#4#5#6 { \prop_put:cnx { l_coffin_poles_ \int_value:w #1 _prop } {#2} { @@ -922,7 +922,7 @@ \tl_new:N \l_coffin_display_font_tl \tl_set:Nn \l_coffin_display_font_tl { \sffamily \tiny } \prop_new:N \l_coffin_handles_tmp_prop -\cs_new_protected_nopar:Npn \coffin_mark_handle:Nnnn #1#2#3#4 +\cs_new_protected:Npn \coffin_mark_handle:Nnnn #1#2#3#4 { \hcoffin_set:Nn \l_coffin_display_pole_coffin { @@ -959,7 +959,7 @@ \l_coffin_tmp_tl #1 {#2} {#3} } } -\cs_new_protected_nopar:Npn \coffin_mark_handle_aux:nnnnNnn #1#2#3#4#5#6#7 +\cs_new_protected:Npn \coffin_mark_handle_aux:nnnnNnn #1#2#3#4#5#6#7 { \coffin_attach_mark:NnnNnnnn #5 {#6} {#7} \l_coffin_display_coord_coffin {#1} {#2} @@ -967,7 +967,7 @@ { #4 \l_coffin_display_offset_dim } } \cs_generate_variant:Nn \coffin_mark_handle:Nnnn { c } -\cs_new_protected_nopar:Npn \coffin_display_handles:Nn #1#2 +\cs_new_protected:Npn \coffin_display_handles:Nn #1#2 { \hcoffin_set:Nn \l_coffin_display_pole_coffin { @@ -992,7 +992,7 @@ } \box_use:N \l_coffin_display_coffin } -\cs_new_protected_nopar:Npn \coffin_display_handles_aux:nnnnnn #1#2#3#4#5#6 +\cs_new_protected:Npn \coffin_display_handles_aux:nnnnnn #1#2#3#4#5#6 { \prop_map_inline:Nn \l_coffin_display_poles_prop { @@ -1036,7 +1036,7 @@ } } } -\cs_new_protected_nopar:Npn \coffin_display_handles_aux:nnnn #1#2#3#4 +\cs_new_protected:Npn \coffin_display_handles_aux:nnnn #1#2#3#4 { \coffin_display_attach:Nnnnn \l_coffin_display_coord_coffin {#1} {#2} @@ -1044,7 +1044,7 @@ { #4 \l_coffin_display_offset_dim } } \cs_generate_variant:Nn \coffin_display_handles:Nn { c } -\cs_new_protected_nopar:Npn \coffin_display_attach:Nnnnn #1#2#3#4#5 +\cs_new_protected:Npn \coffin_display_attach:Nnnnn #1#2#3#4#5 { \coffin_calculate_intersection:Nnn #1 {#2} {#3} \dim_set:Nn \l_coffin_x_prime_dim { \l_coffin_x_dim } @@ -1068,7 +1068,7 @@ { \box_wd:N \l_coffin_display_coffin } \box_set_eq:NN \l_coffin_display_coffin \l_coffin_aligned_coffin } -\cs_new_protected_nopar:Npn \coffin_show_structure:N #1 +\cs_new_protected:Npn \coffin_show_structure:N #1 { \cs_if_exist:cTF { l_coffin_poles_ \int_value:w #1 _prop } { @@ -1100,7 +1100,7 @@ \iow_newline: > \c_space_tl \c_space_tl #1 \c_space_tl \c_space_tl => \c_space_tl \c_space_tl \exp_not:n {#2} } -\cs_new_nopar:Npn \coffin_show_aux:w #1 > ~ { } +\cs_new:Npn \coffin_show_aux:w #1 > ~ { } \cs_generate_variant:Nn \coffin_show_structure:N { c } \msg_kernel_new:nnnn { coffins } { no-pole-intersection } { No~intersection~between~coffin~poles. } diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3expan.sty b/Master/texmf-dist/tex/latex/l3kernel/l3expan.sty index 303e369e694..b0fded9bb79 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3expan.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3expan.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3expan.dtx 3031 2011-12-07 05:27:05Z bruno $ +\GetIdInfo$Id: l3expan.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental argument expansion} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -85,7 +85,7 @@ \exp_after:wN { \tex_romannumeral:D \exp_eval_register:c {#3} } {#1} {#2} } -\cs_new_nopar:Npn \exp_eval_register:N #1 +\cs_new:Npn \exp_eval_register:N #1 { \exp_after:wN \if_meaning:w \exp_not:N #1 #1 \if_meaning:w \scan_stop: #1 @@ -96,7 +96,7 @@ \fi: \exp_after:wN \c_zero \tex_the:D #1 } -\cs_new_nopar:Npn \exp_eval_register:c #1 +\cs_new:Npn \exp_eval_register:c #1 { \exp_after:wN \exp_eval_register:N \cs:w #1 \cs_end: } \cs_new:Npn \exp_eval_error_msg:w #1 \tex_the:D #2 { @@ -165,7 +165,7 @@ \cs:w #2 \exp_after:wN \cs_end: \exp_after:wN { \tex_romannumeral:D -`0 #3 } } -\cs_new_nopar:Npn \exp_args:NVV #1#2#3 +\cs_new:Npn \exp_args:NVV #1#2#3 { \exp_after:wN #1 \exp_after:wN { \tex_romannumeral:D \exp_after:wN @@ -369,7 +369,7 @@ \tex_lowercase:D { \group_end: - \cs_new_nopar:Npn \cs_generate_variant_aux:N #1 + \cs_new:Npn \cs_generate_variant_aux:N #1 { \exp_after:wN \cs_generate_variant_aux:w \token_to_meaning:N #1 diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3file.sty b/Master/texmf-dist/tex/latex/l3kernel/l3file.sty index 1437c74f4da..5ee45083280 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3file.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3file.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3file.dtx 2896 2011-10-09 20:36:50Z joseph $ +\GetIdInfo$Id: l3file.dtx 3095 2011-12-26 22:33:23Z joseph $ {L3 Experimental file operations} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -59,17 +59,17 @@ \seq_new:N \l_file_search_path_seq \seq_new:N \l_file_search_path_saved_seq \seq_new:N \l_file_tmpa_seq -\cs_new_protected_nopar:Npn \file_add_path:nN #1#2 +\cs_new_protected:Npn \file_add_path:nN #1#2 { - \ior_open:Nn \g_file_test_stream {#1} - \ior_if_eof:NTF \g_file_test_stream + \ior_open:Nn \g_file_test_ior {#1} + \ior_if_eof:NTF \g_file_test_ior { \file_add_path_search:nN {#1} #2 } { - \ior_close:N \g_file_test_stream + \ior_close:N \g_file_test_ior \tl_set:Nx #2 {#1} } } -\cs_new_protected_nopar:Npn \file_add_path_search:nN #1#2 +\cs_new_protected:Npn \file_add_path_search:nN #1#2 { \tl_clear:N #2 \cs_if_exist:NT \input@path @@ -81,8 +81,8 @@ } \seq_map_inline:Nn \l_file_search_path_seq { - \ior_open:Nn \g_file_test_stream { ##1 #1 } - \ior_if_eof:NF \g_file_test_stream + \ior_open:Nn \g_file_test_ior { ##1 #1 } + \ior_if_eof:NF \g_file_test_ior { \tl_set:Nx #2 { ##1 #1 } \seq_map_break: @@ -90,7 +90,7 @@ } \cs_if_exist:NT \input@path { \seq_set_eq:NN \l_file_search_path_seq \l_file_search_path_saved_seq } - \ior_close:N \g_file_test_stream + \ior_close:N \g_file_test_ior } \prg_new_protected_conditional:Nnn \file_if_exist:n { T , F , TF } { @@ -99,7 +99,7 @@ { \prg_return_false: } { \prg_return_true: } } -\cs_new_protected_nopar:Npn \file_input:n #1 +\cs_new_protected:Npn \file_input:n #1 { \file_add_path:nN {#1} \l_file_name_tl \tl_if_empty:NF \l_file_name_tl @@ -111,12 +111,12 @@ \seq_gpop:NN \g_file_stack_seq \g_file_current_name_tl } } -\cs_new_protected_nopar:Npn \file_path_include:n #1 +\cs_new_protected:Npn \file_path_include:n #1 { \seq_if_in:NnF \l_file_search_path_seq {#1} { \seq_put_right:Nn \l_file_search_path_seq {#1} } } -\cs_new_protected_nopar:Npn \file_path_remove:n #1 +\cs_new_protected:Npn \file_path_remove:n #1 { \seq_remove_all:Nn \l_file_search_path_seq {#1} } \cs_new_protected_nopar:Npn \file_list: { diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3fp.sty b/Master/texmf-dist/tex/latex/l3kernel/l3fp.sty index 3eb68b0727d..00d73728018 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3fp.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3fp.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3fp.dtx 3029 2011-12-06 22:47:30Z joseph $ +\GetIdInfo$Id: l3fp.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental floating-point operations} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -121,9 +121,9 @@ \int_new:N \l_fp_trig_sign_int \int_new:N \l_fp_trig_decimal_int \int_new:N \l_fp_trig_extended_int -\cs_new_protected_nopar:Npn \fp_read:N #1 +\cs_new_protected:Npn \fp_read:N #1 { \exp_after:wN \fp_read_aux:w #1 \q_stop } -\cs_new_protected_nopar:Npn \fp_read_aux:w #1#2 . #3 e #4 \q_stop +\cs_new_protected:Npn \fp_read_aux:w #1#2 . #3 e #4 \q_stop { \if:w #1 - \l_fp_input_a_sign_int \c_minus_one @@ -134,7 +134,7 @@ \l_fp_input_a_decimal_int #3 \scan_stop: \l_fp_input_a_exponent_int #4 \scan_stop: } -\cs_new_protected_nopar:Npn \fp_split:Nn #1#2 +\cs_new_protected:Npn \fp_split:Nn #1#2 { \tl_set:Nx \l_fp_tmp_tl {#2} \tl_set_rescan:Nno \l_fp_tmp_tl { \char_set_catcode_ignore:n { 32 } } @@ -169,7 +169,7 @@ \fi: \fi: } -\cs_new_protected_nopar:Npn \fp_split_exponent:w #1 e #2 e #3 \q_stop #4 +\cs_new_protected:Npn \fp_split_exponent:w #1 e #2 e #3 \q_stop #4 { \use:c { l_fp_input_ #4 _exponent_int } \int_eval:w 0 #2 \scan_stop: @@ -177,19 +177,19 @@ \use:c { l_fp_input_ #4 _integer_int } \int_eval:w 0 #1 . . \q_stop #4 } -\cs_new_protected_nopar:Npn \fp_split_aux_i:w #1 . #2 . #3 \q_stop +\cs_new_protected:Npn \fp_split_aux_i:w #1 . #2 . #3 \q_stop { \fp_split_aux_ii:w #2 000000000 \q_stop } -\cs_new_protected_nopar:Npn \fp_split_aux_ii:w #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \fp_split_aux_ii:w #1#2#3#4#5#6#7#8#9 { \fp_split_aux_iii:w {#1#2#3#4#5#6#7#8#9} } -\cs_new_protected_nopar:Npn \fp_split_aux_iii:w #1#2 \q_stop +\cs_new_protected:Npn \fp_split_aux_iii:w #1#2 \q_stop { \l_fp_tmp_int 1 #1 \scan_stop: \exp_after:wN \fp_split_decimal:w \int_use:N \l_fp_tmp_int 000000000 \q_stop } -\cs_new_protected_nopar:Npn \fp_split_decimal:w #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \fp_split_decimal:w #1#2#3#4#5#6#7#8#9 { \fp_split_decimal_aux:w {#2#3#4#5#6#7#8#9} } -\cs_new_protected_nopar:Npn \fp_split_decimal_aux:w #1#2#3 \q_stop #4 +\cs_new_protected:Npn \fp_split_decimal_aux:w #1#2#3 \q_stop #4 { \use:c { l_fp_input_ #4 _decimal_int } #1#2 \scan_stop: \if_int_compare:w @@ -206,7 +206,7 @@ \exp_after:wN \fp_overflow_msg: \fi: } -\cs_new_protected_nopar:Npn \fp_standardise:NNNN #1#2#3#4 +\cs_new_protected:Npn \fp_standardise:NNNN #1#2#3#4 { \if_int_compare:w \int_eval:w #2 + #3 = \c_zero @@ -218,7 +218,7 @@ \fi: #1#2#3#4 } -\cs_new_protected_nopar:Npn \fp_standardise_aux:NNNN #1#2#3#4 +\cs_new_protected:Npn \fp_standardise_aux:NNNN #1#2#3#4 { \cs_set_protected_nopar:Npn \fp_standardise_aux: { @@ -229,7 +229,7 @@ \exp_after:wN \fp_standardise_aux: \fi: } - \cs_set_protected_nopar:Npn + \cs_set_protected:Npn \fp_standardise_aux:w ##1##2##3##4##5##6##7##8##9 \q_stop { #2 ##2 \scan_stop: @@ -246,7 +246,7 @@ \exp_after:wN \fp_standardise_aux: \fi: } - \cs_set_protected_nopar:Npn + \cs_set_protected:Npn \fp_standardise_aux:w ##1##2##3##4##5##6##7##8##9 { #2 ##1##2##3##4##5##6##7##8 \scan_stop: @@ -293,7 +293,7 @@ \exp_after:wN \fp_level_input_exponents_a: \fi: } -\cs_new_protected_nopar:Npn \fp_level_input_exponents_a:NNNNNNNNN +\cs_new_protected:Npn \fp_level_input_exponents_a:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \l_fp_input_b_integer_int #1#2#3#4#5#6#7#8 \scan_stop: @@ -318,7 +318,7 @@ \exp_after:wN \fp_level_input_exponents_b: \fi: } -\cs_new_protected_nopar:Npn \fp_level_input_exponents_b:NNNNNNNNN +\cs_new_protected:Npn \fp_level_input_exponents_b:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \l_fp_input_a_integer_int #1#2#3#4#5#6#7#8 \scan_stop: @@ -333,28 +333,28 @@ \l_fp_input_a_decimal_int \l_fp_tmp_tl \scan_stop: \tex_advance:D \l_fp_input_a_exponent_int \c_one } -\cs_new_protected_nopar:Npn \fp_tmp:w #1#2 { } -\cs_new_protected_nopar:Npn \fp_new:N #1 +\cs_new_protected:Npn \fp_tmp:w #1#2 { } +\cs_new_protected:Npn \fp_new:N #1 { \tl_new:N #1 \tl_gset_eq:NN #1 \c_zero_fp } \cs_generate_variant:Nn \fp_new:N { c } -\cs_new_protected_nopar:Npn \fp_const:Nn #1#2 +\cs_new_protected:Npn \fp_const:Nn #1#2 { \fp_new:N #1 \fp_gset:Nn #1 {#2} } \cs_generate_variant:Nn \fp_const:Nn { c } -\cs_new_protected_nopar:Npn \fp_zero:N #1 +\cs_new_protected:Npn \fp_zero:N #1 { \tl_set_eq:NN #1 \c_zero_fp } -\cs_new_protected_nopar:Npn \fp_gzero:N #1 +\cs_new_protected:Npn \fp_gzero:N #1 { \tl_gset_eq:NN #1 \c_zero_fp } \cs_generate_variant:Nn \fp_zero:N { c } \cs_generate_variant:Nn \fp_gzero:N { c } \cs_new_protected_nopar:Npn \fp_set:Nn { \fp_set_aux:NNn \tl_set:Nn } \cs_new_protected_nopar:Npn \fp_gset:Nn { \fp_set_aux:NNn \tl_gset:Nn } -\cs_new_protected_nopar:Npn \fp_set_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_set_aux:NNn #1#2#3 { \group_begin: \fp_split:Nn a {#3} @@ -390,7 +390,7 @@ { \fp_set_from_dim_aux:NNn \tl_set:Nx } \cs_new_protected_nopar:Npn \fp_gset_from_dim:Nn { \fp_set_from_dim_aux:NNn \tl_gset:Nx } -\cs_new_protected_nopar:Npn \fp_set_from_dim_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_set_from_dim_aux:NNn #1#2#3 { \group_begin: \l_fp_tmp_skip \etex_glueexpr:D #3 \scan_stop: @@ -428,7 +428,7 @@ } \cs_set_protected_nopar:Npx \fp_set_from_dim_aux:w { - \cs_set_nopar:Npn \exp_not:N \fp_set_from_dim_aux:w + \cs_set:Npn \exp_not:N \fp_set_from_dim_aux:w ##1 \tl_to_str:n { pt } {##1} } \fp_set_from_dim_aux:w @@ -446,10 +446,10 @@ \cs_new_eq:NN \fp_gset_eq:cc \tl_gset_eq:cc \cs_new_eq:NN \fp_show:N \tl_show:N \cs_new_eq:NN \fp_show:c \tl_show:c -\cs_new_nopar:Npn \fp_use:N #1 +\cs_new:Npn \fp_use:N #1 { \exp_after:wN \fp_use_aux:w #1 \q_stop } \cs_generate_variant:Nn \fp_use:N { c } -\cs_new_nopar:Npn \fp_use_aux:w #1#2 e #3 \q_stop +\cs_new:Npn \fp_use_aux:w #1#2 e #3 \q_stop { \if:w #1 - - @@ -466,14 +466,14 @@ \fi: #2 e #3 \q_stop } -\cs_new_nopar:Npn \fp_use_none:w #1 e #2 \q_stop {#1} -\cs_new_nopar:Npn \fp_use_small:w #1 . #2 e #3 \q_stop +\cs_new:Npn \fp_use_none:w #1 e #2 \q_stop {#1} +\cs_new:Npn \fp_use_small:w #1 . #2 e #3 \q_stop { 0 . \prg_replicate:nn { -#3 - 1 } { 0 } #1#2 } -\cs_new_nopar:Npn \fp_use_large:w #1 . #2 e #3 \q_stop +\cs_new:Npn \fp_use_large:w #1 . #2 e #3 \q_stop { \if_int_compare:w #3 < \c_ten \exp_after:wN \fp_use_large_aux_i:w @@ -482,39 +482,39 @@ \fi: #1#2 e #3 \q_stop } -\cs_new_nopar:Npn \fp_use_large_aux_i:w #1#2 e #3 \q_stop +\cs_new:Npn \fp_use_large_aux_i:w #1#2 e #3 \q_stop { #1 \use:c { fp_use_large_aux_ #3 :w } #2 \q_stop } -\cs_new_nopar:cpn { fp_use_large_aux_1:w } #1#2 \q_stop { #1 . #2 } -\cs_new_nopar:cpn { fp_use_large_aux_2:w } #1#2#3 \q_stop +\cs_new:cpn { fp_use_large_aux_1:w } #1#2 \q_stop { #1 . #2 } +\cs_new:cpn { fp_use_large_aux_2:w } #1#2#3 \q_stop { #1#2 . #3 } -\cs_new_nopar:cpn { fp_use_large_aux_3:w } #1#2#3#4 \q_stop +\cs_new:cpn { fp_use_large_aux_3:w } #1#2#3#4 \q_stop { #1#2#3 . #4 } -\cs_new_nopar:cpn { fp_use_large_aux_4:w } #1#2#3#4#5 \q_stop +\cs_new:cpn { fp_use_large_aux_4:w } #1#2#3#4#5 \q_stop { #1#2#3#4 . #5 } -\cs_new_nopar:cpn { fp_use_large_aux_5:w } #1#2#3#4#5#6 \q_stop +\cs_new:cpn { fp_use_large_aux_5:w } #1#2#3#4#5#6 \q_stop { #1#2#3#4#5 . #6 } -\cs_new_nopar:cpn { fp_use_large_aux_6:w } #1#2#3#4#5#6#7 \q_stop +\cs_new:cpn { fp_use_large_aux_6:w } #1#2#3#4#5#6#7 \q_stop { #1#2#3#4#5#6 . #7 } -\cs_new_nopar:cpn { fp_use_large_aux_7:w } #1#2#3#4#5#6#7#8 \q_stop +\cs_new:cpn { fp_use_large_aux_7:w } #1#2#3#4#5#6#7#8 \q_stop { #1#2#3#4#6#7 . #8 } -\cs_new_nopar:cpn { fp_use_large_aux_8:w } #1#2#3#4#5#6#7#8#9 \q_stop +\cs_new:cpn { fp_use_large_aux_8:w } #1#2#3#4#5#6#7#8#9 \q_stop { #1#2#3#4#5#6#7#8 . #9 } -\cs_new_nopar:cpn { fp_use_large_aux_9:w } #1 \q_stop { #1 . } -\cs_new_nopar:Npn \fp_use_large_aux_ii:w #1 e #2 \q_stop +\cs_new:cpn { fp_use_large_aux_9:w } #1 \q_stop { #1 . } +\cs_new:Npn \fp_use_large_aux_ii:w #1 e #2 \q_stop { #1 \prg_replicate:nn { #2 - 9 } { 0 } . } -\cs_new_nopar:Npn \fp_to_dim:N #1 { \fp_use:N #1 pt } +\cs_new:Npn \fp_to_dim:N #1 { \fp_use:N #1 pt } \cs_generate_variant:Nn \fp_to_dim:N { c } -\cs_new_nopar:Npn \fp_to_int:N #1 +\cs_new:Npn \fp_to_int:N #1 { \exp_after:wN \fp_to_int_aux:w #1 \q_stop } \cs_generate_variant:Nn \fp_to_int:N { c } -\cs_new_nopar:Npn \fp_to_int_aux:w #1#2 e #3 \q_stop +\cs_new:Npn \fp_to_int_aux:w #1#2 e #3 \q_stop { \if:w #1 - - @@ -526,7 +526,7 @@ \fi: #2 e #3 \q_stop } -\cs_new_nopar:Npn \fp_to_int_small:w #1 . #2 e #3 \q_stop +\cs_new:Npn \fp_to_int_small:w #1 . #2 e #3 \q_stop { \if_int_compare:w #3 > \c_one \else: @@ -537,7 +537,7 @@ \fi: \fi: } -\cs_new_nopar:Npn \fp_to_int_large:w #1 . #2 e #3 \q_stop +\cs_new:Npn \fp_to_int_large:w #1 . #2 e #3 \q_stop { \if_int_compare:w #3 < \c_ten \exp_after:wN \fp_to_int_large_aux_i:w @@ -546,26 +546,26 @@ \fi: #1#2 e #3 \q_stop } -\cs_new_nopar:Npn \fp_to_int_large_aux_i:w #1#2 e #3 \q_stop +\cs_new:Npn \fp_to_int_large_aux_i:w #1#2 e #3 \q_stop { \use:c { fp_to_int_large_aux_ #3 :w } #2 \q_stop {#1} } -\cs_new_nopar:cpn { fp_to_int_large_aux_1:w } #1#2 \q_stop +\cs_new:cpn { fp_to_int_large_aux_1:w } #1#2 \q_stop { \fp_to_int_large_aux:nnn { #2 0 } {#1} } -\cs_new_nopar:cpn { fp_to_int_large_aux_2:w } #1#2#3 \q_stop +\cs_new:cpn { fp_to_int_large_aux_2:w } #1#2#3 \q_stop { \fp_to_int_large_aux:nnn { #3 00 } {#1#2} } -\cs_new_nopar:cpn { fp_to_int_large_aux_3:w } #1#2#3#4 \q_stop +\cs_new:cpn { fp_to_int_large_aux_3:w } #1#2#3#4 \q_stop { \fp_to_int_large_aux:nnn { #4 000 } {#1#2#3} } -\cs_new_nopar:cpn { fp_to_int_large_aux_4:w } #1#2#3#4#5 \q_stop +\cs_new:cpn { fp_to_int_large_aux_4:w } #1#2#3#4#5 \q_stop { \fp_to_int_large_aux:nnn { #5 0000 } {#1#2#3#4} } -\cs_new_nopar:cpn { fp_to_int_large_aux_5:w } #1#2#3#4#5#6 \q_stop +\cs_new:cpn { fp_to_int_large_aux_5:w } #1#2#3#4#5#6 \q_stop { \fp_to_int_large_aux:nnn { #6 00000 } {#1#2#3#4#5} } -\cs_new_nopar:cpn { fp_to_int_large_aux_6:w } #1#2#3#4#5#6#7 \q_stop +\cs_new:cpn { fp_to_int_large_aux_6:w } #1#2#3#4#5#6#7 \q_stop { \fp_to_int_large_aux:nnn { #7 000000 } {#1#2#3#4#5#6} } -\cs_new_nopar:cpn { fp_to_int_large_aux_7:w } #1#2#3#4#5#6#7#8 \q_stop +\cs_new:cpn { fp_to_int_large_aux_7:w } #1#2#3#4#5#6#7#8 \q_stop { \fp_to_int_large_aux:nnn { #8 0000000 } {#1#2#3#4#5#6#7} } -\cs_new_nopar:cpn { fp_to_int_large_aux_8:w } #1#2#3#4#5#6#7#8#9 \q_stop +\cs_new:cpn { fp_to_int_large_aux_8:w } #1#2#3#4#5#6#7#8#9 \q_stop { \fp_to_int_large_aux:nnn { #9 00000000 } {#1#2#3#4#5#6#7#8} } -\cs_new_nopar:cpn { fp_to_int_large_aux_9:w } #1 \q_stop {#1} -\cs_new_nopar:Npn \fp_to_int_large_aux:nnn #1#2#3 +\cs_new:cpn { fp_to_int_large_aux_9:w } #1 \q_stop {#1} +\cs_new:Npn \fp_to_int_large_aux:nnn #1#2#3 { \if_int_compare:w #1 < \c_five_hundred_million #3#2 @@ -573,15 +573,15 @@ \int_value:w \int_eval:w #3#2 + 1 \int_eval_end: \fi: } -\cs_new_nopar:Npn \fp_to_int_large_aux_ii:w #1 e #2 \q_stop +\cs_new:Npn \fp_to_int_large_aux_ii:w #1 e #2 \q_stop { #1 \prg_replicate:nn { #2 - 9 } { 0 } } -\cs_new_nopar:Npn \fp_to_tl:N #1 +\cs_new:Npn \fp_to_tl:N #1 { \exp_after:wN \fp_to_tl_aux:w #1 \q_stop } \cs_generate_variant:Nn \fp_to_tl:N { c } -\cs_new_nopar:Npn \fp_to_tl_aux:w #1#2 e #3 \q_stop +\cs_new:Npn \fp_to_tl_aux:w #1#2 e #3 \q_stop { \if:w #1 - - @@ -593,7 +593,7 @@ \fi: #2 e #3 \q_stop } -\cs_new_nopar:Npn \fp_to_tl_large:w #1 e #2 \q_stop +\cs_new:Npn \fp_to_tl_large:w #1 e #2 \q_stop { \if_int_compare:w #2 < \c_ten \exp_after:wN \fp_to_tl_large_aux_i:w @@ -602,66 +602,66 @@ \fi: #1 e #2 \q_stop } -\cs_new_nopar:Npn \fp_to_tl_large_aux_i:w #1 e #2 \q_stop +\cs_new:Npn \fp_to_tl_large_aux_i:w #1 e #2 \q_stop { \use:c { fp_to_tl_large_ #2 :w } #1 \q_stop } -\cs_new_nopar:Npn \fp_to_tl_large_aux_ii:w #1 . #2 e #3 \q_stop +\cs_new:Npn \fp_to_tl_large_aux_ii:w #1 . #2 e #3 \q_stop { #1 \fp_to_tl_large_zeros:NNNNNNNNN #2 e #3 } -\cs_new_nopar:cpn { fp_to_tl_large_0:w } #1 . #2 \q_stop +\cs_new:cpn { fp_to_tl_large_0:w } #1 . #2 \q_stop { #1 \fp_to_tl_large_zeros:NNNNNNNNN #2 } -\cs_new_nopar:cpn { fp_to_tl_large_1:w } #1 . #2#3 \q_stop +\cs_new:cpn { fp_to_tl_large_1:w } #1 . #2#3 \q_stop { #1#2 \fp_to_tl_large_zeros:NNNNNNNNN #3 0 } -\cs_new_nopar:cpn { fp_to_tl_large_2:w } #1 . #2#3#4 \q_stop +\cs_new:cpn { fp_to_tl_large_2:w } #1 . #2#3#4 \q_stop { #1#2#3 \fp_to_tl_large_zeros:NNNNNNNNN #4 00 } -\cs_new_nopar:cpn { fp_to_tl_large_3:w } #1 . #2#3#4#5 \q_stop +\cs_new:cpn { fp_to_tl_large_3:w } #1 . #2#3#4#5 \q_stop { #1#2#3#4 \fp_to_tl_large_zeros:NNNNNNNNN #5 000 } -\cs_new_nopar:cpn { fp_to_tl_large_4:w } #1 . #2#3#4#5#6 \q_stop +\cs_new:cpn { fp_to_tl_large_4:w } #1 . #2#3#4#5#6 \q_stop { #1#2#3#4#5 \fp_to_tl_large_zeros:NNNNNNNNN #6 0000 } -\cs_new_nopar:cpn { fp_to_tl_large_5:w } #1 . #2#3#4#5#6#7 \q_stop +\cs_new:cpn { fp_to_tl_large_5:w } #1 . #2#3#4#5#6#7 \q_stop { #1#2#3#4#5#6 \fp_to_tl_large_zeros:NNNNNNNNN #7 00000 } -\cs_new_nopar:cpn { fp_to_tl_large_6:w } #1 . #2#3#4#5#6#7#8 \q_stop +\cs_new:cpn { fp_to_tl_large_6:w } #1 . #2#3#4#5#6#7#8 \q_stop { #1#2#3#4#5#6#7 \fp_to_tl_large_zeros:NNNNNNNNN #8 000000 } -\cs_new_nopar:cpn { fp_to_tl_large_7:w } #1 . #2#3#4#5#6#7#8#9 \q_stop +\cs_new:cpn { fp_to_tl_large_7:w } #1 . #2#3#4#5#6#7#8#9 \q_stop { #1#2#3#4#5#6#7#8 \fp_to_tl_large_zeros:NNNNNNNNN #9 0000000 } -\cs_new_nopar:cpn { fp_to_tl_large_8:w } #1 . +\cs_new:cpn { fp_to_tl_large_8:w } #1 . { #1 \use:c { fp_to_tl_large_8_aux:w } } -\cs_new_nopar:cpn { fp_to_tl_large_8_aux:w } #1#2#3#4#5#6#7#8#9 \q_stop +\cs_new:cpn { fp_to_tl_large_8_aux:w } #1#2#3#4#5#6#7#8#9 \q_stop { #1#2#3#4#5#6#7#8 \fp_to_tl_large_zeros:NNNNNNNNN #9 00000000 } -\cs_new_nopar:cpn { fp_to_tl_large_9:w } #1 . #2 \q_stop {#1#2} -\cs_new_nopar:Npn \fp_to_tl_small:w #1 e #2 \q_stop +\cs_new:cpn { fp_to_tl_large_9:w } #1 . #2 \q_stop {#1#2} +\cs_new:Npn \fp_to_tl_small:w #1 e #2 \q_stop { \if_int_compare:w #2 = \c_minus_one \exp_after:wN \fp_to_tl_small_one:w @@ -674,7 +674,7 @@ \fi: #1 e #2 \q_stop } -\cs_new_nopar:Npn \fp_to_tl_small_one:w #1 . #2 e #3 \q_stop +\cs_new:Npn \fp_to_tl_small_one:w #1 . #2 e #3 \q_stop { \if_int_compare:w \fp_use_ix:NNNNNNNNN #2 > \c_four \if_int_compare:w @@ -693,7 +693,7 @@ \fp_to_tl_small_zeros:NNNNNNNNN #2 \fi: } -\cs_new_nopar:Npn \fp_to_tl_small_two:w #1 . #2 e #3 \q_stop +\cs_new:Npn \fp_to_tl_small_two:w #1 . #2 e #3 \q_stop { \if_int_compare:w \fp_use_iix_ix:NNNNNNNNN #2 > \c_forty_four \if_int_compare:w @@ -713,13 +713,13 @@ \fp_to_tl_small_zeros:NNNNNNNNN #2 \fi: } -\cs_new_nopar:Npn \fp_to_tl_small_aux:w #1 . #2 e #3 \q_stop +\cs_new:Npn \fp_to_tl_small_aux:w #1 . #2 e #3 \q_stop { #1 \fp_to_tl_large_zeros:NNNNNNNNN #2 e #3 } -\cs_new_nopar:Npn \fp_to_tl_large_zeros:NNNNNNNNN #1#2#3#4#5#6#7#8#9 +\cs_new:Npn \fp_to_tl_large_zeros:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \if_int_compare:w #9 = \c_zero \if_int_compare:w #8 = \c_zero @@ -758,7 +758,7 @@ . #1#2#3#4#5#6#7#8#9 \fi: } -\cs_new_nopar:Npn \fp_to_tl_small_zeros:NNNNNNNNN #1#2#3#4#5#6#7#8#9 +\cs_new:Npn \fp_to_tl_small_zeros:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \if_int_compare:w #9 = \c_zero \if_int_compare:w #8 = \c_zero @@ -797,11 +797,11 @@ #1#2#3#4#5#6#7#8#9 \fi: } -\cs_new_nopar:Npn \fp_use_iix_ix:NNNNNNNNN #1#2#3#4#5#6#7#8#9 {#8#9} -\cs_new_nopar:Npn \fp_use_ix:NNNNNNNNN #1#2#3#4#5#6#7#8#9 {#9} -\cs_new_nopar:Npn \fp_use_i_to_vii:NNNNNNNNN #1#2#3#4#5#6#7#8#9 +\cs_new:Npn \fp_use_iix_ix:NNNNNNNNN #1#2#3#4#5#6#7#8#9 {#8#9} +\cs_new:Npn \fp_use_ix:NNNNNNNNN #1#2#3#4#5#6#7#8#9 {#9} +\cs_new:Npn \fp_use_i_to_vii:NNNNNNNNN #1#2#3#4#5#6#7#8#9 {#1#2#3#4#5#6#7} -\cs_new_nopar:Npn \fp_use_i_to_iix:NNNNNNNNN #1#2#3#4#5#6#7#8#9 +\cs_new:Npn \fp_use_i_to_iix:NNNNNNNNN #1#2#3#4#5#6#7#8#9 {#1#2#3#4#5#6#7#8} \cs_new_protected_nopar:Npn \fp_round_figures:Nn { \fp_round_figures_aux:NNn \tl_set:Nn } @@ -809,7 +809,7 @@ \cs_new_protected_nopar:Npn \fp_ground_figures:Nn { \fp_round_figures_aux:NNn \tl_gset:Nn } \cs_generate_variant:Nn \fp_ground_figures:Nn { c } -\cs_new_protected_nopar:Npn \fp_round_figures_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_round_figures_aux:NNn #1#2#3 { \group_begin: \fp_read:N #2 @@ -844,7 +844,7 @@ \cs_new_protected_nopar:Npn \fp_ground_places:Nn { \fp_round_places_aux:NNn \tl_gset:Nn } \cs_generate_variant:Nn \fp_ground_places:Nn { c } -\cs_new_protected_nopar:Npn \fp_round_places_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_round_places_aux:NNn #1#2#3 { \group_begin: \fp_read:N #2 @@ -883,7 +883,7 @@ \exp_after:wN \use_i:nn \exp_after:wN \fp_round_aux:NNNNNNNNN \int_use:N \l_fp_input_a_decimal_int } -\cs_new_protected_nopar:Npn \fp_round_aux:NNNNNNNNN #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \fp_round_aux:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \fp_round_loop:N #9#8#7#6#5#4#3#2#1 \bool_if:NT \l_fp_round_carry_bool @@ -896,7 +896,7 @@ \tex_advance:D \l_fp_input_a_exponent_int \c_one \fi: } -\cs_new_protected_nopar:Npn \fp_round_loop:N #1 +\cs_new_protected:Npn \fp_round_loop:N #1 { \if_int_compare:w \l_fp_round_position_int < \l_fp_round_target_int \bool_if:NTF \l_fp_round_carry_bool @@ -926,7 +926,7 @@ \cs_new_protected_nopar:Npn \fp_gabs:N { \fp_abs_aux:NN \tl_gset:Nn } \cs_generate_variant:Nn \fp_abs:N { c } \cs_generate_variant:Nn \fp_gabs:N { c } -\cs_new_protected_nopar:Npn \fp_abs_aux:NN #1#2 +\cs_new_protected:Npn \fp_abs_aux:NN #1#2 { \group_begin: \fp_read:N #2 @@ -951,7 +951,7 @@ \cs_new_protected_nopar:Npn \fp_gneg:N { \fp_neg_aux:NN \tl_gset:Nn } \cs_generate_variant:Nn \fp_neg:N { c } \cs_generate_variant:Nn \fp_gneg:N { c } -\cs_new_protected_nopar:Npn \fp_neg_aux:NN #1#2 +\cs_new_protected:Npn \fp_neg_aux:NN #1#2 { \group_begin: \fp_read:N #2 @@ -977,7 +977,7 @@ \cs_new_protected_nopar:Npn \fp_gadd:Nn { \fp_add_aux:NNn \tl_gset:Nn } \cs_generate_variant:Nn \fp_add:Nn { c } \cs_generate_variant:Nn \fp_gadd:Nn { c } -\cs_new_protected_nopar:Npn \fp_add_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_add_aux:NNn #1#2#3 { \group_begin: \fp_read:N #2 @@ -1007,7 +1007,7 @@ \l_fp_output_integer_int \l_fp_output_decimal_int \l_fp_output_exponent_int - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: ##1 ##2 @@ -1080,7 +1080,7 @@ \cs_new_protected_nopar:Npn \fp_gsub:Nn { \fp_sub_aux:NNn \tl_gset:Nn } \cs_generate_variant:Nn \fp_sub:Nn { c } \cs_generate_variant:Nn \fp_gsub:Nn { c } -\cs_new_protected_nopar:Npn \fp_sub_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_sub_aux:NNn #1#2#3 { \group_begin: \fp_read:N #2 @@ -1098,7 +1098,7 @@ \cs_new_protected_nopar:Npn \fp_gmul:Nn { \fp_mul_aux:NNn \tl_gset:Nn } \cs_generate_variant:Nn \fp_mul:Nn { c } \cs_generate_variant:Nn \fp_gmul:Nn { c } -\cs_new_protected_nopar:Npn \fp_mul_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_mul_aux:NNn #1#2#3 { \group_begin: \fp_read:N #2 @@ -1179,10 +1179,10 @@ \fp_mul_end_level: \l_fp_output_integer_int 0 \l_fp_mul_output_tl \scan_stop: } -\cs_new_protected_nopar:Npn \fp_mul_split:NNNN #1#2#3#4 +\cs_new_protected:Npn \fp_mul_split:NNNN #1#2#3#4 { \tex_advance:D #1 \c_one_thousand_million - \cs_set_protected_nopar:Npn \fp_mul_split_aux:w + \cs_set_protected:Npn \fp_mul_split_aux:w ##1##2##3##4##5##6##7##8##9 \q_stop { #2 ##2##3##4 \scan_stop: #3 ##5##6##7 \scan_stop: @@ -1191,7 +1191,7 @@ \exp_after:wN \fp_mul_split_aux:w \int_use:N #1 \q_stop \tex_advance:D #1 -\c_one_thousand_million } -\cs_new_protected_nopar:Npn \fp_mul_product:NN #1#2 +\cs_new_protected:Npn \fp_mul_product:NN #1#2 { \l_fp_mul_output_int \int_eval:w \l_fp_mul_output_int + #1 * #2 \scan_stop: @@ -1202,7 +1202,7 @@ \exp_after:wN \use_i:nn \exp_after:wN \fp_mul_end_level:NNNNNNNNN \int_use:N \l_fp_mul_output_int } -\cs_new_protected_nopar:Npn \fp_mul_end_level:NNNNNNNNN #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \fp_mul_end_level:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \tl_set:Nx \l_fp_mul_output_tl { #7#8#9 \l_fp_mul_output_tl } \l_fp_mul_output_int #1#2#3#4#5#6 \scan_stop: @@ -1211,7 +1211,7 @@ \cs_new_protected_nopar:Npn \fp_gdiv:Nn { \fp_div_aux:NNn \tl_gset:Nn } \cs_generate_variant:Nn \fp_div:Nn { c } \cs_generate_variant:Nn \fp_gdiv:Nn { c } -\cs_new_protected_nopar:Npn \fp_div_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_div_aux:NNn #1#2#3 { \group_begin: \fp_read:N #2 @@ -1225,7 +1225,7 @@ \int_eval:w \l_fp_input_b_integer_int + \l_fp_input_b_decimal_int = \c_zero - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: #1 \exp_not:N #2 { \c_undefined_fp } @@ -1235,7 +1235,7 @@ \int_eval:w \l_fp_input_a_integer_int + \l_fp_input_a_decimal_int = \c_zero - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: #1 \exp_not:N #2 { \c_zero_fp } @@ -1261,7 +1261,7 @@ \l_fp_output_integer_int \l_fp_output_decimal_int \l_fp_output_exponent_int - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: ##1 ##2 @@ -1353,13 +1353,13 @@ \int_eval_end: \tex_divide:D \l_fp_div_offset_int \c_ten } -\cs_new_protected_nopar:Npn \fp_div_loop_step:w #1#2#3#4#5#6#7#8#9 \q_stop +\cs_new_protected:Npn \fp_div_loop_step:w #1#2#3#4#5#6#7#8#9 \q_stop { \l_fp_input_a_integer_int \int_eval:w #2 + \l_fp_input_a_integer_int \int_eval_end: \l_fp_input_a_decimal_int #3#4#5#6#7#8#9 0 \scan_stop: } -\cs_new_protected_nopar:Npn \fp_add:NNNNNNNNN #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \fp_add:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { #7 \int_eval:w #1 + #4 \int_eval_end: #8 \int_eval:w #2 + #5 \int_eval_end: @@ -1375,7 +1375,7 @@ \tex_advance:D #8 -\c_one_thousand_million \fi: } -\cs_new_protected_nopar:Npn \fp_sub:NNNNNNNNN #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \fp_sub:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { #7 \int_eval:w #1 - #4 \int_eval_end: #8 \int_eval:w #2 - #5 \int_eval_end: @@ -1398,7 +1398,7 @@ \fi: \fi: } -\cs_new_protected_nopar:Npn \fp_mul:NNNNNN #1#2#3#4#5#6 +\cs_new_protected:Npn \fp_mul:NNNNNN #1#2#3#4#5#6 { \fp_mul_split:NNNN #1 \l_fp_mul_a_i_int \l_fp_mul_a_ii_int \l_fp_mul_a_iii_int @@ -1442,7 +1442,7 @@ \fp_mul_end_level: #5 0 \l_fp_mul_output_tl \scan_stop: } -\cs_new_protected_nopar:Npn \fp_mul:NNNNNNNNN #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \fp_mul:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \fp_mul_split:NNNN #2 \l_fp_mul_a_i_int \l_fp_mul_a_ii_int \l_fp_mul_a_iii_int @@ -1502,7 +1502,7 @@ \fp_mul_end_level: #7 0 \l_fp_mul_output_tl \scan_stop: } -\cs_new_protected_nopar:Npn \fp_div_integer:NNNNN #1#2#3#4#5 +\cs_new_protected:Npn \fp_div_integer:NNNNN #1#2#3#4#5 { \l_fp_tmp_int #1 \tex_divide:D \l_fp_tmp_int #3 @@ -1534,7 +1534,7 @@ \exp_after:wN \fp_extended_normalise_aux_i: \fi: } -\cs_new_protected_nopar:Npn \fp_extended_normalise_aux_i:w +\cs_new_protected:Npn \fp_extended_normalise_aux_i:w #1#2#3#4#5#6#7#8#9 \q_stop { \l_fp_input_a_integer_int @@ -1544,7 +1544,7 @@ \exp_after:wN \fp_extended_normalise_aux_ii:w \int_use:N \l_fp_input_a_extended_int \q_stop } -\cs_new_protected_nopar:Npn \fp_extended_normalise_aux_ii:w +\cs_new_protected:Npn \fp_extended_normalise_aux_ii:w #1#2#3#4#5#6#7#8#9 \q_stop { \l_fp_input_a_decimal_int @@ -1562,7 +1562,7 @@ \exp_after:wN \fp_extended_normalise_aux_ii: \fi: } -\cs_new_protected_nopar:Npn \fp_extended_normalise_ii_aux:NNNNNNNNN +\cs_new_protected:Npn \fp_extended_normalise_ii_aux:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \if_int_compare:w \l_fp_input_a_integer_int = \c_zero @@ -1595,7 +1595,7 @@ \exp_after:wN \fp_extended_normalise_output: \fi: } -\cs_new_protected_nopar:Npn \fp_extended_normalise_output_aux_i:NNNNNNNNN +\cs_new_protected:Npn \fp_extended_normalise_output_aux_i:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \l_fp_output_integer_int #1#2#3#4#5#6#7#8 \scan_stop: @@ -1609,13 +1609,13 @@ \exp_after:wN \fp_extended_normalise_output_aux_ii:NNNNNNNNN \l_fp_tmp_tl } -\cs_new_protected_nopar:Npn \fp_extended_normalise_output_aux_ii:NNNNNNNNN +\cs_new_protected:Npn \fp_extended_normalise_output_aux_ii:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \l_fp_output_decimal_int #1#2#3#4#5#6#7#8#9 \scan_stop: \fp_extended_normalise_output_aux:N } -\cs_new_protected_nopar:Npn \fp_extended_normalise_output_aux:N #1 +\cs_new_protected:Npn \fp_extended_normalise_output_aux:N #1 { \tex_advance:D \l_fp_output_extended_int \c_one_thousand_million \tex_divide:D \l_fp_output_extended_int \c_ten @@ -1665,7 +1665,7 @@ \fi: \fi: } -\cs_new_protected_nopar:Npn \fp_trig_sub:NNN #1#2#3 +\cs_new_protected:Npn \fp_trig_sub:NNN #1#2#3 { \l_fp_input_a_integer_int \int_eval:w \l_fp_input_a_integer_int - #1 \int_eval_end: @@ -1763,7 +1763,7 @@ \cs_new_protected_nopar:Npn \fp_gsin:Nn { \fp_sin_aux:NNn \tl_gset:Nn } \cs_generate_variant:Nn \fp_sin:Nn { c } \cs_generate_variant:Nn \fp_gsin:Nn { c } -\cs_new_protected_nopar:Npn \fp_sin_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_sin_aux:NNn #1#2#3 { \group_begin: \fp_split:Nn a {#3} @@ -1860,7 +1860,7 @@ \cs_new_protected_nopar:Npn \fp_gcos:Nn { \fp_cos_aux:NNn \tl_gset:Nn } \cs_generate_variant:Nn \fp_cos:Nn { c } \cs_generate_variant:Nn \fp_gcos:Nn { c } -\cs_new_protected_nopar:Npn \fp_cos_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_cos_aux:NNn #1#2#3 { \group_begin: \fp_split:Nn a {#3} @@ -2061,7 +2061,7 @@ \cs_new_protected_nopar:Npn \fp_gtan:Nn { \fp_tan_aux:NNn \tl_gset:Nn } \cs_generate_variant:Nn \fp_tan:Nn { c } \cs_generate_variant:Nn \fp_gtan:Nn { c } -\cs_new_protected_nopar:Npn \fp_tan_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_tan_aux:NNn #1#2#3 { \group_begin: \fp_split:Nn a {#3} @@ -2254,7 +2254,7 @@ \cs_new_protected_nopar:Npn \fp_gexp:Nn { \fp_exp_aux:NNn \tl_gset:Nn } \cs_generate_variant:Nn \fp_exp:Nn { c } \cs_generate_variant:Nn \fp_gexp:Nn { c } -\cs_new_protected_nopar:Npn \fp_exp_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_exp_aux:NNn #1#2#3 { \group_begin: \fp_split:Nn a {#3} @@ -2425,13 +2425,13 @@ \fi: \fp_exp_decimal: } -\cs_new_protected_nopar:Npn \fp_exp_integer_const:n #1 +\cs_new_protected:Npn \fp_exp_integer_const:n #1 { \exp_after:wN \exp_after:wN \exp_after:wN \fp_exp_integer_const:nnnn \cs:w c_fp_exp_ #1 _tl \cs_end: } -\cs_new_protected_nopar:Npn \fp_exp_integer_const:nnnn #1#2#3#4 +\cs_new_protected:Npn \fp_exp_integer_const:nnnn #1#2#3#4 { \l_fp_exp_integer_int #1 \scan_stop: \l_fp_exp_decimal_int #2 \scan_stop: @@ -2550,7 +2550,7 @@ \exp_after:wN \fp_exp_Taylor: \fi: } -\cs_new_protected_nopar:Npn \fp_exp_const:Nx #1#2 +\cs_new_protected:Npn \fp_exp_const:Nx #1#2 { \tl_new:N #1 \tl_gset:Nx #1 {#2} @@ -2572,7 +2572,7 @@ \cs_new_protected_nopar:Npn \fp_gln:Nn { \fp_ln_aux:NNn \tl_gset:Nn } \cs_generate_variant:Nn \fp_ln:Nn { c } \cs_generate_variant:Nn \fp_gln:Nn { c } -\cs_new_protected_nopar:Npn \fp_ln_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_ln_aux:NNn #1#2#3 { \group_begin: \fp_split:Nn a {#3} @@ -2588,7 +2588,7 @@ > \c_zero \exp_after:wN \exp_after:wN \exp_after:wN \fp_ln_aux: \else: - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: ##1 \exp_not:N ##2 { \c_zero_fp } @@ -2596,7 +2596,7 @@ \exp_after:wN \exp_after:wN \exp_after:wN \fp_ln_error_msg: \fi: \else: - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: ##1 \exp_not:N ##2 { \c_zero_fp } @@ -2622,7 +2622,7 @@ \else: \exp_after:wN \fp_ln_exponent: \fi: - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: ##1 \exp_not:N ##2 @@ -2682,7 +2682,7 @@ \fi: \fp_ln_exponent_units: } -\cs_new_protected_nopar:Npn \fp_ln_exponent_tens:NN #1 #2 +\cs_new_protected:Npn \fp_ln_exponent_tens:NN #1 #2 { \l_fp_input_a_exponent_int #2 \scan_stop: \fp_ln_const:nn { 10 } { #1 } @@ -2718,7 +2718,7 @@ \l_fp_output_exponent_int \l_fp_exp_exponent_int \fi: } -\cs_new_protected_nopar:Npn \fp_ln_normalise_aux:NNNNNNNNN #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \fp_ln_normalise_aux:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \if_int_compare:w \l_fp_exp_integer_int = \c_zero \l_fp_exp_decimal_int #1#2#3#4#5#6#7#8 \scan_stop: @@ -2785,7 +2785,7 @@ \tex_divide:D \l_fp_input_a_decimal_int \c_two \tex_divide:D \l_fp_input_a_extended_int \c_two } -\cs_new_protected_nopar:Npn \fp_ln_const:nn #1#2 +\cs_new_protected:Npn \fp_ln_const:nn #1#2 { \exp_after:wN \exp_after:wN \exp_after:wN \fp_exp_integer_const:nnnn @@ -2855,7 +2855,7 @@ \exp_after:wN \fp_ln_fixed: \fi: } -\cs_new_protected_nopar:Npn \fp_ln_fixed_aux:NNNNNNNNN #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \fp_ln_fixed_aux:NNNNNNNNN #1#2#3#4#5#6#7#8#9 { \if_int_compare:w \l_fp_output_integer_int = \c_zero \l_fp_output_decimal_int #1#2#3#4#5#6#7#8 \scan_stop: @@ -2906,7 +2906,7 @@ \cs_new_protected_nopar:Npn \fp_gpow:Nn { \fp_pow_aux:NNn \tl_gset:Nn } \cs_generate_variant:Nn \fp_pow:Nn { c } \cs_generate_variant:Nn \fp_gpow:Nn { c } -\cs_new_protected_nopar:Npn \fp_pow_aux:NNn #1#2#3 +\cs_new_protected:Npn \fp_pow_aux:NNn #1#2#3 { \group_begin: \fp_read:N #2 @@ -2928,13 +2928,13 @@ \int_eval:w \l_fp_input_a_integer_int + \l_fp_input_a_decimal_int = \c_zero - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: ##1 ##2 { \c_undefined_fp } } \else: - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: ##1 ##2 { \c_zero_fp } @@ -2945,7 +2945,7 @@ \int_eval:w \l_fp_input_a_integer_int + \l_fp_input_a_decimal_int = \c_zero - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: ##1 ##2 { \c_one_fp } @@ -2978,14 +2978,14 @@ \exp_after:wN \fp_pow_aux_ii: \else: \group_end: - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: ##1 ##2 { \c_undefined_fp } } \fi: \else: - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: ##1 ##2 { \c_undefined_fp } @@ -3031,7 +3031,7 @@ \fp_pow_aux_iv: \fi: \fi: - \cs_set_protected_nopar:Npx \fp_tmp:w ##1##2 + \cs_set_protected:Npx \fp_tmp:w ##1##2 { \group_end: ##1 ##2 @@ -3150,7 +3150,7 @@ \fp_read:N #1 \fp_compare_aux:N #2 } -\cs_new_protected_nopar:Npn \fp_compare_aux:N #1 +\cs_new_protected:Npn \fp_compare_aux:N #1 { \cs_if_exist:cTF { fp_compare_#1: } { \use:c { fp_compare_#1: } } @@ -3336,43 +3336,43 @@ } \l_fp_tmp_tl } -\cs_new_protected_nopar:Npn \fp_compare_aux_i:w #1 == #2 == #3 \q_stop +\cs_new_protected:Npn \fp_compare_aux_i:w #1 == #2 == #3 \q_stop { \quark_if_nil:nTF {#2} { \fp_compare_aux_ii:w #1 != \q_nil != \q_stop } { \fp_compare:nNnTF {#1} = {#2} \prg_return_true: \prg_return_false: } } -\cs_new_protected_nopar:Npn \fp_compare_aux_ii:w #1 != #2 != #3 \q_stop +\cs_new_protected:Npn \fp_compare_aux_ii:w #1 != #2 != #3 \q_stop { \quark_if_nil:nTF {#2} { \fp_compare_aux_iii:w #1 <= \q_nil <= \q_stop } { \fp_compare:nNnTF {#1} = {#2} \prg_return_false: \prg_return_true: } } -\cs_new_protected_nopar:Npn \fp_compare_aux_iii:w #1 <= #2 <= #3 \q_stop +\cs_new_protected:Npn \fp_compare_aux_iii:w #1 <= #2 <= #3 \q_stop { \quark_if_nil:nTF {#2} { \fp_compare_aux_iv:w #1 >= \q_nil >= \q_stop } { \fp_compare:nNnTF {#1} > {#2} \prg_return_false: \prg_return_true: } } -\cs_new_protected_nopar:Npn \fp_compare_aux_iv:w #1 >= #2 >= #3 \q_stop +\cs_new_protected:Npn \fp_compare_aux_iv:w #1 >= #2 >= #3 \q_stop { \quark_if_nil:nTF {#2} { \fp_compare_aux_v:w #1 = \q_nil \q_stop } { \fp_compare:nNnTF {#1} < {#2} \prg_return_false: \prg_return_true: } } -\cs_new_protected_nopar:Npn \fp_compare_aux_v:w #1 = #2 = #3 \q_stop +\cs_new_protected:Npn \fp_compare_aux_v:w #1 = #2 = #3 \q_stop { \quark_if_nil:nTF {#2} { \fp_compare_aux_vi:w #1 < \q_nil < \q_stop } { \fp_compare:nNnTF {#1} = {#2} \prg_return_true: \prg_return_false: } } -\cs_new_protected_nopar:Npn \fp_compare_aux_vi:w #1 < #2 < #3 \q_stop +\cs_new_protected:Npn \fp_compare_aux_vi:w #1 < #2 < #3 \q_stop { \quark_if_nil:nTF {#2} { \fp_compare_aux_vii:w #1 > \q_nil > \q_stop } { \fp_compare:nNnTF {#1} < {#2} \prg_return_true: \prg_return_false: } } -\cs_new_protected_nopar:Npn \fp_compare_aux_vii:w #1 > #2 > #3 \q_stop +\cs_new_protected:Npn \fp_compare_aux_vii:w #1 > #2 > #3 \q_stop { \quark_if_nil:nTF {#2} { \prg_return_false: } diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3int.sty b/Master/texmf-dist/tex/latex/l3kernel/l3int.sty index b5f57e66b05..eaf62805f81 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 3029 2011-12-06 22:47:30Z joseph $ +\GetIdInfo$Id: l3int.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental integers} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -120,7 +120,7 @@ #1 - \int_div_truncate:nn {#1} {#2} * ( #2 ) \int_eval_end: } -\cs_new_protected_nopar:Npn \int_new:N #1 +\cs_new_protected:Npn \int_new:N #1 { \chk_if_free_cs:N #1 \newcount #1 @@ -130,14 +130,14 @@ { \int_compare:nNnTF {#2} > \c_minus_one { - \int_compare:nNnTF {#2} > \c_max_register_int + \int_compare:nNnTF {#2} > \c_max_const_int { \int_new:N #1 \int_gset:Nn #1 {#2} } { \chk_if_free_cs:N #1 - \tex_global:D \tex_mathchardef:D #1 = + \tex_global:D \int_constdef:Nw #1 = \int_eval:w #2 \int_eval_end: } } @@ -147,14 +147,29 @@ } } \cs_generate_variant:Nn \int_const:Nn { c } -\cs_new_protected_nopar:Npn \int_zero:N #1 { #1 = \c_zero } -\cs_new_protected_nopar:Npn \int_gzero:N #1 { \tex_global:D #1 = \c_zero } +\pdftex_if_engine:TF + { + \cs_new_eq:NN \int_constdef:Nw \tex_mathchardef:D + \tex_mathchardef:D \c_max_const_int 32 767 ~ + } + { + \cs_new_eq:NN \int_constdef:Nw \tex_chardef:D + \tex_chardef:D \c_max_const_int 1 114 111 ~ + } +\cs_new_protected:Npn \int_zero:N #1 { #1 = \c_zero } +\cs_new_protected:Npn \int_gzero:N #1 { \tex_global:D #1 = \c_zero } \cs_generate_variant:Nn \int_zero:N { c } \cs_generate_variant:Nn \int_gzero:N { c } -\cs_new_protected_nopar:Npn \int_set_eq:NN #1#2 { #1 = #2 } +\cs_new_protected:Npn \int_zero_new:N #1 + { \cs_if_exist:NTF #1 { \int_zero:N #1 } { \int_new:N #1 } } +\cs_new_protected:Npn \int_gzero_new:N #1 + { \cs_if_exist:NTF #1 { \int_gzero:N #1 } { \int_new:N #1 } } +\cs_generate_variant:Nn \int_zero_new:N { c } +\cs_generate_variant:Nn \int_gzero_new:N { c } +\cs_new_protected:Npn \int_set_eq:NN #1#2 { #1 = #2 } \cs_generate_variant:Nn \int_set_eq:NN { c } \cs_generate_variant:Nn \int_set_eq:NN { Nc , cc } -\cs_new_protected_nopar:Npn \int_gset_eq:NN #1#2 { \tex_global:D #1 = #2 } +\cs_new_protected:Npn \int_gset_eq:NN #1#2 { \tex_global:D #1 = #2 } \cs_generate_variant:Nn \int_gset_eq:NN { c } \cs_generate_variant:Nn \int_gset_eq:NN { Nc , cc } \cs_new_protected:Npn \int_add:Nn #1#2 @@ -169,9 +184,9 @@ \cs_generate_variant:Nn \int_gadd:Nn { c } \cs_generate_variant:Nn \int_sub:Nn { c } \cs_generate_variant:Nn \int_gsub:Nn { c } -\cs_new_protected_nopar:Npn \int_incr:N #1 +\cs_new_protected:Npn \int_incr:N #1 { \tex_advance:D #1 \c_one } -\cs_new_protected_nopar:Npn \int_decr:N #1 +\cs_new_protected:Npn \int_decr:N #1 { \tex_advance:D #1 \c_minus_one } \cs_new_protected_nopar:Npn \int_gincr:N { \tex_global:D \int_incr:N } @@ -495,7 +510,7 @@ \exp_after:wN \int_to_roman_aux:N \int_to_roman:w \int_eval:n {#1} Q } -\cs_new_nopar:Npn \int_to_roman_aux:N #1 +\cs_new:Npn \int_to_roman_aux:N #1 { \use:c { int_to_roman_ #1 :w } \int_to_roman_aux:N @@ -505,7 +520,7 @@ \exp_after:wN \int_to_Roman_aux:N \int_to_roman:w \int_eval:n {#1} Q } -\cs_new_nopar:Npn \int_to_Roman_aux:N #1 +\cs_new:Npn \int_to_Roman_aux:N #1 { \use:c { int_to_Roman_ #1 :w } \int_to_Roman_aux:N @@ -525,7 +540,7 @@ \cs_new_nopar:Npn \int_to_Roman_c:w { C } \cs_new_nopar:Npn \int_to_Roman_d:w { D } \cs_new_nopar:Npn \int_to_Roman_m:w { M } -\cs_new_nopar:Npn \int_to_Roman_Q:w #1 { } +\cs_new:Npn \int_to_Roman_Q:w #1 { } \cs_new:Npn \int_get_sign:n #1 { \int_get_sign_and_digits_aux:nNNN {#1} @@ -631,7 +646,7 @@ \int_const:cn { c_int_from_roman_C_int } { 100 } \int_const:cn { c_int_from_roman_D_int } { 500 } \int_const:cn { c_int_from_roman_M_int } { 1000 } -\cs_new_nopar:Npn \int_from_roman:n #1 +\cs_new:Npn \int_from_roman:n #1 { \tl_if_blank:nF {#1} { @@ -640,7 +655,7 @@ \int_from_roman_aux:NN #1 Q \q_stop } } -\cs_new_nopar:Npn \int_from_roman_aux:NN #1#2 +\cs_new:Npn \int_from_roman_aux:NN #1#2 { \str_if_eq:nnTF {#1} { Q } {#1#2} @@ -674,9 +689,9 @@ } } } -\cs_new_nopar:Npn \int_from_roman_end:w #1 Q #2 \q_stop +\cs_new:Npn \int_from_roman_end:w #1 Q #2 \q_stop { \tl_if_empty:nTF {#2} {#1} {#2} } -\cs_new_nopar:Npn \int_from_roman_clean_up:w #1 Q { + 0 Q -1 } +\cs_new:Npn \int_from_roman_clean_up:w #1 Q { + 0 Q -1 } \cs_new_eq:NN \int_show:N \kernel_register_show:N \cs_new_eq:NN \int_show:c \kernel_register_show:c \cs_new_protected:Npn \int_show:n #1 diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3io.sty b/Master/texmf-dist/tex/latex/l3kernel/l3io.sty index c074dbf0ea2..685dd7ca945 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3io.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3io.sty @@ -46,16 +46,15 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3io.dtx 3005 2011-11-25 13:19:47Z bruno $ +\GetIdInfo$Id: l3io.dtx 3096 2011-12-27 09:09:18Z joseph $ {L3 Experimental input-output operations} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} \package_check_loaded_expl: \cs_new_eq:NN \if_eof:w \tex_ifeof:D -\cs_new_eq:NN \c_iow_term_stream \c_sixteen -\cs_new_eq:NN \c_ior_term_stream \c_sixteen -\cs_new_eq:NN \c_iow_log_stream \c_minus_one -\cs_new_eq:NN \c_ior_log_stream \c_minus_one +\cs_new_eq:NN \c_term_ior \c_sixteen +\cs_new_eq:NN \c_log_iow \c_minus_one +\cs_new_eq:NN \c_term_iow \c_sixteen \tl_const:Nn \c_iow_streams_tl { \c_zero @@ -88,34 +87,30 @@ \cs_set_eq:NN \ior_raw_new:N \newread \cs_generate_variant:Nn \ior_raw_new:N { c } \cs_generate_variant:Nn \iow_raw_new:N { c } -\cs_new_protected_nopar:Npn \ior_new:N #1 - { - \chk_if_free_cs:N #1 - \tex_global:D \tex_chardef:D #1 16 ~ - } -\cs_new_eq:NN \iow_new:N \ior_new:N +\cs_new_protected:Npn \ior_new:N #1 { \cs_new_eq:NN #1 \c_term_ior } \cs_generate_variant:Nn \ior_new:N { c } +\cs_new_protected:Npn \iow_new:N #1 { \cs_new_eq:NN #1 \c_term_iow } \cs_generate_variant:Nn \iow_new:N { c } -\cs_new_protected_nopar:Npn \ior_open:Nn #1#2 +\cs_new_protected:Npn \ior_open:Nn #1#2 { \ior_close:N #1 \int_set:Nn \l_ior_stream_int \c_sixteen \tl_map_function:NN \c_ior_streams_tl \ior_alloc_read:n \int_compare:nNnTF \l_ior_stream_int = \c_sixteen - { \msg_kernel_error:nn { ior } { streams-exhausted } } + { \msg_kernel_fatal:nn { ior } { streams-exhausted } } { \ior_stream_alloc:N #1 \prop_gput:NVn \g_ior_streams_prop \l_ior_stream_int {#2} \tex_openin:D #1#2 \scan_stop: } } -\cs_new_protected_nopar:Npn \iow_open:Nn #1#2 +\cs_new_protected:Npn \iow_open:Nn #1#2 { \iow_close:N #1 \int_set:Nn \l_iow_stream_int \c_sixteen \tl_map_function:NN \c_iow_streams_tl \iow_alloc_write:n \int_compare:nNnTF \l_iow_stream_int = \c_sixteen - { \msg_kernel_error:nn { iow } { streams-exhausted } } + { \msg_kernel_fatal:nn { iow } { streams-exhausted } } { \iow_stream_alloc:N #1 \prop_gput:NVn \g_iow_streams_prop \l_iow_stream_int {#2} @@ -124,7 +119,7 @@ } \cs_generate_variant:Nn \ior_open:Nn { c } \cs_generate_variant:Nn \iow_open:Nn { c } -\cs_new_protected_nopar:Npn \iow_alloc_write:n #1 +\cs_new_protected:Npn \iow_alloc_write:n #1 { \prop_if_in:NnF \g_iow_streams_prop {#1} { @@ -132,7 +127,7 @@ \tl_map_break: } } -\cs_new_protected_nopar:Npn \ior_alloc_read:n #1 +\cs_new_protected:Npn \ior_alloc_read:n #1 { \prop_if_in:NnF \g_iow_streams_prop {#1} { @@ -140,21 +135,20 @@ \tl_map_break: } } -\cs_new_protected_nopar:Npn \iow_stream_alloc:N #1 +\cs_new_protected:Npn \iow_stream_alloc:N #1 { - \cs_if_exist:cTF { g_iow_ \int_use:N \l_iow_stream_int _stream } - { \cs_gset_eq:Nc #1 { g_iow_ \int_use:N \l_iow_stream_int _stream } } + \cs_if_exist:cTF { g_iow_ \int_use:N \l_iow_stream_int _iow } + { \cs_gset_eq:Nc #1 { g_iow_ \int_use:N \l_iow_stream_int _iow } } { \iow_stream_alloc_aux: \int_compare:nNnT \l_iow_stream_int = \c_sixteen { - \iow_raw_new:N \g_iow_tmp_stream - \int_set:Nn \l_iow_stream_int { \g_iow_tmp_stream } + \iow_raw_new:N \g_iow_tmp_iow + \int_set:Nn \l_iow_stream_int { \g_iow_tmp_iow } \cs_gset_eq:cN - { g_iow_ \int_use:N \l_iow_stream_int _stream } - \g_iow_tmp_stream + { g_iow_ \int_use:N \l_iow_stream_int _iow } \g_iow_tmp_iow } - \cs_gset_eq:Nc #1 { g_iow_ \int_use:N \l_iow_stream_int _stream } + \cs_gset_eq:Nc #1 { g_iow_ \int_use:N \l_iow_stream_int _iow } } } \cs_new_protected_nopar:Npn \iow_stream_alloc_aux: @@ -162,7 +156,7 @@ \int_incr:N \l_iow_stream_int \int_compare:nNnT \l_iow_stream_int < \c_sixteen { - \cs_if_exist:cTF { g_iow_ \int_use:N \l_iow_stream_int _stream } + \cs_if_exist:cTF { g_iow_ \int_use:N \l_iow_stream_int _iow } { \prop_if_in:NVT \g_iow_streams_prop \l_iow_stream_int { \iow_stream_alloc_aux: } @@ -170,21 +164,20 @@ { \iow_stream_alloc_aux: } } } -\cs_new_protected_nopar:Npn \ior_stream_alloc:N #1 +\cs_new_protected:Npn \ior_stream_alloc:N #1 { - \cs_if_exist:cTF { g_ior_ \int_use:N \l_ior_stream_int _stream } - { \cs_gset_eq:Nc #1 { g_ior_ \int_use:N \l_ior_stream_int _stream } } + \cs_if_exist:cTF { g_ior_ \int_use:N \l_ior_stream_int _ior } + { \cs_gset_eq:Nc #1 { g_ior_ \int_use:N \l_ior_stream_int _ior } } { \ior_stream_alloc_aux: \int_compare:nNnT \l_ior_stream_int = \c_sixteen { - \ior_raw_new:N \g_ior_tmp_stream - \int_set:Nn \l_ior_stream_int { \g_ior_tmp_stream } + \ior_raw_new:N \g_ior_tmp_ior + \int_set:Nn \l_ior_stream_int { \g_ior_tmp_ior } \cs_gset_eq:cN - { g_ior_ \int_use:N \l_iow_stream_int _stream } - \g_ior_tmp_stream + { g_ior_ \int_use:N \l_iow_stream_int _ior } \g_ior_tmp_ior } - \cs_gset_eq:Nc #1 { g_ior_ \int_use:N \l_ior_stream_int _stream } + \cs_gset_eq:Nc #1 { g_ior_ \int_use:N \l_ior_stream_int _ior } } } \cs_new_protected_nopar:Npn \ior_stream_alloc_aux: @@ -192,7 +185,7 @@ \int_incr:N \l_ior_stream_int \int_compare:nNnT \l_ior_stream_int < \c_sixteen { - \cs_if_exist:cTF { g_ior_ \int_use:N \l_ior_stream_int _stream } + \cs_if_exist:cTF { g_ior_ \int_use:N \l_ior_stream_int _ior } { \prop_if_in:NVT \g_ior_streams_prop \l_ior_stream_int { \ior_stream_alloc_aux: } @@ -200,7 +193,7 @@ { \ior_stream_alloc_aux: } } } -\cs_new_protected_nopar:Npn \ior_close:N #1 +\cs_new_protected:Npn \ior_close:N #1 { \cs_if_exist:NT #1 { @@ -209,11 +202,11 @@ \int_compare:nNnF #1 = \c_sixteen { \tex_closein:D #1 } \prop_gdel:NV \g_ior_streams_prop #1 - \tex_global:D \tex_chardef:D #1 16 ~ + \cs_gset_eq:NN #1 \c_term_ior } } } -\cs_new_protected_nopar:Npn \iow_close:N #1 +\cs_new_protected:Npn \iow_close:N #1 { \cs_if_exist:NT #1 { @@ -222,7 +215,7 @@ \int_compare:nNnF #1 = \c_sixteen { \tex_closein:D #1 } \prop_gdel:NV \g_iow_streams_prop #1 - \tex_global:D \tex_chardef:D #1 16 ~ + \cs_gset_eq:NN #1 \c_term_iow } } } @@ -255,19 +248,19 @@ } \cs_new_eq:NN \iow_shipout_x:Nn \tex_write:D \cs_generate_variant:Nn \iow_shipout_x:Nn { Nx } -\cs_new_protected_nopar:Npn \iow_shipout:Nn #1#2 +\cs_new_protected:Npn \iow_shipout:Nn #1#2 { \iow_shipout_x:Nn #1 { \exp_not:n {#2} } } \cs_generate_variant:Nn \iow_shipout:Nn { Nx } \cs_new_protected_nopar:Npn \iow_now:Nx { \tex_immediate:D \iow_shipout_x:Nn } -\cs_new_protected_nopar:Npn \iow_now:Nn #1#2 +\cs_new_protected:Npn \iow_now:Nn #1#2 { \iow_now:Nx #1 { \exp_not:n {#2} } } -\cs_set_protected_nopar:Npn \iow_log:x { \iow_now:Nx \c_iow_log_stream } -\cs_new_protected_nopar:Npn \iow_log:n { \iow_now:Nn \c_iow_log_stream } -\cs_set_protected_nopar:Npn \iow_term:x { \iow_now:Nx \c_iow_term_stream } -\cs_new_protected_nopar:Npn \iow_term:n { \iow_now:Nn \c_iow_term_stream } -\cs_new_protected_nopar:Npn \iow_now_when_avail:Nn #1 +\cs_set_protected_nopar:Npn \iow_log:x { \iow_now:Nx \c_log_iow } +\cs_new_protected_nopar:Npn \iow_log:n { \iow_now:Nn \c_log_iow } +\cs_set_protected_nopar:Npn \iow_term:x { \iow_now:Nx \c_term_iow } +\cs_new_protected_nopar:Npn \iow_term:n { \iow_now:Nn \c_term_iow } +\cs_new_protected:Npn \iow_now_when_avail:Nn #1 { \cs_if_free:NTF #1 { \use_none:n } { \iow_now:Nn #1 } } -\cs_new_protected_nopar:Npn \iow_now_when_avail:Nx #1 +\cs_new_protected:Npn \iow_now_when_avail:Nx #1 { \cs_if_free:NTF #1 { \use_none:n } { \iow_now:Nx #1 } } \cs_new_nopar:Npn \iow_newline: { ^^J } \cs_new_eq:NN \iow_char:N \cs_to_str:N @@ -394,7 +387,7 @@ \tl_set:Nx \l_iow_current_line_tl { \l_iow_current_indentation_tl \l_iow_current_word_tl } } -\cs_new_protected_nopar:Npn \iow_wrap_special:w #1 ~ #2 ~ #3 ~ % +\cs_new_protected:Npn \iow_wrap_special:w #1 ~ #2 ~ #3 ~ % { \use:c { iow_wrap_#1: } \str_if_eq:xxTF { #2~#3 } { ~ \c_iow_wrap_marker_tl } @@ -461,13 +454,13 @@ } { \prg_return_true: } } -\cs_new_protected_nopar:Npn \ior_to:NN #1#2 +\cs_new_protected:Npn \ior_to:NN #1#2 { \tex_read:D #1 to #2 } -\cs_new_protected_nopar:Npn \ior_gto:NN #1#2 +\cs_new_protected:Npn \ior_gto:NN #1#2 { \tex_global:D \tex_read:D #1 to #2 } -\cs_new_protected_nopar:Npn \ior_str_to:NN #1#2 +\cs_new_protected:Npn \ior_str_to:NN #1#2 { \etex_readline:D #1 to #2 } -\cs_new_protected_nopar:Npn \ior_str_gto:NN #1#2 +\cs_new_protected:Npn \ior_str_gto:NN #1#2 { \tex_global:D \etex_readline:D #1 to #2 } %% %% diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty b/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty index 721a7ecc09d..aab64765fa0 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 2800 2011-09-10 16:54:36Z will $ +\GetIdInfo$Id: l3keys.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental key-value interfaces} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -181,7 +181,7 @@ \tl_set:Nn \l_keys_module_tl {#1} } \cs_generate_variant:Nn \keys_define_aux:nnn { o } -\cs_new_protected_nopar:Npn \keys_define_elt:n #1 +\cs_new_protected:Npn \keys_define_elt:n #1 { \bool_set_true:N \l_keys_no_value_bool \keys_define_elt_aux:nn {#1} { } @@ -200,14 +200,14 @@ { \l_keys_property_tl } { \l_keys_path_tl } } } -\cs_new_protected_nopar:Npn \keys_property_find:n #1 +\cs_new_protected:Npn \keys_property_find:n #1 { \tl_set:Nx \l_keys_path_tl { \l_keys_module_tl / } \tl_if_in:nnTF {#1} { . } { \keys_property_find_aux:w #1 \q_stop } { \msg_kernel_error:nnx { keys } { key-no-property } {#1} } } -\cs_new_protected_nopar:Npn \keys_property_find_aux:w #1 . #2 \q_stop +\cs_new_protected:Npn \keys_property_find_aux:w #1 . #2 \q_stop { \tl_set:Nx \l_keys_path_tl { \l_keys_path_tl \tl_to_str:n {#1} } \tl_if_in:nnTF {#2} { . } @@ -234,7 +234,7 @@ } \cs_new_protected:Npn \keys_define_key_aux:w #1 : #2 \q_stop { \tl_if_empty:nTF {#2} } -\cs_new_nopar:Npn \keys_bool_set:NN #1#2 +\cs_new:Npn \keys_bool_set:NN #1#2 { \cs_if_exist:NF #1 { \bool_new:N #1 } \keys_choice_make: @@ -249,7 +249,7 @@ } \keys_default_set:n { true } } -\cs_new_nopar:Npn \keys_bool_set_inverse:NN #1#2 +\cs_new:Npn \keys_bool_set_inverse:NN #1#2 { \cs_if_exist:NF #1 { \bool_new:N #1 } \keys_choice_make: @@ -304,7 +304,7 @@ { generate-choices-before-code } { \l_keys_path_tl } } } -\cs_new_protected_nopar:Npn \keys_choices_generate_aux:n #1 +\cs_new_protected:Npn \keys_choices_generate_aux:n #1 { \keys_cmd_set:nx { \l_keys_path_tl / #1 } { @@ -337,7 +337,7 @@ \keys_cmd_set_aux:n {#1} \cs_set:cpx { \c_keys_code_root_tl #1 } ##1 {#2} } -\cs_new_protected_nopar:Npn \keys_cmd_set_aux:n #1 +\cs_new_protected:Npn \keys_cmd_set_aux:n #1 { \tl_clear_new:c { \c_keys_vars_root_tl #1 .default } \tl_set:cn { \c_keys_vars_root_tl #1 .default } { \q_no_value } @@ -346,17 +346,17 @@ \cs_new_protected:Npn \keys_default_set:n #1 { \tl_set:cn { \c_keys_vars_root_tl \l_keys_path_tl .default } {#1} } \cs_generate_variant:Nn \keys_default_set:n { V } -\cs_new_protected_nopar:Npn \keys_meta_make:n #1 +\cs_new_protected:Npn \keys_meta_make:n #1 { \exp_args:NNo \keys_cmd_set:nn \l_keys_path_tl { \exp_after:wN \keys_set:nn \exp_after:wN { \l_keys_module_tl } {#1} } } -\cs_new_protected_nopar:Npn \keys_meta_make:x #1 +\cs_new_protected:Npn \keys_meta_make:x #1 { \keys_cmd_set:nx { \l_keys_path_tl } { \exp_not:N \keys_set:nn { \l_keys_module_tl } {#1} } } -\cs_new_nopar:Npn \keys_multichoice_find:n #1 +\cs_new:Npn \keys_multichoice_find:n #1 { \clist_map_function:nN {#1} \keys_choice_find:n } \cs_new_protected_nopar:Npn \keys_multichoice_make: { @@ -384,29 +384,29 @@ \int_incr:N \l_keys_choice_int } } -\cs_new_protected_nopar:Npn \keys_value_requirement:n #1 +\cs_new_protected:Npn \keys_value_requirement:n #1 { \tl_set_eq:cc { \c_keys_vars_root_tl \l_keys_path_tl .req } { c_keys_value_ #1 _tl } } -\cs_new_protected_nopar:Npn \keys_variable_set:NnNN #1#2#3#4 +\cs_new_protected:Npn \keys_variable_set:NnNN #1#2#3#4 { \cs_if_exist:NF #1 { \use:c { #2 _new:N } #1 } \keys_cmd_set:nx { \l_keys_path_tl } { \exp_not:c { #2 _ #3 set:N #4 } \exp_not:N #1 {##1} } } -\cs_new_protected_nopar:Npn \keys_variable_set:NnN #1#2#3 +\cs_new_protected:Npn \keys_variable_set:NnN #1#2#3 { \keys_variable_set:NnNN #1 {#2} { } #3 } \cs_generate_variant:Nn \keys_variable_set:NnNN { c } \cs_generate_variant:Nn \keys_variable_set:NnN { c } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .bool_set:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .bool_set:N } #1 { \keys_bool_set:NN #1 { } } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .bool_gset:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .bool_gset:N } #1 { \keys_bool_set:NN #1 g } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .bool_set_inverse:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .bool_set_inverse:N } #1 { \keys_bool_set_inverse:NN #1 { } } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .bool_gset_inverse:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .bool_gset_inverse:N } #1 { \keys_bool_set_inverse:NN #1 g } \cs_new_protected_nopar:cpn { \c_keys_props_root_tl .choice: } { \keys_choice_make: } @@ -420,43 +420,43 @@ { \keys_choice_code_store:x { \exp_not:n {#1} } } \cs_new_protected:cpn { \c_keys_props_root_tl .choice_code:x } #1 { \keys_choice_code_store:x {#1} } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .clist_set:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .clist_set:N } #1 { \keys_variable_set:NnN #1 { clist } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .clist_set:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .clist_set:c } #1 { \keys_variable_set:cnN {#1} { clist } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .clist_gset:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .clist_gset:N } #1 { \keys_variable_set:NnNN #1 { clist } g n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .clist_gset:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .clist_gset:c } #1 { \keys_variable_set:cnNN {#1} { clist } g n } \cs_new_protected:cpn { \c_keys_props_root_tl .default:n } #1 { \keys_default_set:n {#1} } \cs_new_protected:cpn { \c_keys_props_root_tl .default:V } #1 { \keys_default_set:V #1 } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .dim_set:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .dim_set:N } #1 { \keys_variable_set:NnN #1 { dim } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .dim_set:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .dim_set:c } #1 { \keys_variable_set:cnN {#1} { dim } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .dim_gset:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .dim_gset:N } #1 { \keys_variable_set:NnNN #1 { dim } g n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .dim_gset:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .dim_gset:c } #1 { \keys_variable_set:cnNN {#1} { dim } g n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .fp_set:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .fp_set:N } #1 { \keys_variable_set:NnN #1 { fp } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .fp_set:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .fp_set:c } #1 { \keys_variable_set:cnN {#1} { fp } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .fp_gset:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .fp_gset:N } #1 { \keys_variable_set:NnNN #1 { fp } g n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .fp_gset:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .fp_gset:c } #1 { \keys_variable_set:cnNN {#1} { fp } g n } \cs_new_protected:cpn { \c_keys_props_root_tl .generate_choices:n } #1 { \keys_choices_generate:n {#1} } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .int_set:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .int_set:N } #1 { \keys_variable_set:NnN #1 { int } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .int_set:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .int_set:c } #1 { \keys_variable_set:cnN {#1} { int } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .int_gset:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .int_gset:N } #1 { \keys_variable_set:NnNN #1 { int } g n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .int_gset:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .int_gset:c } #1 { \keys_variable_set:cnNN {#1} { int } g n } \cs_new_protected:cpn { \c_keys_props_root_tl .meta:n } #1 { \keys_meta_make:n {#1} } @@ -466,29 +466,29 @@ { \keys_multichoice_make: } \cs_new_protected:cpn { \c_keys_props_root_tl .multichoices:nn } #1 { \keys_multichoices_make:nn #1 } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .skip_set:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .skip_set:N } #1 { \keys_variable_set:NnN #1 { skip } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .skip_set:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .skip_set:c } #1 { \keys_variable_set:cnN {#1} { skip } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .skip_gset:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .skip_gset:N } #1 { \keys_variable_set:NnNN #1 { skip } g n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .skip_gset:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .skip_gset:c } #1 { \keys_variable_set:cnNN {#1} { skip } g n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .tl_set:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .tl_set:N } #1 { \keys_variable_set:NnN #1 { tl } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .tl_set:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .tl_set:c } #1 { \keys_variable_set:cnN {#1} { tl } n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .tl_set_x:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .tl_set_x:N } #1 { \keys_variable_set:NnN #1 { tl } x } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .tl_set_x:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .tl_set_x:c } #1 { \keys_variable_set:cnN {#1} { tl } x } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .tl_gset:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .tl_gset:N } #1 { \keys_variable_set:NnNN #1 { tl } g n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .tl_gset:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .tl_gset:c } #1 { \keys_variable_set:cnNN {#1} { tl } g n } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .tl_gset_x:N } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .tl_gset_x:N } #1 { \keys_variable_set:NnNN #1 { tl } g x } -\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .tl_gset_x:c } #1 +\cs_new_protected:cpn { \c_keys_props_root_tl .tl_gset_x:c } #1 { \keys_variable_set:cnNN {#1} { tl } g x } \cs_new_protected_nopar:cpn { \c_keys_props_root_tl .value_forbidden: } { \keys_value_requirement:n { forbidden } } @@ -518,7 +518,7 @@ } \cs_generate_variant:Nn \keys_set_known:nnN { nV , nv , no } \cs_generate_variant:Nn \keys_set_known_aux:nnnN { o } -\cs_new_protected_nopar:Npn \keys_set_elt:n #1 +\cs_new_protected:Npn \keys_set_elt:n #1 { \bool_set_true:N \l_keys_no_value_bool \keys_set_elt_aux:nn {#1} { } @@ -597,7 +597,7 @@ { = { \exp_not:o \l_keys_value_tl } } } } -\cs_new_nopar:Npn \keys_execute:nn #1#2 +\cs_new:Npn \keys_execute:nn #1#2 { \cs_if_exist:cTF { \c_keys_code_root_tl #1 } { @@ -606,7 +606,7 @@ } {#2} } -\cs_new_nopar:Npn \keys_choice_find:n #1 +\cs_new:Npn \keys_choice_find:n #1 { \keys_execute:nn { \l_keys_path_tl / \tl_to_str:n {#1} } { \keys_execute:nn { \l_keys_path_tl / unknown } { } } @@ -623,7 +623,7 @@ { \prg_return_true: } { \prg_return_false: } } -\cs_new_nopar:Npn \keys_show:nn #1#2 +\cs_new:Npn \keys_show:nn #1#2 { \cs_show:c { \c_keys_code_root_tl #1 / \tl_to_str:n {#2} } } \msg_kernel_new:nnnn { keys } { boolean-values-only } { Key~'#1'~accepts~boolean~values~only. } diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3luatex.sty b/Master/texmf-dist/tex/latex/l3kernel/l3luatex.sty index 7494acf9185..2328dda0623 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3luatex.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3luatex.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3luatex.dtx 2995 2011-11-23 16:15:19Z bruno $ +\GetIdInfo$Id: l3luatex.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental LuaTeX-specific functions} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -54,8 +54,8 @@ \msg_kernel_new:nnnn { luatex } { bad-engine } { LuaTeX~engine~not~in~use!~Ignoring~#1. } { - The~feature~you~are~using~is~only~available\ - with~the~luaTeX~engine.~LaTeX3~ignored~`#1#2'. + The~feature~you~are~using~is~only~available~ + with~the~LuaTeX~engine.~LaTeX3~ignored~`#1#2'. } \luatex_if_engine:TF { @@ -81,30 +81,24 @@ { \lua_shipout_x:n { \exp_not:n {#1} } } \cs_generate_variant:Nn \lua_shipout:n { x } \int_new:N \g_cctab_allocate_int -\int_set:Nn \g_cctab_allocate_int { -1 } +\int_set:Nn \g_cctab_allocate_int { \c_minus_one } \int_new:N \g_cctab_stack_int \seq_new:N \g_cctab_stack_seq -\cs_new_protected_nopar:Npn \cctab_new:N #1 +\cs_new_protected:Npn \cctab_new:N #1 { - \cs_if_free:NTF #1 - { - \int_gadd:Nn \g_cctab_allocate_int { 2 } - \int_compare:nNnTF - { \g_cctab_allocate_int } < { \c_max_register_int + 1 } - { - \tex_global:D \tex_mathchardef:D #1 \g_cctab_allocate_int - \luatex_initcatcodetable:D #1 - } - { \msg_kernel_fatal:nnx { alloc } { out-of-registers } { cctab } } - } + \chk_if_free_cs:N #1 + \int_gadd:Nn \g_cctab_allocate_int { \c_two } + \int_compare:nNnTF + \g_cctab_allocate_int < { \c_max_register_int + \c_one } { - \msg_kernel_error:nnx { code } { variable-already-defined } - { \token_to_str:N #1 } + \tex_global:D \tex_chardef:D #1 \g_cctab_allocate_int + \luatex_initcatcodetable:D #1 } + { \msg_kernel_fatal:nnx { alloc } { out-of-registers } { cctab } } } \luatex_if_engine:F { - \cs_set_protected_nopar:Npn \cctab_new:N #1 + \cs_set_protected:Npn \cctab_new:N #1 { \msg_kernel_error:nnx { luatex } { bad-engine } { \exp_not:N \cctab_new:N } @@ -112,33 +106,34 @@ } \luatex_if_engine:T { - \cs_set_protected_nopar:Npn \cctab_new:N #1 + \cs_set_protected:Npn \cctab_new:N #1 { + \chk_if_free_cs:N #1 \newcatcodetable #1 \luatex_initcatcodetable:D #1 } } -\cs_new_protected_nopar:Npn \cctab_begin:N #1 +\cs_new_protected:Npn \cctab_begin:N #1 { \seq_gpush:Nx \g_cctab_stack_seq { \tex_the:D \luatex_catcodetable:D } \luatex_catcodetable:D #1 - \int_gadd:Nn \g_cctab_stack_int { 2 } - \int_compare:nNnT { \g_cctab_stack_int } > { 268 435 453 } - { \msg_kernel_error:nn { code } { cctab-stack-full } } + \int_gadd:Nn \g_cctab_stack_int { \c_two } + \int_compare:nNnT \g_cctab_stack_int > \c_max_register_int + { \msg_kernel_fatal:nn { code } { cctab-stack-full } } \luatex_savecatcodetable:D \g_cctab_stack_int \luatex_catcodetable:D \g_cctab_stack_int } \cs_new_protected_nopar:Npn \cctab_end: { - \int_gsub:Nn \g_cctab_stack_int { 2 } - \seq_gpop:NN \g_cctab_stack_seq \l_cctab_tmp_tl - \quark_if_no_value:NT \l_cctab_tmp_tl + \int_gsub:Nn \g_cctab_stack_int { \c_two } + \seq_if_empty:NTF \g_cctab_stack_seq { \tl_set:Nn \l_cctab_tmp_tl { 0 } } + { \seq_gpop:NN \g_cctab_stack_seq \l_cctab_tmp_tl } \luatex_catcodetable:D \l_cctab_tmp_tl \scan_stop: } \luatex_if_engine:F { - \cs_set_protected_nopar:Npn \cctab_begin:N #1 + \cs_set_protected:Npn \cctab_begin:N #1 { \msg_kernel_error:nnxx { luatex } { bad-engine } { \exp_not:N \cctab_begin:N } {#1} @@ -151,7 +146,7 @@ } \luatex_if_engine:T { - \cs_set_protected_nopar:Npn \cctab_begin:N #1 { \BeginCatcodeRegime #1 } + \cs_set_protected:Npn \cctab_begin:N #1 { \BeginCatcodeRegime #1 } \cs_set_protected_nopar:Npn \cctab_end: { \EndCatcodeRegime } } \tl_new:N \l_cctab_tmp_tl @@ -164,7 +159,7 @@ } \luatex_if_engine:F { - \cs_set_protected_nopar:Npn \cctab_gset:Nn #1#2 + \cs_set_protected:Npn \cctab_gset:Nn #1#2 { \msg_kernel_error:nnxx { luatex } { bad-engine } { \exp_not:N \cctab_gset:Nn } { #1 {#2} } @@ -180,8 +175,9 @@ \cs_new_eq:NN \c_document_cctab \CatcodeTableLaTeX \cs_new_eq:NN \c_initex_cctab \CatcodeTableIniTeX \cs_new_eq:NN \c_other_cctab \CatcodeTableOther - \cs_new_eq:NN \c_string_cctab \CatcodeTableString + \cs_new_eq:NN \c_str_cctab \CatcodeTableString } +\cs_new_eq:NN \c_string_cctab \c_str_cctab %% %% %% End of file `l3luatex.sty'. diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3msg.sty b/Master/texmf-dist/tex/latex/l3kernel/l3msg.sty index d4991bc760c..7090d10d2a5 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 3029 2011-12-06 22:47:30Z joseph $ +\GetIdInfo$Id: l3msg.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental messages} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -206,16 +206,16 @@ \iow_term:x { ************************************************* } } \int_set:Nn \tex_errorcontextlines:D { -1 } -\cs_new_nopar:Npn \msg_fatal_text:n #1 { Fatal~#1~error } -\cs_new_nopar:Npn \msg_critical_text:n #1 { Critical~#1~error } -\cs_new_nopar:Npn \msg_error_text:n #1 { #1~error } -\cs_new_nopar:Npn \msg_warning_text:n #1 { #1~warning } -\cs_new_nopar:Npn \msg_info_text:n #1 { #1~info } -\cs_new_nopar:Npn \msg_see_documentation_text:n #1 +\cs_new:Npn \msg_fatal_text:n #1 { Fatal~#1~error } +\cs_new:Npn \msg_critical_text:n #1 { Critical~#1~error } +\cs_new:Npn \msg_error_text:n #1 { #1~error } +\cs_new:Npn \msg_warning_text:n #1 { #1~warning } +\cs_new:Npn \msg_info_text:n #1 { #1~info } +\cs_new:Npn \msg_see_documentation_text:n #1 { \\ \\ See~the~#1~documentation~for~further~information. } \prop_new:N \l_msg_redirect_classes_prop \prop_new:N \l_msg_redirect_names_prop -\cs_new_protected_nopar:Npn \msg_class_set:nn #1#2 +\cs_new_protected:Npn \msg_class_set:nn #1#2 { \prop_clear_new:c { l_msg_redirect_ #1 _prop } \cs_set_protected:cpn { msg_ #1 :nnxxxx } ##1##2##3##4##5##6 @@ -337,7 +337,7 @@ { \msg_use_aux:nnn {#1} {#3} {#4} } { \msg_kernel_error:nnxx { msg } { message-unknown } {#3} {#4} } } -\cs_new_protected_nopar:Npn \msg_use_aux:nnn #1#2#3 +\cs_new_protected:Npn \msg_use_aux:nnn #1#2#3 { \tl_set:Nn \l_msg_current_class_tl {#1} \tl_set:Nn \l_msg_current_module_tl {#2} @@ -345,7 +345,7 @@ { \msg_use_loop_check:nn { names } { // #2 / #3 / } } { \msg_use_aux:nn {#1} {#2} } } -\cs_new_protected_nopar:Npn \msg_use_aux:nn #1#2 +\cs_new_protected:Npn \msg_use_aux:nn #1#2 { \prop_if_in:cnTF { l_msg_redirect_ #1 _prop } {#2} { \msg_use_loop_check:nn {#1} {#2} } @@ -367,19 +367,19 @@ \cs_new_protected_nopar:Npn \msg_use_code: { } \cs_new_protected:Npn \msg_use_loop:n #1 { } \cs_generate_variant:Nn \msg_use_loop:n { o } -\cs_new_protected_nopar:Npn \msg_redirect_class:nn #1#2 +\cs_new_protected:Npn \msg_redirect_class:nn #1#2 { \prop_put:cnn { l_msg_redirect_ #1 _prop } { * } {#2} } -\cs_new_protected_nopar:Npn \msg_redirect_module:nnn #1#2#3 +\cs_new_protected:Npn \msg_redirect_module:nnn #1#2#3 { \prop_put:cnn { l_msg_redirect_ #2 _prop } {#1} {#3} } -\cs_new_protected_nopar:Npn \msg_redirect_name:nnn #1#2#3 +\cs_new_protected:Npn \msg_redirect_name:nnn #1#2#3 { \prop_put:Nnn \l_msg_redirect_names_prop { // #1 / #2 / } {#3} } -\cs_new_protected_nopar:Npn \msg_kernel_new:nnnn #1#2 +\cs_new_protected:Npn \msg_kernel_new:nnnn #1#2 { \msg_new:nnnn { LaTeX } { #1 / #2 } } -\cs_new_protected_nopar:Npn \msg_kernel_new:nnn #1#2 +\cs_new_protected:Npn \msg_kernel_new:nnn #1#2 { \msg_new:nnn { LaTeX } { #1 / #2 } } -\cs_new_protected_nopar:Npn \msg_kernel_set:nnnn #1#2 +\cs_new_protected:Npn \msg_kernel_set:nnnn #1#2 { \msg_set:nnnn { LaTeX } { #1 / #2 } } -\cs_new_protected_nopar:Npn \msg_kernel_set:nnn #1#2 +\cs_new_protected:Npn \msg_kernel_set:nnn #1#2 { \msg_set:nnn { LaTeX } { #1 / #2 } } \cs_new_protected:Npn \msg_kernel_fatal:nnxxxx #1#2#3#4#5#6 { @@ -555,12 +555,21 @@ LaTeX~has~been~asked~to~replace~an~empty~pattern~by~'#1':~that~% would~lead~to~an~infinite~loop! } +\msg_kernel_new:nnnn { scan } { already-defined } + { Scan~mark~#1~already~defined. } + { + \c_msg_coding_error_text_tl + LaTeX~has~been~asked~to~create~a~new~scan~mark~'#1'~ + but~this~name~has~already~been~used~for~a~scan~mark. + } \msg_kernel_new:nnn { seq } { misused } { A~sequence~was~misused. } \msg_kernel_new:nnn { kernel } { bad-var } { Erroneous~variable~#1 used! } \msg_kernel_new:nnn { prg } { zero-step } { Zero~step~size~for~stepwise~function~#1. } +\msg_kernel_new:nnn { prg } { replicate-neg } + { Negative~argument~for~\prg_replicate:nn. } \msg_kernel_new:nnn { seq } { show } { Sequence~\token_to_str:N #1~ diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3prg.sty b/Master/texmf-dist/tex/latex/l3kernel/l3prg.sty index e86d4214429..69475b6617b 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 3014 2011-11-27 06:55:43Z bruno $ +\GetIdInfo$Id: l3prg.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental control structures} %% \ProvidesExplPackage @@ -54,15 +54,15 @@ \package_check_loaded_expl: \tex_let:D \if_bool:N \tex_ifodd:D \tex_let:D \if_predicate:w \tex_ifodd:D -\cs_new_protected_nopar:Npn \bool_new:N #1 { \cs_new_eq:NN #1 \c_false_bool } +\cs_new_protected:Npn \bool_new:N #1 { \cs_new_eq:NN #1 \c_false_bool } \cs_generate_variant:Nn \bool_new:N { c } -\cs_new_protected_nopar:Npn \bool_set_true:N #1 +\cs_new_protected:Npn \bool_set_true:N #1 { \cs_set_eq:NN #1 \c_true_bool } -\cs_new_protected_nopar:Npn \bool_set_false:N #1 +\cs_new_protected:Npn \bool_set_false:N #1 { \cs_set_eq:NN #1 \c_false_bool } -\cs_new_protected_nopar:Npn \bool_gset_true:N #1 +\cs_new_protected:Npn \bool_gset_true:N #1 { \cs_gset_eq:NN #1 \c_true_bool } -\cs_new_protected_nopar:Npn \bool_gset_false:N #1 +\cs_new_protected:Npn \bool_gset_false:N #1 { \cs_gset_eq:NN #1 \c_false_bool } \cs_generate_variant:Nn \bool_set_true:N { c } \cs_generate_variant:Nn \bool_set_false:N { c } @@ -193,8 +193,8 @@ \exp_after:wN \bool_not_choose:NN \exp_after:wN #1 \int_to_roman:w - `\q } -\cs_new_nopar:Npn \bool_choose:NN #1#2 { \use:c { bool_ #2 _ #1 :w } } -\cs_new_nopar:Npn \bool_not_choose:NN #1#2 { \use:c { bool_not_ #2 _ #1 :w } } +\cs_new:Npn \bool_choose:NN #1#2 { \use:c { bool_ #2 _ #1 :w } } +\cs_new:Npn \bool_not_choose:NN #1#2 { \use:c { bool_not_ #2 _ #1 :w } } \cs_new_nopar:cpn { bool_&_1:w } & { \bool_get_next:N } \cs_new_nopar:cpn { bool_|_0:w } | { \bool_get_next:N } \cs_new_nopar:cpn { bool_not_&_0:w } & { \bool_get_next:N } @@ -335,18 +335,18 @@ { \prg_case_tl_aux:Nw #1 } } \cs_generate_variant:Nn \prg_case_tl:Nnn { c } -\cs_new_nopar:Npn \prg_replicate:nn #1 +\cs_new:Npn \prg_replicate:nn #1 { \int_to_roman:w \exp_after:wN \prg_replicate_first_aux:N \int_value:w \int_eval:w #1 \int_eval_end: \cs_end: } -\cs_new_nopar:Npn \prg_replicate_aux:N #1 +\cs_new:Npn \prg_replicate_aux:N #1 { \cs:w prg_replicate_#1 :n \prg_replicate_aux:N } -\cs_new_nopar:Npn \prg_replicate_first_aux:N #1 +\cs_new:Npn \prg_replicate_first_aux:N #1 { \cs:w prg_replicate_first_ #1 :n \prg_replicate_aux:N } -\cs_new_nopar:Npn \prg_replicate_ :n #1 { \cs_end: } +\cs_new:Npn \prg_replicate_ :n #1 { \cs_end: } \cs_new:cpn { prg_replicate_0:n } #1 { \cs_end: {#1#1#1#1#1#1#1#1#1#1} } \cs_new:cpn { prg_replicate_1:n } #1 { \cs_end: {#1#1#1#1#1#1#1#1#1#1} #1 } \cs_new:cpn { prg_replicate_2:n } #1 { \cs_end: {#1#1#1#1#1#1#1#1#1#1} #1#1 } @@ -364,7 +364,8 @@ { \cs_end: {#1#1#1#1#1#1#1#1#1#1} #1#1#1#1#1#1#1#1 } \cs_new:cpn { prg_replicate_9:n } #1 { \cs_end: {#1#1#1#1#1#1#1#1#1#1} #1#1#1#1#1#1#1#1#1 } -\cs_new:cpn { prg_replicate_first_-:n } #1 { \c_zero \negative_replication } +\cs_new:cpn { prg_replicate_first_-:n } #1 + { \c_zero \msg_expandable_kernel_error:nn { prg } { replicate-neg } } \cs_new:cpn { prg_replicate_first_0:n } #1 { \c_zero } \cs_new:cpn { prg_replicate_first_1:n } #1 { \c_zero #1 } \cs_new:cpn { prg_replicate_first_2:n } #1 { \c_zero #1#1 } @@ -446,12 +447,13 @@ \tl_to_lowercase:n { \group_end: - \cs_new_nopar:Npn \prg_variable_get_scope:N #1 + \cs_new:Npn \prg_variable_get_scope:N #1 { - \exp_last_unbraced:Nf \prg_variable_get_scope_aux:w - { \cs_to_str:N #1 \exp_stop_f: \q_stop } + \exp_after:wN \exp_after:wN + \exp_after:wN \prg_variable_get_scope_aux:w + \cs_to_str:N #1 \exp_stop_f: \q_stop } - \cs_new_nopar:Npn \prg_variable_get_scope_aux:w #1#2 \q_stop + \cs_new:Npn \prg_variable_get_scope_aux:w #1#2 \q_stop { \token_if_eq_meaning:NNT & #1 { g } } } \group_begin: @@ -460,12 +462,12 @@ \tl_to_lowercase:n { \group_end: - \cs_new_nopar:Npn \prg_variable_get_type:N #1 + \cs_new:Npn \prg_variable_get_type:N #1 { \exp_after:wN \prg_variable_get_type_aux:w \token_to_str:N #1 & a \q_stop } - \cs_new_nopar:Npn \prg_variable_get_type_aux:w #1 & #2#3 \q_stop + \cs_new:Npn \prg_variable_get_type_aux:w #1 & #2#3 \q_stop { \token_if_eq_meaning:NNTF a #2 {#1} @@ -473,7 +475,7 @@ } } \int_new:N \g_prg_map_int -\cs_new_protected_nopar:Npn \prg_define_quicksort:nnn #1#2#3 { +\cs_new_protected:Npn \prg_define_quicksort:nnn #1#2#3 { \cs_set:cpx{#1_quicksort:n}##1{ \exp_not:c{#1_quicksort_start_partition:w} ##1 \exp_not:n{#2\q_nil#3\q_stop} diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3prop.sty b/Master/texmf-dist/tex/latex/l3kernel/l3prop.sty index c3878515e49..869c381a1bb 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3prop.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3prop.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3prop.dtx 3029 2011-12-06 22:47:30Z joseph $ +\GetIdInfo$Id: l3prop.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental property lists} %% \ProvidesExplPackage @@ -230,7 +230,7 @@ \cs_generate_variant:Nn \prop_get:NnNT { c , cV , co } \cs_generate_variant:Nn \prop_get:NnNF { c , cV , co } \cs_generate_variant:Nn \prop_get:NnNTF { c , cV , co } -\cs_new_nopar:Npn \prop_map_function:NN #1#2 +\cs_new:Npn \prop_map_function:NN #1#2 { \exp_last_unbraced:NNo \prop_map_function_aux:Nwn #2 #1 \q_recursion_tail \q_prop { } @@ -260,7 +260,7 @@ \cs_generate_variant:Nn \prop_map_inline:Nn { c } \cs_new_eq:NN \prop_map_break: \prg_map_break: \cs_new_eq:NN \prop_map_break:n \prg_map_break:n -\cs_new_protected_nopar:Npn \prop_show:N #1 +\cs_new_protected:Npn \prop_show:N #1 { \msg_aux_show:Nnx #1 diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3quark.sty b/Master/texmf-dist/tex/latex/l3kernel/l3quark.sty index 31102e00c73..3a9a6489663 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3quark.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3quark.sty @@ -46,12 +46,12 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3quark.dtx 3014 2011-11-27 06:55:43Z bruno $ +\GetIdInfo$Id: l3quark.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental quarks} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} \package_check_loaded_expl: -\cs_new_protected_nopar:Npn \quark_new:N #1 { \tl_const:Nn #1 {#1} } +\cs_new_protected:Npn \quark_new:N #1 { \tl_const:Nn #1 {#1} } \quark_new:N \q_nil \quark_new:N \q_mark \quark_new:N \q_no_value @@ -147,6 +147,21 @@ \cs_generate_variant:Nn \quark_if_nil:nF { V , o } \quark_new:N \q_tl_act_mark \quark_new:N \q_tl_act_stop +\tl_new:N \g_scan_marks_tl +\cs_new_protected:Npn \scan_new:N #1 + { + \tl_if_in:NnTF \g_scan_marks_tl { #1 } + { + \msg_kernel_error:nnx { scan } { already-defined } + { \token_to_str:N #1 } + } + { + \tl_gput_right:Nn \g_scan_marks_tl {#1} + \cs_new_eq:NN #1 \scan_stop: + } + } +\scan_new:N \s_stop +\cs_new:Npn \use_none_delimit_by_s_stop:w #1 \s_stop { } %% %% %% End of file `l3quark.sty'. diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty b/Master/texmf-dist/tex/latex/l3kernel/l3seq.sty index adfb1684b43..743e17ed121 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 3033 2011-12-07 10:12:21Z joseph $ +\GetIdInfo$Id: l3seq.dtx 3085 2011-12-22 16:29:26Z bruno $ {L3 Experimental sequences and stacks} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -80,7 +80,7 @@ { \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 +\cs_new_protected:Npn \seq_set_split_aux:NNnn #1 #2 #3 #4 { \tl_if_empty:nTF {#3} { #1 #2 { \tl_map_function:nN {#4} \seq_wrap_item:n } } @@ -108,9 +108,9 @@ } \cs_new:Npn \seq_set_split_aux_ii:w #1 \seq_set_split_aux_end: { \seq_wrap_item:n {#1} } -\cs_new_protected_nopar:Npn \seq_concat:NNN #1#2#3 +\cs_new_protected:Npn \seq_concat:NNN #1#2#3 { \tl_set:Nx #1 { \exp_not:o {#2} \exp_not:o {#3} } } -\cs_new_protected_nopar:Npn \seq_gconcat:NNN #1#2#3 +\cs_new_protected:Npn \seq_gconcat:NNN #1#2#3 { \tl_gset:Nx #1 { \exp_not:o {#2} \exp_not:o {#3} } } \cs_generate_variant:Nn \seq_concat:NNN { ccc } \cs_generate_variant:Nn \seq_gconcat:NNN { ccc } @@ -201,7 +201,7 @@ \cs_generate_variant:Nn \seq_if_in:NnF { c , cV , cv , co , cx } \cs_generate_variant:Nn \seq_if_in:NnTF { NV , Nv , No , Nx } \cs_generate_variant:Nn \seq_if_in:NnTF { c , cV , cv , co , cx } -\cs_new_protected_nopar:Npn \seq_get_left:NN #1#2 +\cs_new_protected:Npn \seq_get_left:NN #1#2 { \seq_if_empty_err_break:N #1 \exp_after:wN \seq_get_left_aux:NnwN #1 \q_stop #2 @@ -214,7 +214,7 @@ { \seq_pop_left_aux:NNN \tl_set:Nn } \cs_new_protected_nopar:Npn \seq_gpop_left:NN { \seq_pop_left_aux:NNN \tl_gset:Nn } -\cs_new_protected_nopar:Npn \seq_pop_left_aux:NNN #1#2#3 +\cs_new_protected:Npn \seq_pop_left_aux:NNN #1#2#3 { \seq_if_empty_err_break:N #2 \exp_after:wN \seq_pop_left_aux:NnwNNN #2 \q_stop #1#2#3 @@ -227,13 +227,13 @@ } \cs_generate_variant:Nn \seq_pop_left:NN { c } \cs_generate_variant:Nn \seq_gpop_left:NN { c } -\cs_new_protected_nopar:Npn \seq_get_right:NN #1#2 +\cs_new_protected:Npn \seq_get_right:NN #1#2 { \seq_if_empty_err_break:N #1 \seq_get_right_aux:NN #1#2 \prg_break_point:n { } } -\cs_new_protected_nopar:Npn \seq_get_right_aux:NN #1#2 +\cs_new_protected:Npn \seq_get_right_aux:NN #1#2 { \seq_push_item_def:n { } \exp_after:wN \exp_after:wN \exp_after:wN \seq_get_right_loop:nn @@ -255,13 +255,13 @@ { \seq_pop_right_aux:NNN \tl_set:Nx } \cs_new_protected_nopar:Npn \seq_gpop_right:NN { \seq_pop_right_aux:NNN \tl_gset:Nx } -\cs_new_protected_nopar:Npn \seq_pop_right_aux:NNN #1#2#3 +\cs_new_protected:Npn \seq_pop_right_aux:NNN #1#2#3 { \seq_if_empty_err_break:N #2 \seq_pop_right_aux_ii:NNN #1 #2 #3 \prg_break_point:n { } } -\cs_new_protected_nopar:Npn \seq_pop_right_aux_ii:NNN #1#2#3 +\cs_new_protected:Npn \seq_pop_right_aux_ii:NNN #1#2#3 { \seq_push_item_def:n { \seq_wrap_item:n {##1} } #1 #2 { \if_false: } \fi: @@ -283,7 +283,7 @@ \cs_new_eq:NN \seq_break:n \prg_map_break:n \cs_new_eq:NN \seq_map_break: \prg_map_break: \cs_new_eq:NN \seq_map_break:n \prg_map_break:n -\cs_new_protected_nopar:Npn \seq_if_empty_err_break:N #1 +\cs_new_protected:Npn \seq_if_empty_err_break:N #1 { \if_meaning:w #1 \c_empty_tl \msg_kernel_error:nnx { seq } { empty-sequence } { \token_to_str:N #1 } @@ -370,7 +370,7 @@ \cs_new_eq:NN \seq_pop:cN \seq_pop_left:cN \cs_new_eq:NN \seq_gpop:NN \seq_gpop_left:NN \cs_new_eq:NN \seq_gpop:cN \seq_gpop_left:cN -\cs_new_protected_nopar:Npn \seq_show:N #1 +\cs_new_protected:Npn \seq_show:N #1 { \msg_aux_show:Nnx #1 @@ -378,7 +378,7 @@ { \seq_map_function:NN #1 \msg_aux_show:n } } \cs_generate_variant:Nn \seq_show:N { c } -\cs_new_nopar:Npn \seq_if_empty_break_return_false:N #1 +\cs_new:Npn \seq_if_empty_break_return_false:N #1 { \if_meaning:w #1 \c_empty_tl \prg_return_false: @@ -456,7 +456,7 @@ } \cs_new:Npn \seq_length_aux:n #1 { +1 } \cs_generate_variant:Nn \seq_length:N { c } -\cs_new_nopar:Npn \seq_item:Nn #1#2 +\cs_new:Npn \seq_item:Nn #1#2 { \exp_last_unbraced:Nfo \seq_item_aux:nnn { @@ -472,7 +472,7 @@ { } \prg_break_point:n { } } -\cs_new_nopar:Npn \seq_item_aux:nnn #1#2#3 +\cs_new:Npn \seq_item_aux:nnn #1#2#3 { \use_none:n #2 \int_compare:nNnTF {#1} = \c_zero @@ -480,9 +480,9 @@ { \exp_args:Nf \seq_item_aux:nnn { \int_eval:n { #1 - 1 } } } } \cs_generate_variant:Nn \seq_item:Nn { c } -\cs_new_nopar:Npn \seq_use:N #1 { \seq_map_function:NN #1 \use:n } +\cs_new:Npn \seq_use:N #1 { \seq_map_function:NN #1 \use:n } \cs_generate_variant:Nn \seq_use:N { c } -\cs_new_nopar:Npn \seq_mapthread_function:NNN #1#2#3 +\cs_new:Npn \seq_mapthread_function:NNN #1#2#3 { \exp_after:wN \seq_mapthread_function_aux:NN \exp_after:wN #3 @@ -491,7 +491,7 @@ { ? \seq_break: } { } \prg_break_point:n { } } -\cs_new_nopar:Npn \seq_mapthread_function_aux:NN #1#2 +\cs_new:Npn \seq_mapthread_function_aux:NN #1#2 { \exp_after:wN \seq_mapthread_function_aux:Nnnwnn \exp_after:wN #1 @@ -539,7 +539,7 @@ { \seq_reverse_aux:NN \tl_set:Nx } \cs_new_protected_nopar:Npn \seq_greverse:N { \seq_reverse_aux:NN \tl_gset:Nx } -\cs_new_protected_nopar:Npn \seq_reverse_aux:NN #1 #2 +\cs_new_protected:Npn \seq_reverse_aux:NN #1 #2 { \cs_set_eq:NN \seq_tmp:w \seq_item:n \cs_set_eq:NN \seq_item:n \seq_reverse_aux_item:nwn @@ -553,6 +553,26 @@ } \cs_generate_variant:Nn \seq_reverse:N { c } \cs_generate_variant:Nn \seq_greverse:N { c } +\cs_new_protected_nopar:Npn \seq_set_filter:NNn + { \seq_set_filter_aux:NNNn \tl_set:Nx } +\cs_new_protected_nopar:Npn \seq_gset_filter:NNn + { \seq_set_filter_aux:NNNn \tl_gset:Nx } +\cs_new_protected:Npn \seq_set_filter_aux:NNNn #1#2#3#4 + { + \seq_push_item_def:n { \bool_if:nT {#4} { \seq_wrap_item:n {##1} } } + #1 #2 { #3 \prg_break_point:n { } } + \seq_pop_item_def: + } +\cs_new_protected_nopar:Npn \seq_set_map:NNn + { \seq_set_map_aux:NNNn \tl_set:Nx } +\cs_new_protected_nopar:Npn \seq_gset_map:NNn + { \seq_set_map_aux:NNNn \tl_gset:Nx } +\cs_new_protected:Npn \seq_set_map_aux:NNNn #1#2#3#4 + { + \seq_push_item_def:n { \exp_not:N \seq_item:n {#4} } + #1 #2 { #3 } + \seq_pop_item_def: + } %% %% %% End of file `l3seq.sty'. diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3skip.sty b/Master/texmf-dist/tex/latex/l3kernel/l3skip.sty index 40bcb9caad3..62cbdf92adb 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3skip.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3skip.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3skip.dtx 3029 2011-12-06 22:47:30Z joseph $ +\GetIdInfo$Id: l3skip.dtx 3086 2011-12-22 17:55:46Z bruno $ {L3 Experimental dimensions and skips} \ProvidesExplPackage diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3tl.sty b/Master/texmf-dist/tex/latex/l3kernel/l3tl.sty index f22f7bd8d66..413c68fd926 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3tl.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3tl.sty @@ -46,14 +46,12 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3tl.dtx 3034 2011-12-07 11:40:25Z bruno $ +\GetIdInfo$Id: l3tl.dtx 3091 2011-12-25 16:22:59Z bruno $ {L3 Experimental token lists} - - \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} \package_check_loaded_expl: -\cs_new_protected_nopar:Npn \tl_new:N #1 +\cs_new_protected:Npn \tl_new:N #1 { \chk_if_free_cs:N #1 \cs_gset_eq:NN #1 \c_empty_tl @@ -72,15 +70,15 @@ \cs_generate_variant:Nn \tl_const:Nn { c } \cs_generate_variant:Nn \tl_const:Nx { c } \tl_const:Nn \c_empty_tl { } -\cs_new_protected_nopar:Npn \tl_clear:N #1 +\cs_new_protected:Npn \tl_clear:N #1 { \tl_set_eq:NN #1 \c_empty_tl } -\cs_new_protected_nopar:Npn \tl_gclear:N #1 +\cs_new_protected:Npn \tl_gclear:N #1 { \tl_gset_eq:NN #1 \c_empty_tl } \cs_generate_variant:Nn \tl_clear:N { c } \cs_generate_variant:Nn \tl_gclear:N { c } -\cs_new_protected_nopar:Npn \tl_clear_new:N #1 +\cs_new_protected:Npn \tl_clear_new:N #1 { \cs_if_exist:NTF #1 { \tl_clear:N #1 } { \tl_new:N #1 } } -\cs_new_protected_nopar:Npn \tl_gclear_new:N #1 +\cs_new_protected:Npn \tl_gclear_new:N #1 { \cs_if_exist:NTF #1 { \tl_gclear:N #1 } { \tl_new:N #1 } } \cs_generate_variant:Nn \tl_clear_new:N { c } \cs_generate_variant:Nn \tl_gclear_new:N { c } @@ -168,44 +166,40 @@ \group_end: \tl_const:Nn \c_tl_rescan_marker_tl { A B } } -\tl_new:N \l_tl_rescan_tl \cs_new_protected_nopar:Npn \tl_set_rescan:Nnn { \tl_set_rescan_aux:NNnn \tl_set:Nn } \cs_new_protected_nopar:Npn \tl_gset_rescan:Nnn { \tl_set_rescan_aux:NNnn \tl_gset:Nn } +\cs_new_protected_nopar:Npn \tl_rescan:nn + { \tl_set_rescan_aux:NNnn \prg_do_nothing: \use:n } \cs_new_protected:Npn \tl_set_rescan_aux:NNnn #1#2#3#4 { \group_begin: - \exp_args:No \etex_everyeof:D { \c_tl_rescan_marker_tl } + \exp_args:No \etex_everyeof:D { \c_tl_rescan_marker_tl \exp_not:N } \tex_endlinechar:D \c_minus_one \tex_newlinechar:D \c_minus_one #3 - \tl_clear:N \l_tl_rescan_tl - \exp_after:wN \tl_rescan_aux:w \etex_scantokens:D {#4} - \exp_args:NNNo \group_end: - #1 #2 \l_tl_rescan_tl + \use:x + { + \group_end: + #1 \exp_not:N #2 + { + \exp_after:wN \tl_rescan_aux:w + \exp_after:wN \prg_do_nothing: + \etex_scantokens:D {#4} + } + } } \use:x { - \cs_new_protected:Npn \exp_not:N \tl_rescan_aux:w ##1 + \cs_new:Npn \exp_not:N \tl_rescan_aux:w ##1 \c_tl_rescan_marker_tl - { \tl_set:Nn \exp_not:N \l_tl_rescan_tl {##1} } + { \exp_not:N \exp_not:o { ##1 } } } \cs_generate_variant:Nn \tl_set_rescan:Nnn { Nno , Nnx } \cs_generate_variant:Nn \tl_set_rescan:Nnn { c , cno , cnx } \cs_generate_variant:Nn \tl_gset_rescan:Nnn { Nno , Nnx } \cs_generate_variant:Nn \tl_gset_rescan:Nnn { c , cno } -\cs_new_protected:Npn \tl_rescan:nn #1#2 - { - \group_begin: - \exp_args:No \etex_everyeof:D { \c_tl_rescan_marker_tl } - \tex_endlinechar:D \c_minus_one - \tex_newlinechar:D \c_minus_one - #1 - \exp_after:wN \tl_rescan_aux:w \etex_scantokens:D {#2} - \exp_args:No \group_end: - \l_tl_rescan_tl - } \cs_new_eq:NN \tl_to_lowercase:n \tex_lowercase:D \cs_new_eq:NN \tl_to_uppercase:n \tex_uppercase:D \tl_new:N \l_tl_replace_tl @@ -229,6 +223,7 @@ { \tl_to_str:n {#5} } } { + \group_align_safe_begin: \cs_set:Npx \tl_tmp:w ##1##2 #4 { ##2 @@ -237,6 +232,7 @@ \exp_not:n { \exp_not:n {#5} } ##1 } + \group_align_safe_end: #2 #3 { \exp_after:wN #1 @@ -257,15 +253,15 @@ } \cs_new:Npn \tl_replace_once_aux_end:w #1 \q_mark #2 \q_stop { \exp_not:o {#1} } -\cs_new_protected_nopar:Npn \tl_remove_once:Nn #1#2 +\cs_new_protected:Npn \tl_remove_once:Nn #1#2 { \tl_replace_once:Nnn #1 {#2} { } } -\cs_new_protected_nopar:Npn \tl_gremove_once:Nn #1#2 +\cs_new_protected:Npn \tl_gremove_once:Nn #1#2 { \tl_greplace_once:Nnn #1 {#2} { } } \cs_generate_variant:Nn \tl_remove_once:Nn { c } \cs_generate_variant:Nn \tl_gremove_once:Nn { c } -\cs_new_protected_nopar:Npn \tl_remove_all:Nn #1#2 +\cs_new_protected:Npn \tl_remove_all:Nn #1#2 { \tl_replace_all:Nnn #1 {#2} { } } -\cs_new_protected_nopar:Npn \tl_gremove_all:Nn #1#2 +\cs_new_protected:Npn \tl_gremove_all:Nn #1#2 { \tl_greplace_all:Nnn #1 {#2} { } } \cs_generate_variant:Nn \tl_remove_all:Nn { c } \cs_generate_variant:Nn \tl_gremove_all:Nn { c } @@ -402,9 +398,9 @@ \cs_new_eq:NN \tl_map_break: \prg_map_break: \cs_new_eq:NN \tl_map_break:n \prg_map_break:n \cs_new_eq:NN \tl_to_str:n \etex_detokenize:D -\cs_new_nopar:Npn \tl_to_str:N #1 { \etex_detokenize:D \exp_after:wN {#1} } +\cs_new:Npn \tl_to_str:N #1 { \etex_detokenize:D \exp_after:wN {#1} } \cs_generate_variant:Nn \tl_to_str:N { c } -\cs_new_nopar:Npn \tl_use:N #1 +\cs_new:Npn \tl_use:N #1 { \cs_if_exist:NTF #1 {#1} { \msg_expandable_kernel_error:nnn { kernel } { bad-var } {#1} } @@ -415,7 +411,7 @@ \int_eval:n { 0 \tl_map_function:nN {#1} \tl_length_aux:n } } -\cs_new_nopar:Npn \tl_length:N #1 +\cs_new:Npn \tl_length:N #1 { \int_eval:n { 0 \tl_map_function:NN #1 \tl_length_aux:n } @@ -498,7 +494,7 @@ \tl_to_str:n {#1} { { } } ~ \q_stop } -\cs_new_nopar:Npn \str_head_aux:w #1 ~ % +\cs_new:Npn \str_head_aux:w #1 ~ % { \tl_head:w #1 { ~ } } \cs_new:Npn \str_tail:n #1 { @@ -506,7 +502,7 @@ \reverse_if:N \if_charcode:w \scan_stop: \tl_to_str:n {#1} X X \q_stop } -\cs_new_nopar:Npn \str_tail_aux:w #1 X #2 \q_stop { \fi: #1 } +\cs_new:Npn \str_tail_aux:w #1 X #2 \q_stop { \fi: #1 } \prg_new_conditional:Npnn \tl_if_head_eq_charcode:nN #1#2 { p , T , F , TF } { \if_charcode:w @@ -574,7 +570,11 @@ } } \prg_new_conditional:Npnn \tl_if_head_N_type:n #1 { p , T , F , TF } - { \str_if_eq_return:on { \use:n #1 { } } { #1 { } } } + { + \str_if_eq_return:xx + { \exp_not:o { \use:n #1 { } } } + { \exp_not:n { #1 { } } } + } \prg_new_conditional:Npnn \tl_if_head_group:n #1 { p , T , F , TF } { \if_catcode:w * @@ -611,11 +611,9 @@ \tl_new:N \g_tmpb_tl \tl_new:N \l_tmpa_tl \tl_new:N \l_tmpb_tl -\cs_new:Npn \str_if_eq_return:on #1 #2 +\cs_new:Npn \str_if_eq_return:xx #1 #2 { - \if_int_compare:w - \pdftex_strcmp:D { \exp_not:o {#1} } { \exp_not:n {#2} } - = \c_zero + \if_int_compare:w \pdftex_strcmp:D {#1} {#2} = \c_zero \prg_return_true: \else: \prg_return_false: @@ -626,16 +624,17 @@ \cs_new:Npn \tl_if_single:NF { \exp_args:No \tl_if_single:nF } \cs_new:Npn \tl_if_single:NTF { \exp_args:No \tl_if_single:nTF } \prg_new_conditional:Npnn \tl_if_single:n #1 { p , T , F , TF } - { \str_if_eq_return:on { \use_none:nn #1 ?? } {?} } + { \str_if_eq_return:xx { \exp_not:o { \use_none:nn #1 ?? } } {?} } \prg_new_conditional:Npnn \tl_if_single_token:n #1 { p , T , F , TF } { \tl_if_head_N_type:nTF {#1} - { \str_if_eq_return:on { \use_none:n #1 } { } } - { \str_if_eq_return:on { ~ } { #1 } } + { \str_if_eq_return:xx { \exp_not:o { \use_none:n #1 } } { } } + { \str_if_eq_return:xx { \exp_not:n {#1} } { ~ } } } \cs_new:Npn \tl_act:NNNnn { \tex_romannumeral:D \tl_act_aux:NNNnn } \cs_new:Npn \tl_act_aux:NNNnn #1 #2 #3 #4 #5 { + \group_align_safe_begin: \tl_act_loop:w #5 \q_tl_act_mark \q_tl_act_stop {#4} #1 #2 #3 \tl_act_result:n { } @@ -660,7 +659,8 @@ \tl_act_loop:w #2 \q_tl_act_stop {#3} #4 } -\cs_new:Npn \tl_act_end:wn #1 \tl_act_result:n #2 { \c_zero #2 } +\cs_new:Npn \tl_act_end:wn #1 \tl_act_result:n #2 + { \group_align_safe_end: \c_zero #2 } \cs_new:Npn \tl_act_group:nwnNNN #1 #2 \q_tl_act_stop #3#4#5 { #5 {#3} {#1} @@ -714,9 +714,9 @@ \cs_new:Npn \tl_act_reverse_group_preserve:nn #1 #2 { \tl_act_reverse_output:n { {#2} } } \cs_generate_variant:Nn \tl_reverse:n { o , V } -\cs_new_protected_nopar:Npn \tl_reverse:N #1 +\cs_new_protected:Npn \tl_reverse:N #1 { \tl_set:Nf #1 { \tl_reverse:o { #1 \exp_stop_f: } } } -\cs_new_protected_nopar:Npn \tl_greverse:N #1 +\cs_new_protected:Npn \tl_greverse:N #1 { \tl_gset:Nf #1 { \tl_reverse:o { #1 \exp_stop_f: } } } \cs_generate_variant:Nn \tl_reverse:N { c } \cs_generate_variant:Nn \tl_greverse:N { c } @@ -786,7 +786,7 @@ \q_recursion_tail \prg_break_point:n { } } -\cs_new_nopar:Npn \tl_item_aux:nn #1#2 +\cs_new:Npn \tl_item_aux:nn #1#2 { \quark_if_recursion_tail_break:n {#2} \int_compare:nNnTF {#1} = \c_zero @@ -795,6 +795,8 @@ } \cs_new_nopar:Npn \tl_item:Nn { \exp_args:No \tl_item:nn } \cs_generate_variant:Nn \tl_item:Nn { c } +\prg_new_conditional:Npnn \tl_if_empty:x #1 { p , T , F , TF } + { \str_if_eq_return:xx { } {#1} } %% %% %% End of file `l3tl.sty'. diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3token.sty b/Master/texmf-dist/tex/latex/l3kernel/l3token.sty index 4546eabd5f0..1a744a15610 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3token.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3token.sty @@ -46,107 +46,107 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3token.dtx 2931 2011-10-22 13:48:28Z bruno $ +\GetIdInfo$Id: l3token.dtx 3099 2011-12-27 21:41:02Z joseph $ {L3 Experimental token manipulation} %% \begin{function}[EXP,pTF]{\token_if_protected_long_macro:N} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} \package_check_loaded_expl: -\cs_new_protected_nopar:Npn \char_set_catcode:nn #1#2 +\cs_new_protected:Npn \char_set_catcode:nn #1#2 { \tex_catcode:D #1 = \int_eval:w #2 \int_eval_end: } -\cs_new_nopar:Npn \char_value_catcode:n #1 +\cs_new:Npn \char_value_catcode:n #1 { \tex_the:D \tex_catcode:D \int_eval:w #1\int_eval_end: } -\cs_new_nopar:Npn \char_show_value_catcode:n #1 +\cs_new_protected:Npn \char_show_value_catcode:n #1 { \tex_showthe:D \tex_catcode:D \int_eval:w #1 \int_eval_end: } -\cs_new_protected_nopar:Npn \char_set_catcode_escape:N #1 +\cs_new_protected:Npn \char_set_catcode_escape:N #1 { \char_set_catcode:nn { `#1 } \c_zero } -\cs_new_protected_nopar:Npn \char_set_catcode_group_begin:N #1 +\cs_new_protected:Npn \char_set_catcode_group_begin:N #1 { \char_set_catcode:nn { `#1 } \c_one } -\cs_new_protected_nopar:Npn \char_set_catcode_group_end:N #1 +\cs_new_protected:Npn \char_set_catcode_group_end:N #1 { \char_set_catcode:nn { `#1 } \c_two } -\cs_new_protected_nopar:Npn \char_set_catcode_math_toggle:N #1 +\cs_new_protected:Npn \char_set_catcode_math_toggle:N #1 { \char_set_catcode:nn { `#1 } \c_three } -\cs_new_protected_nopar:Npn \char_set_catcode_alignment:N #1 +\cs_new_protected:Npn \char_set_catcode_alignment:N #1 { \char_set_catcode:nn { `#1 } \c_four } -\cs_new_protected_nopar:Npn \char_set_catcode_end_line:N #1 +\cs_new_protected:Npn \char_set_catcode_end_line:N #1 { \char_set_catcode:nn { `#1 } \c_five } -\cs_new_protected_nopar:Npn \char_set_catcode_parameter:N #1 +\cs_new_protected:Npn \char_set_catcode_parameter:N #1 { \char_set_catcode:nn { `#1 } \c_six } -\cs_new_protected_nopar:Npn \char_set_catcode_math_superscript:N #1 +\cs_new_protected:Npn \char_set_catcode_math_superscript:N #1 { \char_set_catcode:nn { `#1 } \c_seven } -\cs_new_protected_nopar:Npn \char_set_catcode_math_subscript:N #1 +\cs_new_protected:Npn \char_set_catcode_math_subscript:N #1 { \char_set_catcode:nn { `#1 } \c_eight } -\cs_new_protected_nopar:Npn \char_set_catcode_ignore:N #1 +\cs_new_protected:Npn \char_set_catcode_ignore:N #1 { \char_set_catcode:nn { `#1 } \c_nine } -\cs_new_protected_nopar:Npn \char_set_catcode_space:N #1 +\cs_new_protected:Npn \char_set_catcode_space:N #1 { \char_set_catcode:nn { `#1 } \c_ten } -\cs_new_protected_nopar:Npn \char_set_catcode_letter:N #1 +\cs_new_protected:Npn \char_set_catcode_letter:N #1 { \char_set_catcode:nn { `#1 } \c_eleven } -\cs_new_protected_nopar:Npn \char_set_catcode_other:N #1 +\cs_new_protected:Npn \char_set_catcode_other:N #1 { \char_set_catcode:nn { `#1 } \c_twelve } -\cs_new_protected_nopar:Npn \char_set_catcode_active:N #1 +\cs_new_protected:Npn \char_set_catcode_active:N #1 { \char_set_catcode:nn { `#1 } \c_thirteen } -\cs_new_protected_nopar:Npn \char_set_catcode_comment:N #1 +\cs_new_protected:Npn \char_set_catcode_comment:N #1 { \char_set_catcode:nn { `#1 } \c_fourteen } -\cs_new_protected_nopar:Npn \char_set_catcode_invalid:N #1 +\cs_new_protected:Npn \char_set_catcode_invalid:N #1 { \char_set_catcode:nn { `#1 } \c_fifteen } -\cs_new_protected_nopar:Npn \char_set_catcode_escape:n #1 +\cs_new_protected:Npn \char_set_catcode_escape:n #1 { \char_set_catcode:nn {#1} \c_zero } -\cs_new_protected_nopar:Npn \char_set_catcode_group_begin:n #1 +\cs_new_protected:Npn \char_set_catcode_group_begin:n #1 { \char_set_catcode:nn {#1} \c_one } -\cs_new_protected_nopar:Npn \char_set_catcode_group_end:n #1 +\cs_new_protected:Npn \char_set_catcode_group_end:n #1 { \char_set_catcode:nn {#1} \c_two } -\cs_new_protected_nopar:Npn \char_set_catcode_math_toggle:n #1 +\cs_new_protected:Npn \char_set_catcode_math_toggle:n #1 { \char_set_catcode:nn {#1} \c_three } -\cs_new_protected_nopar:Npn \char_set_catcode_alignment:n #1 +\cs_new_protected:Npn \char_set_catcode_alignment:n #1 { \char_set_catcode:nn {#1} \c_four } -\cs_new_protected_nopar:Npn \char_set_catcode_end_line:n #1 +\cs_new_protected:Npn \char_set_catcode_end_line:n #1 { \char_set_catcode:nn {#1} \c_five } -\cs_new_protected_nopar:Npn \char_set_catcode_parameter:n #1 +\cs_new_protected:Npn \char_set_catcode_parameter:n #1 { \char_set_catcode:nn {#1} \c_six } -\cs_new_protected_nopar:Npn \char_set_catcode_math_superscript:n #1 +\cs_new_protected:Npn \char_set_catcode_math_superscript:n #1 { \char_set_catcode:nn {#1} \c_seven } -\cs_new_protected_nopar:Npn \char_set_catcode_math_subscript:n #1 +\cs_new_protected:Npn \char_set_catcode_math_subscript:n #1 { \char_set_catcode:nn {#1} \c_eight } -\cs_new_protected_nopar:Npn \char_set_catcode_ignore:n #1 +\cs_new_protected:Npn \char_set_catcode_ignore:n #1 { \char_set_catcode:nn {#1} \c_nine } -\cs_new_protected_nopar:Npn \char_set_catcode_space:n #1 +\cs_new_protected:Npn \char_set_catcode_space:n #1 { \char_set_catcode:nn {#1} \c_ten } -\cs_new_protected_nopar:Npn \char_set_catcode_letter:n #1 +\cs_new_protected:Npn \char_set_catcode_letter:n #1 { \char_set_catcode:nn {#1} \c_eleven } -\cs_new_protected_nopar:Npn \char_set_catcode_other:n #1 +\cs_new_protected:Npn \char_set_catcode_other:n #1 { \char_set_catcode:nn {#1} \c_twelve } -\cs_new_protected_nopar:Npn \char_set_catcode_active:n #1 +\cs_new_protected:Npn \char_set_catcode_active:n #1 { \char_set_catcode:nn {#1} \c_thirteen } -\cs_new_protected_nopar:Npn \char_set_catcode_comment:n #1 +\cs_new_protected:Npn \char_set_catcode_comment:n #1 { \char_set_catcode:nn {#1} \c_fourteen } -\cs_new_protected_nopar:Npn \char_set_catcode_invalid:n #1 +\cs_new_protected:Npn \char_set_catcode_invalid:n #1 { \char_set_catcode:nn {#1} \c_fifteen } -\cs_new_protected_nopar:Npn \char_set_mathcode:nn #1#2 +\cs_new_protected:Npn \char_set_mathcode:nn #1#2 { \tex_mathcode:D #1 = \int_eval:w #2 \int_eval_end: } -\cs_new_nopar:Npn \char_value_mathcode:n #1 +\cs_new:Npn \char_value_mathcode:n #1 { \tex_the:D \tex_mathcode:D \int_eval:w #1\int_eval_end: } -\cs_new_nopar:Npn \char_show_value_mathcode:n #1 +\cs_new_protected:Npn \char_show_value_mathcode:n #1 { \tex_showthe:D \tex_mathcode:D \int_eval:w #1 \int_eval_end: } -\cs_new_protected_nopar:Npn \char_set_lccode:nn #1#2 +\cs_new_protected:Npn \char_set_lccode:nn #1#2 { \tex_lccode:D #1 = \int_eval:w #2 \int_eval_end: } -\cs_new_nopar:Npn \char_value_lccode:n #1 +\cs_new:Npn \char_value_lccode:n #1 { \tex_the:D \tex_lccode:D \int_eval:w #1\int_eval_end: } -\cs_new_nopar:Npn \char_show_value_lccode:n #1 +\cs_new_protected:Npn \char_show_value_lccode:n #1 { \tex_showthe:D \tex_lccode:D \int_eval:w #1 \int_eval_end: } -\cs_new_protected_nopar:Npn \char_set_uccode:nn #1#2 +\cs_new_protected:Npn \char_set_uccode:nn #1#2 { \tex_uccode:D #1 = \int_eval:w #2 \int_eval_end: } -\cs_new_nopar:Npn \char_value_uccode:n #1 +\cs_new:Npn \char_value_uccode:n #1 { \tex_the:D \tex_uccode:D \int_eval:w #1\int_eval_end: } -\cs_new_nopar:Npn \char_show_value_uccode:n #1 +\cs_new_protected:Npn \char_show_value_uccode:n #1 { \tex_showthe:D \tex_uccode:D \int_eval:w #1 \int_eval_end: } -\cs_new_protected_nopar:Npn \char_set_sfcode:nn #1#2 +\cs_new_protected:Npn \char_set_sfcode:nn #1#2 { \tex_sfcode:D #1 = \int_eval:w #2 \int_eval_end: } -\cs_new_nopar:Npn \char_value_sfcode:n #1 +\cs_new:Npn \char_value_sfcode:n #1 { \tex_the:D \tex_sfcode:D \int_eval:w #1\int_eval_end: } -\cs_new_nopar:Npn \char_show_value_sfcode:n #1 +\cs_new_protected:Npn \char_show_value_sfcode:n #1 { \tex_showthe:D \tex_sfcode:D \int_eval:w #1 \int_eval_end: } -\cs_new_protected_nopar:Npn \token_new:Nn #1#2 { \cs_new_eq:NN #1 #2 } +\cs_new_protected:Npn \token_new:Nn #1#2 { \cs_new_eq:NN #1 #2 } \cs_new_eq:NN \c_group_begin_token { \cs_new_eq:NN \c_group_end_token } \group_begin: @@ -253,7 +253,7 @@ \exp_after:wN \token_if_macro_p_aux:w \token_to_meaning:N #1 MA; \q_stop } - \cs_new_nopar:Npn \token_if_macro_p_aux:w #1 MA #2 ; #3 \q_stop + \cs_new:Npn \token_if_macro_p_aux:w #1 MA #2 ; #3 \q_stop { \if_int_compare:w \pdftex_strcmp:D { #2 } { cro } = \c_zero \prg_return_true: @@ -293,14 +293,14 @@ \exp_after:wN \token_if_chardef_aux:w \token_to_meaning:N #1 ?CHAR" \q_stop } - \cs_new_nopar:Npn \token_if_chardef_aux:w #1 ?CHAR" #2 \q_stop + \cs_new:Npn \token_if_chardef_aux:w #1 ?CHAR" #2 \q_stop { \tl_if_empty:nTF {#1} { \prg_return_true: } { \prg_return_false: } } \prg_new_conditional:Npnn \token_if_mathchardef:N #1 { p , T , F , TF } { \exp_after:wN \token_if_mathchardef_aux:w \token_to_meaning:N #1 ?MAYHCHAR" \q_stop } - \cs_new_nopar:Npn \token_if_mathchardef_aux:w #1 ?MAYHCHAR" #2 \q_stop + \cs_new:Npn \token_if_mathchardef_aux:w #1 ?MAYHCHAR" #2 \q_stop { \tl_if_empty:nTF {#1} { \prg_return_true: } { \prg_return_false: } } \prg_new_conditional:Npnn \token_if_int_register:N #1 { p , T , F , TF } { @@ -311,7 +311,7 @@ \token_to_meaning:N #1 ?COUXY \q_stop \fi: } - \cs_new_nopar:Npn \token_if_int_register_aux:w #1 ?COUXY #2 \q_stop + \cs_new:Npn \token_if_int_register_aux:w #1 ?COUXY #2 \q_stop { \tl_if_empty:nTF {#1} { \prg_return_true: } { \prg_return_false: } } \prg_new_conditional:Npnn \token_if_skip_register:N #1 { p , T , F , TF } { @@ -322,7 +322,7 @@ \token_to_meaning:N #1?SKIP\q_stop \fi: } - \cs_new_nopar:Npn \token_if_skip_register_aux:w #1 ?SKIP #2 \q_stop + \cs_new:Npn \token_if_skip_register_aux:w #1 ?SKIP #2 \q_stop { \tl_if_empty:nTF {#1} { \prg_return_true: } { \prg_return_false: } } \prg_new_conditional:Npnn \token_if_dim_register:N #1 { p , T , F , TF } { @@ -333,7 +333,7 @@ \token_to_meaning:N #1 ?ZIMEX \q_stop \fi: } - \cs_new_nopar:Npn \token_if_dim_register_aux:w #1 ?ZIMEX #2 \q_stop + \cs_new:Npn \token_if_dim_register_aux:w #1 ?ZIMEX #2 \q_stop { \tl_if_empty:nTF {#1} { \prg_return_true: } { \prg_return_false: } } \prg_new_conditional:Npnn \token_if_toks_register:N #1 { p , T , F , TF } { @@ -344,7 +344,7 @@ \token_to_meaning:N #1 ?YOKS \q_stop \fi: } - \cs_new_nopar:Npn \token_if_toks_register_aux:w #1 ?YOKS #2 \q_stop + \cs_new:Npn \token_if_toks_register_aux:w #1 ?YOKS #2 \q_stop { \tl_if_empty:nTF {#1} { \prg_return_true: } { \prg_return_false: } } \prg_new_conditional:Npnn \token_if_protected_macro:N #1 { p , T , F , TF } @@ -352,7 +352,7 @@ \exp_after:wN \token_if_protected_macro_aux:w \token_to_meaning:N #1 ?PROYECYEZ~MACRO \q_stop } - \cs_new_nopar:Npn \token_if_protected_macro_aux:w + \cs_new:Npn \token_if_protected_macro_aux:w #1 ?PROYECYEZ~MACRO #2 \q_stop { \tl_if_empty:nTF {#1} { \prg_return_true: } { \prg_return_false: } } \prg_new_conditional:Npnn \token_if_long_macro:N #1 { p , T , F , TF } @@ -360,7 +360,7 @@ \exp_after:wN \token_if_long_macro_aux:w \token_to_meaning:N #1 ?LOXG~MACRO \q_stop } - \cs_new_nopar:Npn \token_if_long_macro_aux:w #1 ?LOXG~MACRO #2 \q_stop + \cs_new:Npn \token_if_long_macro_aux:w #1 ?LOXG~MACRO #2 \q_stop { \tl_if_empty:nTF {#1} { \prg_return_true: } { \prg_return_false: } } \prg_new_conditional:Npnn \token_if_protected_long_macro:N #1 { p , T , F , TF } @@ -368,7 +368,7 @@ \exp_after:wN \token_if_protected_long_macro_aux:w \token_to_meaning:N #1 ?PROYECYEZ?LOXG~MACRO \q_stop } - \cs_new_nopar:Npn \token_if_protected_long_macro_aux:w + \cs_new:Npn \token_if_protected_long_macro_aux:w #1 ?PROYECYEZ?LOXG~MACRO #2 \q_stop { \tl_if_empty:nTF {#1} { \prg_return_true: } { \prg_return_false: } } } @@ -389,14 +389,14 @@ \token_to_meaning:N #1 ; ; ; \q_stop #1 } } - \cs_new_nopar:Npn \token_if_primitive_aux:NNw #1#2 #3 ; #4 \q_stop + \cs_new:Npn \token_if_primitive_aux:NNw #1#2 #3 ; #4 \q_stop { \tl_if_empty:oTF { \token_if_primitive_aux_space:w #3 ~ } { \token_if_primitive_aux_loop:N #3 ; \q_stop } { \token_if_primitive_aux_nullfont:N } } } -\cs_new_nopar:Npn \token_if_primitive_aux_space:w #1 ~ { } +\cs_new:Npn \token_if_primitive_aux_space:w #1 ~ { } \cs_new:Npn \token_if_primitive_aux_nullfont:N #1 { \if_meaning:w \tex_nullfont:D #1 @@ -405,7 +405,7 @@ \prg_return_false: \fi: } -\cs_new_nopar:Npn \token_if_primitive_aux_loop:N #1 +\cs_new:Npn \token_if_primitive_aux_loop:N #1 { \if_num:w `#1 < \c_token_A_int % \exp_after:wN \token_if_primitive_auxii:Nw @@ -414,7 +414,7 @@ \exp_after:wN \token_if_primitive_aux_loop:N \fi: } -\cs_new_nopar:Npn \token_if_primitive_auxii:Nw #1 #2 \q_stop +\cs_new:Npn \token_if_primitive_auxii:Nw #1 #2 \q_stop { \if:w : #1 \exp_after:wN \token_if_primitive_aux_undefined:N @@ -434,7 +434,7 @@ \cs_new_eq:NN \l_peek_token ? \cs_new_eq:NN \g_peek_token ? \cs_new_eq:NN \l_peek_search_token ? -\cs_new_nopar:Npn \l_peek_search_tl { } +\tl_new:N \l_peek_search_tl \cs_new_nopar:Npn \peek_true:w { } \cs_new_nopar:Npn \peek_true_aux:w { } \cs_new_nopar:Npn \peek_false:w { } @@ -540,13 +540,13 @@ \cs_new_protected_nopar:Npn \peek_ignore_spaces_execute_branches_aux: { \peek_after:Nw \peek_ignore_spaces_execute_branches: } \group_begin: - \cs_set_nopar:Npn \peek_def:nnnn #1#2#3#4 + \cs_set:Npn \peek_def:nnnn #1#2#3#4 { \peek_def_aux:nnnnn {#1} {#2} {#3} {#4} { TF } \peek_def_aux:nnnnn {#1} {#2} {#3} {#4} { T } \peek_def_aux:nnnnn {#1} {#2} {#3} {#4} { F } } - \cs_set_nopar:Npn \peek_def_aux:nnnnn #1#2#3#4#5 + \cs_set:Npn \peek_def_aux:nnnnn #1#2#3#4#5 { \cs_gset_nopar:cpx { #1 #5 } { @@ -606,7 +606,7 @@ { \peek_ignore_spaces_execute_branches: } \group_end: \exp_args:Nno \use:nn - { \cs_new_nopar:Npn \token_get_prefix_arg_replacement_aux:wN #1 } + { \cs_new:Npn \token_get_prefix_arg_replacement_aux:wN #1 } { \tl_to_str:n { macro : } #2 -> #3 \q_stop #4 } { #4 {#1} {#2} {#3} } \cs_new:Npn \token_get_prefix_spec:N #1 @@ -648,12 +648,12 @@ \tl_to_lowercase:n { \group_end: #2 ^^@ } } } - \char_tmp:NN \char_active_set:Npn \cs_set:Npn - \char_tmp:NN \char_active_set:Npx \cs_set:Npx - \char_tmp:NN \char_active_gset:Npn \cs_gset:Npn - \char_tmp:NN \char_active_gset:Npx \cs_gset:Npx - \char_tmp:NN \char_active_set_eq:NN \cs_set_eq:NN - \char_tmp:NN \char_active_gset_eq:NN \cs_gset_eq:NN + \char_tmp:NN \char_set_active:Npn \cs_set:Npn + \char_tmp:NN \char_set_active:Npx \cs_set:Npx + \char_tmp:NN \char_gset_active:Npn \cs_gset:Npn + \char_tmp:NN \char_gset_active:Npx \cs_gset:Npx + \char_tmp:NN \char_set_active_eq:NN \cs_set_eq:NN + \char_tmp:NN \char_gset_active_eq:NN \cs_gset_eq:NN \group_end: \cs_new_protected_nopar:Npn \peek_execute_branches_N_type: { -- cgit v1.2.3