diff options
author | Karl Berry <karl@freefriends.org> | 2014-08-26 17:33:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-08-26 17:33:09 +0000 |
commit | 6c4cd2ab2f8d1ebe3a051d700c3005d73eefe04c (patch) | |
tree | 16833d474c6532347c42dee6b34fa77aed22eca6 /Master/texmf-dist/source/latex/l3kernel/l3basics.dtx | |
parent | 097e7dc0afa442be238a967b292237470680626e (diff) |
l3 (26aug14)
git-svn-id: svn://tug.org/texlive/trunk@35045 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3basics.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3basics.dtx | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx index b36707ccc97..ab565a10ab7 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx @@ -37,7 +37,7 @@ \documentclass[full]{l3doc} %</driver> %<*driver|package> -\GetIdInfo$Id: l3basics.dtx 5187 2014-07-09 12:02:17Z will $ +\GetIdInfo$Id: l3basics.dtx 5364 2014-08-24 20:19:24Z joseph $ {L3 Basic definitions} %</driver|package> %<*driver> @@ -202,7 +202,7 @@ % other argument specifiers in your function names, but they do not handle % expansion for you. You should define the base function and then use % \cs{cs_generate_variant:Nn} to generate custom variants as described in -% Section~\ref{sec:l3expan:defining-variants}. +% Section~\ref{sec:l3expan:variants-method}. % % \subsection{Defining new functions using parameter text} % \label{sec:l3basics:defining-new-function-1} @@ -1125,7 +1125,7 @@ % prefix primitive conditionals with |\if_|. % % \begin{function}[EXP] -% {\if_true:, \if_false:, \or:, \else:, \fi:, \reverse_if:N} +% {\if_true:, \if_false:, \else:, \fi:, \reverse_if:N} % \begin{syntax} % "\if_true:" <true code> "\else:" <false code> "\fi:" \\ % "\if_false:" <true code> "\else:" <false code> "\fi:" \\ @@ -1134,8 +1134,8 @@ % "\if_true:" always executes <true code>, while "\if_false:" always % executes <false code>. "\reverse_if:N" reverses any two-way primitive % conditional. "\else:" and "\fi:" delimit the branches of the -% conditional. "\or:" is used in case switches, see \pkg{l3int} -% for more. +% conditional. The function "\or:" is documented in \pkg{l3int} and +% used in case switches. % \begin{texnote} % These are equivalent to their corresponding \TeX\ primitive % conditionals; \cs{reverse_if:N} is \eTeX's \tn{unless}. @@ -1441,7 +1441,6 @@ % \subsection{Defining some constants} % % \begin{variable}{\c_minus_one, \c_zero, \c_sixteen} -% \begin{variable}{\c_six, \c_seven, \c_twelve} % We need the constants \cs{c_minus_one} and \cs{c_sixteen} now for % writing information to the log and the terminal and \cs{c_zero} % which is used by some functions in the \textsf{l3alloc} module. The @@ -1450,9 +1449,8 @@ % \cs{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 -% \cs{c_minus_one}. +% \pkg{l3alloc}, and works such that the first available count register +% is $10$. % \begin{macrocode} %<*package> \tex_let:D \c_minus_one \m@ne @@ -1463,12 +1461,8 @@ %</initex> \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{variable} -% \end{variable} % % \begin{variable}{\c_max_register_int} % This is here as this particular integer is needed both in package @@ -1882,7 +1876,8 @@ % version. The |p| form is only valid for expandable tests, we check % for that by making sure that the second argument is empty. % \begin{macrocode} -\cs_set_protected:Npn \__prg_generate_p_form:wnnnnnn #1 \q_stop #2#3#4#5#6#7 +\cs_set_protected:Npn \__prg_generate_p_form:wnnnnnn + #1 \q_stop #2#3#4#5#6#7 { \if_meaning:w \scan_stop: #3 \scan_stop: \exp_after:wN \use_i:nn @@ -1898,17 +1893,20 @@ { \token_to_str:c { #4 _p: #5 } } } } -\cs_set_protected:Npn \__prg_generate_T_form:wnnnnnn #1 \q_stop #2#3#4#5#6#7 +\cs_set_protected:Npn \__prg_generate_T_form:wnnnnnn + #1 \q_stop #2#3#4#5#6#7 { \exp_args:cc { cs_ #2 #3 :Npn } { #4 : #5 T } #6 { #7 \c_zero \use:n \use_none:n } } -\cs_set_protected:Npn \__prg_generate_F_form:wnnnnnn #1 \q_stop #2#3#4#5#6#7 +\cs_set_protected:Npn \__prg_generate_F_form:wnnnnnn + #1 \q_stop #2#3#4#5#6#7 { \exp_args:cc { cs_ #2 #3 :Npn } { #4 : #5 F } #6 { #7 \c_zero { } } } -\cs_set_protected:Npn \__prg_generate_TF_form:wnnnnnn #1 \q_stop #2#3#4#5#6#7 +\cs_set_protected:Npn \__prg_generate_TF_form:wnnnnnn + #1 \q_stop #2#3#4#5#6#7 { \exp_args:cc { cs_ #2 #3 :Npn } { #4 : #5 TF } #6 { #7 \c_zero } @@ -1918,11 +1916,12 @@ % % \begin{macro}{\prg_set_eq_conditional:NNn,\prg_new_eq_conditional:NNn} % \begin{macro}[aux]{\__prg_set_eq_conditional:NNNn} -% The setting-equal functions. Split the two functions and feed a -% first auxiliary \Arg{name_1} \Arg{signature_1} \meta{boolean_1} +% The setting-equal functions. Split both functions and feed +% \Arg{name_1} \Arg{signature_1} \meta{boolean_1} % \Arg{name_2} \Arg{signature_2} \meta{boolean_2} % \meta{copying~function} \meta{conditions} |,| \cs{q_recursion_tail} % |,| \cs{q_recursion_stop} +% to a first auxiliary. % \begin{macrocode} \cs_set_protected_nopar:Npn \prg_set_eq_conditional:NNn { \__prg_set_eq_conditional:NNNn \cs_set_eq:cc } @@ -2303,10 +2302,12 @@ % If an internal error occurs before \LaTeX3 has loaded \pkg{l3msg} then % the code should issue a usable if terse error message and halt. This % can only happen if a coding error is made by the team, so this is -% a reasonable response. +% a reasonable response. Setting the \tn{newlinechar} is needed, to +% turn |^^J| into a proper line break in plain \TeX{}. % \begin{macrocode} \cs_set_protected:Npn \__msg_kernel_error:nnxx #1#2#3#4 { + \tex_newlinechar:D = `\^^J \tex_relax:D \tex_errmessage:D { !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!~! ^^J @@ -2697,9 +2698,9 @@ % \subsection{Using the signature to define functions} % % We can now combine some of the tools we have to provide a simple -% interface for defining functions. We define some simpler functions -% with user interface |\cs_set:Nn \foo_bar:nn {#1,#2}|, \emph{i.e.}, the -% number of arguments is read from the signature. +% interface for defining functions, where the number of arguments is +% read from the signature. For instance, +% |\cs_set:Nn \foo_bar:nn {#1,#2}|. % % \begin{macro} % { |