diff options
author | Karl Berry <karl@freefriends.org> | 2020-04-12 22:27:59 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-04-12 22:27:59 +0000 |
commit | f337ef24d0b836a2f13b8fc1648525ca3122632c (patch) | |
tree | 7f5dcac80cd5c4d99d95c370c7a733dee7586111 /Master/texmf-dist/doc | |
parent | d8c63106e29c1e5d9d31f49233bfda0fa449b577 (diff) |
witharrows (31mar20)
git-svn-id: svn://tug.org/texlive/trunk@54707 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/generic/witharrows/witharrows-french.pdf | bin | 259546 -> 260589 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/witharrows/witharrows-french.tex | 26 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/witharrows/witharrows.pdf | bin | 615389 -> 616385 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/witharrows/witharrows.tex | 233 |
4 files changed, 159 insertions, 100 deletions
diff --git a/Master/texmf-dist/doc/generic/witharrows/witharrows-french.pdf b/Master/texmf-dist/doc/generic/witharrows/witharrows-french.pdf Binary files differindex 9711cf5756d..ffb9a424e29 100644 --- a/Master/texmf-dist/doc/generic/witharrows/witharrows-french.pdf +++ b/Master/texmf-dist/doc/generic/witharrows/witharrows-french.pdf diff --git a/Master/texmf-dist/doc/generic/witharrows/witharrows-french.tex b/Master/texmf-dist/doc/generic/witharrows/witharrows-french.tex index 9eac72c3c76..1d3605543ae 100644 --- a/Master/texmf-dist/doc/generic/witharrows/witharrows-french.tex +++ b/Master/texmf-dist/doc/generic/witharrows/witharrows-french.tex @@ -768,7 +768,7 @@ A & = B \end{WithArrows}$ \vspace{1cm} -Les options relatives aux flèches |up| and |down| peuvent être fixées au niveau global ou environnemental avec la +Les options relatives aux flèches |up| et |down| peuvent être fixées au niveau global ou environnemental avec la clé |up-and-down|. Cette clé peut aussi être utilisée comme préfixe comme illustré maintenant. % \begin{Verbatim} @@ -1174,7 +1174,7 @@ Pour le moment, aucune option n'est disponible pour cette commande |\MultiArrow| Si on désire dessiner des flèches depuis l'extérieur des environnements |{WithArrows}|, il est possible de le faire en utilisant les nœuds Tikz créés par ces environnements. -Le nom d'un nœud Tikz crée par \pkg{witharrows} est préfixé par |wa-|. Ensuite, on trouve une liste de nombres +Le nom d'un nœud Tikz créé par \pkg{witharrows} est préfixé par |wa-|. Ensuite, on trouve une liste de nombres qui indique quelle est la position de l'environnement dans l'arbre d'imbrication des environnements. À la fin, on a le suffixe |l| pour un nœud de gauche et le suffixe |r| pour un nœud de droite. @@ -1286,7 +1286,7 @@ Dans le cas présent, il aurait été plus facile d'utiliser une commande |\Arro c'était seulement un exemple pour expliquer comment les nœuds Tikz créés par \pkg{witharrows} peuvent être utilisés. \bigskip -Dans l'exemple suivant, on crée deux environnements |{WithArrows}| nommés «|premier|» et «|second|» et on dessine +Dans l'exemple suivant, on crée des environnements |{WithArrows}| nommés «|premier|» et «|second|» et on dessine une flèche entre un nœud du premier et un nœud du second. \begin{Verbatim} @@ -1428,7 +1428,9 @@ A & = A_1 \Arrow{première étape} \\ \bigskip Avec l'option |fleqn|, l'environnement est composé calé à gauche (d'une manière similaire à l'option |fleqn| des classes standard de LaTeX). Dans ce cas, la marge gauche peut être réglée avec -l'option |mathindent| (qui a un nom inspiré du paramètre |\mathindent| de LaTeX). La valeur initiale +l'option |mathindent| (qui a un nom inspiré du paramètre |\mathindent| de LaTeX\footnote{En LaTeX, |mathindent| est +une dimension (|dim|) mais devrait devenir un ressort (|skip|) dans une prochaine version de LaTeX. Pour le moment, le +paramètre |mathindent| de \pkg{witharrows} est une dimension.}). La valeur initiale pour cette option est de 25~pt. \begin{Verbatim} @@ -2027,6 +2029,18 @@ détectées (par exemple, si une flèche arrive après la dernière ligne de l'e \bigskip +\subsection{Note pour les utilisateurs de AUCTeX} + +Dans un éditeur de texte paramétré par éditer du LaTeX, les environnements |{DispWithArrows}| et +|{DispWithArrows*}| devraient être formatés comme l'environnement |{equation}| de LaTeX c'est-à-dire avec un +formatage adapté au mode mathématique. + +Dans l'éditeur Emacs avec AUCTeX, cela se fait en ajoutant les chaînes |"DispWithArrows"| et |"DispWithArrows*"| à +la variable |font-latex-math-environments|. On peut le faire en utilisant l'interface de personnalisation de Emacs : + +|M-x customize| > |[Text]| > |[TeX]| > |[Font LaTeX]| + +\bigskip \subsection{Note pour les développeurs} Si vous définissez un environnement s'appuyant sur un environnement de @@ -2394,6 +2408,10 @@ e.\;& f \text{ est lipschitzienne} \end{scope} +\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. diff --git a/Master/texmf-dist/doc/generic/witharrows/witharrows.pdf b/Master/texmf-dist/doc/generic/witharrows/witharrows.pdf Binary files differindex b64ebed03c8..31c50353bfc 100644 --- a/Master/texmf-dist/doc/generic/witharrows/witharrows.pdf +++ b/Master/texmf-dist/doc/generic/witharrows/witharrows.pdf diff --git a/Master/texmf-dist/doc/generic/witharrows/witharrows.tex b/Master/texmf-dist/doc/generic/witharrows/witharrows.tex index f76f7f98dc8..3655e422ca1 100644 --- a/Master/texmf-dist/doc/generic/witharrows/witharrows.tex +++ b/Master/texmf-dist/doc/generic/witharrows/witharrows.tex @@ -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.3} -\def\myfiledate{2019/12/27} +\def\myfileversion{2.4} +\def\myfiledate{2020/03/31} \input tikz.tex \input expl3-generic.tex \usetikzlibrary{arrows.meta,bending} @@ -192,7 +192,7 @@ { \str_if_empty:NTF \l__witharrows_previous_key_str { - \str_set_eq:NN \l__witharrows_previous_key_str \l_keys_key_tl + \str_set_eq:NN \l__witharrows_previous_key_str \l_keys_key_str #1 } { \__witharrows_error:n { Incompatible~options } } @@ -206,18 +206,21 @@ max-length-of-arrow .initial:n = 2 cm , ygap .dim_set:N = \l__witharrows_ygap_dim , ygap .initial:n = 0.4 ex , + ygap .value_required:n = true , ystart .dim_set:N = \l__witharrows_ystart_dim , - + ystart .value_required:n = true , ystart .initial:n = 0.4 ex , more-columns .code:n = \__witharrows_msg_redirect_name:nn { Too~much~columns~in~WithArrows } { none } , + more-columns .value_forbidden:n = true , command-name .code:n = \str_set:Nn \l__witharrows_command_name_str { #1 } \str_set:Nx \l__witharrows_string_Arrow_for_msg_str { \c_backslash_str Arrow~alias~\c_backslash_str #1 } , + command-name .value_required:n = true , tikz-code .tl_set:N = \l__witharrows_tikz_code_tl, tikz-code .initial:n = \draw~(#1)~to~node{#3}~(#2)~; , - TikzCode .meta:n = { tikz-code = #1 } , + tikz-code .value_required:n = true , displaystyle .bool_set:N = \l__witharrows_displaystyle_bool , displaystyle .default:n = true , show-nodes .code:n = @@ -232,6 +235,7 @@ \int_set:Nn \l__witharrows_pos_arrow_int 7 } { \__witharrows_error:n { Incompatible~options } } , + group .value_forbidden:n = true , groups .code:n = \str_if_empty:NTF \l__witharrows_previous_key_str { @@ -242,32 +246,49 @@ \int_set:Nn \l__witharrows_pos_arrow_int 6 } { \__witharrows_error:n { Incompatible~options } } , + groups .value_forbidden:n = true , tikz .code:n = \tikzset { WithArrows / arrow / .append~style = { #1 } } , tikz .initial:n = \c_empty_tl , + tikz .value_required:n = true , rr .code:n = \__witharrows_fix_pos_option:n 3 , + rr .value_forbidden:n = true , ll .code:n = \__witharrows_fix_pos_option:n 1 , + ll .value_forbidden:n = true , rl .code:n = \__witharrows_fix_pos_option:n 2 , + rl .value_forbidden:n = true , lr .code:n = \__witharrows_fix_pos_option:n 0 , + lr .value_forbidden:n = true , i .code:n = \__witharrows_fix_pos_option:n 5 , + i .value_forbidden:n = true , xoffset .dim_set:N = \l__witharrows_xoffset_dim , + xoffset .value_required:n = true , xoffset .initial:n = 3 mm , jot .dim_set:N = \jot , + jot .value_required:n = true , interline .skip_set:N = \l__witharrows_interline_skip , start-adjust .dim_set:N = \l__witharrows_start_adjust_dim , start-adjust .initial:n = 0.4 ex , + start-adjust .value_required:n = true , end-adjust .dim_set:N = \l__witharrows_end_adjust_dim , end-adjust .initial:n = 0.4 ex , + end-adjust .value_required:n = true , adjust .meta:n = { start-adjust = #1 , end-adjust = #1 } , + adjust .value_required:n = true , up-and-down .code:n = \keys_set:nn { WithArrows / up-and-down } { #1 } , + up-and-down .value_required:n = true , no-arrows .code:n = \cs_set_eq:NN \__witharrows_draw_arrows:nn \use_none:nn \cs_set_eq:NN \__witharrows_draw_arrow:nnn \use_none:nnn , + no-arrows .value_forbidden:n = true } \keys_define:nn { WithArrows / WithArrowsSpecific } { t .code:n = \int_set:Nn \l__witharrows_pos_env_int O , + t .value_forbidden:n = true , c .code:n = \int_set:Nn \l__witharrows_pos_env_int 1 , + c .value_forbidden:n = true , b .code:n = \int_set:Nn \l__witharrows_pos_env_int 2 , + b .value_forbidden:n = true } \clist_new:N \c__witharrows_extensible_delimiters_clist \clist_set:Nn \c__witharrows_extensible_delimiters_clist @@ -280,6 +301,7 @@ fleqn .default:n = true , mathindent .dim_set:N = \l__witharrows_mathindent_dim , mathindent .initial:n = 25 pt , + mathindent .value_required:n = true , wrap-lines .bool_set:N = \l__witharrows_wrap_lines_bool , wrap-lines .default:n = true , replace-left-brace-by .code:n = @@ -301,9 +323,12 @@ { \__witharrows_error:n { Duplicate~name } } { \seq_gput_left:NV \g__witharrows_names_seq \l_tmpa_str } \str_set_eq:NN \l__witharrows_name_str \l_tmpa_str , + name .value_required:n = true , code-before .code:n = \tl_put_right:Nn \l__witharrows_code_before_tl { #1 } , + code-before .value_required:n = true, CodeBefore .meta:n = { code-before = #1 } , code-after .code:n = \tl_put_right:Nn \l__witharrows_code_after_tl { #1 } , + code-after .value_required:n = true , CodeAfter .meta:n = { code-after = #1 } , format .code:n = \tl_if_empty:nTF { #1 } @@ -313,10 +338,7 @@ { \tl_set:Nn \l__witharrows_format_str { #1 } } { \__witharrows_error:n { Invalid~option~format } } } , - code-before .value_required:n = true, - code-after .value_required:n = true , - name .value_required:n = true , - format .value_required:n = true , + format .value_required:n = true } \keys_define:nn { WithArrows } { @@ -406,7 +428,7 @@ { \str_if_empty:NTF \l__witharrows_previous_key_str { - \str_set_eq:NN \l__witharrows_previous_key_str \l_keys_key_tl + \str_set_eq:NN \l__witharrows_previous_key_str \l_keys_key_str \str_set:Nn \l__witharrows_status_arrow_str { independent } } { \__witharrows_error:n { Incompatible~options~in~Arrow } } @@ -446,7 +468,7 @@ xoffset .code:n = , unknown .code:n = \__witharrows_sort_seq:N \l__witharrows_options_Arrow_seq - \seq_if_in:NVTF \l__witharrows_options_WithArrows_seq \l_keys_key_tl + \seq_if_in:NVTF \l__witharrows_options_WithArrows_seq \l_keys_key_str { \str_set:Nn \l_tmpa_str { ~However,~this~key~can~be~used~in~the~options~of~{WithArrows}. } @@ -464,7 +486,7 @@ { \str_if_empty:NT \l__witharrows_previous_key_str { - \str_set_eq:NN \l__witharrows_previous_key_str \l_keys_key_tl + \str_set_eq:NN \l__witharrows_previous_key_str \l_keys_key_str \int_set:Nn \l__witharrows_pos_arrow_int { #1 } } } @@ -562,7 +584,7 @@ \int_zero_new:N \l__witharrows_arrow_int \int_zero_new:N \l__witharrows_pos_of_arrow_int \int_zero_new:N \l__witharrows_jump_int - \int_set:Nn \l__witharrows_jump_int \c_one_int + \int_set:Nn \l__witharrows_jump_int 1 \str_set:Nn \l__witharrows_format_str { rl } \skip_zero:N \l__witharrows_interline_skip \tl_clear_new:N \l__witharrows_code_before_tl @@ -578,7 +600,6 @@ \seq_clear_new:N \l__witharrows_format_seq \seq_set_split:NnV \l__witharrows_format_seq { } \l__witharrows_format_str \l__witharrows_code_before_tl - \spread@equation } \cs_new_protected:Npn \__witharrows_construct_halign: { @@ -689,6 +710,7 @@ \fi: \int_case:nn \l__witharrows_pos_env_int { 0 \vtop 1 \vcenter 2 \vbox } \bgroup + \spread@equation \__witharrows_construct_halign: && \__witharrows_error:n { Too~much~columns~in~WithArrows } @@ -759,8 +781,12 @@ \bool_if:NT \l__witharrows_in_DispWithArrows_bool { & - \tikz [ __witharrows_standard ] - \coordinate ( \int_use:N \g__witharrows_line_int - v ) ; + \pgfpicture + \pgfrememberpicturepositiononpagetrue + \pgfcoordinate + { wa - \l__witharrows_prefix_str - \int_use:N \g__witharrows_line_int - v } + \pgfpointorigin + \endpgfpicture } \dim_compare:nNnT { #1 } < \c_zero_dim { \__witharrows_error:n { option~of~cr~negative } } @@ -769,7 +795,8 @@ \noalign { \dim_set:Nn \l_tmpa_dim { \dim_max:nn { #1 } \c_zero_dim } - \skip_vertical:n { \l_tmpa_dim + \l__witharrows_interline_skip } + \skip_vertical:N \l_tmpa_dim + \skip_vertical:N \l__witharrows_interline_skip \scan_stop: } } @@ -837,6 +864,7 @@ \bool_if:NTF \l__witharrows_fleqn_bool \c_zero_skip { 0 pt plus 1000 pt minus 1000 pt } + \spread@equation \__witharrows_construct_halign: \tabskip = 0 pt plus 1000 pt minus 1000 pt & @@ -869,7 +897,7 @@ \hbox_to_wd:nn \l__witharrows_linewidth_dim { \bool_if:NTF \l__witharrows_fleqn_bool - { \skip_horizontal:n \l__witharrows_mathindent_dim } + { \skip_horizontal:N \l__witharrows_mathindent_dim } \hfil \hbox_to_wd:nn \g__witharrows_alignment_dim { @@ -891,25 +919,25 @@ } \hfil } - \skip_horizontal:n { - \l__witharrows_linewidth_dim } + \skip_horizontal:N -\l__witharrows_linewidth_dim \vcenter { \box_use_drop:N \l__witharrows_halign_box } } \dim_gzero_new:N \g__witharrows_right_x_dim \dim_gset_eq:NN \g__witharrows_right_x_dim \c_max_dim - \tikzpicture [ __witharrows_standard ] + \pgfpicture + \pgfrememberpicturepositiononpagetrue \int_step_variable:nNn \g__witharrows_line_int \l_tmpa_int { \cs_if_free:cTF - { pgf@sh@ns@wa - \l__witharrows_prefix_str - \l_tmpa_int - v } + { pgf @ sh @ ns @ wa - \l__witharrows_prefix_str - \l_tmpa_int - v } { \__witharrows_fatal:n { Inexistent~v-node } } { - \tikz@parse@node\pgfutil@firstofone ( \l_tmpa_int - v ) - \dim_set:Nn \l_tmpa_dim \pgf@x - \dim_compare:nNnT \l_tmpa_dim < \g__witharrows_right_x_dim - { \dim_gset:Nn \g__witharrows_right_x_dim \l_tmpa_dim } + \pgfpointanchor { wa - \l__witharrows_prefix_str - \l_tmpa_int - v } { center } + \dim_compare:nNnT \pgf@x < \g__witharrows_right_x_dim + { \dim_gset_eq:NN \g__witharrows_right_x_dim \pgf@x } } } - \endtikzpicture + \endpgfpicture \__witharrows_post_halign: \c_math_toggle_token \c_math_toggle_token \group_end: @@ -943,7 +971,7 @@ \seq_clear_new:N \l__witharrows_first_arrows_seq \seq_clear_new:N \l__witharrows_last_arrows_seq \bool_set_true:N \l__witharrows_new_group_bool - \int_set:Nn \l__witharrows_arrow_int \c_one_int + \int_set:Nn \l__witharrows_arrow_int 1 \int_until_do:nNnn \l__witharrows_arrow_int > \g__witharrows_arrow_int { \prop_get:cnN @@ -968,26 +996,26 @@ \__witharrows_code_for_possible_arrow: \int_incr:N \l__witharrows_arrow_int } - \bool_if:nT - { - \int_compare_p:n { \l__witharrows_pos_arrow_int != 7 } - && - \int_compare_p:nNn \l__witharrows_first_arrow_of_group_int > 0 - } + \bool_lazy_and:nnT + { \bool_not_p:n { \int_compare_p:nNn \l__witharrows_pos_arrow_int = 7 } } + { \int_compare_p:nNn \l__witharrows_first_arrow_of_group_int > 0 } { \__witharrows_draw_arrows:nn \l__witharrows_first_arrow_of_group_int \g__witharrows_arrow_int } } \cs_new_protected:Npn \__witharrows_code_for_possible_arrow: { - \bool_if:nT + \bool_lazy_and:nnT + { \int_compare_p:nNn \l__witharrows_arrow_int > 1 } { - \int_compare_p:nNn \l__witharrows_arrow_int > \c_one_int - && - ( \int_compare_p:n { \l__witharrows_initial_int > \l__witharrows_last_line_of_group_int } - && - \int_compare_p:n { \l__witharrows_pos_arrow_int != 7 } - || - \str_if_eq_p:Vn \l__witharrows_status_arrow_str { new-group } - ) + \bool_lazy_or_p:nn + { + \bool_lazy_and_p:nn + { + \int_compare_p:nNn + \l__witharrows_initial_int > \l__witharrows_last_line_of_group_int + } + { \bool_not_p:n { \int_compare_p:nNn \l__witharrows_pos_arrow_int = 7 } } + } + { \str_if_eq_p:Vn \l__witharrows_status_arrow_str { new-group } } } { \int_compare:nNnF \l__witharrows_first_arrow_of_group_int = \c_zero_int @@ -1008,7 +1036,7 @@ \seq_put_left:NV \l__witharrows_first_arrows_seq \l__witharrows_arrow_int \seq_clear:N \l__witharrows_last_arrows_seq \seq_put_left:NV \l__witharrows_last_arrows_seq \l__witharrows_arrow_int - \int_compare:nT { \l__witharrows_pos_arrow_int != 8 } + \int_compare:nNnF \l__witharrows_pos_arrow_int = 8 { \dim_set:Nn \l__witharrows_x_dim { - \c_max_dim } } } { @@ -1032,7 +1060,7 @@ } \bool_if:nF { \str_if_eq_p:Vn \l__witharrows_status_arrow_str { independent } } { - \int_compare:nT { \l__witharrows_pos_arrow_int != 8 } + \int_compare:nNnF \l__witharrows_pos_arrow_int = 8 { \__witharrows_update_x:nn \l__witharrows_initial_int \l__witharrows_final_int } } } @@ -1089,12 +1117,9 @@ \__witharrows_update_x:nn \l__witharrows_initial_int \l__witharrows_final_int } \tl_set:Nx \l__witharrows_initial_tl - { - \int_use:N \l__witharrows_initial_int - \bool_if:NTF \l__witharrows_initial_r_bool rl - .south - } + { \int_use:N \l__witharrows_initial_int - \bool_if:NTF \l__witharrows_initial_r_bool rl } \tl_set:Nx \l__witharrows_final_tl - { \int_use:N \l__witharrows_final_int - \bool_if:NTF \l__witharrows_final_r_bool rl .north } + { \int_use:N \l__witharrows_final_int - \bool_if:NTF \l__witharrows_final_r_bool rl } \prop_get:cnN { g__witharrows_arrow _ \l__witharrows_prefix_str _ \int_use:N \l__witharrows_arrow_int _ prop } { label } @@ -1116,20 +1141,21 @@ \dim_gzero_new:N \g__witharrows_x_final_dim \dim_gzero_new:N \g__witharrows_y_initial_dim \dim_gzero_new:N \g__witharrows_y_final_dim - \tikzpicture [ __witharrows_standard ] - \tikz@scan@one@point \pgfutil@firstofone ( \l__witharrows_initial_tl ) + \pgfpicture + \pgfrememberpicturepositiononpagetrue + \pgfpointanchor { wa - \l__witharrows_prefix_str - \l__witharrows_initial_tl } { south } \dim_gset:Nn \g__witharrows_x_initial_dim \pgf@x \dim_gset:Nn \g__witharrows_y_initial_dim \pgf@y - \tikz@scan@one@point \pgfutil@firstofone ( \l__witharrows_final_tl ) + \pgfpointanchor { wa - \l__witharrows_prefix_str - \l__witharrows_final_tl } { north } \dim_gset:Nn \g__witharrows_x_final_dim \pgf@x \dim_gset:Nn \g__witharrows_y_final_dim \pgf@y - \endtikzpicture - \bool_if:nTF - { \dim_compare_p:nNn { \g__witharrows_y_initial_dim - \g__witharrows_y_final_dim } + \endpgfpicture + \bool_lazy_and:nnTF + { + \dim_compare_p:nNn { \g__witharrows_y_initial_dim - \g__witharrows_y_final_dim } > \l__witharrows_max_length_of_arrow_dim - && - \int_compare_p:nNn { \l__witharrows_final_int - \l__witharrows_initial_int } = 1 } + { \int_compare_p:nNn { \l__witharrows_final_int - \l__witharrows_initial_int } = 1 } { \tl_gset:Nx \g_tmpa_tl { @@ -1139,7 +1165,7 @@ \dim_eval:n { ( \g__witharrows_y_initial_dim + \g__witharrows_y_final_dim ) / 2 - + ( \l__witharrows_max_length_of_arrow_dim / 2 ) + + 0.5 \l__witharrows_max_length_of_arrow_dim } } \tl_gset:Nx \g_tmpb_tl @@ -1150,7 +1176,7 @@ \dim_eval:n { ( \g__witharrows_y_initial_dim + \g__witharrows_y_final_dim ) / 2 - - ( \l__witharrows_max_length_of_arrow_dim / 2 ) + - 0.5 \l__witharrows_max_length_of_arrow_dim } } } @@ -1192,7 +1218,7 @@ } \cs_new_protected:Npn \__witharrows_draw_arrow:nnn #1 #2 #3 { - \bool_if:nT { \l__witharrows_wrap_lines_bool && \l__witharrows_in_DispWithArrows_bool } + \bool_lazy_and:nnT \l__witharrows_wrap_lines_bool \l__witharrows_in_DispWithArrows_bool { \tl_set_eq:NN \l__witharrows_tikz_code_tl \c__witharrows_tikz_code_wrap_lines_tl } \exp_args:NV \__witharrows_def_function_tmpa:n \l__witharrows_tikz_code_tl \__witharrows_tmpa:nnn { #1 } { #2 } { #3 } @@ -1201,7 +1227,7 @@ \tl_const:Nn \c__witharrows_tikz_code_wrap_lines_tl { \draw ( #1 ) to node ( __witharrows_label ) { } ( #2 ) ; - \tikz@parse@node \pgfutil@firstofone ( __witharrows_label.west ) + \pgfpointanchor { wa - \l__witharrows_prefix_str - __witharrows_label } { west } \dim_set:Nn \l_tmpa_dim { \g__witharrows_right_x_dim - \pgf@x - \pgfkeysvalueof { / pgf / inner~xsep } } \path \pgfextra { \tl_gset:Nx \g_tmpa_tl \tikz@text@width } ; @@ -1220,16 +1246,18 @@ } \cs_new_protected:Npn \__witharrows_update_x:nn #1 #2 { + \dim_gset_eq:NN \g_tmpa_dim \l__witharrows_x_dim + \pgfpicture + \pgfrememberpicturepositiononpagetrue \int_step_inline:nnn { #1 } { #2 } { - \tikzpicture [ __witharrows_standard ] - \tikz@scan@one@point \pgfutil@firstofone ( ##1 - l ) - \dim_gset:Nn \g_tmpa_dim { \dim_max:nn \l__witharrows_x_dim \pgf@x } - \endtikzpicture - \dim_set_eq:NN \l__witharrows_x_dim \g_tmpa_dim + \pgfpointanchor { wa - \l__witharrows_prefix_str - ##1 - l } { center } + \dim_gset:Nn \g_tmpa_dim { \dim_max:nn \g_tmpa_dim \pgf@x } } + \endpgfpicture + \dim_set_eq:NN \l__witharrows_x_dim \g_tmpa_dim } -\cs_new:Npn \WithArrowsLastEnv { \int_use:N \g__witharrows_last_env_int } +\cs_new:Npn \WithArrowsLastEnv { \int_use:N \g__witharrows_last_env_int } \keys_define:nn { WithArrows / Arrow / code-after } { tikz .code:n = @@ -1298,30 +1326,42 @@ { \int_compare:nNnTF \l__witharrows_pos_arrow_int = 4 { - \tikzpicture [ __witharrows_standard ] - \tikz@scan@one@point \pgfutil@firstofone (#2-l.south) + \pgfpicture + \pgfrememberpicturepositiononpagetrue + \pgfpointanchor { wa - \l__witharrows_prefix_str - #2 - l } + { south } \dim_set_eq:NN \l_tmpa_dim \pgf@x \dim_set_eq:NN \l_tmpb_dim \pgf@y - \tikz@scan@one@point \pgfutil@firstofone (#3-l.north) + \pgfpointanchor { wa - \l__witharrows_prefix_str - #3 - l } + { north } \dim_set:Nn \l_tmpa_dim { \dim_max:nn \l_tmpa_dim \pgf@x } \tl_gset:Nx \g_tmpa_tl { \dim_use:N \l_tmpa_dim , \dim_use:N \l_tmpb_dim } \tl_gset:Nx \g_tmpb_tl { \dim_use:N \l_tmpa_dim , \dim_use:N \pgf@y } - \endtikzpicture + \endpgfpicture } { - \tikzpicture [ __witharrows_standard ] - \tikz@scan@one@point \pgfutil@firstofone - ( #2-\bool_if:NTF\l__witharrows_initial_r_bool rl .south ) + \pgfpicture + \pgfrememberpicturepositiononpagetrue + \pgfpointanchor + { + wa - \l__witharrows_prefix_str - + #2 - \bool_if:NTF \l__witharrows_initial_r_bool r l + } + { south } \tl_gset:Nx \g_tmpa_tl - { \dim_use:N \pgf@x , \dim_use:N \pgf@y } - \tikz@scan@one@point \pgfutil@firstofone - ( #3-\bool_if:NTF\l__witharrows_final_r_bool rl .north ) + { \dim_use:N \pgf@x , \dim_use:N \pgf@y } + \pgfpointanchor + { + wa - \l__witharrows_prefix_str - + #3 - \bool_if:NTF \l__witharrows_final_r_bool r l + } + { north } \tl_gset:Nx \g_tmpb_tl - { \dim_use:N \pgf@x , \dim_use:N \pgf@y } - \endtikzpicture + { \dim_use:N \pgf@x , \dim_use:N \pgf@y } + \endpgfpicture } \__witharrows_draw_arrow:nnn \g_tmpa_tl \g_tmpb_tl { #4 } } @@ -1369,11 +1409,12 @@ -- node (__witharrows_label) {} ([xshift = \l__witharrows_xoffset_dim+5mm]\l_tmpb_tl-r.south) -- ([xshift = \l__witharrows_xoffset_dim]\l_tmpb_tl-r.south) ; - \tikz@parse@node \pgfutil@firstofone (__witharrows_label.west) + + \pgfpointanchor { wa - \l__witharrows_prefix_str - __witharrows_label } { west } \dim_set:Nn \l_tmpa_dim { 20 cm } \path \pgfextra { \tl_gset:Nx \g_tmpa_tl \tikz@text@width } ; \tl_if_empty:NF \g_tmpa_tl { \dim_set:Nn \l_tmpa_dim \g_tmpa_tl } - \bool_if:nT { \l__witharrows_wrap_lines_bool && \l__witharrows_in_DispWithArrows_bool } + \bool_lazy_and:nnT \l__witharrows_wrap_lines_bool \l__witharrows_in_DispWithArrows_bool { \dim_set:Nn \l_tmpb_dim { \g__witharrows_right_x_dim - \pgf@x - 0.3333 em } @@ -1405,7 +1446,7 @@ { If~you~go~on,~this~command~will~be~ignored. } \__witharrows_msg_new:nn { Bad~value~for~replace~brace~by } { - Bad~value~for~the~option~'\l_keys_key_tl'.~The~value~must~begin~ + Bad~value~for~the~option~'\l_keys_key_str'.~The~value~must~begin~ with~an~extensible~left~delimiter.~The~possible~values~are:~., \token_to_str:N \{,~(,~[,~\token_to_str:N \lbrace,~ \token_to_str:N \lbrack,~\token_to_str:N \lgroup,~ @@ -1437,12 +1478,12 @@ } \__witharrows_msg_new:nn { Value~for~a~key } { - The~key~'\l_keys_key_tl'~should~be~used~without~value. \\ + The~key~'\l_keys_key_str'~should~be~used~without~value. \\ However,~you~can~go~on~for~this~time. } \__witharrows_msg_new:nnn { Unknown~option~in~Arrow } { - The~key~'\l_keys_key_tl'~is~unknown~for~the~command~ + The~key~'\l_keys_key_str'~is~unknown~for~the~command~ \l__witharrows_string_Arrow_for_msg_str\ in~the~row~ \int_use:N \g__witharrows_line_int\ of~your~environment~ \{\l__witharrows_type_env_str\}. \l_tmpa_str \\ @@ -1455,7 +1496,7 @@ } \__witharrows_msg_new:nnn { Unknown~option~WithArrows } { - The~key~'\l_keys_key_tl'~is~unknown~in~\{\l__witharrows_type_env_str\}. \\ + The~key~'\l_keys_key_str'~is~unknown~in~\{\l__witharrows_type_env_str\}. \\ \c__witharrows_option_ignored_str \\ For~a~list~of~the~available~keys,~type~H~<return>. } @@ -1465,7 +1506,7 @@ } \__witharrows_msg_new:nnn { Unknown~option~DispWithArrows } { - The~key~'\l_keys_key_tl'~is~unknown~in~\{\l__witharrows_type_env_str\}. \\ + The~key~'\l_keys_key_str'~is~unknown~in~\{\l__witharrows_type_env_str\}. \\ \c__witharrows_option_ignored_str \\ For~a~list~of~the~available~keys,~type~H~<return>. } @@ -1475,7 +1516,7 @@ } \__witharrows_msg_new:nnn { Unknown~option~WithArrowsOptions } { - The~key~'\l_keys_key_tl'~is~unknown~in~ + The~key~'\l_keys_key_str'~is~unknown~in~ \token_to_str:N \WithArrowsOptions. \\ \c__witharrows_option_ignored_str \\ For~a~list~of~the~available~keys,~type~H~<return>. @@ -1486,7 +1527,7 @@ } \__witharrows_msg_new:nnn { Unknown~option~Arrow~in~code-after } { - The~key~'\l_keys_key_tl'~is~unknown~in~ + The~key~'\l_keys_key_str'~is~unknown~in~ \token_to_str:N \Arrow\ in~code-after. \\ \c__witharrows_option_ignored_str \\ For~a~list~of~the~available~keys,~type~H~<return>. @@ -1552,14 +1593,14 @@ } \__witharrows_msg_new:nn { Incompatible~options~in~Arrow } { - You~try~to~use~the~option~'\l_keys_key_tl'~but~ + You~try~to~use~the~option~'\l_keys_key_str'~but~ this~option~is~incompatible~or~redundant~with~the~option~ '\l__witharrows_previous_key_str'~set~in~the~same~command~ \l__witharrows_string_Arrow_for_msg_str. \\ \c__witharrows_option_ignored_str } \__witharrows_msg_new:nn { Incompatible~options } - { You~try~to~use~the~option~'\l_keys_key_tl'~but~ + { You~try~to~use~the~option~'\l_keys_key_str'~but~ this~option~is~incompatible~or~redundant~with~the~option~ '\l__witharrows_previous_key_str'~set~in~the~same~command~ \bool_if:NT \l__witharrows_in_code_after_bool @@ -1670,7 +1711,7 @@ \group_begin: \msg_set:nnn { witharrows } { Unknown~option~WithArrowsOptions } { - The~key~'\l_keys_key_tl'~can't~be~set~in~the~ + The~key~'\l_keys_key_str'~can't~be~set~in~the~ definition~of~a~style.~You~can~go~on~for~this~time~ but~you~should~suppress~this~key. } @@ -1700,7 +1741,7 @@ } \__witharrows_msg_new:nn { Option~unknown~for~up-and-down } { - The~option~'\l_keys_key_tl'~is~unknown.~\c__witharrows_option_ignored_str + The~option~'\l_keys_key_str'~is~unknown.~\c__witharrows_option_ignored_str } \tl_const:Nn \c__witharrows_tikz_code_up_tl { @@ -1792,7 +1833,7 @@ \cs_if_exist:cTF { tikz@library@calc@loaded } { \keys_set:nV { WithArrows / up-and-down } \l_keys_value_tl - \int_set:Nn \l__witharrows_pos_arrow_int \c_one_int + \int_set:Nn \l__witharrows_pos_arrow_int 1 \bool_set_false:N \l__witharrows_wrap_lines_bool \tl_set_eq:NN \l__witharrows_tikz_code_tl \c__witharrows_tikz_code_up_tl } @@ -1805,7 +1846,7 @@ \cs_if_exist:cTF { tikz@library@calc@loaded } { \keys_set:nV { WithArrows / up-and-down } \l_keys_value_tl - \int_set:Nn \l__witharrows_pos_arrow_int \c_one_int + \int_set:Nn \l__witharrows_pos_arrow_int 1 \bool_set_false:N \l__witharrows_wrap_lines_bool \tl_set_eq:NN \l__witharrows_tikz_code_tl \c__witharrows_tikz_code_down_tl } @@ -1816,13 +1857,13 @@ \seq_put_right:Nn \l__witharrows_options_Arrow_seq { up } \__witharrows_msg_new:nn { varwidth~not~loaded } { - You~can't~use~the~option~'\l_keys_key_tl'~because~ + You~can't~use~the~option~'\l_keys_key_str'~because~ you~don't~have~loaded~the~package~'varwidth'. \\ \c__witharrows_option_ignored_str } \__witharrows_msg_new:nn { calc~not~loaded } { - You~can't~use~the~option~'\l_keys_key_tl'~because~you~don't~have~loaded~the~ + You~can't~use~the~option~'\l_keys_key_str'~because~you~don't~have~loaded~the~ Tikz~library~'calc'.You~should~add~'\token_to_str:N\usetikzlibrary{calc}'~ ~in~the~preamble~of~your~document. \\ \c__witharrows_option_ignored_str |