diff options
author | Karl Berry <karl@freefriends.org> | 2015-06-19 22:34:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-06-19 22:34:54 +0000 |
commit | 8ec6f52457309f1e1152d881c29acc8f8c775442 (patch) | |
tree | 3b3247c79f170cc40a286743fb4e1265255cbb06 /Master/texmf-dist/source/latex/l3kernel | |
parent | 487de9cd41f430fd78e869079c420f36a8ff051a (diff) |
l3 (19jun15)
git-svn-id: svn://tug.org/texlive/trunk@37621 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel')
7 files changed, 217 insertions, 155 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx index 85507e91d25..3c0a4035cd8 100644 --- a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx @@ -36,8 +36,8 @@ %<*driver|generic|package> \def\ExplFileName{expl3} \def\ExplFileDescription{L3 programming layer} -\def\ExplFileDate{2015/03/01} -\def\ExplFileVersion{5547} +\def\ExplFileDate{2015/06/15} +\def\ExplFileVersion{5630} %</driver|generic|package> %<*driver> \documentclass[full]{l3doc} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx index b5fc71e1438..f15f704a2c9 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx @@ -145,7 +145,7 @@ % \end{macro} % \end{macro} % \end{macro} -\GetIdInfo$Id: l3bootstrap.dtx 5542 2015-02-28 22:47:53Z joseph $ +\GetIdInfo$Id: l3bootstrap.dtx 5608 2015-05-20 15:29:10Z joseph $ {L3 Bootstrap code} %</driver|package> %<*driver> @@ -373,7 +373,7 @@ % primitive or a version of \LuaTeX{} capable of emulating it. % \begin{macrocode} \begingroup - \def\next{\endgroup} + \def\next{\endgroup}% \def\ShortText{Required primitives not found}% \def\LongText% {% @@ -386,48 +386,49 @@ or later.\LineBreak \LineBreak }% - \expandafter\ifx\csname pdfstrcmp\endcsname\relax + \ifnum0% + \expandafter\ifx\csname pdfstrcmp\endcsname\relax\else 1\fi \expandafter\ifx\csname directlua\endcsname\relax \else - \ifnum\luatexversion<36 % - \newlinechar`\^^J\relax + \ifnum\luatexversion<36 \else 1\fi + \fi + =0 % + \newlinechar`\^^J % %<*initex> - \def\LineBreak{^^J}% - \edef\next - {% - \errhelp - {% - \LongText - For pdfTeX and XeTeX the '-etex' command-line switch is also - needed.\LineBreak - \LineBreak - Format building will abort!\LineBreak - }% - \errmessage{\ShortText}% - \endgroup - \noexpand\end - }% -%</initex> -%<*package> - \def\LineBreak{\noexpand\MessageBreak}% - \expandafter\ifx\csname PackageError\endcsname\relax - \def\LineBreak{^^J}% - \def\PackageError#1#2#3% + \def\LineBreak{^^J}% + \edef\next + {% + \errhelp {% - \errhelp{#3}% - \errmessage{#1 Error: #2!} + \LongText + For pdfTeX and XeTeX the '-etex' command-line switch is also + needed.\LineBreak + \LineBreak + Format building will abort!\LineBreak }% - \fi - \edef\next + \errmessage{\ShortText}% + \endgroup + \noexpand\end + }% +%</initex> +%<*package> + \def\LineBreak{\noexpand\MessageBreak}% + \expandafter\ifx\csname PackageError\endcsname\relax + \def\LineBreak{^^J}% + \def\PackageError#1#2#3% {% - \noexpand\PackageError{expl3}{\ShortText} - {\LongText Loading of expl3 will abort!}% - \endgroup - \noexpand\endinput + \errhelp{#3}% + \errmessage{#1 Error: #2} }% -%</package> \fi - \fi + \edef\next + {% + \noexpand\PackageError{expl3}{\ShortText} + {\LongText Loading of expl3 will abort!}% + \endgroup + \noexpand\endinput + }% +%</package> \fi \next % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx index 41e883c9397..abc040a20d0 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx @@ -38,7 +38,7 @@ \documentclass[full]{l3doc} %</driver> %<*driver|package> -\GetIdInfo$Id: l3candidates.dtx 5544 2015-03-01 18:30:00Z joseph $ +\GetIdInfo$Id: l3candidates.dtx 5613 2015-05-21 11:59:04Z joseph $ {L3 Experimental additions to l3kernel} %</driver|package> %<*driver> @@ -806,7 +806,7 @@ % \end{texnote} % \end{function} % -% \begin{function}[EXP, added = 2014-06-30, updated = 2015-02-18]^^A +% \begin{function}[EXP, added = 2014-06-30, updated = 2015-05-07]^^A % { % \tl_lower_case:n, \tl_upper_case:n, \tl_mixed_case:n, % \tl_lower_case:nn, \tl_upper_case:nn, \tl_mixed_case:nn @@ -867,6 +867,14 @@ % \begin{verbatim} % $ $ \( \) % \end{verbatim} +% +% Note that while expansion occurs when searching the text it does not +% apply to math mode material (which should be unaffected by case changing). +% As such, whilst the opening token for math mode may be \enquote{hidden} +% inside a command/macro, the closing one cannot be as this is being +% searched for in math mode. Typically, in the types of \enquote{text} +% the case changing functions are intended to apply to this should not be +% an issue. % \end{variable} % % \begin{variable}{\l_tl_case_change_exclude_tl} @@ -948,22 +956,8 @@ % input is left unchanged. % % Context-sensitive mappings are enabled: language-dependent cases are -% discussed below. All context detection works before any expansion of -% following tokens and thus any control sequences are taken as the end of -% the current \enquote{word}/character context. -% -% \begin{variable}{\l_tl_change_case_after_final_sigma_tl} -% The \enquote{final sigma} rule for Greek letters is enabled and active for -% all inputs. It is implemented here in a modified form which takes account -% of the requirements of the likely real use cases, performance and -% expandability. A capital sigma will map to a final-sigma if it is followed -% by a space, the end of the input or one of the characters listed in -% \cs{l_tl_change_case_after_final_sigma_tl}, which has standard setting -% \begin{verbatim} -% ) ] } . : ; , ! ? ' " -% \end{verbatim} -% with comparisons are made on a character basis. -% \end{variable} +% discussed below. Context detection will expand input but treats any +% unexpandable control sequences as \enquote{failures} to match a context. % % Language-sensitive conversions are enabled using the \meta{language} % argument, and follow Unicode Consortium guidelines. Currently, the @@ -3138,9 +3132,9 @@ % \begin{macro}[aux, EXP]{\@@_change_case_cs:N} % \begin{macro}[aux, EXP]{\@@_change_case_cs:NN} % \begin{macro}[aux, EXP]{\@@_change_case_cs:NNn} +% \begin{macro}[aux, EXP]{\@@_change_case_if_expandable:NTF} % \begin{macro}[aux, EXP]{\@@_change_case_cs_expand:Nnw} % \begin{macro}[aux, EXP]{\@@_change_case_cs_expand:NN} -% \begin{macro}[aux, EXP]{\@@_change_case_cs_expand:NNnw} % The mechanism for the core conversion of case is based on the idea that % we can use a loop to grab the entire token list plus a quark: the latter is % used as an end marker and to avoid any brace stripping. Depending on the @@ -3494,23 +3488,34 @@ % When a control sequence is not on the exclude list the other test if % to see if it is expandable. Once again, if there is a hit then the loop % function is grabbed as part of the clean-up and reinserted before the -% now expanded material. +% now expanded material. The test for expandablity has to check for +% end-of-recursion as it is needed by the look-ahead code which might hit +% the end of the input. The test is done in two parts as \cs{bool_if:nTF} +% will choke if |#1| is |(|! % \begin{macrocode} -\cs_new:Npn \@@_change_case_cs_expand:Nnw #1#2 +\cs_new:Npn \@@_change_case_if_expandable:NTF #1 { - \bool_if:nTF + \token_if_expandable:NTF #1 { - \token_if_expandable_p:N #1 - && ! \token_if_protected_macro_p:N #1 - && ! \token_if_protected_long_macro_p:N #1 + \bool_if:nTF + { + \token_if_protected_macro_p:N #1 + || \token_if_protected_long_macro_p:N #1 + || \token_if_eq_meaning_p:NN \q_recursion_tail #1 + } + { \use_ii:nn } + { \use_i:nn } } + { \use_ii:nn } + } +\cs_new:Npn \@@_change_case_cs_expand:Nnw #1#2 + { + \@@_change_case_if_expandable:NTF #1 { \@@_change_case_cs_expand:NN #1 } { #2 } } \cs_new:Npn \@@_change_case_cs_expand:NN #1#2 { \exp_after:wN #2 #1 } -\cs_new:Npn \@@_change_case_cs_expand:NNnw #1#2#3 - { \@@_change_case_cs_expand:Nnw #2 {#3} #1 } % \end{macrocode} % \end{macro} % \end{macro} @@ -3547,7 +3552,6 @@ % \begin{macro}[aux, EXP]{\@@_change_case_lower_sigma:Nnw} % \begin{macro}[aux, EXP]{\@@_change_case_lower_sigma:w} % \begin{macro}[aux, EXP]{\@@_change_case_lower_sigma:Nw} -% \begin{macro}[aux, EXP]{\@@_change_case_lower_sigma_loop:NN} % \begin{macro}[aux, EXP]{\@@_change_case_upper_sigma:Nnw} % If the current char is an upper case sigma, the a check is made on the next % item in the input. If it is \texttt{N}-type and not a control sequence @@ -3565,34 +3569,22 @@ } \cs_new:Npn \@@_change_case_lower_sigma:w #1 \q_recursion_stop { - \tl_if_head_is_N_type:nTF {#1} - { \@@_change_case_lower_sigma:Nw #1 \q_recursion_stop } - { \c__unicode_final_sigma_tl } + \tl_if_head_is_N_type:nTF {#1} + { \@@_change_case_lower_sigma:Nw #1 \q_recursion_stop } + { \c__unicode_final_sigma_tl } } \cs_new:Npn \@@_change_case_lower_sigma:Nw #1#2 \q_recursion_stop { - \token_if_cs:NTF #1 - { \c__unicode_final_sigma_tl } + \@@_change_case_if_expandable:NTF #1 { - \exp_after:wN \@@_change_case_lower_sigma_loop:NN - \exp_after:wN #1 \l_tl_case_change_after_final_sigma_tl - \q_recursion_tail \q_recursion_stop + \exp_after:wN \@@_change_case_lower_sigma:w #1 + #2 \q_recursion_stop + } + { + \token_if_letter:NTF #1 + { \c__unicode_std_sigma_tl } + { \c__unicode_final_sigma_tl } } - } -% \end{macrocode} -% Assuming the next token is not a control sequence, a loop is used to test -% if the next char is something that can be interpreted as the end of a word. -% Rather than use all of the Unicode data for this, the simplifying -% assumption is made that in real text the end of a word will be indicated by -% a small number of chars. -% \begin{macrocode} -\cs_new:Npn \@@_change_case_lower_sigma_loop:NN #1#2 - { - \quark_if_recursion_tail_stop_do:Nn #2 - { \c__unicode_std_sigma_tl } - \int_compare:nNnT { `#1 } = { `#2 } - { \use_i_delimit_by_q_recursion_stop:nw { \c__unicode_final_sigma_tl } } - \@@_change_case_lower_sigma_loop:NN #1 } % \end{macrocode} % Simply skip to the final step for upper casing. @@ -3603,7 +3595,6 @@ % \end{macro} % \end{macro} % \end{macro} -% \end{macro} % % \begin{macro}[aux, EXP]{\@@_change_case_lower_tr:Nnw} % \begin{macro}[aux, EXP]{\@@_change_case_lower_tr_auxi:Nw} @@ -3643,15 +3634,22 @@ } \cs_new:Npn \@@_change_case_lower_tr_auxii:Nw #1#2 \q_recursion_stop { - \bool_if:nTF + \@@_change_case_if_expandable:NTF #1 { - \token_if_cs_p:N #1 - || ! ( \int_compare_p:nNn { `#1 } = { "0307 } ) + \exp_after:wN \@@_change_case_lower_tr_auxi:Nw #1 + #2 \q_recursion_stop } - { \@@_change_case_output:Vwn \c__unicode_dotless_i_tl } { - \@@_change_case_output:nwn { i } - \use_i:nn + \bool_if:nTF + { + \token_if_cs_p:N #1 + || ! ( \int_compare_p:nNn { `#1 } = { "0307 } ) + } + { \@@_change_case_output:Vwn \c__unicode_dotless_i_tl } + { + \@@_change_case_output:nwn { i } + \use_i:nn + } } } % \end{macrocode} @@ -3742,18 +3740,25 @@ } \cs_new:Npn \@@_change_case_lower_lt:NNw #1#2#3 \q_recursion_stop { - \bool_if:nT + \@@_change_case_if_expandable:NTF #2 { - ! \token_if_cs_p:N #2 - && - ( - \int_compare_p:nNn { `#2 } = { "0300 } - || \int_compare_p:nNn { `#2 } = { "0301 } - || \int_compare_p:nNn { `#2 } = { "0303 } - ) + \exp_after:wN \@@_change_case_lower_lt:Nw \exp_after:wN #1 #2 + #3 \q_recursion_stop + } + { + \bool_if:nT + { + ! \token_if_cs_p:N #2 + && + ( + \int_compare_p:nNn { `#2 } = { "0300 } + || \int_compare_p:nNn { `#2 } = { "0301 } + || \int_compare_p:nNn { `#2 } = { "0303 } + ) + } + { \@@_change_case_output:Vwn \c__unicode_dot_above_tl } + #1 #2#3 \q_recursion_stop } - { \@@_change_case_output:Vwn \c__unicode_dot_above_tl } - #1 #2#3 \q_recursion_stop } % \end{macrocode} % For upper casing, the test required is for a dot-above char after an I, @@ -3790,14 +3795,21 @@ } \cs_new:Npn \@@_change_case_upper_lt:NNw #1#2#3 \q_recursion_stop { - \bool_if:nTF + \@@_change_case_if_expandable:NTF #2 + { + \exp_after:wN \@@_change_case_upper_lt:Nw \exp_after:wN #1 #2 + #3 \q_recursion_stop + } { - ! \token_if_cs_p:N #2 - && \int_compare_p:nNn { `#2 } = { "0307 } + \bool_if:nTF + { + ! \token_if_cs_p:N #2 + && \int_compare_p:nNn { `#2 } = { "0307 } + } + { #1 } + { #1 #2 } + #3 \q_recursion_stop } - { #1 } - { #1 #2 } - #3 \q_recursion_stop } % \end{macrocode} % \end{macro} @@ -4028,21 +4040,28 @@ } \cs_new:Npn \@@_change_case_mixed_nl:NNw #1#2#3 \q_recursion_stop { - \bool_if:nTF + \@@_change_case_if_expandable:NTF #2 { - ! ( \token_if_cs_p:N #2 ) - && - ( - \int_compare_p:nNn { `#2 } = { `j } - || \int_compare_p:nNn { `#2 } = { `J } - ) + \exp_after:wN \@@_change_case_mixed_nl:Nw \exp_after:wN #1 #2 + #3 \q_recursion_stop } { - \@@_change_case_output:nwn { J } - #1 + \bool_if:nTF + { + ! ( \token_if_cs_p:N #2 ) + && + ( + \int_compare_p:nNn { `#2 } = { `j } + || \int_compare_p:nNn { `#2 } = { `J } + ) + } + { + \@@_change_case_output:nwn { J } + #1 + } + { #1 #2 } + #3 \q_recursion_stop } - { #1 #2 } - #3 \q_recursion_stop } % \end{macrocode} % \end{macro} @@ -4071,21 +4090,6 @@ %</package> % \end{macrocode} % \end{variable} -% -% \begin{variable}{\l_tl_case_change_after_final_sigma_tl} -% Characters coming after a final sigma. -% \begin{macrocode} -\tl_new:N \l_tl_case_change_after_final_sigma_tl -\tl_set:Nx \l_tl_case_change_after_final_sigma_tl - { % ( - ) % [ - ] % \{ - \cs_to_str:N \} - . : ; , - ! ? ' " - } -% \end{macrocode} -% \end{variable} % % \begin{variable}{\l_tl_mixed_case_ignore_tl} % Characters to skip over when finding the first letter in a word to be diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx index bded1318cdc..b057b04dc80 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -%% File: l3file.dtx Copyright (C) 1990-2014 The LaTeX3 Project +%% File: l3file.dtx Copyright (C) 1990-2015 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of the %% LaTeX Project Public License (LPPL), either version 1.3c of this @@ -37,7 +37,7 @@ \documentclass[full]{l3doc} %</driver> %<*driver|package> -\GetIdInfo$Id: l3file.dtx 5369 2014-08-24 22:41:47Z bruno $ +\GetIdInfo$Id: l3file.dtx 5627 2015-06-07 09:26:26Z bruno $ {L3 File and I/O operations} %</driver|package> %<*driver> @@ -432,7 +432,7 @@ % \item |\#|, |\%|, |\{|, |\}|, |\~| may be used to represent % the corresponding character, % \item \cs{iow_indent:n} may be used to indent a part of the -% message. +% \meta{text} (not the \meta{run-on text}). % \end{itemize} % Additional functions may be added to the wrapping by using the % \meta{set up}, which is executed before the wrapping takes place: this @@ -464,7 +464,7 @@ % \begin{syntax} % \cs{iow_indent:n} \Arg{text} % \end{syntax} -% In the context of \cs{iow_wrap:nnnN} (for instance in messages), +% In the first argument of \cs{iow_wrap:nnnN} (for instance in messages), % indents \meta{text} by four spaces. This function will not cause % a line break, and only affects lines which start within the scope % of the \meta{text}. In case the indented \meta{text} should appear @@ -975,7 +975,10 @@ { \cs_if_exist:NTF \normalend { \tex_count:D 38 \scan_stop: } - { \tex_count:D 16 \scan_stop: - \c_one } + { + \tex_count:D 16 \scan_stop: + \cs_if_exist:NT \loccount { - \c_one } + } } { \prop_gput:Nnn \g_@@_streams_prop {#1} { Reserved~by~format } @@ -1239,7 +1242,10 @@ { \cs_if_exist:NTF \normalend { \tex_count:D 39 \scan_stop: } - { \tex_count:D 17 \scan_stop: - \c_one } + { + \tex_count:D 17 \scan_stop: + \cs_if_exist:NT \loccount { - \c_one } + } } { \prop_gput:Nnn \g_@@_streams_prop {#1} { Reserved~by~format } @@ -1554,21 +1560,26 @@ % \end{macro} % % \begin{macro}{\iow_indent:n} -% \begin{macro}[aux]{\@@_indent:n} -% We give a dummy (protected) definition to \cs{iow_indent:n} +% \begin{macro}[aux]{\@@_indent:n, \@@_indent_error:n} +% We give a (protected) error definition to \cs{iow_indent:n} % when outside messages. Within wrapped message, it places % the instruction for increasing the indentation before its % argument, and the instruction for unindenting afterwards. % Note that there will be no forced line-break, so the indentation % only changes when the next line is started. % \begin{macrocode} -\cs_new_protected:Npn \iow_indent:n #1 { } \cs_new:Npx \@@_indent:n #1 { \c_@@_wrap_indent_marker_tl #1 \c_@@_wrap_unindent_marker_tl } +\cs_new:Npn \@@_indent_error:n #1 + { + \__msg_kernel_expandable_error:nn { kernel } { indent-outside-wrapping-code } + #1 + } +\cs_new_protected_nopar:Npn \iow_indent:n { \@@_indent_error:n } % \end{macrocode} % \end{macro} % \end{macro} @@ -1612,11 +1623,14 @@ \@@_wrap_set:Nx \l_@@_wrap_tl {#1} %</package> % \end{macrocode} +% To warn users that \cs{iow_indent:n} only works in the first argument +% of \cs{iow_wrap:nnnN} reset \cs{iow_indent:n} to its error definition. % This is a bit of a hack to measure the string length of the run on text % without the \pkg{l3str} module (which is still experimental). This should % be replaced once the string module is finalised with something a little % cleaner. % \begin{macrocode} + \cs_set_eq:NN \iow_indent:n \@@_indent_error:n \tl_set:Nx \l_@@_newline_tl { \iow_newline: #2 } \tl_set:Nx \l_@@_newline_tl { \tl_to_str:N \l_@@_newline_tl } \tl_replace_all:Nnn \l_@@_newline_tl { ~ } { \c_space_tl } @@ -1625,12 +1639,20 @@ \int_zero:N \l_@@_current_indentation_int \tl_clear:N \l_@@_current_indentation_tl \int_zero:N \l_@@_current_line_int - \tl_clear:N \l_@@_current_line_tl + \tl_set:Nn \l_@@_current_line_tl { \use_none:n } \bool_set_true:N \l_@@_line_start_bool +% \end{macrocode} +% After some setup above (in particular the odd setting of the current line +% to \cs{use_none:n}), a loop goes through space-delimited words in the +% message, recognizing special markers. To make sure that the first line +% behaves identically to others, start with a newline marker: the +% \cs{use_none:n} above avoids actually getting a new line in the output. +% \begin{macrocode} \use:x { \exp_not:n { \tl_clear:N \l_@@_wrap_tl } \@@_wrap_loop:w + \tl_to_str:N \c_@@_wrap_newline_marker_tl \tl_to_str:N \l_@@_wrap_tl \tl_to_str:N \c_@@_wrap_end_marker_tl \c_space_tl \c_space_tl @@ -1836,6 +1858,8 @@ { File~names~must~contain~balanced~numbers~of~quotes~("). } +\__msg_kernel_new:nnn { kernel } { indent-outside-wrapping-code } + { Only~\iow_wrap:nnnN~(arg~1)~allows~\iow_indent:n } % \end{macrocode} % % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx index c64d2a7dd3a..8797006f6b4 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx @@ -37,7 +37,7 @@ \documentclass[full]{l3doc} %</driver> %<*driver|package> -\GetIdInfo$Id: l3keys.dtx 5500 2015-01-27 14:37:04Z joseph $ +\GetIdInfo$Id: l3keys.dtx 5629 2015-06-14 08:38:04Z joseph $ {L3 Key-value interfaces} %</driver|package> %<*driver> @@ -1391,7 +1391,7 @@ \clist_map_inline:nn {#2} { \int_incr:N \l_keys_choice_int - \@@_cmd_set:nx { \l_keys_path_tl / ##1 } + \@@_cmd_set:nx { \l_keys_path_tl / \tl_to_str:n {##1} } { \tl_set:Nn \exp_not:N \l_keys_choice_tl {##1} \int_set:Nn \exp_not:N \l_keys_choice_int @@ -2127,7 +2127,7 @@ % \begin{macrocode} \prg_new_conditional:Npnn \keys_if_exist:nn #1#2 { p , T , F , TF } { - \cs_if_exist:cTF { \c_@@_code_root_tl #1 / #2 } + \cs_if_exist:cTF { \c_@@_code_root_tl \tl_to_str:n { #1 / #2 } } { \prg_return_true: } { \prg_return_false: } } @@ -2140,7 +2140,7 @@ \prg_new_conditional:Npnn \keys_if_choice_exist:nnn #1#2#3 { p , T , F , TF } { - \cs_if_exist:cTF { \c_@@_code_root_tl #1 / #2 / #3 } + \cs_if_exist:cTF { \c_@@_code_root_tl \tl_to_str:n { #1 / #2 / #3 } } { \prg_return_true: } { \prg_return_false: } } diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx index 92881b93abf..81c1a12b0ca 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -%% File: l3prg.dtx Copyright (C) 2005-2014 The LaTeX3 Project +%% File: l3prg.dtx Copyright (C) 2005-2015 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of the %% LaTeX Project Public License (LPPL), either version 1.3c of this @@ -37,7 +37,7 @@ \documentclass[full]{l3doc} %</driver> %<*driver|package> -\GetIdInfo$Id: l3prg.dtx 5354 2014-08-23 01:35:39Z bruno $ +\GetIdInfo$Id: l3prg.dtx 5566 2015-04-13 08:24:56Z joseph $ {L3 Control structures} %</driver|package> %<*driver> @@ -238,6 +238,14 @@ % All conditional |\bool_| functions except assignments are expandable % and expect the input to also be fully expandable (which will generally % mean being constructed from predicate functions, possibly nested). +% +% \begin{texnote} +% The \texttt{bool} data type is not implemented using the +% \tn{iffalse}/\tn{iftrue} primitives, in contrast to \tn{newif}, +% \emph{etc.}, in plain \TeX{}, \LaTeXe{} and so on. Programmers should +% not base use of \texttt{bool} switches on any particular expectation +% of the implementation. +% \end{texnote} % % \begin{function}{\bool_new:N, \bool_new:c} % \begin{syntax} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx index d82f85327f8..dadd33bfa23 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx @@ -38,7 +38,7 @@ \documentclass[full]{l3doc} %</driver> %<*driver|package> -\GetIdInfo$Id: l3skip.dtx 5354 2014-08-23 01:35:39Z bruno $ +\GetIdInfo$Id: l3skip.dtx 5607 2015-05-18 12:25:06Z joseph $ {L3 Dimensions and skips} %</driver|package> %<*driver> @@ -473,6 +473,15 @@ % one (\TeX{}) point when converted to big points. % \end{function} % +% \begin{function}[added = 2015-05-18, EXP]{\dim_to_decimal_in_sp:n} +% \begin{syntax} +% \cs{dim_to_decimal_in_sp:n} \Arg{dimexpr} +% \end{syntax} +% Evaluates the \meta{dimension expression}, and leaves the result, +% expressed in scaled points (\texttt{sp}) in the input stream, with \emph{no +% units}. The result will necessarily be an integer. +% \end{function} +% % \begin{function}[added = 2014-07-15, EXP] % {\dim_to_decimal_in_unit:nn} % \begin{syntax} @@ -490,6 +499,13 @@ % \end{verbatim} % leaves |0.35277| in the input stream, \emph{i.e.}~the magnitude of % one big point when converted to millimetres. +% +% Note that this function is not optimised for any particular output +% and as such may give different results to \cs{dim_to_decimal_in_bp:n} +% or \cs{dim_to_decimal_in_sp:n}. In particular, the latter is able to +% take a wider range of input values as it is not limited by the ability +% to calculate a ratio using \eTeX{} primitives, which is required +% internally by \cs{dim_to_decimal_in_unit:nn}. % \end{function} % % \begin{function}[EXP, added = 2012-05-08, tested = m3fp-convert002] @@ -1435,6 +1451,15 @@ { \dim_to_decimal:n { ( #1 ) * 800 / 803 } } % \end{macrocode} % \end{macro} +% +% \begin{macro}[EXP]{\dim_to_decimal_in_sp:n} +% Another hard-coded conversion: this one is necessary to avoid things going +% off-scale. +% \begin{macrocode} +\cs_new:Npn \dim_to_decimal_in_sp:n #1 + { \int_eval:n { \@@_eval:w #1 \@@_eval_end: } } +% \end{macrocode} +% \end{macro} % % \begin{macro}[EXP]{\dim_to_decimal_in_unit:nn} % An analogue of \cs{dim_ratio:nn} that produces a decimal number as its |