[latex3-commits] [git/LaTeX3-latex3-latex3] master: Minor indexing and doc fixes (72778ee8d)

Phelype Oleinik phe.h.o1 at gmail.com
Fri Aug 30 16:12:53 CEST 2019


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/72778ee8d4bbe4bb5450a5a20d557ca0ad99e2d3

>---------------------------------------------------------------

commit 72778ee8d4bbe4bb5450a5a20d557ca0ad99e2d3
Author: Phelype Oleinik <phe.h.o1 at gmail.com>
Date:   Fri Aug 30 11:12:53 2019 -0300

    Minor indexing and doc fixes


>---------------------------------------------------------------

72778ee8d4bbe4bb5450a5a20d557ca0ad99e2d3
 l3kernel/l3doc.dtx         |  5 ++++-
 l3kernel/l3regex.dtx       | 14 +++++++-------
 l3kernel/l3str-convert.dtx |  6 +++---
 l3kernel/l3str.dtx         |  6 +++++-
 l3kernel/l3tl.dtx          | 16 ++++++++--------
 5 files changed, 27 insertions(+), 20 deletions(-)

diff --git a/l3kernel/l3doc.dtx b/l3kernel/l3doc.dtx
index 9c00e7928..714f41d30 100644
--- a/l3kernel/l3doc.dtx
+++ b/l3kernel/l3doc.dtx
@@ -1153,6 +1153,7 @@ and all files in that bundle must be distributed together.
         { n } { n }
         { o } { n }
         { f } { n }
+        { e } { n }
         { x } { n }
         { V } { n }
         { v } { n }
@@ -1258,7 +1259,9 @@ and all files in that bundle must be distributed together.
     \bool_if:NT #3
       {
         \token_to_str:N :
-        \str_if_eq:nnTF { #1 ~ } { \exp_args }
+        \bool_lazy_or:nnTF
+            { \str_if_eq_p:nn { #1 ~ } { \exp_args } }
+            { \str_if_eq_p:nn { #1 ~ } { \exp_last_unbraced } }
           { \exp_not:n {#2} }
           { \@@_signature_base_form:n {#2} }
       }
diff --git a/l3kernel/l3regex.dtx b/l3kernel/l3regex.dtx
index f4f3fb1dd..c3c22a56b 100644
--- a/l3kernel/l3regex.dtx
+++ b/l3kernel/l3regex.dtx
@@ -656,7 +656,7 @@
 %     \cs{regex_replace_all:nnN} \Arg{regular expression} \Arg{replacement} \meta{tl~var}
 %     \cs{regex_replace_all:nnNTF} \Arg{regular expression} \Arg{replacement} \meta{tl~var} \Arg{true code} \Arg{false code}
 %   \end{syntax}
-%   Replaces all occurrences of the \cs{regular expression} in the
+%   Replaces all occurrences of the \meta{regular expression} in the
 %   \meta{token list} by the \meta{replacement}, where |\0| represents
 %   the full match, |\1| represent the contents of the first capturing
 %   group, |\2| of the second, \emph{etc.} Every match is treated
@@ -697,7 +697,7 @@
 %     non-implemented syntax.
 %   \item Test for the maximum register \cs{c_max_register_int}.
 %   \item Find out whether the fact that |\W| and friends match the
-%     end-marker leads to bugs. Possibly update \cs{__regex_item_reverse:n}.
+%     end-marker leads to bugs. Possibly update \cs[no-index]{__regex_item_reverse:n}.
 %   \item The empty cs should be matched by |\c{}|, not by
 %     |\c{csname.?endcsname\s?}|.
 % \end{itemize}
@@ -709,21 +709,21 @@
 %   \item Only build |\c{...}| once.
 %   \item Use arrays for the left and right state stacks when
 %     compiling a regex.
-%   \item Should \cs{__regex_action_free_group:n} only be used for greedy
+%   \item Should \cs[no-index]{__regex_action_free_group:n} only be used for greedy
 %     |{n,}| quantifier? (I think not.)
 %   \item Quantifiers for |\u| and assertions.
 %   \item When matching, keep track of an explicit stack of
 %     \texttt{current_state} and \texttt{current_submatches}.
 %   \item If possible, when a state is reused by the same thread, kill
 %     other subthreads.
-%   \item Use an array rather than \cs{l__regex_balance_tl}
-%     to build the function \cs{__regex_replacement_balance_one_match:n}.
+%   \item Use an array rather than \cs[no-index]{l__regex_balance_tl}
+%     to build the function \cs[no-index]{__regex_replacement_balance_one_match:n}.
 %   \item Reduce the number of epsilon-transitions in alternatives.
 %   \item Optimize simple strings: use less states (|abcade| should give
 %     two states, for |abc| and |ade|). [Does that really make sense?]
 %   \item Optimize groups with no alternative.
-%   \item Optimize states with a single \cs{__regex_action_free:n}.
-%   \item Optimize the use of \cs{__regex_action_success:} by inserting it
+%   \item Optimize states with a single \cs[no-index]{__regex_action_free:n}.
+%   \item Optimize the use of \cs[no-index]{__regex_action_success:} by inserting it
 %     in state $2$ directly instead of having an extra transition.
 %   \item Optimize the use of \cs{int_step_...} functions.
 %   \item Groups don't capture within regexes for csnames; optimize and
diff --git a/l3kernel/l3str-convert.dtx b/l3kernel/l3str-convert.dtx
index 1343955f7..2ae0afdbc 100644
--- a/l3kernel/l3str-convert.dtx
+++ b/l3kernel/l3str-convert.dtx
@@ -186,7 +186,7 @@
 %   encoding. Instead, the \meta{false code} is performed.
 % \end{function}
 %
-% \section{Creating $8$-bit mappings}
+% \section[Creating 8-bit mappings]{Creating $8$-bit mappings}
 %
 % \begin{function}{\str_declare_eight_bit_encoding:nnn}
 %   \begin{syntax}
@@ -218,8 +218,8 @@
 %   \item The \texttt{hex} unescaping should raise an error for
 %     odd-token count strings.
 %   \item Decide what bytes should be escaped in the \texttt{url}
-%     escaping. Perhaps |!'()*-./0123456789_| are safe, and all other
-%     characters should be escaped?
+%     escaping. Perhaps the characters |!'()*-./0123456789_| are safe,
+%     and all other characters should be escaped?
 %   \item Automate generation of 8-bit mapping files.
 %   \item Change the framework for 8-bit encodings: for decoding from
 %     8-bit to Unicode, use $256$ integer registers; for encoding, use a
diff --git a/l3kernel/l3str.dtx b/l3kernel/l3str.dtx
index 32dd203cf..f26f674fd 100644
--- a/l3kernel/l3str.dtx
+++ b/l3kernel/l3str.dtx
@@ -656,7 +656,11 @@
 %     \iow_term:x { \str_range:nnn { abcdef } { -1 } { -4 } }
 %   \end{verbatim}
 %   both yield empty strings.
+% \end{function}
 %
+% ^^A If this stays in the same {function} environment, we get a really
+% ^^A awful page break. Perhaps we should add a way to allow a page break
+% ^^A in a function environment...
 %   The behavior of \cs{str_range_ignore_spaces:nnn} is similar, but spaces
 %   are removed before starting the job. The input
 %   \begin{verbatim}
@@ -682,7 +686,7 @@
 %   \end{verbatim}
 %   will print four instances of |bcde|, four instances of |bc e| and eight
 %   instances of |bcde|.
-% \end{function}
+% ^^A\end{function}
 %
 % \section{String manipulation}
 %
diff --git a/l3kernel/l3tl.dtx b/l3kernel/l3tl.dtx
index 77444e6d1..d38d17f2f 100644
--- a/l3kernel/l3tl.dtx
+++ b/l3kernel/l3tl.dtx
@@ -1065,12 +1065,11 @@
 %   Leaves in the input stream the items from the \meta{start index} to the
 %   \meta{end index} inclusive.  Spaces and braces are preserved between
 %   the items returned (but never at either end of the list).
-%
 %   Here \meta{start index} and \meta{end index} should be integer denotations.
 %   For describing in detail the functions' behavior, let $m$ and $n$ be the start
 %   and end index respectively. If either is $0$, the result is empty. A positive
-%   index means `start counting from the left end', a negative index means
-%   `start counting from the right end'. Let $l$ be the count of the token list.
+%   index means `start counting from the left end', and a negative index means
+%   `from the right end'. Let $l$ be the count of the token list.
 %
 %   The \emph{actual start point} is determined as $M=m$ if~$m>0$ and as $M=l+m+1$
 %   if~$m<0$. Similarly the \emph{actual end point} is $N=n$ if~$n>0$ and $N=l+n+1$
@@ -1110,16 +1109,17 @@
 %   \begin{verbatim}
 %     \tl_range:nnn { abcd~{e{}}f } { 2 } { 4 }
 %   \end{verbatim}
-%   will discard the space after `d`.
+%   will discard the space after `d'.
 %
-%   If we want to get the items from the third to the last, the call
+%   If we want to get the items from, say, the third to the last in a token
+%   list |<tl>|, the call
 %   is |\tl_range:nnn { <tl> } { 3 } { -1 }|. Similarly, for discarding
 %   the last item, we can do |\tl_range:nnn { <tl> } { 1 } { -2 }|.
 %
-%   The behavior of \cs{tl_range:Nnn} is exactly the same, acting on the
-%   contents of the tl variable.
+%^^A   The behavior of \cs{tl_range:Nnn} is exactly the same, acting on the
+%^^A   contents of the tl variable.
 %
-%   For improved performance, see  \cs{tl_range_braced:nnn} and
+%   For better performance, see  \cs{tl_range_braced:nnn} and
 %   \cs{tl_range_unbraced:nnn}.
 %   \begin{texnote}
 %     The result is returned within the \tn{unexpanded}





More information about the latex3-commits mailing list