summaryrefslogtreecommitdiff
path: root/macros/generic
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-09-09 03:03:16 +0000
committerNorbert Preining <norbert@preining.info>2020-09-09 03:03:16 +0000
commit4b315627efc5a6beb1e6c6ec7a98779f215c75eb (patch)
treecf65539a3758192b9bfbaea63d1962f28ec32a3e /macros/generic
parentbc2d0660f4f460b55009ab4e525f2a0e4cde6187 (diff)
CTAN sync 202009090303
Diffstat (limited to 'macros/generic')
-rw-r--r--macros/generic/witharrows/witharrows-french.pdfbin266688 -> 270033 bytes
-rw-r--r--macros/generic/witharrows/witharrows-french.tex40
-rw-r--r--macros/generic/witharrows/witharrows.dtx97
-rw-r--r--macros/generic/witharrows/witharrows.pdfbin638897 -> 643250 bytes
4 files changed, 98 insertions, 39 deletions
diff --git a/macros/generic/witharrows/witharrows-french.pdf b/macros/generic/witharrows/witharrows-french.pdf
index 3c95de9c42..10b2e83191 100644
--- a/macros/generic/witharrows/witharrows-french.pdf
+++ b/macros/generic/witharrows/witharrows-french.pdf
Binary files differ
diff --git a/macros/generic/witharrows/witharrows-french.tex b/macros/generic/witharrows/witharrows-french.tex
index 95b3e77256..86b7f660f9 100644
--- a/macros/generic/witharrows/witharrows-french.tex
+++ b/macros/generic/witharrows/witharrows-french.tex
@@ -49,8 +49,8 @@
Title = L’extension witharrows ,
Subject = Une extension pour plain-TeX et LaTeX ,
Author = F. Pantigny
+ }
}
-}
\NewDocumentEnvironment {scope} {} {} {}
@@ -468,8 +468,16 @@ la page~\pageref{NestedEnv}.
Jusqu'à présent, nous n'avons utilisé l'environnement |{WithArrows}| qu'avec deux colonnes. Néanmoins, il est
possible de l'utiliser avec un nombre arbitraire de colonnes grâce à l'option |format|. La valeur donnée à cette
option est similaire au préambule d'un environnement |{array}|: il s'agit d'une séquence de lettres |r|, |c| et
-|l|. La valeur initiale de cette option |format| est, en fait, |rl|.
+|l| mais aussi |R|, |C| et |L|.
+\smallskip
+\colorbox{yellow!50}{\textbf{Nouveau 2.6}}\enskip
+Les lettres |R|, |C| et |L| placent des groupes vides |{}| qui permettent un espacement correct lorsque ces
+colonnes contiennent des symboles de type |\mathrel| (comme $=$, $\le$, etc.) ou |\mathbin| (comme $+$, $×$, etc.).
+Ce système est inspiré par l'environnement |{IEEEeqnarray}| de \pkg{IEEEtrantools}.
+
+\smallskip
+La valeur initiale du paramètre |format| est, en fait, |rL|.
\bigskip
Par exemple, si on veut seulement une colonne alignée à gauche, on peut utiliser l'option |format=l|.
@@ -492,7 +500,7 @@ Dans l'exemple suivant, on utilise cinq colonnes toutes centrées (l'environneme
présenté p.~\pageref{DispWithArrows}).
\begin{Verbatim}
-\begin{DispWithArrows*}[~emphase#format = ccccc@,
+\begin{DispWithArrows*}[~emphase#format = cCcCc@,
wrap-lines,
interline=1mm]
k & \;\le\; & t & \;\le\; & k+1 \\
@@ -504,7 +512,7 @@ k & \;\le\; & t & \;\le\; & k+1 \\
\frac{1}{k+1} & \le & \ln(k+1)-\ln(k) & \le & \frac{1}{k}
\end{DispWithArrows*}
\end{Verbatim}
-\begin{DispWithArrows*}[format = ccccc,
+\begin{DispWithArrows*}[format = cCcCc,
wrap-lines,
interline=1mm]
k & \;\le\; & t & \;\le\; & k+1 \\
@@ -2464,13 +2472,13 @@ E & \Longleftrightarrow \frac{(x+4)}3 + \frac{5x+3}5 = 7
\subsection{Boucle numérotée automatique}
Supposons que nous voulions tracer une boucle avec des flèches numérotées. Dans ce but, il est
-possible d'écrire une commande dédiée |\BoucleNumérotée| qui fera le travail quand elle
+possible d'écrire une commande dédiée |\NumberedLoop| qui fera le travail quand elle
sera utilisée dans le |code-after|. Dans l'exemple suivant, nous avons écrit cette commande avec
|\NewDocumentCommand| de \pkg{xparse} et |\foreach| de \pkg{pgffor} (ces deux
extensions sont chargées quand \pkg{witharrows} est chargé.).
\begin{Verbatim}
-\NewDocumentCommande \NombreedLoop {}
+\NewDocumentCommande \NomberedLoop {}
{\foreach \j dans {2,...,\WithArrowsNbLines}
{ \pgfmathtruncatemacro{\i}{\j-1}
\Arrow[rr]{\i}{\j}{\i} }
@@ -2484,7 +2492,7 @@ compteur).
\bigskip
\begin{Verbatim}
-$\begin{WithArrows}[~emphase#code-after = \BoucleNumérotée@]
+$\begin{WithArrows}[~emphase#code-after = \NumberedLoop@]
a.\;& f \text{ est continue sur } E \\
b.\;& f \text{ est continue en } 0 \\
c.\;& f \text{ est bornée sur la sphère unité} \\
@@ -2495,14 +2503,14 @@ e.\;& f \text{ est lipschitzienne}
\bigskip
\begin{scope}
-\NewDocumentCommand \BoucleNumérotée {}
+\NewDocumentCommand \NumberedLoop {}
{\foreach \j in {2,...,\WithArrowsNbLines}
{ \pgfmathtruncatemacro{\i}{\j-1}
\Arrow[rr]{\i}{\j}{\i} }
\Arrow[rr,xoffset=1cm,tikz=<-]{1}{\WithArrowsNbLines}{\WithArrowsNbLines}}
-$\begin{WithArrows}[code-after = \BoucleNumérotée]
+$\begin{WithArrows}[code-after = \NumberedLoop]
a.\;& f \text{ est continue sur } E \\
b.\;& f \text{ est continue en } 0 \\
c.\;& f \text{ est bornée sur la sphère unité} \\
@@ -2523,7 +2531,7 @@ tikz-code = {\draw (~#1) to node {\footnotesize (~#3)} (~#2) ;}
\WithArrowsOptions{tikz-code = {\draw (#1) to node {\footnotesize (#3)} (#2) ;}}
-$\begin{WithArrows}[code-after = \BoucleNumérotée]
+$\begin{WithArrows}[code-after = \NumberedLoop]
a.\;& f \text{ est continue on } E \\
b.\;& f \text{ est continue dans } 0 \\
c.\;& f \text{ est bornée sur la sphère unité} \\
@@ -2537,7 +2545,17 @@ e.\;& f \text{ est lipschitzienne}
\section*{Autre documentation}
Le document |witharrows.pdf| (fourni avec l'extension \pkg{witharrows}) contient une traduction anglaise de la
-documentation ici présente, ainsi que le code source commenté et un historique des versions.
+documentation ici présente, ainsi que le code source commenté et un historique des versions.
+
+
+\bigskip
+Les versions successives du fichier |witharrows.sty| fournies par TeXLive sont disponibles sur le serveur
+\textsc{svn} de TeXLive :
+
+{
+\small
+\url{https:www.tug.org/svn/texlive/trunk/Master/texmf-dist/tex/latex/nicematrix/witharrows.sty}
+}
diff --git a/macros/generic/witharrows/witharrows.dtx b/macros/generic/witharrows/witharrows.dtx
index b32e5f62d8..79f46f5d69 100644
--- a/macros/generic/witharrows/witharrows.dtx
+++ b/macros/generic/witharrows/witharrows.dtx
@@ -15,8 +15,8 @@
%
% \fi
% \iffalse
-\def\myfileversion{2.5.1}
-\def\myfiledate{2020/07/28}
+\def\myfileversion{2.6}
+\def\myfiledate{2020/09/08}
%
%
%<*batchfile>
@@ -505,8 +505,18 @@ version 2005/12/01 or later.
% So far, we have used the environment |{WithArrows}| with two columns. However,
% it's possible to use the environment with an arbitrary number of columns with
% the option |format|. The value given to this option is like the preamble of an
-% environment |{array}|, that is to say a sequence of letters |r|, |c| and |l|.
-% The initial value of the option |format| is, in fact, |rl|.
+% environment |{array}|, that is to say a sequence of letters |r|, |c| and |l|,
+% but also |R|, |C| and |L|.
+%
+% \smallskip
+% \colorbox{yellow!50}{\textbf{New 2.6}}\enskip
+% The letters |R|, |C| and |L| add empty groups |{}| which provide correct
+% spaces when these columns contain symbols with the type |\mathrel| (such as
+% $=$, $\leq$, etc.) or |\mathbin| (such as $+$, $\times$, etc.). This system is
+% inspired by the environment |{IEEEeqnarray}| of the package \pkg{IEEEtrantools}.
+%
+% \smallskip
+% The initial value of the parameter |format| is, in fact, |rL|.
%
% \bigskip
% For exemple, if we want only one column left-aligned, we use the option |format=l|.
@@ -529,7 +539,7 @@ version 2005/12/01 or later.
% |{DispWithArrows*}| is presented p.~\pageref{DispWithArrows}).
%
% \begin{Verbatim}
-% \begin{DispWithArrows*}[~emphase#format = ccccc@,
+% \begin{DispWithArrows*}[~emphase#format = cCcCc@,
% wrap-lines,
% tikz = {align = flush left},
% interline=1mm]
@@ -542,7 +552,7 @@ version 2005/12/01 or later.
% \frac{1}{k+1} & \le & \ln(k+1)-\ln(k) & \le & \frac{1}{k}
% \end{DispWithArrows*}
% \end{Verbatim}
-% \begin{DispWithArrows*}[format = ccccc,
+% \begin{DispWithArrows*}[format = cCcCc,
% wrap-lines,
% tikz = {align = flush left},
% interline=1mm]
@@ -1870,7 +1880,7 @@ version 2005/12/01 or later.
% \interitem
% \section{Advanced features}
%
-% \subsection{Utilisation with plain-TeX}
+% \subsection{Use with plain-TeX}
% \label{plain-TeX}
%
% The extension \pkg{witharrows} can be used with plain-TeX. In this case, the
@@ -2300,7 +2310,7 @@ version 2005/12/01 or later.
%
%
% \bigskip
-% Example of utilisation:
+% Example of use:
%
% \begin{Verbatim}
% $\begin{WithArrows}[groups]
@@ -2917,14 +2927,29 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \bigskip
-% The following command creates a sequence of strings (|str|) from a |clist|. Be
-% careful: we use |\seq_set_map:NNn| and the name of that function will maybe
-% change to |\eq_set_map_x:NNn|.
+% The following command creates a sequence of strings (|str|) from a |clist|.
+%
+%
+% The following command converts all the elements of a sequence (which are token
+% lists) into strings.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_convert_to_str_seq:N #1
+ {
+ \seq_clear:N \l_tmpa_seq
+ \seq_map_inline:Nn #1
+ {
+ \seq_put_left:Nx \l_tmpa_seq { \tl_to_str:n { ##1 } }
+ }
+ \seq_set_eq:NN #1 \l_tmpa_seq
+ }
+% \end{macrocode}
+%
+% The following command creates a sequence of strings (|str|) from a |clist|.
% \begin{macrocode}
\cs_new_protected:Npn \@@_set_seq_of_str_from_clist:Nn #1 #2
{
\seq_set_from_clist:Nn #1 { #2 }
- \seq_set_map:NNn #1 #1 { \tl_to_str:n { ##1 } }
+ \@@_convert_to_str_seq:N #1
}
% \end{macrocode}
%
@@ -3192,7 +3217,7 @@ version 2005/12/01 or later.
% We will also use a ``static'' version of the counter of columns, called
% |\g_@@_static_col_int|. The value will be set directly in each cell of the
% array by an instruction in the template of the |\halign|. The aim of this
-% programmation is to try to detect some utilisation of |\omit| (which should be
+% programmation is to try to detect some use of |\omit| (which should be
% forbidden) in the cells of the |\halign|.
% \begin{macrocode}
\seq_new:N \g_@@_static_col_int_seq
@@ -3618,7 +3643,7 @@ version 2005/12/01 or later.
\tl_if_empty:nTF { #1 }
{ \@@_error:n { Invalid~option~format } }
{
- \regex_match:nnTF { \A[rcl]*\Z } { #1 }
+ \regex_match:nnTF { \A[rclRCL]*\Z } { #1 }
{ \tl_set:Nn \l_@@_format_str { #1 } }
{ \@@_error:n { Invalid~option~format } }
} ,
@@ -4162,7 +4187,7 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% In the preamble of the |\halign|, there will be \emph{two} counters of the
-% columns. The aim of this programmation is to detect the utilisation of a
+% columns. The aim of this programmation is to detect the use of a
% command |\omit| in a cell of the |\halign| (it should be forbidden).
% For example, in the part of the preamble concerning the third column (if there
% is a third column in the environment), we will have the following instructions :
@@ -4223,7 +4248,7 @@ version 2005/12/01 or later.
% The string |\l_@@_format_str| corresponds to the option |format|. Now, we set
% the initial value for this option.
% \begin{macrocode}
- \str_set:Nn \l_@@_format_str { rl }
+ \str_set:Nn \l_@@_format_str { rL }
% \end{macrocode}
%
%
@@ -4370,8 +4395,8 @@ version 2005/12/01 or later.
% stream of TeX. That means that the part of the preamble concerning the last
% cell will be constructed first.
% \item The function |\@@_construct_halign:| is recursive in order to treat
-% succesively all the letters of the preamble.
-% \item Each part of the preamble is created with a |\use:x| function. This
+% successively all the letters of the preamble.
+% \item Each part of the preamble is created with a |\use:e| function. This
% expansion of the preamble gives the ability of controlling which parts of the
% code will be expanded during the construction of the preamble (other parts
% will be expanded and executed only during the execution of the |\halign|).
@@ -4386,18 +4411,18 @@ version 2005/12/01 or later.
\seq_pop_right:NNTF \l_@@_format_seq \l_@@_type_col_str
{
% \end{macrocode}
-% Here is the |\use:x| which is fundamental: it will really construct the part
+% Here is the |\use:e| which is fundamental: it will really construct the part
% of the preamble corresponding to a column by expanding only some parts of the
% following code.
% \begin{macrocode}
- \use:x
+ \use:e
{
% \end{macrocode}
% Before the recursive call of |\@@_construct_halign:|, we decrease the integer
% |\g_@@_col_bool|. But, during the construction of the column which is
% constructed first (that is to say which is the last column of the |\halign|),
% it is \emph{not} lowered because |\int_decr:N|, which is protected, won't be
-% expanded by the |\use:x|.
+% expanded by the |\use:e|.
%
% We begin the construction of a generic column.
% \begin{macrocode}
@@ -4409,7 +4434,7 @@ version 2005/12/01 or later.
% We redefine the command |\Arrow| (or the name given to the corresponding
% command by the option |command-name|) in each cell of the last column.
% The braces around |\l_@@_command_name_str| are mandatory because
-% |\l_@@_command_name_str| will be expanded by the |\use:x| and the command
+% |\l_@@_command_name_str| will be expanded by the |\use:e| and the command
% |\cs_set_eq:cN| must still be efficient during the execution of the |\halign|.
% \begin{macrocode}
\cs_set_eq:cN { \l_@@_command_name_str } \@@_Arrow
@@ -4432,18 +4457,21 @@ version 2005/12/01 or later.
%</LaTeX>
}
\str_if_eq:VnT \l_@@_type_col_str { c } \hfil
+ \str_if_eq:VnT \l_@@_type_col_str { C } \hfil
\str_if_eq:VnT \l_@@_type_col_str { r } \hfill
+ \str_if_eq:VnT \l_@@_type_col_str { R } \hfill
\int_gincr:N \g_@@_col_int
\int_gset:Nn \g_@@_static_col_int { \int_use:N \g_@@_col_int }
\c_math_toggle_token
- {
- { }
- \bool_if:NT \l_@@_displaystyle_bool \displaystyle
- ####
- }
+ \str_if_eq:VnT \l_@@_type_col_str { C } { { } }
+ \str_if_eq:VnT \l_@@_type_col_str { L } { { } }
+ \bool_if:NT \l_@@_displaystyle_bool \displaystyle
+ ##
+ \str_if_eq:VnT \l_@@_type_col_str { C } { { } }
+ \str_if_eq:VnT \l_@@_type_col_str { R } { { } }
\c_math_toggle_token
\int_compare:nNnTF \g_@@_col_int = \l_@@_nb_cols_int
- { \@@_construct_nodes: }
+ \@@_construct_nodes:
{
% \end{macrocode}
% The following glue (|\hfil|) will be added only if we are not in the last cell
@@ -4451,7 +4479,9 @@ version 2005/12/01 or later.
% |\@@_construct_nodes:|).
% \begin{macrocode}
\str_if_eq:VnT \l_@@_type_col_str { l } \hfil
+ \str_if_eq:VnT \l_@@_type_col_str { L } \hfil
\str_if_eq:VnT \l_@@_type_col_str { c } \hfil
+ \str_if_eq:VnT \l_@@_type_col_str { C } \hfil
\bool_if:NT \l_@@_in_DispWithArrows_bool { \tabskip = \c_zero_skip }
&
}
@@ -7681,6 +7711,13 @@ version 2005/12/01 or later.
%
% \section{History}
%
+% The successive versions of the file |witharrows.sty| provided by TeXLive are available on the
+% \textsc{svn} server of TeXLive:
+%
+% {
+% \small
+% \url{https:www.tug.org/svn/texlive/trunk/Master/texmf-dist/tex/latex/witharrows/witharrows.sty}
+% }
% \subsection*{Changes between versions 1.0 and 1.1}
%
% Option for the command |\\| and option |interline|
@@ -7887,6 +7924,10 @@ version 2005/12/01 or later.
%
% Correction of the erroneous programmation of the nodes aliases.
%
+% \subsection*{Changes between 2.5.1 and 2.6}
+%
+% The key |format| now support the letters |R|, |C| and |L|.
+%
% \PrintIndex
%
% \tableofcontents
diff --git a/macros/generic/witharrows/witharrows.pdf b/macros/generic/witharrows/witharrows.pdf
index 3d89c2d242..7b350f0631 100644
--- a/macros/generic/witharrows/witharrows.pdf
+++ b/macros/generic/witharrows/witharrows.pdf
Binary files differ