From 47dcd2e2b5322254f57061c60596e7dda1c9054e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 29 Jul 2020 21:34:43 +0000 Subject: witharrows (29jul20) git-svn-id: svn://tug.org/texlive/trunk@55987 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/generic/witharrows/witharrows-french.pdf | Bin 266363 -> 266688 bytes .../doc/generic/witharrows/witharrows.pdf | Bin 639742 -> 638897 bytes .../doc/generic/witharrows/witharrows.tex | 40 ++++------ .../source/generic/witharrows/witharrows.dtx | 84 ++++++++++----------- .../source/generic/witharrows/witharrows.ins | 4 +- .../tex/generic/witharrows/witharrows.sty | 60 ++++++--------- 6 files changed, 81 insertions(+), 107 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/generic/witharrows/witharrows-french.pdf b/Master/texmf-dist/doc/generic/witharrows/witharrows-french.pdf index 9a9a5e39182..3c95de9c427 100644 Binary files a/Master/texmf-dist/doc/generic/witharrows/witharrows-french.pdf and b/Master/texmf-dist/doc/generic/witharrows/witharrows-french.pdf differ diff --git a/Master/texmf-dist/doc/generic/witharrows/witharrows.pdf b/Master/texmf-dist/doc/generic/witharrows/witharrows.pdf index 64cd930e620..3d89c2d2429 100644 Binary files a/Master/texmf-dist/doc/generic/witharrows/witharrows.pdf and b/Master/texmf-dist/doc/generic/witharrows/witharrows.pdf differ diff --git a/Master/texmf-dist/doc/generic/witharrows/witharrows.tex b/Master/texmf-dist/doc/generic/witharrows/witharrows.tex index b1c30db494b..2b94910abee 100644 --- a/Master/texmf-dist/doc/generic/witharrows/witharrows.tex +++ b/Master/texmf-dist/doc/generic/witharrows/witharrows.tex @@ -6,7 +6,7 @@ %% %% witharrows.dtx (with options: `plain-TeX') %% -%% Copyright (C) 2017-2019 by F. Pantigny +%% Copyright (C) 2017-2020 by F. Pantigny %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -18,8 +18,8 @@ %% and version 1.3 or later is part of all distributions of %% LaTeX version 2005/12/01 or later. %% -\def\myfileversion{2.5} -\def\myfiledate{2020/06/22} +\def\myfileversion{2.5.1} +\def\myfiledate{2020/07/28} \input tikz.tex \input expl3-generic.tex \usetikzlibrary{arrows.meta,bending} @@ -34,7 +34,6 @@ \cs_new_protected:Npn \__witharrows_fatal:n { \msg_fatal:nn { witharrows } } \cs_new_protected:Npn \__witharrows_error:nn { \msg_error:nnn { witharrows } } \cs_generate_variant:Nn \__witharrows_error:nn { n x } -\cs_generate_variant:Nn \tl_put_right:Nn { N v } \cs_generate_variant:Nn \seq_set_split:Nnn { N x x } \AtBeginDocument { @@ -72,19 +71,10 @@ \sort_return_same: } } -\cs_new_protected:Npn \__witharrows_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 - } \cs_new_protected:Npn \__witharrows_set_seq_of_str_from_clist:Nn #1 #2 { \seq_set_from_clist:Nn #1 { #2 } - \__witharrows_convert_to_str_seq:N #1 + \seq_set_map:NNn #1 #1 { \tl_to_str:n { ##1 } } } \cs_new_protected:Npn \__witharrows_save:N #1 { @@ -380,7 +370,6 @@ t, tikz, tikz-code, xoffset, ygap, ystart } -\__witharrows_convert_to_str_seq:N \l__witharrows_options_WithArrows_seq \keys_define:nn { WithArrows / WithArrows } { unknown .code:n = @@ -682,11 +671,6 @@ node~contents = { } , __witharrows_node_style , name = wa - \l__witharrows_prefix_str - \int_use:N \g__witharrows_line_int - l , - alias = - { - \str_if_empty:NF \l__witharrows_name_str - { \l__witharrows_name_str - \int_use:N \g__witharrows_line_int - l } - } ] ; \hfil @@ -696,13 +680,19 @@ node~contents = { } , __witharrows_node_style , name = wa - \l__witharrows_prefix_str - \int_use:N \g__witharrows_line_int - r , - alias = - { - \str_if_empty:NF \l__witharrows_name_str - { \l__witharrows_name_str - \int_use:N \g__witharrows_line_int - r } - } ] ; + \str_if_empty:NF \l__witharrows_name_str + { + \pgfpicture + \pgfnodealias + { \l__witharrows_name_str - \int_use:N \g__witharrows_line_int - l } + { wa - \l__witharrows_prefix_str - \int_use:N \g__witharrows_line_int - l } + \pgfnodealias + { \l__witharrows_name_str - \int_use:N \g__witharrows_line_int - r } + { wa - \l__witharrows_prefix_str - \int_use:N \g__witharrows_line_int - r } + \endpgfpicture + } \bool_if:NT \l__witharrows_show_node_names_bool { \hbox_overlap_right:n diff --git a/Master/texmf-dist/source/generic/witharrows/witharrows.dtx b/Master/texmf-dist/source/generic/witharrows/witharrows.dtx index 9a4b5067ef3..b32e5f62d81 100644 --- a/Master/texmf-dist/source/generic/witharrows/witharrows.dtx +++ b/Master/texmf-dist/source/generic/witharrows/witharrows.dtx @@ -15,8 +15,8 @@ % % \fi % \iffalse -\def\myfileversion{2.5} -\def\myfiledate{2020/06/22} +\def\myfileversion{2.5.1} +\def\myfiledate{2020/07/28} % % %<*batchfile> @@ -162,7 +162,7 @@ version 2005/12/01 or later. % \end{WithArrows}$ % % \interitem -% It's possible to put several arrows which start from the same row. +% It's possible to put several arrows starting from the same row. % \begin{Verbatim} % $\begin{WithArrows} % A & = \bigl((a+b)+1\bigr)^2 ~emphase#\Arrow{}\Arrow{}[jump=2]@ \\ @@ -1579,7 +1579,7 @@ version 2005/12/01 or later. % the left margin can be controlled with the option |mathindent| (with a name % inspired by the parameter |\mathindent| of standard LaTeX\footnote{In LaTeX, % |mathindent| is a dimension (|dim|) and not a glue (|skip|) but should become -% a skip in a future version of LaTeX. As for now, the parameter |mathindent| of +% a skip in a future version of LaTeX. As of now, the parameter |mathindent| of % \pkg{witharrows} is a dimension.}). The initial value % of this parameter is 25~pt. % @@ -2699,19 +2699,19 @@ version 2005/12/01 or later. % |{WithArrows}|. Idem for the option |footnotehyper|. % % \medskip -% The boolean |\g_@@_footnotehyper_bool| will indicate if the option +% The boolean |\c_@@_footnotehyper_bool| will indicate if the option % |footnotehyper| is used. % \begin{macrocode} %<*LaTeX> -\bool_new:N \g_@@_footnotehyper_bool +\bool_new:N \c_@@_footnotehyper_bool % \end{macrocode} % % \medskip -% The boolean |\g_@@_footnote_bool| will indicate if the option |footnote| is +% The boolean |\c_@@_footnote_bool| will indicate if the option |footnote| is % used, but quicky, it will also be set to |true| if the option |footnotehyper| % is used. % \begin{macrocode} -\bool_new:N \g_@@_footnote_bool +\bool_new:N \c_@@_footnote_bool % % \end{macrocode} % @@ -2734,8 +2734,8 @@ version 2005/12/01 or later. %<*LaTeX> \keys_define:nn { WithArrows / package } { - footnote .bool_gset:N = \g_@@_footnote_bool , - footnotehyper .bool_gset:N = \g_@@_footnotehyper_bool , + footnote .bool_set:N = \c_@@_footnote_bool , + footnotehyper .bool_set:N = \c_@@_footnotehyper_bool , unknown .code:n = \@@_fatal:n { Option~unknown~for~package } } @@ -2793,7 +2793,7 @@ version 2005/12/01 or later. % % \medskip % \begin{macrocode} -\bool_if:NT \g_@@_footnote_bool +\bool_if:NT \c_@@_footnote_bool { \@ifclassloaded { beamer } { \msg_info:nn { witharrows } { Option~incompatible~with~Beamer } } @@ -2806,7 +2806,7 @@ version 2005/12/01 or later. % \end{macrocode} % % \begin{macrocode} -\bool_if:NT \g_@@_footnotehyper_bool +\bool_if:NT \c_@@_footnotehyper_bool { \@ifclassloaded { beamer } { \@@_info:n { Option~incompatible~with~Beamer } } @@ -2815,11 +2815,11 @@ version 2005/12/01 or later. { \@@_error:n { footnotehyper~with~footnote~package } } { \usepackage { footnotehyper } } } - \bool_gset_true:N \g_@@_footnote_bool + \bool_set_true:N \c_@@_footnote_bool } % \end{macrocode} -% The flag |\g_@@_footnote_bool| is raised and so, we will only have to test -% |\g_@@_footnote_bool| in order to know if we have to insert an environment +% The flag |\c_@@_footnote_bool| is raised and so, we will only have to test +% |\c_@@_footnote_bool| in order to know if we have to insert an environment % |{savenotes}| (the |\begin{savenotes}| is in |\@@_pre_halign:n| and % |\end{savenotes}| at the end of the environments |{WithArrows}| and % |{DispWithArrows}|). @@ -2850,7 +2850,6 @@ version 2005/12/01 or later. % % % \begin{macrocode} -\cs_generate_variant:Nn \tl_put_right:Nn { N v } \cs_generate_variant:Nn \seq_set_split:Nnn { N x x } % \end{macrocode} % @@ -2918,22 +2917,14 @@ version 2005/12/01 or later. % \end{macrocode} % % \bigskip -% The following command converts each item of a sequence from |tl| to |str|. It -% will be used when creating list of keys (a key name is always a |str|). +% 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|. % \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 - } \cs_new_protected:Npn \@@_set_seq_of_str_from_clist:Nn #1 #2 { \seq_set_from_clist:Nn #1 { #2 } - \@@_convert_to_str_seq:N #1 + \seq_set_map:NNn #1 #1 { \tl_to_str:n { ##1 } } } % \end{macrocode} % @@ -3686,7 +3677,6 @@ version 2005/12/01 or later. t, tikz, tikz-code, xoffset, ygap, ystart } -\@@_convert_to_str_seq:N \l_@@_options_WithArrows_seq % \end{macrocode} % % \medskip @@ -4332,14 +4322,14 @@ version 2005/12/01 or later. % \pkg{footnote} or the package \pkg{footnotehyper}). % \begin{macrocode} %<*LaTeX> - \bool_if:NT \g_@@_footnote_bool { \begin { savenotes } } + \bool_if:NT \c_@@_footnote_bool { \begin { savenotes } } % % \end{macrocode} % % \bigskip % We execute the code |\l_@@_code_before_tl| of the option |code-before| of the -% environment after the eventual |\begin{savenotes}| and, symetrically, we will -% execute the |\l_@@_code_after_tl| before the eventual |\end{savenotes}| (we +% environment after the potential |\begin{savenotes}| and, symetrically, we will +% execute the |\l_@@_code_after_tl| before the potential |\end{savenotes}| (we % have a good reason for the last point: we want to extract the footnotes of the % arrows executed in the |code-after|). % \begin{macrocode} @@ -4514,11 +4504,6 @@ version 2005/12/01 or later. node~contents = { } , @@_node_style , name = wa - \l_@@_prefix_str - \int_use:N \g_@@_line_int - l , - alias = - { - \str_if_empty:NF \l_@@_name_str - { \l_@@_name_str - \int_use:N \g_@@_line_int - l } - } ] ; \hfil @@ -4535,13 +4520,19 @@ version 2005/12/01 or later. node~contents = { } , @@_node_style , name = wa - \l_@@_prefix_str - \int_use:N \g_@@_line_int - r , - alias = - { - \str_if_empty:NF \l_@@_name_str - { \l_@@_name_str - \int_use:N \g_@@_line_int - r } - } ] ; + \str_if_empty:NF \l_@@_name_str + { + \pgfpicture + \pgfnodealias + { \l_@@_name_str - \int_use:N \g_@@_line_int - l } + { wa - \l_@@_prefix_str - \int_use:N \g_@@_line_int - l } + \pgfnodealias + { \l_@@_name_str - \int_use:N \g_@@_line_int - r } + { wa - \l_@@_prefix_str - \int_use:N \g_@@_line_int - r } + \endpgfpicture + } \bool_if:NT \l_@@_show_node_names_bool { \hbox_overlap_right:n @@ -4654,7 +4645,7 @@ version 2005/12/01 or later. % \pkg{footnote} or the package \pkg{footnotehyper}). % \begin{macrocode} %<*LaTeX> - \bool_if:NT \g_@@_footnote_bool { \end { savenotes } } + \bool_if:NT \c_@@_footnote_bool { \end { savenotes } } % %<*plain-TeX> \group_end: @@ -4723,7 +4714,7 @@ version 2005/12/01 or later. % \end{macrocode} % The command |\MultiArrow| is available in |code-after|, and we have a special % version of |\Arrow|, called ``|\Arrow| in |code-after|'' in the -% documentation.\footnote{As for now, |\MultiArrow| has no option, and that's +% documentation.\footnote{As of now, |\MultiArrow| has no option, and that's % why its internal name is a name of \pkg{expl3} with the signature |:nn| % whereas |\Arrow| in |code-after| provides options and has the name of a % function defined with |\NewDocumentCommand|.} @@ -5435,7 +5426,7 @@ version 2005/12/01 or later. % extract the footnotes with an environment |{savenotes}| (of the package % \pkg{footnote} or the package \pkg{footnotehyper}). % \begin{macrocode} - \bool_if:NT \g_@@_footnote_bool { \end { savenotes } } + \bool_if:NT \c_@@_footnote_bool { \end { savenotes } } % %<*plain-TeX> \group_end: @@ -7892,6 +7883,9 @@ version 2005/12/01 or later. % % \pkg{witharrows} now requires and loads \pkg{varwidth} % +% \subsection*{Changes between 2.5 and 2.5.1} +% +% Correction of the erroneous programmation of the nodes aliases. % % \PrintIndex % diff --git a/Master/texmf-dist/source/generic/witharrows/witharrows.ins b/Master/texmf-dist/source/generic/witharrows/witharrows.ins index bc0fccc6b35..66ef8293fb3 100644 --- a/Master/texmf-dist/source/generic/witharrows/witharrows.ins +++ b/Master/texmf-dist/source/generic/witharrows/witharrows.ins @@ -1,5 +1,5 @@ %% -%% Copyright (C) 2017-2019 by F. Pantigny +%% Copyright (C) 2017-2020 by F. Pantigny %% %% %% This file may be distributed and/or modified under the @@ -17,7 +17,7 @@ \usedir{tex/latex/witharrows} \preamble -Copyright (C) 2017-2019 by F. Pantigny +Copyright (C) 2017-2020 by F. Pantigny This file may be distributed and/or modified under the conditions of the LaTeX Project Public License, either diff --git a/Master/texmf-dist/tex/generic/witharrows/witharrows.sty b/Master/texmf-dist/tex/generic/witharrows/witharrows.sty index 1a7286bca41..0edf18a42e3 100644 --- a/Master/texmf-dist/tex/generic/witharrows/witharrows.sty +++ b/Master/texmf-dist/tex/generic/witharrows/witharrows.sty @@ -6,7 +6,7 @@ %% %% witharrows.dtx (with options: `LaTeX') %% -%% Copyright (C) 2017-2019 by F. Pantigny +%% Copyright (C) 2017-2020 by F. Pantigny %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -18,8 +18,8 @@ %% and version 1.3 or later is part of all distributions of %% LaTeX version 2005/12/01 or later. %% -\def\myfileversion{2.5} -\def\myfiledate{2020/06/22} +\def\myfileversion{2.5.1} +\def\myfiledate{2020/07/28} \RequirePackage{tikz} \usetikzlibrary{arrows.meta,bending} \RequirePackage{l3keys2e} @@ -38,8 +38,8 @@ { \msg_error:nn { witharrows } { expl3~too~old } } \RequirePackage { xparse } [ 2019-01-01 ] \RequirePackage { varwidth } -\bool_new:N \g__witharrows_footnotehyper_bool -\bool_new:N \g__witharrows_footnote_bool +\bool_new:N \c__witharrows_footnotehyper_bool +\bool_new:N \c__witharrows_footnote_bool \cs_new_protected:Npn \__witharrows_msg_new:nn { \msg_new:nnn { witharrows } } \cs_new_protected:Npn \__witharrows_msg_new:nnn { \msg_new:nnnn { witharrows } } \cs_new_protected:Npn \__witharrows_msg_redirect_name:nn @@ -51,8 +51,8 @@ \cs_generate_variant:Nn \__witharrows_error:nn { n x } \keys_define:nn { WithArrows / package } { - footnote .bool_gset:N = \g__witharrows_footnote_bool , - footnotehyper .bool_gset:N = \g__witharrows_footnotehyper_bool , + footnote .bool_set:N = \c__witharrows_footnote_bool , + footnotehyper .bool_set:N = \c__witharrows_footnotehyper_bool , unknown .code:n = \__witharrows_fatal:n { Option~unknown~for~package } } @@ -86,7 +86,7 @@ of~the~package~footnote.\\ If~you~go~on,~the~package~footnotehyper~won't~be~loaded. } -\bool_if:NT \g__witharrows_footnote_bool +\bool_if:NT \c__witharrows_footnote_bool { \@ifclassloaded { beamer } { \msg_info:nn { witharrows } { Option~incompatible~with~Beamer } } @@ -96,7 +96,7 @@ { \usepackage { footnote } } } } -\bool_if:NT \g__witharrows_footnotehyper_bool +\bool_if:NT \c__witharrows_footnotehyper_bool { \@ifclassloaded { beamer } { \__witharrows_info:n { Option~incompatible~with~Beamer } } @@ -105,13 +105,12 @@ { \__witharrows_error:n { footnotehyper~with~footnote~package } } { \usepackage { footnotehyper } } } - \bool_gset_true:N \g__witharrows_footnote_bool + \bool_set_true:N \c__witharrows_footnote_bool } \bool_new:N \c__witharrows_leqno_bool \DeclareOption { leqno } { \bool_set_true:N \c__witharrows_leqno_bool } \DeclareOption* { } \ProcessOptions* -\cs_generate_variant:Nn \tl_put_right:Nn { N v } \cs_generate_variant:Nn \seq_set_split:Nnn { N x x } \AtBeginDocument { @@ -151,19 +150,10 @@ \sort_return_same: } } -\cs_new_protected:Npn \__witharrows_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 - } \cs_new_protected:Npn \__witharrows_set_seq_of_str_from_clist:Nn #1 #2 { \seq_set_from_clist:Nn #1 { #2 } - \__witharrows_convert_to_str_seq:N #1 + \seq_set_map:NNn #1 #1 { \tl_to_str:n { ##1 } } } \cs_new_protected:Npn \__witharrows_save:N #1 { @@ -522,7 +512,6 @@ t, tikz, tikz-code, xoffset, ygap, ystart } -\__witharrows_convert_to_str_seq:N \l__witharrows_options_WithArrows_seq \keys_define:nn { WithArrows / WithArrows } { unknown .code:n = @@ -754,7 +743,7 @@ \int_gset_eq:NN \g__witharrows_col_int \l__witharrows_nb_cols_int \seq_clear_new:N \l__witharrows_format_seq \seq_set_split:NnV \l__witharrows_format_seq { } \l__witharrows_format_str - \bool_if:NT \g__witharrows_footnote_bool { \begin { savenotes } } + \bool_if:NT \c__witharrows_footnote_bool { \begin { savenotes } } \l__witharrows_code_before_tl \cs_set_eq:NN \notag \__witharrows_notag: \cs_set_eq:NN \nonumber \__witharrows_nonumber: @@ -831,11 +820,6 @@ node~contents = { } , __witharrows_node_style , name = wa - \l__witharrows_prefix_str - \int_use:N \g__witharrows_line_int - l , - alias = - { - \str_if_empty:NF \l__witharrows_name_str - { \l__witharrows_name_str - \int_use:N \g__witharrows_line_int - l } - } ] ; \hfil @@ -845,13 +829,19 @@ node~contents = { } , __witharrows_node_style , name = wa - \l__witharrows_prefix_str - \int_use:N \g__witharrows_line_int - r , - alias = - { - \str_if_empty:NF \l__witharrows_name_str - { \l__witharrows_name_str - \int_use:N \g__witharrows_line_int - r } - } ] ; + \str_if_empty:NF \l__witharrows_name_str + { + \pgfpicture + \pgfnodealias + { \l__witharrows_name_str - \int_use:N \g__witharrows_line_int - l } + { wa - \l__witharrows_prefix_str - \int_use:N \g__witharrows_line_int - l } + \pgfnodealias + { \l__witharrows_name_str - \int_use:N \g__witharrows_line_int - r } + { wa - \l__witharrows_prefix_str - \int_use:N \g__witharrows_line_int - r } + \endpgfpicture + } \bool_if:NT \l__witharrows_show_node_names_bool { \hbox_overlap_right:n @@ -883,7 +873,7 @@ \egroup \egroup \__witharrows_post_halign: - \bool_if:NT \g__witharrows_footnote_bool { \end { savenotes } } + \bool_if:NT \c__witharrows_footnote_bool { \end { savenotes } } } \cs_new_protected:Npn \__witharrows_post_halign: { @@ -1215,7 +1205,7 @@ } { \c_math_toggle_token \c_math_toggle_token } \bool_if:NT \l__witharrows_subequations_bool { \end { subequations } } - \bool_if:NT \g__witharrows_footnote_bool { \end { savenotes } } + \bool_if:NT \c__witharrows_footnote_bool { \end { savenotes } } \ignorespacesafterend } \NewDocumentEnvironment { DispWithArrows* } { } -- cgit v1.2.3