summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-01-01 20:32:12 +0000
committerKarl Berry <karl@freefriends.org>2023-01-01 20:32:12 +0000
commit855d5215723f5bff8afadcf46452597e5873b8a8 (patch)
tree0c5d4628ef7be59d096f8ded7fe6b3137c9bb849 /Master/texmf-dist/doc/generic
parent9bca2e005cf2d87e637dbd5910442f26ba5fd5af (diff)
witharrows (1jan23)
git-svn-id: svn://tug.org/texlive/trunk@65425 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic')
-rw-r--r--Master/texmf-dist/doc/generic/witharrows/witharrows-french.pdfbin269827 -> 272837 bytes
-rw-r--r--Master/texmf-dist/doc/generic/witharrows/witharrows-french.tex56
-rw-r--r--Master/texmf-dist/doc/generic/witharrows/witharrows.pdfbin686365 -> 559421 bytes
-rw-r--r--Master/texmf-dist/doc/generic/witharrows/witharrows.tex221
4 files changed, 225 insertions, 52 deletions
diff --git a/Master/texmf-dist/doc/generic/witharrows/witharrows-french.pdf b/Master/texmf-dist/doc/generic/witharrows/witharrows-french.pdf
index ebb65eab902..01445044345 100644
--- a/Master/texmf-dist/doc/generic/witharrows/witharrows-french.pdf
+++ b/Master/texmf-dist/doc/generic/witharrows/witharrows-french.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/witharrows/witharrows-french.tex b/Master/texmf-dist/doc/generic/witharrows/witharrows-french.tex
index fd610eef085..cf2c940912a 100644
--- a/Master/texmf-dist/doc/generic/witharrows/witharrows-french.tex
+++ b/Master/texmf-dist/doc/generic/witharrows/witharrows-french.tex
@@ -71,6 +71,7 @@ version~\myfileversion\space de \pkg{witharrows}, à la date du~\myfiledate.}}
\maketitle
+
\begin{abstract}
L'extension \pkg{witharrows} fournit des environments |{WithArrows}| et
|{DispWithArrows}| similaires aux environnements |{aligned}| et |{align}| de
@@ -93,7 +94,7 @@ l'extension LaTeX.
\medskip
Cette extension peut être utilisée avec |xelatex|, |lualatex|, |pdflatex| mais aussi avec le cheminement classique
|latex|-|dvips|-|ps2pdf| (ou Adobe Distiller). L'extension \pkg{witharrows} charge les extensions \pkg{l3keys2e},
-\pkg{xparse}, \pkg{tikz}, \pkg{varwidth} ainsi que les bibliothèques Tikz \pkg{arrows.meta} et \pkg{bending}. L'utilisateur final n'a qu'à charger l'extension \pkg{nicematrix} avec
+\pkg{xparse}, \pkg{tikz}, \pkg{varwidth} ainsi que les bibliothèques Tikz \pkg{arrows.meta} et \pkg{bending}. L'utilisateur final n'a qu'à charger l'extension \pkg{witharrows} avec
l'instruction habituelle : |\usepackage{witharrows}|.
\medskip
@@ -481,7 +482,6 @@ option est similaire au préambule d'un environnement |{array}|: il s'agit d'une
|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}.
@@ -1530,10 +1530,8 @@ 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\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.
+l'option |mathindent| (qui a un nom inspiré du paramètre |\mathindent| de LaTeX). La valeur initiale pour cette
+option est de 25~pt.
\begin{Verbatim}
\begin{DispWithArrows}[~emphase#fleqn,mathindent = 1cm@]
@@ -1805,7 +1803,7 @@ xyz = -15 \label{dernière-équation}
Le système complet est l'équation \ref{système} (cette référence a été obtenue avec |\ref{système}|) et la
dernière équation est l'équation \ref{dernière-équation} (référence obtenue avec
|\ref{dernière-équation}|). Notons que |\ref*|, utilisé dans le code ci-dessus, est une variante de
-|ref| proposée par \pkg{hyperref} pour composer une référence sans créer de lien.
+|ref| qui compose une référence sans créer de lien hypertexte (même quand \pkg{hyperref} est chargé).
\bigskip
On peut souhaiter remplacer l'accolade gauche par un autre délimiteur extensible (gauche). On peut le faire avec
@@ -1935,6 +1933,44 @@ environnement (via les arguments optionnels) ou bien encore dans une autre comma
Pour un exemple d'utilisation, voir p.~\pageref{example-WithArrowsRightX}.
+\bigskip
+\subsection{La clé right-overlap}
+
+\colorbox{yellow!50}{\textbf{Nouveau 2.8}}
+
+La clé |right-overlap| est une clé booléenne dont la valeur initiale est |true|. Elle concerne uniquement les
+environnements |{WithArrows}|.
+
+Quand la clé |right-overlap| est active, les flèches (et leurs étiquettes) sont tracées en débordement et n'entrent
+donc pas dans le calcul de la boîte TeX contenant l'environnement |{WithArrows}|.
+
+Quand la clé |right-overlap| est mise à |false| (dans |\WithArrowsOptions| ou bien dans un environnement
+|{WithArrows}| individuel) le débord vers la droite est pris en compte dans le calcul des dimensions de la boîte
+englobante.
+
+\begin{Verbatim}
+$\left\{\begin{WithArrows}[c,format = rCrCl,~emphase#right-overlap=false@]
+2x & + & 3y & = & 5 \Arrow{on ajoute $L_1$ à $L_2$}\\
+-2x & - & 5y & = & 2
+\end{WithArrows}\right.$\quad
+$\left\{\begin{WithArrows}[c,format = rCrCl]
+2x & + & 3y & = & 5 \\
+ & - & 2y & = & 7
+\end{WithArrows}\right.$
+\end{Verbatim}
+
+\medskip
+$\left\{\begin{WithArrows}[c,format = rCrCl,right-overlap=false]
+2x & + & 3y & = & 5 \Arrow{on ajoute $L_1$ à $L_2$}\\
+-2x & - & 5y & = & 2
+\end{WithArrows}\right.$\quad
+$\left\{\begin{WithArrows}[c,format = rCrCl]
+2x & + & 3y & = & 5 \\
+ & - & 2y & = & 7
+\end{WithArrows}\right.$
+
+\bigskip
+Le réglage |right-overlap = false| peut aussi être utile en conjonction avec la classe |standalone|.
\bigskip
\subsection{Positionnement vertical des flèches}
@@ -1961,8 +1997,8 @@ $\begin{WithArrows}[interline=1mm, adjust = 0pt]
\end{WithArrows}$
\begin{tikzpicture}[remember picture,overlay,blue]
-\draw (wa-\WithArrowsLastEnv-1-r.south) to ++(1,0) coordinate (B) to ++(0.1,0) ;;
-\draw (A) to ++(1,0) coordinate (C) to ++(0.1,0) ;;
+\draw (wa-\WithArrowsLastEnv-1-r.south) to ++(1,0) coordinate (B) to ++(0.1,0) ;
+\draw (A) to ++(1,0) coordinate (C) to ++(0.1,0) ;
\draw (B) -- (C) ;
\draw[<-] (B) to ++(0,0.2) ;
\draw[<-] (C) to ++(0,-0.2) ;
@@ -1983,7 +2019,7 @@ est |end-adjust| sont égaux à $0.4$~ex.
\bigskip
Voici par exemple le comportement sans le mécanisme de |start-adjust| et
-|end-adjust| (c'était le comportement par défaut dans les versions antérieures à la version 1.13).
+|end-adjust| :
\begin{Verbatim}
$\begin{WithArrows}~emphase#[start-adjust=0pt, end-adjust=0pt]@
A & = (a+1)^2 \Arrow{on développe} \\
diff --git a/Master/texmf-dist/doc/generic/witharrows/witharrows.pdf b/Master/texmf-dist/doc/generic/witharrows/witharrows.pdf
index a6570633eac..2cae02ea86a 100644
--- a/Master/texmf-dist/doc/generic/witharrows/witharrows.pdf
+++ b/Master/texmf-dist/doc/generic/witharrows/witharrows.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/witharrows/witharrows.tex b/Master/texmf-dist/doc/generic/witharrows/witharrows.tex
index d04cfea0628..09477d5d734 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-2022 by F. Pantigny
+%% Copyright (C) 2017-2023 by F. Pantigny
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -18,15 +18,20 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
%%
-\def\myfileversion{2.7}
-\def\myfiledate{2022/04/20}
+\def\myfileversion{2.8}
+\def\myfiledate{2023/01/01}
\input tikz.tex
\input expl3-generic.tex
\usetikzlibrary{arrows.meta,bending}
\ExplSyntaxOn
\catcode `\@ = 11
\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_new:nnn #1 #2 #3
+ {
+ \bool_if:NTF \c__witharrows_messages_for_Overleaf_bool
+ { \msg_new:nnn { witharrows } { #1 } { #2 \\ #3 } }
+ { \msg_new:nnnn { witharrows } { #1 } { #2 } { #3 } }
+ }
\cs_new_protected:Npn \__witharrows_msg_redirect_name:nn
{ \msg_redirect_name:nnn { witharrows } }
\cs_new_protected:Npn \__witharrows_error:n { \msg_error:nn { witharrows } }
@@ -34,6 +39,13 @@
\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_new_protected:Npn \__witharrows_error_or_warning:n
+ { \bool_if:NTF \c__witharrows_messages_for_Overleaf_bool \__witharrows_warning:n \__witharrows_error:n }
+\bool_set:Nn \c__witharrows_messages_for_Overleaf_bool
+ {
+ \str_if_eq_p:Vn \c_sys_jobname_str { _region_ } % for Emacs
+ || \str_if_eq_p:Vn \c_sys_jobname_str { output } % for Overleaf
+ }
\cs_generate_variant:Nn \seq_set_split:Nnn { N x x }
\AtBeginDocument
{
@@ -172,6 +184,8 @@
\seq_new:N \l__witharrows_o_arrows_seq
\dim_new:N \l__witharrows_xoffset_for_o_arrows_dim
\dim_set:Nn \l__witharrows_xoffset_for_o_arrows_dim { 2 mm }
+\bool_new:N \l__witharrows_right_overlap_bool
+\bool_set_true:N \l__witharrows_right_overlap_bool
\cs_new_protected:Npn \__witharrows_eval_if_allowed:n #1
{
\str_if_empty:NTF \l__witharrows_previous_key_str
@@ -202,7 +216,7 @@
\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 .tl_set:N = \l__witharrows_tikz_code_tl ,
tikz-code .initial:n = \draw~(#1)~to~node{#3}~(#2)~; ,
tikz-code .value_required:n = true ,
displaystyle .bool_set:N = \l__witharrows_displaystyle_bool ,
@@ -272,7 +286,9 @@
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
+ b .value_forbidden:n = true ,
+ right-overlap .bool_set:N = \l__witharrows_right_overlap_bool ,
+ right-overlap .value_required:n = true
}
\clist_new:N \c__witharrows_extensible_delimiters_clist
\clist_set:Nn \c__witharrows_extensible_delimiters_clist
@@ -283,7 +299,7 @@
{
fleqn .bool_set:N = \l__witharrows_fleqn_bool ,
fleqn .default:n = true ,
- mathindent .dim_set:N = \l__witharrows_mathindent_dim ,
+ mathindent .skip_set:N = \l__witharrows_mathindent_skip ,
mathindent .initial:n = 25 pt ,
mathindent .value_required:n = true ,
wrap-lines .bool_set:N = \l__witharrows_wrap_lines_bool ,
@@ -352,7 +368,7 @@
\__witharrows_set_seq_of_str_from_clist:Nn \l__witharrows_options_WithArrows_seq
{
adjust, b, c, code-after, code-before, command-name,
- displaystyle, end-adjust,
+ right-overlap, displaystyle, end-adjust,
format, group, groups, i,
interline, jot, ll,
lr, max-length-of-arrow, more-columns, name,
@@ -397,7 +413,8 @@
\seq_new:N \l__witharrows_options_WithArrowsOptions_seq
\__witharrows_set_seq_of_str_from_clist:Nn \l__witharrows_options_WithArrowsOptions_seq
{
- allow-duplicate-names, b, c, command-name, more-columns, tikz-code, adjust,
+ allow-duplicate-names, b, c, command-name, right_overlap,
+ more-columns, tikz-code, adjust,
displaystyle, end-adjust, fleqn, group, groups, i, interline, jot, ll, lr,
mathindent, max-length-of-arrow, no-arrows, up-and-down, rl, rr,
show-node-names, show-nodes, start-adjust, t, tikz, wrap-lines, xoffset,
@@ -592,6 +609,14 @@
{ \keys_set:nn { WithArrows / WithArrows } { #1 } }
\bool_if:NT \l__witharrows_in_DispWithArrows_bool
{ \keys_set:nn { WithArrows / DispWithArrows } { #1 } }
+ \bool_if:NF \l__witharrows_right_overlap_bool
+ {
+ \bool_if:NT \l__witharrows_in_WithArrows_bool
+ {
+ \dim_gzero_new:N \g__witharrows_overlap_x_dim
+ \dim_zero_new:N \l__witharrows_delta_x_dim
+ }
+ }
\cs_set_eq:cN \l__witharrows_command_name_str \__witharrows_Arrow_first_columns:
\int_set:Nn \l__witharrows_nb_cols_int { \str_count:N \l__witharrows_format_str }
\int_gset_eq:NN \g__witharrows_col_int \l__witharrows_nb_cols_int
@@ -647,7 +672,7 @@
\halign to \l__witharrows_linewidth_dim
\bgroup
\bool_if:NT \l__witharrows_fleqn_bool
- { \skip_horizontal:N \l__witharrows_mathindent_dim }
+ { \skip_horizontal:N \l__witharrows_mathindent_skip }
}
\int_gincr:N \g__witharrows_line_int
\int_gzero:N \g__witharrows_col_int
@@ -712,6 +737,9 @@
\if_mode_math: \else:
\__witharrows_error:n { WithArrows~outside~math~mode }
\fi:
+ \box_clear_new:N \l__witharrows_env_box
+ \hbox_set:Nw \l__witharrows_env_box
+ \int_compare:nNnT \l__witharrows_pos_env_int = 1 \c_math_toggle_token
\int_case:nn \l__witharrows_pos_env_int { 0 \vtop 1 \vcenter 2 \vbox }
\bgroup
\spread@equation
@@ -729,7 +757,15 @@
\\
\egroup
\egroup
+ \int_compare:nNnT \l__witharrows_pos_env_int = 1 \c_math_toggle_token
+ \hbox_set_end:
\__witharrows_post_halign:
+ \bool_if:NF \l__witharrows_right_overlap_bool
+ {
+ \box_set_wd:Nn \l__witharrows_env_box
+ { \g__witharrows_overlap_x_dim + \box_wd:N \l__witharrows_env_box }
+ }
+ \box_use_drop:N \l__witharrows_env_box
\group_end:
}
\cs_new_protected:Npn \__witharrows_post_halign:
@@ -901,7 +937,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_skip }
\hfil
\hbox_to_wd:nn \g__witharrows_alignment_dim
{
@@ -1217,6 +1253,25 @@
{ \dim_use:N \g__witharrows_y_final_dim }
}
}
+ \bool_if:NF \l__witharrows_right_overlap_bool
+ {
+ \bool_if:NT \l__witharrows_in_WithArrows_bool
+ {
+ \pgfpicture
+ \pgfrememberpicturepositiononpagetrue
+ \pgfpointanchor { wa - \l__witharrows_prefix_str - 1 - r } { south }
+ \int_compare:nNnTF \l__witharrows_pos_arrow_int < 5
+ {
+ \dim_set:Nn \l__witharrows_delta_x_dim
+ {
+ \pgf@x -
+ ( \dim_min:nn \g__witharrows_x_initial_dim \g__witharrows_x_final_dim )
+ }
+ }
+ { \dim_set:Nn \l__witharrows_delta_x_dim { \pgf@x - \l__witharrows_x_dim } }
+ \endpgfpicture
+ }
+ }
\__witharrows_draw_arrow:nno \g_tmpa_tl \g_tmpb_tl \l_tmpa_tl
\group_end:
}
@@ -1232,13 +1287,25 @@
\pgf@relevantforpicturesizetrue
#1
\dim_compare:nNnTF \pgf@picminx = { 16000 pt }
- { \dim_zero:NN \l_tmpa_dim }
+ { \dim_zero:N \l_tmpa_dim }
{ \dim_set:Nn \l_tmpa_dim { \pgf@picmaxx - \pgf@picminx } }
\dim_add:Nn \l_tmpa_dim \l__witharrows_xoffset_dim
\prop_gput:cnV
{ g__witharrows_arrow _ \l__witharrows_prefix_str _ \int_use:N \l__witharrows_arrow_int _ prop }
{ width }
\l_tmpa_dim
+ \bool_if:NF \l__witharrows_right_overlap_bool
+ {
+ \bool_if:NT \l__witharrows_in_WithArrows_bool
+ {
+ \dim_gset:Nn \g__witharrows_overlap_x_dim
+ {
+ \dim_max:nn
+ \g__witharrows_overlap_x_dim
+ { \l_tmpa_dim - \l__witharrows_delta_x_dim }
+ }
+ }
+ }
\pgfresetboundingbox
\endtikzpicture
}
@@ -1519,7 +1586,6 @@
-- node (__witharrows_label) {}
([xshift = \l__witharrows_xoffset_dim+5mm]\l_tmpb_tl-r.south)
-- ([xshift = \l__witharrows_xoffset_dim]\l_tmpb_tl-r.south) ;
-
\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 } ;
@@ -1547,9 +1613,15 @@
{
\draw [ <- ]
( [xshift = \l__witharrows_xoffset_dim]\k-r.south ) -- ++(5mm,0) ;
- } ;
+ } % ;
\endtikzpicture
}
+\bool_if:NTF \c__witharrows_messages_for_Overleaf_bool
+ { \str_const:Nn \c__witharrows_available_keys_str { } }
+ {
+ \str_const:Nn \c__witharrows_available_keys_str
+ { For~a~list~of~the~available~keys,~type~H~<return>. }
+ }
\str_new:N \l_witharrows_body_str
\cs_new:Npn \__witharrows_potential_body_i:
{
@@ -1558,7 +1630,7 @@
}
\cs_new:Npn \__witharrows_potential_body_ii:
{
- \str_if_empty:NTF \l_nicematrix_body_str
+ \str_if_empty:NTF \l_witharrows_body_str
{ No~further~help~available }
{
The~body~of~your~environment~was:\\
@@ -1571,6 +1643,7 @@
{ If~you~go~on,~this~command~will~be~ignored. }
\__witharrows_msg_new:nn { Bad~value~for~replace~brace~by }
{
+ Incorrect~value.\\
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,~
@@ -1583,6 +1656,7 @@
}
\__witharrows_msg_new:nn { option~of~cr~negative }
{
+ Bad~value.\\
The~argument~of~the~command~\token_to_str:N\\~
should~be~positive~in~the~row~\int_use:N \g__witharrows_line_int\
of~your~environment~\{\l__witharrows_type_env_str\}.\\
@@ -1590,13 +1664,15 @@
}
\__witharrows_msg_new:nn { omit~probably~used }
{
- There~is~a~problem.~Maybe~you~have~used~a~command~
+ Strange~problem.\\
+ Maybe~you~have~used~a~command~
\token_to_str:N\omit\ in~the~line~\int_use:N \g__witharrows_line_int\
(or~another~line)~of~your~environment~\{\l__witharrows_type_env_str\}.\\
You~can~go~on~but~you~may~have~others~errors.
}
\__witharrows_msg_new:nnn { Invalid~option~format }
{
+ Invalide~value.\\
The~key~'format'~should~contain~only~letters~r,~c~and~l~and~
must~not~be~empty.\\
\c__witharrows_option_ignored_str
@@ -1605,6 +1681,7 @@
{ \__witharrows_potential_body_ii: }
\__witharrows_msg_new:nnn { invalid~key~o }
{
+ Invalid~use~of~a~key.\\
The~key~'o'~for~individual~arrows~can~be~used~only~in~mode~
'group'~or~in~mode~'groups'.\\
\c__witharrows_option_ignored_str
@@ -1613,6 +1690,7 @@
{ \__witharrows_potential_body_ii: }
\__witharrows_msg_new:nnn { Value~for~a~key }
{
+ Misuse~of~a~key.\\
The~key~'\l_keys_key_str'~should~be~used~without~value. \\
However,~you~can~go~on~for~this~time.
\__witharrows_potential_body_i:
@@ -1620,12 +1698,13 @@
{ \__witharrows_potential_body_ii: }
\__witharrows_msg_new:nnn { Unknown~option~in~Arrow }
{
+ Unknown~option.\\
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 \\
\c__witharrows_option_ignored_str \\
- For~a~list~of~the~available~keys,~type~H~<return>.
+ \c__witharrows_available_keys_str
}
{
The~available~keys~are~(in~alphabetic~order):~
@@ -1633,9 +1712,10 @@
}
\__witharrows_msg_new:nnn { Unknown~option~WithArrows }
{
+ Unknown~option.\\
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>.
+ \c__witharrows_available_keys_str
}
{
The~available~keys~are~(in~alphabetic~order):~
@@ -1643,9 +1723,10 @@
}
\__witharrows_msg_new:nnn { Unknown~option~DispWithArrows }
{
+ Unknown~option.\\
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>.
+ \c__witharrows_available_keys_str
}
{
The~available~keys~are~(in~alphabetic~order):~
@@ -1653,10 +1734,11 @@
}
\__witharrows_msg_new:nnn { Unknown~option~WithArrowsOptions }
{
+ Unknown~option.\\
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>.
+ \c__witharrows_available_keys_str
}
{
The~available~keys~are~(in~alphabetic~order):~
@@ -1664,10 +1746,11 @@
}
\__witharrows_msg_new:nnn { Unknown~option~Arrow~in~code-after }
{
+ Unknown~option.\\
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>.
+ \c__witharrows_available_keys_str
}
{
The~available~keys~are~(in~alphabetic~order):~
@@ -1675,6 +1758,7 @@
}
\__witharrows_msg_new:nnn { Too~much~columns~in~WithArrows }
{
+ Too~much~columns.\\
Your~environment~\{\l__witharrows_type_env_str\}~has~\int_use:N
\l__witharrows_nb_cols_int\ columns~and~you~try~to~use~one~more.~
Maybe~you~have~forgotten~a~\c_backslash_str\c_backslash_str.~
@@ -1686,6 +1770,7 @@
{ \__witharrows_potential_body_ii: }
\__witharrows_msg_new:nnn { Too~much~columns~in~DispWithArrows }
{
+ Too~much~columns.\\
Your~environment~\{\l__witharrows_type_env_str\}~has~\int_use:N
\l__witharrows_nb_cols_int\ columns~and~you~try~to~use~one~more.~
Maybe~you~have~forgotten~a~\c_backslash_str\c_backslash_str\
@@ -1696,6 +1781,7 @@
{ \__witharrows_potential_body_ii: }
\__witharrows_msg_new:nn { Negative~jump }
{
+ Incorrect~value.\\
You~can't~use~a~negative~value~for~the~option~'jump'~of~command~
\l__witharrows_string_Arrow_for_msg_str\
in~the~row~\int_use:N \g__witharrows_line_int\
@@ -1705,6 +1791,7 @@
}
\__witharrows_msg_new:nn { new-group~without~groups }
{
+ Misuse~of~a~key.\\
You~can't~use~the~option~'new-group'~for~the~command~
\l__witharrows_string_Arrow_for_msg_str\
because~you~are~not~in~'groups'~mode.~Try~to~use~the~option~
@@ -1714,8 +1801,9 @@
\__witharrows_msg_new:nnn
{ Too~few~lines~for~an~arrow }
{
+ Impossible~arrow.\\
Line~\l__witharrows_input_line_str\
- :~an~arrow~specifiead~in~the~row~\int_use:N \l__witharrows_initial_int\
+ :~an~arrow~specified~in~the~row~\int_use:N \l__witharrows_initial_int\
of~your~environment~\{\l__witharrows_type_env_str\}~can't~be~drawn~
because~it~arrives~after~the~last~row~of~the~environment. \\
If~you~go~on,~this~arrow~will~be~ignored.
@@ -1724,12 +1812,14 @@
{ \__witharrows_potential_body_ii: }
\__witharrows_msg_new:nn { o~arrow~with~no~arrow~under }
{
+ Problem~with~the~key~'o'.\\
Line~\l__witharrows_input_line_str\
:~there~is~no~arrow~'under'~your~arrow~of~type~'o'.\\
If~you~go~on,~this~arrow~won't~be~drawn.
}
\__witharrows_msg_new:nnn { WithArrows~outside~math~mode }
{
+ You~are~outside~math~mode.\\
The~environment~\{\l__witharrows_type_env_str\}~should~be~used~only~in~math~mode~
like~the~environment~\{aligned\}~of~amsmath. \\
Nevertheless,~you~can~go~on.
@@ -1738,6 +1828,7 @@
{ \__witharrows_potential_body_ii: }
\__witharrows_msg_new:nnn { DispWithArrows~in~math~mode }
{
+ You~are~in~math~mode.\\
The~environment~\{\l__witharrows_type_env_str\}~should~be~used~only~outside~math~
mode~like~the~environments~\{align\}~and~\{align*\}~of~amsmath. \\
This~error~is~fatal.
@@ -1746,14 +1837,17 @@
{ \__witharrows_potential_body_ii: }
\__witharrows_msg_new:nn { Incompatible~options~in~Arrow }
{
+ Incompatible~options.\\
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_str'~but~
+\__witharrows_msg_new:nn { Incompatible~options a}
+ {
+ Incompatible~options.
+ 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
@@ -1765,8 +1859,10 @@
}
\__witharrows_msg_new:nnn { Arrow~not~in~last~column }
{
+ Bad~use~of~\l__witharrows_string_Arrow_for_msg_str.
You~should~use~the~command~\l__witharrows_string_Arrow_for_msg_str\
only~in~the~last~column~(column~\int_use:N\l__witharrows_nb_cols_int)~
+ in~the~row~\int_use:N \g__witharrows_line_int\
of~your~environment~\{\l__witharrows_type_env_str\}.\\
However~you~can~go~on~for~this~time.
\__witharrows_potential_body_i:
@@ -1774,6 +1870,7 @@
{ \__witharrows_potential_body_ii: }
\__witharrows_msg_new:nn { Wrong~line~in~Arrow }
{
+ Wrong~line.\\
The~specification~of~line~'#1'~you~use~in~the~command~
\l__witharrows_string_Arrow_for_msg_str\
in~the~'code-after'~of~\{\l__witharrows_type_env_str\}~doesn't~exist. \\
@@ -1781,23 +1878,27 @@
}
\__witharrows_msg_new:nn { Both~lines~are~equal }
{
+ Both~lines~are~equal.\\
In~the~'code-after'~of~\{\l__witharrows_type_env_str\}~you~try~to~
draw~an~arrow~going~to~itself~from~the~line~'#1'.~This~is~not~possible. \\
\c__witharrows_option_ignored_str
}
\__witharrows_msg_new:nn { Wrong~line~specification~in~MultiArrow }
{
+ Wrong~line~specification.\\
The~specification~of~line~'#1'~doesn't~exist. \\
If~you~go~on,~it~will~be~ignored~for~\token_to_str:N \MultiArrow.
}
\__witharrows_msg_new:nn { Too~small~specification~for~MultiArrow }
{
+ Too~small~specification.\\
The~specification~of~lines~you~gave~to~\token_to_str:N \MultiArrow\
is~too~small:~you~need~at~least~two~lines. \\
\c__witharrows_command_ignored_str
}
\__witharrows_msg_new:nn { Not~allowed~in~DispWithArrows }
{
+ Forbidden~command.\\
The~command~\token_to_str:N #1
is~allowed~only~in~the~last~column~
(column~\int_use:N\l__witharrows_nb_cols_int)~of~\{\l__witharrows_type_env_str\}. \\
@@ -1805,13 +1906,15 @@
}
\__witharrows_msg_new:nn { Not~allowed~in~WithArrows }
{
+ Forbidden~command.\\
The~command~\token_to_str:N #1 is~not~allowed~in~\{\l__witharrows_type_env_str\}~
(it's~allowed~in~the~last~column~of~\{DispWithArrows\}). \\
\c__witharrows_option_ignored_str
}
\__witharrows_msg_new:nn { Inexistent~v-node }
{
- There~is~a~problem.~Maybe~you~have~put~a~command~\token_to_str:N\cr\
+ There~is~a~problem.\\
+ Maybe~you~have~put~a~command~\token_to_str:N\cr\
instead~of~a~command~\token_to_str:N\\~at~the~end~of~
the~row~\l_tmpa_int\
of~your~environment~\{\l__witharrows_type_env_str\}. \\
@@ -1819,6 +1922,7 @@
}
\__witharrows_msg_new:nn { Option~xoffset~forbidden }
{
+ Incorrect~key.\\
You~can't~use~the~option~'xoffset'~in~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\}~
@@ -1831,6 +1935,7 @@
}
\__witharrows_msg_new:nnn { Duplicate~name }
{
+ Duplicate~name.\\
The~name~'\l_keys_value_tl'~is~already~used~and~you~shouldn't~use~
the~same~environment~name~twice.~You~can~go~on,~but,~
maybe,~you~will~have~incorrect~results. \\
@@ -1844,6 +1949,7 @@
}
\__witharrows_msg_new:nn { Invalid~specification~for~MultiArrow }
{
+ Invalid~specification.\\
The~specification~of~rows~for~\token_to_str:N\MultiArrow\
(i.e.~#1)~is~invalid. \\
\c__witharrows_command_ignored_str
@@ -1853,29 +1959,58 @@
\keys_if_exist:nnTF { WithArrows / Global } { #1 }
{ \__witharrows_error:nn { Key~already~defined } { #1 } }
{
- \keys_define:nn { WithArrows / Global }
+ \seq_clear:N \l_tmpa_seq
+ \keyval_parse:NNn \__witharrows_valid_key:n \__witharrows_valid_key:nn { #2 }
+ \seq_if_empty:NTF \l_tmpa_seq
{
- #1 .code:n =
- { \keys_set_known:nn { WithArrows / WithArrowsOptions } { #2 } }
+ \seq_put_right:Nx \l__witharrows_options_WithArrows_seq
+ { \tl_to_str:n { #1 } }
+ \seq_put_right:Nx \l__witharrows_options_DispWithArrows_seq
+ { \tl_to_str:n { #1 } }
+ \seq_put_right:Nx \l__witharrows_options_WithArrowsOptions_seq
+ { \tl_to_str:N { #1 } }
+ \cs_if_exist:NTF \keys_precompile:nnN
+ {
+ \keys_precompile:nnN
+ { WithArrows / WithArrowsOptions }
+ { #2 }
+ \l_tmpa_tl
+ \__witharrows_key_define:nV { #1 } \l_tmpa_tl
+ }
+ {
+ \keys_define:nn { WithArrows / Global }
+ {
+ #1 .code:n =
+ { \keys_set:nn { WithArrows / WithArrowsOptions } { #2 } }
+ }
+ }
}
- \seq_put_right:Nx \l__witharrows_options_WithArrows_seq { \tl_to_str:n { #1 } }
- \seq_put_right:Nx \l__witharrows_options_DispWithArrows_seq
- { \tl_to_str:n { #1 } }
- \seq_put_right:Nx \l__witharrows_options_WithArrowsOptions_seq
- { \tl_to_str:N { #1 } }
- \group_begin:
- \msg_set:nnn { witharrows } { Unknown~option~WithArrowsOptions }
- {
- 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.
- }
- \WithArrowsOptions { #2 }
- \group_end:
+ { \__witharrows_error:nn { Impossible~style } { #1 } }
}
}
+\__witharrows_msg_new:nn { Impossible~style }
+ {
+ Impossible~style.\\
+ It's~impossible~to~define~the~style~'#1'~
+ because~it~contains~unknown~keys:~'
+ \seq_use:Nnnn \l_tmpa_seq { '~and~' } { ',~'} { ',~and~}'.
+ }
+\cs_new_protected:Npn \__witharrows_valid_key:n #1
+ {
+ \keys_if_exist:nnF { WithArrows / Global } { #1 }
+ { \seq_put_right:Nn \l_tmpa_seq { #1 } }
+ }
+\cs_new_protected:Npn \__witharrows_valid_key:nn #1 #2
+ {
+ \keys_if_exist:nnF { WithArrows / Global } { #1 }
+ { \seq_put_right:Nn \l_tmpa_seq { #1 } }
+ }
+\cs_new_protected:Npn \__witharrows_key_define:nn #1 #2
+ { \keys_define:nn { WithArrows / Global } { #1 .code:n = #2 } }
+\cs_generate_variant:Nn \__witharrows_key_define:nn { n V }
\__witharrows_msg_new:nn { Key~already~defined }
{
+ Key~already~define.\\
The~key~'#1'~is~already~defined. \\
If~you~go~on,~your~instruction~\token_to_str:N\WithArrowsNewStyle\
will~be~ignored.
@@ -1896,6 +2031,7 @@
}
\__witharrows_msg_new:nn { Option~unknown~for~up-and-down }
{
+ Unknown~option.\\
The~option~'\l_keys_key_str'~is~unknown.~\c__witharrows_option_ignored_str
}
\tl_const:Nn \c__witharrows_tikz_code_up_tl
@@ -2012,6 +2148,7 @@
\seq_put_right:Nn \l__witharrows_options_Arrow_seq { up }
\__witharrows_msg_new:nn { calc~not~loaded }
{
+ calc~not~loaded.\\
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. \\