From 38aaa5ab119dae8bf21971e84c7742b2bfc591a5 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 25 Aug 2022 03:01:33 +0000 Subject: CTAN sync 202208250301 --- .../latex/contrib/nicematrix/nicematrix-french.pdf | Bin 511876 -> 511972 bytes .../latex/contrib/nicematrix/nicematrix-french.tex | 220 ++--- macros/latex/contrib/nicematrix/nicematrix.dtx | 980 +++++++++++++++------ macros/latex/contrib/nicematrix/nicematrix.pdf | Bin 1296290 -> 1320819 bytes .../contrib/pdfmanagement-testphase/CHANGELOG.md | 9 + .../contrib/pdfmanagement-testphase/README.md | 2 +- .../contrib/pdfmanagement-testphase/color-ltx.sty | 33 +- .../colorspace-patches-tmp-ltx.sty | 20 +- .../fontspec-luatex-tmp-ltx.sty | 2 +- .../pdfmanagement-testphase/hyperref-generic.dtx | 52 +- .../pdfmanagement-testphase/hyperref-generic.pdf | Bin 952309 -> 950072 bytes .../hyperxmp-patches-tmp-ltx.sty | 6 +- .../l3backend-testphase.dtx | 53 +- .../l3backend-testphase.pdf | Bin 682520 -> 680665 bytes .../contrib/pdfmanagement-testphase/l3pdfannot.dtx | 4 +- .../contrib/pdfmanagement-testphase/l3pdfannot.pdf | Bin 577920 -> 577844 bytes .../contrib/pdfmanagement-testphase/l3pdfdict.dtx | 4 +- .../contrib/pdfmanagement-testphase/l3pdfdict.pdf | Bin 505882 -> 505793 bytes .../pdfmanagement-testphase/l3pdffield-action.dtx | 2 +- .../pdfmanagement-testphase/l3pdffield-action.pdf | Bin 546973 -> 546831 bytes .../l3pdffield-checkbox.dtx | 2 +- .../l3pdffield-checkbox.pdf | Bin 530024 -> 529869 bytes .../pdfmanagement-testphase/l3pdffield-choice.dtx | 2 +- .../pdfmanagement-testphase/l3pdffield-choice.pdf | Bin 533213 -> 533083 bytes .../l3pdffield-pushbutton.dtx | 2 +- .../l3pdffield-pushbutton.pdf | Bin 525406 -> 525255 bytes .../l3pdffield-radiobutton.dtx | 2 +- .../l3pdffield-radiobutton.pdf | Bin 580848 -> 580694 bytes .../l3pdffield-textfield.dtx | 2 +- .../l3pdffield-textfield.pdf | Bin 504654 -> 504492 bytes .../contrib/pdfmanagement-testphase/l3pdffield.dtx | 4 +- .../contrib/pdfmanagement-testphase/l3pdffield.pdf | Bin 738986 -> 738839 bytes .../contrib/pdfmanagement-testphase/l3pdffile.dtx | 4 +- .../contrib/pdfmanagement-testphase/l3pdffile.pdf | Bin 552584 -> 552332 bytes .../pdfmanagement-testphase/l3pdfmanagement.dtx | 52 +- .../pdfmanagement-testphase/l3pdfmanagement.pdf | Bin 673774 -> 673768 bytes .../contrib/pdfmanagement-testphase/l3pdfmeta.dtx | 4 +- .../contrib/pdfmanagement-testphase/l3pdfmeta.pdf | Bin 672516 -> 672429 bytes .../contrib/pdfmanagement-testphase/l3pdftools.dtx | 4 +- .../contrib/pdfmanagement-testphase/l3pdftools.pdf | Bin 517558 -> 517303 bytes .../contrib/pdfmanagement-testphase/l3pdfxform.dtx | 4 +- .../contrib/pdfmanagement-testphase/l3pdfxform.pdf | Bin 417757 -> 417532 bytes .../contrib/pdfmanagement-testphase/ltdocinit.dtx | 4 +- .../contrib/pdfmanagement-testphase/ltdocinit.pdf | Bin 573773 -> 573525 bytes .../output-patches-tmp-ltx.pdf | Bin 385493 -> 385557 bytes .../pdfmanagement-testphase/pdflscape-ltx.sty | 2 +- .../pdfmanagement-firstaid.dtx | 6 +- .../pdfmanagement-firstaid.pdf | Bin 425881 -> 425614 bytes .../pdfmanagement-testphase.dtx | 6 +- .../pdfmanagement-testphase.pdf | Bin 446714 -> 446650 bytes .../pdfmanagement-testphase/transparent-ltx.sty | 2 +- .../xcolor-patches-tmp-ltx.sty | 108 +-- .../latex/contrib/proflycee/doc/ProfLycee-doc.pdf | Bin 789010 -> 805538 bytes .../latex/contrib/proflycee/doc/ProfLycee-doc.tex | 210 ++++- macros/latex/contrib/proflycee/doc/testscript.py | 24 + macros/latex/contrib/proflycee/tex/ProfLycee.sty | 100 ++- macros/latex/contrib/proof-at-the-end/README.md | 3 +- .../contrib/proof-at-the-end/proof-at-the-end.dtx | 130 ++- .../contrib/proof-at-the-end/proof-at-the-end.ins | 2 +- .../contrib/proof-at-the-end/proof-at-the-end.pdf | Bin 321713 -> 329486 bytes .../proof-at-the-end/proof-at-the-end_demo.pdf | Bin 121559 -> 133735 bytes .../proof-at-the-end/proof-at-the-end_demo.tex | 55 +- macros/latex/contrib/srdp-mathematik/README.md | 2 +- .../contrib/srdp-mathematik/srdp-mathematik.pdf | Bin 175330 -> 178996 bytes .../contrib/srdp-mathematik/srdp-mathematik.sty | 20 +- .../contrib/srdp-mathematik/srdp-mathematik.tex | 34 +- macros/latex/contrib/tagpdf/README.md | 4 +- macros/latex/contrib/tagpdf/tagpdf-backend.dtx | 8 +- macros/latex/contrib/tagpdf/tagpdf-checks.dtx | 4 +- macros/latex/contrib/tagpdf/tagpdf-code.pdf | Bin 1240587 -> 1240872 bytes macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx | 6 +- macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx | 4 +- macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx | 4 +- macros/latex/contrib/tagpdf/tagpdf-roles.dtx | 9 +- macros/latex/contrib/tagpdf/tagpdf-space.dtx | 4 +- macros/latex/contrib/tagpdf/tagpdf-struct.dtx | 16 +- macros/latex/contrib/tagpdf/tagpdf-tree.dtx | 23 +- macros/latex/contrib/tagpdf/tagpdf-user.dtx | 4 +- macros/latex/contrib/tagpdf/tagpdf.dtx | 50 +- macros/latex/contrib/tagpdf/tagpdf.pdf | Bin 492426 -> 492448 bytes macros/latex/contrib/tagpdf/tagpdf.tex | 28 +- macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty | 2 +- 82 files changed, 1572 insertions(+), 771 deletions(-) create mode 100644 macros/latex/contrib/proflycee/doc/testscript.py (limited to 'macros/latex') diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.pdf b/macros/latex/contrib/nicematrix/nicematrix-french.pdf index 00d091b585..aef19a755c 100644 Binary files a/macros/latex/contrib/nicematrix/nicematrix-french.pdf and b/macros/latex/contrib/nicematrix/nicematrix-french.pdf differ diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.tex b/macros/latex/contrib/nicematrix/nicematrix-french.tex index c9c6eebe4d..6244fda93e 100644 --- a/macros/latex/contrib/nicematrix/nicematrix-french.tex +++ b/macros/latex/contrib/nicematrix/nicematrix-french.tex @@ -1,4 +1,5 @@ % -*- coding: utf-8 ; -*- +% Ce fichier doit être compilé avec xelatex uniquement. \documentclass[dvipsnames]{article}% dvipsnames is for xcolor (loaded by Tikz, loaded by nicematrix) \usepackage{xltxtra} \usepackage[french]{babel} @@ -17,8 +18,9 @@ \usepackage{verbatim} \usepackage{caption} -% We use \MakeShortVerb of shortvrb and not \DefineShortVerb of fancyvrb -% because we don't want the contents of short verbatim colored in gray +% On utilise \MakeShortVerb de shortvrb et pas \DefineShortVerb de fancyvrb +% car on ne veut pas que le contenu des petits éléments en verbatim soit colorié +% en grise \usepackage{shortvrb} \MakeShortVerb{\|} @@ -708,8 +710,6 @@ blanc, alors le bloc est mono-case\footnote{On peut considérer que la valeur pa défaut de ce premier argument obligatoire est |1-1|.}. - - \subsection{Positionnement horizontal du contenu des blocs} Par défaut, le positionnement horizontal des contenus des blocs est calculé sur @@ -794,7 +794,9 @@ Marie & Pauline \\ \hline \medskip En revanche, les filets verticaux ne sont pas tracés à l'intérieur des blocs (créés par |\Block|: cf.~p.~\pageref{Block}) ni dans les coins (dont la création -est demandée par la clé |corners|: cf.~p.~\pageref{corners}). +est demandée par la clé |corners|: cf.~p.~\pageref{corners}), ni dans les +éventuelles rangées extérieures (créées par les clés |row-first| et |last-row|: +cf.~p.~\pageref{exterior}). \medskip @@ -951,7 +953,8 @@ préambule) ; \medskip \textbf{Ces outils ont en commun de ne pas tracer les filets dans les blocs ni - dans les coins vides (quand la clé |corners| est utilisée).} + dans les coins vides (quand la clé |corners| est utilisée), ni dans les + rangées et colonnes extérieures.} \begin{itemize} \item Les blocs en question sont : \begin{itemize} @@ -964,11 +967,17 @@ par |\Cdots|, |\Vdots|, etc. : cf.~p.~\pageref{Cdots}. \end{itemize} \item Les coins sont créés par la clé |corners| détaillée un peu plus loin : cf. p.~\pageref{corners}. +\item Pour les rangées et colonnes extérieures, cf.~\pageref{exterior}. \end{itemize} En particulier, cette remarque explique la différence entre la commande standard |\hline| et la commande |\Hline| proposée par \pkg{nicematrix}. +\colorbox{yellow!50}{\textbf{Nouveau 6.13}}\enskip La command |\Hline| admet +entre crochets un argument optionnel qui est une liste de couples +\textsl{clé=valeur} qui décrivent un filet. Pour la description de ces clés, +voir |custom-line| p.~\pageref{custom-line}. + \medskip \subsubsection{Les clés hlines et vlines} @@ -1148,7 +1157,7 @@ descendante. \medskip \begin{BVerbatim}[baseline=c,boxwidth=10cm] $\begin{NiceArray}{*{5}{c}}[hvlines] -~emphase#\diagbox{x}{y}@ & e & a & b & c \\ +~emphase#\diagbox{x}{y}@ & e & a & b & c \\ e & e & a & b & c \\ a & a & e & c & b \\ b & b & c & e & a \\ @@ -1156,7 +1165,7 @@ c & c & b & a & e \end{NiceArray}$ \end{BVerbatim} $\begin{NiceArray}{*{5}{c}}[hvlines] -\diagbox{x}{y} & e & a & b & c \\ +\diagbox{x}{y} & e & a & b & c \\ e & e & a & b & c \\ a & a & e & c & b \\ b & b & c & e & a \\ @@ -1199,7 +1208,11 @@ utilisée par l'utilisateur dans le préambule d'un environnement à préambule \end{itemize} \bigskip -Pour la description du filet elle-même, il y a trois possibilités. +On traite maintenant de la description du filet elle-même. Les options qui +suivent peuvent aussi s'utiliser dans l'argument optionnel d'une |\Hline| +individuelle. + +Il y a trois possibilités. \begin{itemize} @@ -1254,7 +1267,7 @@ Produit C & 5 & 4 & 1 \\ \end{center} -\item \emph{Deuxième possibilité} +\item \emph{Deuxième possibilité}\par\nobreak On peut utiliser la clé |tikz| (si Tikz est chargé, \pkg{nicematrix} ne chargeant par défaut que \textsc{pgf}). Dans ce cas-là, le filet est tracé @@ -1461,11 +1474,12 @@ peut placer le contenu de ce |code-before| entre les mots-clés |\CodeBefore| et \end{Verbatim} \smallskip -De nouvelles commandes sont disponibles dans ce |\CodeBefore|: -|\cellcolor|, |\rectanglecolor|, |\rowcolor|, |\columncolor|, |\rowcolors|, -|\rowlistcolors|, |\chessboardcolors| et |\arraycolor|.\footnote{On pourra remarquer que, dans le - |\CodeBefore|, des nœuds PGF/Tikz de la forme \verb+(i-|j)+ correspondant - à la position des filets éventuels sont également accessibles : cf. p.~\pageref{nodes-i}.} +De nouvelles commandes sont disponibles dans ce |\CodeBefore|: |\cellcolor|, +|\rectanglecolor|, |\rowcolor|, |\columncolor|, |\rowcolors|, |\rowlistcolors|, +|\chessboardcolors| et |\arraycolor|.\footnote{On pourra remarquer que, dans le + |\CodeBefore|, des nœuds PGF-Tikz de la forme \verb+(i-|j)+ correspondant à la + position des filets éventuels sont également accessibles : cf. + p.~\pageref{nodes-i}.} \label{code-before} \medskip @@ -1485,30 +1499,30 @@ p.~\pageref{corners}. \pkg{colortbl}. Elle prend en arguments obligatoires une couleur et une liste de cases sous le -format $i$-$j$ où $i$ est le numéro de ligne et $j$ le numéro de colonne. +format $i$-$j$ où $i$ est le numéro de ligne et $j$ le numéro de colonne. Malgré +son nom, elle peut aussi colorier une ligne avec la syntaxe $i$- ou bien une +colonne avec la syntaxe~-$j$. \medskip \begin{scope} \hfuzz=10cm \begin{BVerbatim}[boxwidth=10cm,baseline=c] -\begin{NiceTabular}{|c|c|c|} +\begin{NiceTabular}{ccc}[hvlines] \CodeBefore - ~emphase#\cellcolor[HTML]{FFFF88}{3-1,2-2,1-3}@ + ~emphase#\cellcolor[HTML]{FFFF88}{3-1,2-2,-3}@ \Body -\hline -a & b & c \\ \hline -e & f & g \\ \hline -h & i & j \\ \hline +a & b & c \\ +e & f & g \\ +h & i & j \\ \end{NiceTabular} \end{BVerbatim} -\begin{NiceTabular}{|c|c|c|} +\begin{NiceTabular}{ccc}[hvlines] \CodeBefore - \cellcolor[HTML]{FFFF88}{3-1,2-2,1-3} + \cellcolor[HTML]{FFFF88}{3-1,2-2,-3} \Body -\hline -a & b & c \\ \hline -e & f & g \\ \hline -h & i & j \\ \hline +a & b & c \\ +e & f & g \\ +h & i & j \\ \end{NiceTabular} \end{scope} @@ -1522,24 +1536,22 @@ et la case en bas à droite du rectangle. \begin{scope} \hfuzz=10cm \begin{BVerbatim}[boxwidth=10cm,baseline=c] -\begin{NiceTabular}{|c|c|c|} +\begin{NiceTabular}{ccc}[hvlines] \CodeBefore ~emphase#\rectanglecolor{blue!15}{2-2}{3-3}@ \Body -\hline -a & b & c \\ \hline -e & f & g \\ \hline -h & i & j \\ \hline +a & b & c \\ +e & f & g \\ +h & i & j \\ \end{NiceTabular} \end{BVerbatim} -\begin{NiceTabular}{|c|c|c|} +\begin{NiceTabular}{ccc}[hvlines] \CodeBefore \rectanglecolor{blue!15}{2-2}{3-3} \Body -\hline -a & b & c \\ \hline -e & f & g \\ \hline -h & i & j \\ \hline +a & b & c \\ +e & f & g \\ +h & i & j \\ \end{NiceTabular} \end{scope} @@ -1580,7 +1592,7 @@ $\begin{pNiceMatrix}[baseline=1, r, margin] \medskip On a utilisé la clé |r| qui impose que toutes les colonnes soient alignées à -droite (cf. p.~\pageref{key-R}). +droite (cf. p.~\pageref{columns-type}). \medskip @@ -1637,9 +1649,7 @@ a_{10} & b_{10} & c_{10} \\ \medskip \item La commande |\rowcolors| (avec un \emph{s}) doit son nom à la commande -|\rowcolors| de \pkg{xcolor}\footnote{La commande |\rowcolors| de \pkg{xcolor} - est disponible quand \pkg{xcolor} est chargé avec l'option |table|. Cett - option charge également l'extension \pkg{colortbl}.}. Le \emph{s} rappelle +|\rowcolors| de \pkg{colortbl}. Le \emph{s} rappelle qu'il y a deux couleurs. Elle colorie alternativement les rangées avec les deux couleurs à partir de la rangée dont le numéro est donné en premier argument (obligatoire), comme le fait la commande |\rowcolors| de \pkg{xcolor}. @@ -2040,7 +2050,7 @@ supprimé (il est évidemment possible de le supprimer en mettant |\tabcolsep| o Il est possible de donner la valeur spéciale |auto| à l'option |columns-width|: toutes les colonnes du tableau auront alors une largeur égale à la largeur de la case la plus large du tableau.\footnote{Le résultat est atteint dès la première - compilation (mais PGF/Tikz écrivant des informations dans le fichier |aux|, + compilation (mais PGF-Tikz écrivant des informations dans le fichier |aux|, un message demandant une deuxième compilation apparaîtra).}\par\nobreak \medskip @@ -2126,7 +2136,6 @@ $\begin{array}{c} \label{varwidth} - Rappelons d'abord le fonctionnement d'un environnement |{varwidth}| de l'extension éponyme \pkg{varwidth}. Un tel environnement est similaire à l'environnement classique |{minipage}| mais la largeur indiquée (en argument) @@ -2181,11 +2190,8 @@ Lorsque l'extension \pkg{varwidth} est chargée, ces colonnes |V| de \pkg{varwidth} sont prises en charge par \pkg{nicematrix}. Dans le cadre de \pkg{nicematrix}, l'un des intérêts des colonnes de type |V| par rapport aux colonnes de type |p|, |m| ou |b| est que, pour les cases d'une telle colonne, -le nœud PGF/Tikz créé pour le contenu d'une telle case a une largeur ajusté -au contenu de la cellule en question : cf. p.~\pageref{node-V}. Si le contenu -est vide, la cellule sera considérée comme vide par \pkg{nicematrix} pour le -tracé des lignes pointillés et la détermination des «coins vides» (ce n'est pas -le cas avec une case d'une colonne |p|, |m| ou |b|). +le nœud PGF-Tikz créé pour le contenu d'une telle case a une largeur ajustée +au contenu de la cellule en question : cf. p.~\pageref{node-V}. \medskip \begin{Verbatim} @@ -2207,7 +2213,7 @@ un très très très très long texte Remarquons que l'extension \pkg{varwidth} a quelques problèmes (au moins dans sa -version 0.92). Par exemple, avec LuaLaTeX, elle en fonctionne pas si le contenu +version 0.92). Par exemple, avec LuaLaTeX, elle ne fonctionne pas si le contenu commence par une instruction |\color|. \subsection{Les colonnes X} @@ -2450,8 +2456,6 @@ a_1 & a_2 & & & a_n \end{bNiceMatrix}$ - - \interitem Pour représenter la matrice nulle, on peut choisir d'utiliser le codage suivant :\par\nobreak @@ -2805,10 +2809,10 @@ par les options suivantes (que l'on met entre crochets après la commande) : \item |line-style|. \end{itemize} -Ces options peuvent aussi être fixées avec |\NiceMatrixOptions|, comme options -de |\CodeAfter|, ou bien au niveau d'un environnement mais elles doivent alors -être préfixées par |xdots| (\textsl{xdots} pour rappeler que cela s'applique à -|\Cdots|, |\Ldots|, |\Vdots|, etc.), ce qui fait que leurs noms deviennent : +Ces options peuvent aussi être fixées avec |\NiceMatrixOptions| ou bien au +niveau d'un environnement mais elles doivent alors être préfixées par |xdots| +(\textsl{xdots} pour rappeler que cela s'applique à |\Cdots|, |\Ldots|, +|\Vdots|, etc.), ce qui fait que leurs noms deviennent : % \begin{itemize} \item |xdots/color| ; @@ -2830,7 +2834,7 @@ extérieures (décrites plus loin) bénéficient d'un régime spécial : cf. p.~\pageref{exterior}. \medskip -\colorbox{yellow!50}{\textbf{Nouveau 6.9}}\enskip \textbf{L'option xdots/radius}\par\nobreak +\textbf{L'option xdots/radius}\par\nobreak \smallskip L'option |radius| correspond au rayon des points circulaires qui sont tracés. La @@ -2852,7 +2856,7 @@ unité de mesure dépendante de la fonte courante). version~6.10. Les versions précédentes ne proposaient que |xdots/shorten|. \medskip -\colorbox{yellow!50}{\textbf{Nouveau 6.9}}\enskip \textbf{L'option xdots/inter}\par\nobreak +\textbf{L'option xdots/inter}\par\nobreak \smallskip L'option |xdots/inter| indique la distance entre deux points. La valeur @@ -2958,14 +2962,16 @@ sera exécuté \emph{après} la construction du tableau. \medskip Pour améliorer la lisibilité du code, une syntaxe alternative est proposée : on peut spécifier les instructions du |code-after| à la fin de l'environnement, -après le mot-clé |\CodeAfter|. Bien que ce soit un mot-clé, |\CodeAfter| -accepte quand même un argument optionnel (entre crochets). Les clés autorisées -dans cet argument optionnel forment un sous-ensemble des clés acceptées par -|\NiceMatrixOptions|. +après le mot-clé |\CodeAfter|. Bien que ce soit un mot-clé, |\CodeAfter| accepte +quand même un argument optionnel (entre crochets).\footnote{Les clés autorisées + dans cet argument optionnel sont les suivantes : |delimiters/color|, |rules| + et ses sous-clés ainsi que |sub-matrix| (en lien avec la commande + |\SubMatrix|) et ses sous-clés.} + \medskip Les utilisateurs expérimentés peuvent, en particulier, utiliser les nœuds -PGF/Tikz créés par \pkg{nicematrix} dans le |\CodeAfter|. Ces nœuds sont décrits +PGF-Tikz créés par \pkg{nicematrix} dans le |\CodeAfter|. Ces nœuds sont décrits à partir de la page \pageref{PGF-nodes}. \medskip @@ -3216,7 +3222,7 @@ c & d & \frac12c+\frac14d \\ \medskip Il existe aussi une clé |name| qui permet de donner un nom à une sous-matrice créée par une commande |\SubMatrix|. Ce nom est utilisé pour créer des nœuds -PGF/Tikz : voir p.~\pageref{node-sub-matrix}. +PGF-Tikz : voir p.~\pageref{node-sub-matrix}. \medskip Il est également possible de spécifier des délimiteurs\footnote{Les délimiteurs @@ -3332,12 +3338,13 @@ utiliser lorsque le tableau est inséré dans un environnment flottant \smallskip L'intérêt d'utiliser cette clé |caption| plutôt que la commande classique -|\caption| est que la légende, si elle longue, est justifiée à la largeur du -tableau (sans avoir à utiliser l'extension \pkg{threeparttable} ou l'extension -\pkg{floatrow}). +|\caption| est que la légende, si elle est longue, est justifiée à la largeur du +tableau (hors éventuelles colonnes extérieures spécifiées par |first-col| et +|last-col|). Il n'y a pas besoin d'avoir recours à l'extension +\pkg{threeparttable} ou l'extension \pkg{floatrow}. \smallskip -Par défaut, la légende est placée au-dessous du tableau. Pour avoir la légence +Par défaut, la légende est placée au-dessous du tableau. Pour avoir la légende placée au-dessus, il convient d'utiliser la clé |caption-above| dans |\NiceMatrixOptions|. @@ -3386,8 +3393,8 @@ L'extension \pkg{nicematrix} propose aussi une commande |\tabularnote| qui permet de spécifier des notes qui seront composées à la fin du tableau avec une longueur de ligne égale à la largeur du tableau (hors éventuelles colonnes extérieures spécifiées par |first-col| et |last-col|). Sans surprise, cette -commande n'est disponible que dans les environnements sans délimiteurs, -c'est-à-dire |{NiceTabular}|, |{NiceArray}| et |{NiceMatrix}|. +commande n'est disponible que dans |{NiceTabular}|, |{NiceTabular*}| and +|{NiceTabularX}|. En fait, cette commande n'est disponible que si l'extension \pkg{enumitem} a été chargée (avant ou après \pkg{nicematrix}). Les notes sont en effet composées en @@ -3453,6 +3460,10 @@ tableau en un seul paragraphe. \item Il existe une clé |tabularnote| qui permet d'insérer du texte dans la zone des notes avant les notes numérotées. +\colorbox{yellow!50}{\textbf{Nouveau 6.13} }\enskip Une syntaxe alternative est +proposée : il est possible d'utiliser l'environnement |{TabularNote}| à la fin de +l'environnement |{NiceTabular}| (mais \emph{avant} l'eventuel |\CodeAfter|). + \item Si l'extension \pkg{booktabs} a été chargée (avant ou après \pkg{nicematrix}), la clé |notes/bottomrule| permet de faire tracer un |\bottomrule| de \pkg{booktabs} \emph{après} les notes. @@ -3572,9 +3583,6 @@ paires \textsl{clé=valeur} où le nom des clés n'a plus à être préfixé par \end{center} - - - \medskip On détaille maintenant ces clés. @@ -3713,29 +3721,28 @@ suivant (avec une version de LaTeX postérieure à 2020/10/01). \subsection{Commande \textbackslash ShowCellNames} -\colorbox{yellow!50}{\textbf{Nouveau 6.9}} La commande |\ShowCellNames|, -utilisable dans le |\CodeBefore| et le |\CodeAfter| affiche le nom (sous la -forme $i$-$j$) de chaque case. + +La commande |\ShowCellNames|, utilisable dans le |\CodeBefore| et le +|\CodeAfter| affiche le nom (sous la forme $i$-$j$) de chaque case. Quand elle +est utilisée dans le |\CodeAfter|, cette commande applique un rectangle blanc +semi-transparent pour estomper le tableau (attention : certains lecteurs de +\textsc{pdf} ne prennent pas en charge la transparence). \medskip \begin{BVerbatim}[baseline=c,boxwidth=10.6cm] \begin{NiceTabular}{ccc}[hvlines,cell-space-limits=3pt] -\CodeBefore - \ShowCellNames -\Body \Block{2-2}{} & & test \\ & & blabla \\ & some text & nothing +~emphase#\CodeAfter \ShowCellNames@ \end{NiceTabular} \end{BVerbatim} \begin{NiceTabular}{ccc}[hvlines,cell-space-limits=3pt] -\CodeBefore - \ShowCellNames -\Body \Block{2-2}{} & & test \\ & & blabla \\ & some text & nothing +\CodeAfter \ShowCellNames \end{NiceTabular} @@ -3771,7 +3778,7 @@ charge par \pkg{nicematrix}. \subsection{Colonne par défaut dans \{NiceMatrix\}} -\label{key-R} +\label{columns-type} \colorbox{yellow!50}{\textbf{Nouveau 6.11}}\enskip Les environnements sans préambule (|{NiceMatrix}|, |{pNiceMatrix}|, etc.) ainsi que la commande @@ -4097,7 +4104,7 @@ lignes en pointillés entre les cases du tableau. \smallskip Néanmoins, on peut forcer la création d'un nœud avec la commande |\NotEmpty|.\footnote{Il faut toutefois remarquer qu'avec cette commande, la case est considérée comme non vide, ce qui a des conséquences sur le tracé des -lignes pointillées (cf.~p.~\pageref{Cdots}) et la déterminations des «coins» +lignes pointillées (cf.~p.~\pageref{Cdots}) et la détermination des «coins» (cf. p.~\pageref{corners}).} \medskip @@ -4210,7 +4217,7 @@ de la dernière ligne peuvent être désignés par |last|-$j$. Quand l'extension \pkg{varwidth} est chargée, les colonnes de type |V| définies par \pkg{varwidth} sont prises en charge par \pkg{nicematrix}. Il peut être intéressant de préciser que, pour une cellule située dans une colonne de type -|V|, le nœud PGF/Tikz créé par \pkg{nicematrix} pour le contenu de cette cellule +|V|, le nœud PGF-Tikz créé par \pkg{nicematrix} pour le contenu de cette cellule a une largeur ajustée au contenu de cette cellule. Cela est en contraste avec le cas des colonnes de type |p|, |m| ou |b| dans lesquelles les nœuds ont toujours une largeur égale à la largeur de la colonne. Dans l'exemple suivant, la @@ -4606,7 +4613,7 @@ p.~\pageref{sub-matrix}. \smallskip Si une commande |\SubMatrix| est utilisée avec la clé |name| sous la forme -|name=|\textsl{\ttfamily MonNom}, trois nœuds PGF/Tikz sont créés avec les noms +|name=|\textsl{\ttfamily MonNom}, trois nœuds PGF-Tikz sont créés avec les noms \textsl{\ttfamily MonNom}|-left|, \textsl{\ttfamily MonNom} et \textsl{\ttfamily MonNom}|-right|. @@ -4727,12 +4734,18 @@ Voici un exemple d'utilisation : \medskip \begin{BVerbatim}[baseline=c,boxwidth=9cm] \begin{NiceTabular}{ccc}[hvlines] +\CodeBefore + \arraycolor{gray!10} +\Body merlan & requin & cabillaud \\ baleine & ~emphase#\crossbox[red]@ & morue \\ mante & raie & poule \end{NiceTabular} \end{BVerbatim} \begin{NiceTabular}{ccc}[hvlines] +\CodeBefore + \arraycolor{gray!10} +\Body merlan & requin & cabillaud \\ baleine & \crossbox[red] & morue \\ mante & raie & poule @@ -4833,8 +4846,7 @@ Une instruction comme |\Ldots|, |\Cdots|, etc. essaye de déterminer la premièr case vide de part et d'autre de la case considérée. Quand la clé |corners| (cf.~p.~\pageref{corners}) est utilisée, les coins qui sont déterminés sont composés de cases vides. Néanmoins, une case «vide» n'est pas nécessairement -sans contenu dans le codage TeX (c'est-à-dire sans aucun token entre les deux -esperluettes~|&|). Les règles précises sont les suivantes : +sans contenu dans le codage TeX. Les règles précises sont les suivantes : \begin{itemize} \item Une case implicite est vide. Par exemple, dans la matrice suivante @@ -4849,27 +4861,27 @@ c la dernière case (deuxième rangée et deuxième colonne) est vide. \medskip -\item Chaque case avec un rendu par TeX de largeur nulle est vide. +\item Pour les colonnes de type |p|, |m|, |b|, |V|\footnote{Les colonnes de type + |V| sont fournies par l'extension \pkg{varwidth}: cf.~p.~\pageref{varwidth}} +ou |X|\footnote{Voir p.~\pageref{colonne-X}}, la case est vide si (et seulement +si) son contenu dans le codage TeX est vide (il n'y a que des espaces entre les +deux esperluettes |&|). \medskip -\item Une case qui contient la commande |\NotEmpty| est non vide (et un nœud -PGF/Tikz est créé pour cette case). +\item Pour les colonnes de typte |c|, |l|, |r| ou |w{...}{...}|, la case est +vide si (et seulement si) son rendu TeX est de largeur nulle. \medskip -\item Une case avec une commande |\Hspace| (ou |\Hspace*|) est vide. Cette -commande |\Hspace| est une commande définie par l'extension \pkg{nicematrix} -avec la même signification que |\hspace| excepté que la case où cette commande -est utilisée est considérée comme vide. Cette commande peut être utilisée pour -fixer la largeur des colonnes sans interférer avec le tracé des lignes en -pointillés par \pkg{nicematrix}. +\item Une case qui contient la commande |\NotEmpty| est non vide (et un nœud +PGF-Tikz est créé pour cette case). \medskip -\item Une case d'une colonne de type |p|, |m| ou |t| est toujours non vide -(\emph{attention} : ne pas se fier à ce point car il est susceptible de -changer). En revanche, une case d'une colonne de type |V| de \pkg{varwidth} (cf. -p.~\pageref{varwidth}) est vide quand son contenu TeX est de largeur nulle. - - +\item Une case avec seulement une commande |\Hspace| (ou |\Hspace*|) est vide. +Cette commande |\Hspace| est une commande définie par l'extension +\pkg{nicematrix} avec la même signification que |\hspace| excepté que la case où +cette commande est utilisée est considérée comme vide. Cette commande peut être +utilisée pour fixer la largeur des colonnes sans interférer avec le tracé des +lignes en pointillés par \pkg{nicematrix}. \end{itemize} @@ -4905,7 +4917,7 @@ environnements de l'extension \pkg{nicematrix} ne sont pas affectés). \medskip L'extension \pkg{nicematrix} n'est pas compatible avec la classe \cls{ieeeaccess} -(car cette classe n'est pas compatible avec PGF/Tikz).\footnote{Voir +(car cette classe n'est pas compatible avec PGF-Tikz).\footnote{Voir \url{https://tex.stackexchange.com/questions/528975/error-loading-tikz-in-ieeeaccess-class}} \medskip diff --git a/macros/latex/contrib/nicematrix/nicematrix.dtx b/macros/latex/contrib/nicematrix/nicematrix.dtx index 1f39dbe880..1884212f42 100644 --- a/macros/latex/contrib/nicematrix/nicematrix.dtx +++ b/macros/latex/contrib/nicematrix/nicematrix.dtx @@ -1,5 +1,7 @@ % \iffalse meta-comment % +% This file should be compiled with $xelatex$. +% % Copyright (C) 2018-2022 by F. Pantigny % ----------------------------------- % @@ -15,8 +17,8 @@ % % \fi % \iffalse -\def\myfileversion{6.12} -\def\myfiledate{2022/07/28} +\def\myfileversion{6.13} +\def\myfiledate{2022/08/24} % % %<*batchfile> @@ -827,7 +829,8 @@ version 2005/12/01 or later. % \bigskip % However, the vertical rules are not drawn in the blocks (created by |\Block|: % cf.~p.~\pageref{Block}) nor in the corners (created by the key |corner|: -% cf.~p.~\pageref{corners}). +% cf.~p.~\pageref{corners}) nor in the potential exterior rows (created by the +% keys |first-row| and |last-row|: cf.~p.~\pageref{exterior}). % % \bigskip % If you use \pkg{booktabs} (which provides |\toprule|, |\midrule|, @@ -974,7 +977,8 @@ version 2005/12/01 or later. % % \medskip % \textbf{All these tools don't draw the rules in the blocks nor in the -% empty corners (when the key |corners| is used).} +% empty corners (when the key |corners| is used), nor in the exterior rows and +% columns.} % \begin{itemize} % \item These blocks are: % \begin{itemize} @@ -985,12 +989,18 @@ version 2005/12/01 or later. % \item the blocks implicitely delimited by the continuous dotted lines created % by |\Cdots|, |\Vdots|, etc. (cf.~p.~\pageref{Cdots}). % \end{itemize} -% \item The corners are created by the key |corners| explained below (see p.~\pageref{corners}). +% \item The corners are created by the key |corners| explained below (see +% p.~\pageref{corners}). +% \item For the exterior rows and columns, see~p.~\pageref{exterior}. % \end{itemize} % % In particular, this remark explains the difference between the standard % command |\hline| and the command |\Hline| provided by \pkg{nicematrix}. % +% \colorbox{yellow!50}{\textbf{New 6.13}}\enskip The key |\Hline| takes in an +% optional argument (between square brackets) which is a list of +% \textsl{key=value} pairs. For the description of those keys, see |custom-line| +% on p.~\pageref{custom-line}. % % \subsubsection{The keys hlines and vlines} % @@ -1214,7 +1224,10 @@ version 2005/12/01 or later. % \end{itemize} % % \bigskip -% For the description of the rule itself, there is three possibilities. +% We will now speak of the keys which describe the rule itself. Those keys may +% also be used in the (optional) argument of an individual command |\Hline|. +% +% There is three possibilities. % % \begin{itemize} % \item \emph{First possibility}\par\nobreak @@ -1468,7 +1481,7 @@ version 2005/12/01 or later. % % New commands are available in that |\CodeBefore|: |\cellcolor|, % |\rectanglecolor|, |\rowcolor|, |\columncolor|, |\rowcolors|, -% |\rowlistcolors|, |\chessboardcolors| and |arraycolor|.\footnote{Remark that, +% |\rowlistcolors|, |\chessboardcolors| and |\arraycolor|.\footnote{Remark that, % in the |\CodeBefore|, PGF/Tikz nodes of the form ``\verb+(i-|j)+'' are % also available to indicate the position to the potential rules: % cf.~p.~\pageref{nodes-i}.} @@ -1490,31 +1503,30 @@ version 2005/12/01 or later. % % This command takes in as mandatory arguments a color and a list of cells, each % of which with the format $i$-$j$ where $i$ is the number of the row and $j$ the -% number of the colummn of the cell. -% +% number of the colummn of the cell. In fact, despite its name, this command may +% be used to color a whole row (with the syntax $i$-) or a whole column (with the +% syntax -$j$). % % \medskip % \begin{scope} % \hfuzz=10cm % \begin{BVerbatim}[boxwidth=10cm,baseline=c] -% \begin{NiceTabular}{|c|c|c|} +% \begin{NiceTabular}{ccc}[hvlines] % \CodeBefore -% ~emphase#\cellcolor[HTML]{FFFF88}{3-1,2-2,1-3}@ +% ~emphase#\cellcolor[HTML]{FFFF88}{3-1,2-2,-3}@ % \Body -% \hline -% a & b & c \\ \hline -% e & f & g \\ \hline -% h & i & j \\ \hline +% a & b & c \\ +% e & f & g \\ +% h & i & j \\ % \end{NiceTabular} % \end{BVerbatim} -% \begin{NiceTabular}{|c|c|c|} +% \begin{NiceTabular}{ccc}[hvlines] % \CodeBefore -% \cellcolor[HTML]{FFFF88}{3-1,2-2,1-3} +% \cellcolor[HTML]{FFFF88}{3-1,2-2,-3} % \Body -% \hline -% a & b & c \\ \hline -% e & f & g \\ \hline -% h & i & j \\ \hline +% a & b & c \\ +% e & f & g \\ +% h & i & j \\ % \end{NiceTabular} % \end{scope} % @@ -1527,24 +1539,22 @@ version 2005/12/01 or later. % \begin{scope} % \hfuzz=10cm % \begin{BVerbatim}[boxwidth=10cm,baseline=c] -% \begin{NiceTabular}{|c|c|c|} +% \begin{NiceTabular}{ccc}[hvlines] % \CodeBefore % ~emphase#\rectanglecolor{blue!15}{2-2}{3-3}@ % \Body -% \hline -% a & b & c \\ \hline -% e & f & g \\ \hline -% h & i & j \\ \hline +% a & b & c \\ +% e & f & g \\ +% h & i & j \\ % \end{NiceTabular} % \end{BVerbatim} -% \begin{NiceTabular}{|c|c|c|} +% \begin{NiceTabular}{ccc}[hvlines] % \CodeBefore % \rectanglecolor{blue!15}{2-2}{3-3} % \Body -% \hline -% a & b & c \\ \hline -% e & f & g \\ \hline -% h & i & j \\ \hline +% a & b & c \\ +% e & f & g \\ +% h & i & j \\ % \end{NiceTabular} % \end{scope} % @@ -1584,7 +1594,7 @@ version 2005/12/01 or later. % % \medskip % We have used the key |r| which aligns all the columns rightwards (cf. -% p.~\pageref{key-R}). +% p.~\pageref{columns-width}). % % % \bigskip @@ -1638,9 +1648,7 @@ version 2005/12/01 or later. % % \bigskip % \item The command |\rowcolors| (with a \emph{s}) takes its name from the -% command |\rowcolors| of \pkg{xcolor}\footnote{The command |\rowcolors| of -% \pkg{xcolor} is available when \pkg{xcolor} is loaded with the option~|table|. -% That option also loads the package \pkg{colortbl}.}. The \emph{s} emphasizes +% command |\rowcolors| of \pkg{colortbl}. The \emph{s} emphasizes % the fact that there is \emph{two} colors. This command colors alternately the % rows of the tabular with the tow colors (provided in second and third % argument), beginning with the row whose number is given in first (mandatory) @@ -2166,10 +2174,7 @@ version 2005/12/01 or later. % are supported by \pkg{nicematrix}. Concerning \pkg{nicematrix}, one of the % interests of this type of columns is that, for a cell of a column of type~|V|, % the PGF/Tikz node created by \pkg{nicematrix} for the content of that cell has -% a width adjusted to the content of the cell : cf. p.~\pageref{node-V}. If the -% content of the cell is empty, the cell will be considered as empty by -% \pkg{nicematrix} in the construction of the dotted lines and the «empty -% corners» (that's not the case with a cell of a column |p|, |m| or |b|). +% a width adjusted to the content of the cell : cf. p.~\pageref{node-V}. % % \medskip % \begin{Verbatim} @@ -2797,7 +2802,6 @@ version 2005/12/01 or later. % special treatment: cf. p.~\pageref{exterior}. % % \bigskip -% \colorbox{yellow!50}{\textbf{New 6.9}}\enskip % \textbf{The option xdots/radius}\par\nobreak % % The option |radius| fixes the radius of the dots. The initial value is 0.53~pt. @@ -2817,7 +2821,6 @@ version 2005/12/01 or later. % versions, there was only |xdots/shorten|. % % \bigskip -% \colorbox{yellow!50}{\textbf{New 6.9}}\enskip % \textbf{The option xdots/inter}\par\nobreak % % \smallskip @@ -2926,9 +2929,10 @@ version 2005/12/01 or later. % For the legibility of the code, an alternative syntax is provided: it's % possible to give the instructions of the |code-after| at the end of the % environment, after the keyword |\CodeAfter|. Although |\CodeAfter| is a -% keyword, it takes in an optional argument (between square brackets). The keys -% accepted in that optional ragument form a subset of the keys of the command -% |\WithArrowsOptions|. +% keyword, it takes in an optional argument (between square +% brackets).\footnote{Here are the keys accepted in that argument: +% |delimiters/color|, |rules| and its sub-keys and |sub-matrix| (linked to the +% command |\SubMatrix|) and its sub-keys.} % % % \medskip @@ -3298,8 +3302,9 @@ version 2005/12/01 or later. % % \smallskip % With the key |caption|, the caption, when it is long, is wrapped at the width -% of the tabular (without the use of the package \pkg{threeparttable} or the -% package \pkg{floatrow}). +% of the tabular (excepted the potential exterior columns specified by +% |first-col| and |last-col|), without the use of the package +% \pkg{threeparttable} or the package \pkg{floatrow}. % % \smallskip % By default, the caption is composed below the tabular. With the key @@ -3348,8 +3353,8 @@ version 2005/12/01 or later. % gives the ability to specify notes that will be composed at the end of the % array with a width of line equal to the width of the array (excepted the % potential exterior columns specified by |first-col| and |last-col|). With no -% surprise, that command is available only in the environments without -% delimiters, that is to say |{NiceTabular}|, |{NiceArray}| and |{NiceMatrix}|. +% surprise, that command is available only in the environments +% |{NiceTabular}|, |{NiceTabular*}| and |{NiceTabularX}|. % % In fact, this command is available only if the extension \pkg{enumitem} has % been loaded (before or after \pkg{nicematrix}). Indeed, the notes are composed @@ -3408,6 +3413,11 @@ version 2005/12/01 or later. % \item There is a key |tabularnote| which provides a way to insert some text in % the zone of the notes before the numbered tabular notes. % +% \colorbox{yellow!50}{\textbf{New 6.13}}\enskip An alternative syntaxe is +% available with the environment |{TabularNote}|. That environment should be +% used at the end of the environment |{NiceTabular}| (but \emph{before} a +% potential instruction |\CodeAfter|). +% % \item If the package \pkg{booktabs} has been loaded (before or after % \pkg{nicematrix}), the key |notes/bottomrule| draws a |\bottomrule| of % \pkg{booktabs} \emph{after} the notes. @@ -3667,27 +3677,25 @@ version 2005/12/01 or later. % % \subsection{Command \textbackslash ShowCellNames} % -% \colorbox{yellow!50}{\textbf{New 6.9}} The command |\ShowCellNames|, -% which may be used in the |\CodeBefore| and in the |\CodeAfter| display the name (with the -% form $i$-$j$) of each cell. +% The command |\ShowCellNames|, which may be used in the |\CodeBefore| and in +% the |\CodeAfter| display the name (with the form $i$-$j$) of each cell. When +% used in the |\CodeAfter|, that command applies a semi-transparent white +% rectangle to fade the array (caution: some \textsc{pdf} readers don't support +% transparency). % % \begin{BVerbatim}[baseline=c,boxwidth=10.6cm] % \begin{NiceTabular}{ccc}[hvlines,cell-space-limits=3pt] -% \CodeBefore -% \ShowCellNames -% \Body % \Block{2-2}{} & & test \\ % & & blabla \\ % & some text & nothing +% ~emphase#\CodeAfter \ShowCellNames@ % \end{NiceTabular} % \end{BVerbatim} % \begin{NiceTabular}{ccc}[hvlines,cell-space-limits=3pt] -% \CodeBefore -% \ShowCellNames -% \Body % \Block{2-2}{} & & test \\ % & & blabla \\ % & some text & nothing +% \CodeAfter \ShowCellNames % \end{NiceTabular} % % @@ -3700,8 +3708,8 @@ version 2005/12/01 or later. % % % \medskip -% \begin{BVerbatim}[baseline = c, boxwidth = 10.5cm] -% $\begin{pNiceArray}{~emphase#S@cWc{1cm}c}[nullify-dots,first-row] +% \begin{BVerbatim}[baseline = c, boxwidth = 11cm] +% $\begin{pNiceArray}{~emphase#S@cW{c}{1cm}c}[nullify-dots,first-row] % {C_1} & \Cdots & & C_n \\ % 2.3 & 0 & \Cdots & 0 \\ % 12.4 & \Vdots & & \Vdots \\ @@ -3709,7 +3717,7 @@ version 2005/12/01 or later. % 7.2 & 0 & \Cdots & 0 % \end{pNiceArray}$ % \end{BVerbatim} -% $\begin{pNiceArray}{ScWc{1cm}c}[nullify-dots,first-row] +% $\begin{pNiceArray}{ScW{c}{1cm}c}[nullify-dots,first-row] % {C_1} & \Cdots & & C_n \\ % 2.3 & 0 & \Cdots & 0 \\ % 12.4 & \Vdots & & \Vdots \\ @@ -3724,7 +3732,7 @@ version 2005/12/01 or later. % % \subsection{Default column type in \{NiceMatrix\}} % -% \label{key-R} +% \label{columns-width} % % \colorbox{yellow!50}{\textbf{New 6.11}}\enskip The environments without % preamble (|{NiceMatrix}|, |{pNiceMatrix}|, |{bNiceMatrix}|, etc.) and the @@ -3748,7 +3756,7 @@ version 2005/12/01 or later. % \end{bNiceMatrix}$ % % \medskip -% The key |columnts-type| is available in |\NiceMatrixOptions| but with the +% The key |columns-type| is available in |\NiceMatrixOptions| but with the % prefix |matrix|, which means that its name is, within |\NiceMatrixOptions| : % |matrix/columns-type|. % @@ -4662,12 +4670,18 @@ version 2005/12/01 or later. % \medskip % \begin{BVerbatim}[baseline=c,boxwidth=9cm] % \begin{NiceTabular}{ccc}[hvlines] +% \CodeBefore +% \arraycolor{gray!10} +% \Body % merlan & requin & cabillaud \\ % baleine & ~emphase#\crossbox[red]@ & morue \\ % mante & raie & poule % \end{NiceTabular} % \end{BVerbatim} % \begin{NiceTabular}{ccc}[hvlines] +% \CodeBefore +% \arraycolor{gray!10} +% \Body % merlan & requin & cabillaud \\ % baleine & \crossbox[red] & morue \\ % mante & raie & poule @@ -4777,26 +4791,27 @@ version 2005/12/01 or later. % the last cell (second row and second column) is empty. % % \medskip -% \item Each cell whose TeX ouput has a width equal to zero is empty. +% \item For the columns of type |p|, |m|, |b|, |V|\footnote{The columns of type +% |V| are provided by \pkg{varwidth}: cf.~p.~\pageref{varwidth}.} and +% |X|\footnote{See p.~\pageref{X-columns}}, the cell is empty if (and only if) +% its content in the TeX code is empty (there is only spaces between the +% ampersands |&|). % % \medskip -% \item A cell containing the command |\NotEmpty| is not empty (and a PGF/Tikz -% node) is created in that cell. +% \item For the columns of type |c|, |l|, |r| and |w{...}{...}|, the cell is +% empty if (and only if) its TeX output has a width equal to zero. % % \medskip -% \item A cell with a command |\Hspace| (or |\Hspace*|) is empty. This command -% |\Hspace| is a command defined by the package \pkg{nicematrix} with the same -% meaning as |\hspace| except that the cell where it is used is considered as -% empty. This command can be used to fix the width of some columns of the matrix -% without interfering with \pkg{nicematrix}. +% \item A cell containing the command |\NotEmpty| is not empty (and a PGF/Tikz +% node is created in that cell). % % \medskip -% \item A cell of a column of type |p|, |m| or |t| is always considered as not -% empty. \emph{Caution} : One should not rely upon that point because it may -% change in a future version of \pkg{nicematrix}. On the other side, a cell of a -% column of type |V| of \pkg{varwidth} (cf.~p.~\pageref{varwidth}) is empty when -% its TeX content has a width equal to zero. -% % \end{itemize} +% \item A cell with only a command |\Hspace| (or |\Hspace*|) is empty. This +% command |\Hspace| is a command defined by the package \pkg{nicematrix} with +% the same meaning as |\hspace| except that the cell where it is used is +% considered as empty. This command can be used to fix the width of some columns +% of the matrix without interfering with \pkg{nicematrix}. +% \end{itemize} % % % \subsection{The option exterior-arraycolsep} @@ -5843,8 +5858,11 @@ version 2005/12/01 or later. % |\c_sys_jobname_str| because, with Overleaf, the value of |\c_sys_jobname_str| % is always ``|output|''. % \begin{macrocode} -\str_if_eq:VnT \c_sys_jobname_str { output } - { \bool_set_true:N \c_@@_messages_for_Overleaf_bool } +\bool_set:Nn \c_@@_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 + } % \end{macrocode} % % \bigskip @@ -5881,6 +5899,7 @@ version 2005/12/01 or later. % \begin{macrocode} \cs_generate_variant:Nn \seq_set_split:Nnn { N V n } \cs_generate_variant:Nn \keys_define:nn { n x } +\cs_generate_variant:Nn \str_lowercase:n { V } % \end{macrocode} % % \medskip @@ -6265,8 +6284,15 @@ version 2005/12/01 or later. % \end{macrocode} % |\@temptokena| is a toks (not supported by the L3 programming layer). % \begin{macrocode} - \@temptokena \exp_after:wN - { \tex_the:D \@temptokena \@@_S: [ ##1 ] } + \tl_if_empty:nTF { ##1 } + { + \@temptokena \exp_after:wN + { \tex_the:D \@temptokena \@@_S: } + } + { + \@temptokena \exp_after:wN + { \tex_the:D \@temptokena \@@_S: [ ##1 ] } + } \NC@find } } @@ -6274,7 +6300,19 @@ version 2005/12/01 or later. } % \end{macrocode} % -% +% \bigskip +% \begin{macrocode} +\cs_new_protected:Npn \@@_rescan_for_spanish:N #1 + { + \tl_set_rescan:Nno + #1 + { + \char_set_catcode_other:N > + \char_set_catcode_other:N < + } + #1 + } +% \end{macrocode} % % \bigskip % \subsection*{Parameters} @@ -6441,8 +6479,8 @@ version 2005/12/01 or later. % |[cccc]|), this boolean will be set to false. % % \bigskip -% If the user uses |{NiceTabular}| or |{NiceTabular*}|, we will raise the -% following flag. +% If the user uses |{NiceTabular}|, |{NiceTabular*}| or |{NiceTabularX}|, we +% will raise the following flag. % \begin{macrocode} \bool_new:N \l_@@_NiceTabular_bool % \end{macrocode} @@ -6577,6 +6615,7 @@ version 2005/12/01 or later. % That parameter is \emph{public}. % \begin{macrocode} \tl_new:N \g_nicematrix_code_after_tl +\bool_new:N \l_@@_in_code_after_bool % \end{macrocode} % % \bigskip @@ -6590,10 +6629,16 @@ version 2005/12/01 or later. % The following token list has a function similar to % |\g_nicematrix_code_after_tl| but it is used internally by \pkg{nicematrix}. % In fact, we have to distinguish between |\g_nicematrix_code_after_tl| and -% |\g_@@_internal_code_after_tl| because we must take care of the order in which +% |\g_@@_pre_code_after_tl| because we must take care of the order in which % instructions stored in that parameters are executed. % \begin{macrocode} -\tl_new:N \g_@@_internal_code_after_tl +\tl_new:N \g_@@_pre_code_after_tl +% \end{macrocode} +% +% \bigskip +% \begin{macrocode} +\tl_new:N \g_nicematrix_code_before_tl +\tl_new:N \g_@@_pre_code_before_tl % \end{macrocode} % % \bigskip @@ -6609,8 +6654,8 @@ version 2005/12/01 or later. % % \bigskip % The following sequence will contain the names (without backslash) of the -% commands created by |custom-line| (commands used by the final user in order to -% draw horizontal rules). +% commands created by |custom-line| by the key |command| or |ccommand| (commands +% used by the final user in order to draw horizontal rules). % \begin{macrocode} \seq_new:N \l_@@_custom_line_commands_seq % \end{macrocode} @@ -6624,8 +6669,8 @@ version 2005/12/01 or later. % % \bigskip % The sum of the weights of all the |X|-columns in the preamble. The weight of a -% |X|-column is given as optional argument between square brackets. The default -% value, of course, is $1$. +% |X|-column is given as an optional argument between square brackets. The +% default value, of course, is $1$. % \begin{macrocode} \int_new:N \g_@@_total_X_weight_int % \end{macrocode} @@ -6686,6 +6731,7 @@ version 2005/12/01 or later. \bool_new:N \l_@@_code_before_bool % \end{macrocode} % +% % \bigskip % The following token list will contain the code inserted in each cell of the % current row (this token list will be cleared at the beginning of each row). @@ -7070,7 +7116,7 @@ version 2005/12/01 or later. { \clist_put_right:Nn \l_tmpa_clist { ####1 } } } \tl_set_eq:NN #1 \l_tmpa_clist - } + } } % \end{macrocode} % @@ -7129,7 +7175,7 @@ version 2005/12/01 or later. % specified by the key |tabularnote| of the environment. The token list % |\l_@@_tabularnote_tl| corresponds to the value of that key. % \begin{macrocode} -\tl_new:N \l_@@_tabularnote_tl +\tl_new:N \g_@@_tabularnote_tl % \end{macrocode} % % \bigskip @@ -7231,7 +7277,7 @@ version 2005/12/01 or later. { \bool_if:nT { \cs_if_exist_p:N \@captype || \l_@@_in_env_bool } { - \bool_if:nTF { ! \g_@@_NiceArray_bool && \l_@@_in_env_bool } + \bool_if:nTF { ! \l_@@_NiceTabular_bool && \l_@@_in_env_bool } { \@@_error:n { tabularnote~forbidden } } { \bool_if:NTF \l_@@_in_caption_bool @@ -7786,8 +7832,6 @@ version 2005/12/01 or later. \keys_define:nn { NiceMatrix / Global } { custom-line .code:n = \@@_custom_line:n { #1 } , - delimiters .code:n = \keys_set:nn { NiceMatrix / delimiters } { #1 } , - delimiters .value_required:n = true , rules .code:n = \keys_set:nn { NiceMatrix / rules } { #1 } , rules .value_required:n = true , standard-cline .bool_set:N = \l_@@_standard_cline_bool , @@ -7881,13 +7925,14 @@ version 2005/12/01 or later. corners .clist_set:N = \l_@@_corners_clist , corners .default:n = { NW , SW , NE , SE } , code-before .code:n = - { - \tl_if_empty:nF { #1 } - { - \tl_put_right:Nn \l_@@_code_before_tl { #1 } - \bool_set_true:N \l_@@_code_before_bool - } - } , + { + \tl_if_empty:nF { #1 } + { + \tl_gput_left:Nn \g_@@_pre_code_before_tl { #1 } + \bool_set_true:N \l_@@_code_before_bool + } + } , + code-before .value_required:n = true , % \end{macrocode} % \bigskip % The options |c|, |t| and |b| of the environment |{NiceArray}| have the same @@ -7991,10 +8036,10 @@ version 2005/12/01 or later. NiceMatrixOptions / xdots .inherit:n = NiceMatrix / xdots , NiceMatrixOptions / rules .inherit:n = NiceMatrix / rules , NiceMatrixOptions / notes .inherit:n = NiceMatrix / notes , - NiceMatrixOptions / delimiters .inherit:n = NiceMatrix / delimiters , NiceMatrixOptions / sub-matrix .inherit:n = NiceMatrix / sub-matrix , SubMatrix / rules .inherit:n = NiceMatrix / rules , CodeAfter / xdots .inherit:n = NiceMatrix / xdots , + CodeBefore / sub-matrix .inherit:n = NiceMatrix / sub-matrix , NiceMatrix .inherit:n = { NiceMatrix / Global , @@ -8002,7 +8047,6 @@ version 2005/12/01 or later. } , NiceMatrix / xdots .inherit:n = NiceMatrix / xdots , NiceMatrix / rules .inherit:n = NiceMatrix / rules , - NiceMatrix / delimiters .inherit:n = NiceMatrix / delimiters , NiceTabular .inherit:n = { NiceMatrix / Global , @@ -8010,7 +8054,7 @@ version 2005/12/01 or later. } , NiceTabular / xdots .inherit:n = NiceMatrix / xdots , NiceTabular / rules .inherit:n = NiceMatrix / rules , - NiceTabular / delimiters .inherit:n = NiceMatrix / delimiters , + NiceTabular / notes .inherit:n = NiceMatrix / notes , NiceArray .inherit:n = { NiceMatrix / Global , @@ -8018,7 +8062,6 @@ version 2005/12/01 or later. } , NiceArray / xdots .inherit:n = NiceMatrix / xdots , NiceArray / rules .inherit:n = NiceMatrix / rules , - NiceArray / delimiters .inherit:n = NiceMatrix / delimiters , pNiceArray .inherit:n = { NiceMatrix / Global , @@ -8026,7 +8069,6 @@ version 2005/12/01 or later. } , pNiceArray / xdots .inherit:n = NiceMatrix / xdots , pNiceArray / rules .inherit:n = NiceMatrix / rules , - pNiceArray / delimiters .inherit:n = NiceMatrix / delimiters , } % \end{macrocode} % @@ -8038,6 +8080,12 @@ version 2005/12/01 or later. % \begin{macrocode} \keys_define:nn { NiceMatrix / NiceMatrixOptions } { + delimiters / color .tl_set:N = \l_@@_delimiters_color_tl , + delimiters / color .value_required:n = true , + delimiters / max-width .bool_set:N = \l_@@_delimiters_max_width_bool , + delimiters / max-width .default:n = true , + delimiters .code:n = \keys_set:nn { NiceMatrix / delimiters } { #1 } , + delimiters .value_required:n = true , width .code:n = \dim_set:Nn \l_@@_width_dim { #1 } , width .value_required:n = true , last-col .code:n = @@ -8110,8 +8158,9 @@ version 2005/12/01 or later. % % % \bigskip -% We finalise the definition of the set of keys -% ``|NiceMatrix / NiceMatrix|'' with the options specific to |{NiceMatrix}|. +% We finalise the definition of the set of keys ``|NiceMatrix / NiceMatrix|''. +% That set of keys will be used by |{NiceMatrix}|, |{pNiceMatrix}|, +% |{bNiceMatrix}|, etc. % % \begin{macrocode} \keys_define:nn { NiceMatrix / NiceMatrix } @@ -8126,6 +8175,12 @@ version 2005/12/01 or later. columns-type .value_required:n = true , l .meta:n = { columns-type = l } , r .meta:n = { columns-type = r } , + delimiters / color .tl_set:N = \l_@@_delimiters_color_tl , + delimiters / color .value_required:n = true , + delimiters / max-width .bool_set:N = \l_@@_delimiters_max_width_bool , + delimiters / max-width .default:n = true , + delimiters .code:n = \keys_set:nn { NiceMatrix / delimiters } { #1 } , + delimiters .value_required:n = true , small .bool_set:N = \l_@@_small_bool , small .value_forbidden:n = true , unknown .code:n = \@@_error:n { Unknown~key~for~NiceMatrix } @@ -8152,12 +8207,6 @@ version 2005/12/01 or later. last-col .code:n = \tl_if_empty:nF { #1 } { \@@_error:n { last-col~non~empty~for~NiceArray } } \int_zero:N \l_@@_last_col_int , - notes / para .bool_set:N = \l_@@_notes_para_bool , - notes / para .default:n = true , - notes / bottomrule .bool_set:N = \l_@@_notes_bottomrule_bool , - notes / bottomrule .default:n = true , - tabularnote .tl_set:N = \l_@@_tabularnote_tl , - tabularnote .value_required:n = true , r .code:n = \@@_error:n { r~or~l~with~preamble } , l .code:n = \@@_error:n { r~or~l~with~preamble } , unknown .code:n = \@@_error:n { Unknown~key~for~NiceArray } @@ -8174,6 +8223,12 @@ version 2005/12/01 or later. { \@@_error:n { last-col~non~empty~for~NiceArray } } \int_zero:N \l_@@_last_col_int , first-row .code:n = \int_zero:N \l_@@_first_row_int , + delimiters / color .tl_set:N = \l_@@_delimiters_color_tl , + delimiters / color .value_required:n = true , + delimiters / max-width .bool_set:N = \l_@@_delimiters_max_width_bool , + delimiters / max-width .default:n = true , + delimiters .code:n = \keys_set:nn { NiceMatrix / delimiters } { #1 } , + delimiters .value_required:n = true , small .bool_set:N = \l_@@_small_bool , small .value_forbidden:n = true , r .code:n = \@@_error:n { r~or~l~with~preamble } , @@ -8196,11 +8251,8 @@ version 2005/12/01 or later. width .code:n = \dim_set:Nn \l_@@_width_dim { #1 } \bool_set_true:N \l_@@_width_used_bool , width .value_required:n = true , - notes / para .bool_set:N = \l_@@_notes_para_bool , - notes / para .default:n = true , - notes / bottomrule .bool_set:N = \l_@@_notes_bottomrule_bool , - notes / bottomrule .default:n = true , - tabularnote .tl_set:N = \l_@@_tabularnote_tl , + notes .code:n = \keys_set:nn { NiceMatrix / notes } { #1 } , + tabularnote .tl_gset:N = \g_@@_tabularnote_tl , tabularnote .value_required:n = true , caption .tl_set:N = \l_@@_caption_tl , caption .value_required:n = true , @@ -8444,10 +8496,13 @@ version 2005/12/01 or later. % However, it's very difficult to determine whether a cell is empty. Up to now % we use the following technic: % \begin{itemize} +% \item for the columns of type |p|, |m|, |b|, |V| (of \pkg{varwidth}) or |X|, +% we test whether the cell is syntacticly empty with |\@@_test_if_empty:| and +% |\@@_test_if_empty_for_S:| % \item if the width of the box |\l_@@_cell_box| (created with the content of % the cell) is equal to zero, we consider the cell as empty (however, -% this is not perfect since the user may have used a |\rlap|, a |\llap| or a -% |\mathclap| of \pkg{mathtools}. +% this is not perfect since the user may have used a |\rlap|, |\llap|, |\clap| +% or a |\mathclap| of \pkg{mathtools}). % \item the cells with a command |\Ldots| or |\Cdots|, |\Vdots|, etc., % should also be considered as empty; if |nullify-dots| is in force, there would % be nothing to do (in this case the previous commands only write an instruction @@ -8790,7 +8845,7 @@ version 2005/12/01 or later. % For unexplained reason, with XeTeX (and not with the other engines), the % environments of \pkg{nicematrix} were all composed in black and do not take % into account the color of the encompassing text. As a workaround, you peek the -% color in force at the beginning of the environment and we will it in each cell. +% color in force at the beginning of the environment and we will use it in each cell. % \begin{macrocode} \xglobal \colorlet { nicematrix } { . } % \end{macrocode} @@ -9019,7 +9074,8 @@ version 2005/12/01 or later. % % \medskip % \begin{macrocode} - \tl_gclear_new:N \g_nicematrix_code_before_tl + \tl_gclear:N \g_nicematrix_code_before_tl + \tl_gclear:N \g_@@_pre_code_before_tl } % \end{macrocode} % This is the end of |\@@_pre_array_ii:|. @@ -9112,8 +9168,10 @@ version 2005/12/01 or later. % or, maybe, errors). That's why the command |\@@_create_row_node:| will use the % following counter to avoid such construction. % \begin{macrocode} - \int_gset:Nn \g_@@_last_row_node_int { -1 } + \int_gset:Nn \g_@@_last_row_node_int { -2 } % \end{macrocode} +% The value $-2$ is important. +% % % \interitem % The code in |\@@_pre_array_ii:| is used only here. @@ -9176,7 +9234,7 @@ version 2005/12/01 or later. % \begin{macrocode} \cs_new_protected_nopar:Npn \@@_CodeBefore_Body:w #1 \Body { - \tl_put_right:Nn \l_@@_code_before_tl { #1 } + \tl_gput_left:Nn \g_@@_pre_code_before_tl { #1 } \bool_set_true:N \l_@@_code_before_bool % \end{macrocode} % We go on with |\@@_pre_array:| which will (among other) execute the @@ -9296,21 +9354,37 @@ version 2005/12/01 or later. \bool_if:NT \l_@@_NiceTabular_bool \c_math_toggle_token % \end{macrocode} % +% \bigskip +% The following code is a security for the case the user has used \pkg{babel} +% with the option \pkg{spanish}: in that case, the characters |<| (de code +% \textsc{ascci} 60) and |>| are activated and Tikz is not able to solve the +% problem (even with the Tikz library \pkg{babel}). +% \begin{macrocode} + \int_compare:nNnT { \char_value_catcode:n { 60 } } = { 13 } + { + \@@_rescan_for_spanish:N \g_@@_pre_code_before_tl + \@@_rescan_for_spanish:N \l_@@_code_before_tl + } +% \end{macrocode} +% % Here is the |\CodeBefore|. The construction is a bit complicated because -% |\l_@@_code_before_tl| may begin with keys between square brackets. Moreover, +% |\g_@@_pre_code_before_tl| may begin with keys between square brackets. Moreover, % after the analyze of those keys, we sometimes have to decide to do \emph{not} -% execute the rest of |\l_@@_code_before_tl| (when it is asked for the creation -% of cell nodes in the |\CodeBefore|). That's why we begin with a |\q_stop|: it -% will be used to discard the rest of |\l_@@_code_before_tl|. +% execute the rest of |\g_@@_pre_code_before_tl| (when it is asked for the creation +% of cell nodes in the |\CodeBefore|). That's why we use a |\q_stop|: it +% will be used to discard the rest of |\g_@@_pre_code_before_tl|. % \begin{macrocode} - \exp_last_unbraced:NV \@@_CodeBefore_keys: \l_@@_code_before_tl \q_stop + \exp_last_unbraced:NV \@@_CodeBefore_keys: + \g_@@_pre_code_before_tl % \end{macrocode} % Now, all the cells which are specified to be colored by instructions in the % |\CodeBefore| will actually be colored. It's a two-stages mechanism because we % want to draw all the cells with the same color at the same time to absolutely % avoid thin white lines in some \textsc{pdf} viewers. % \begin{macrocode} - \@@_actually_color: + \@@_actually_color: + \l_@@_code_before_tl + \q_stop \bool_if:NT \l_@@_NiceTabular_bool \c_math_toggle_token \group_end: \bool_if:NT \g_@@_recreate_cell_nodes_bool @@ -9328,7 +9402,7 @@ version 2005/12/01 or later. sub-matrix .value_required:n = true , delimiters / color .tl_set:N = \l_@@_delimiters_color_tl , delimiters / color .value_required:n = true , - unknown .code:n = \@@_error:n { Unknown~key~for~CodeAfter } + unknown .code:n = \@@_error:n { Unknown~key~for~CodeBefore } } % \end{macrocode} % @@ -9470,6 +9544,7 @@ version 2005/12/01 or later. } % \end{macrocode} % +% % \bigskip % \subsection*{The environment \{NiceArrayWithDelims\}} % @@ -9523,7 +9598,7 @@ version 2005/12/01 or later. % the beginning of arrays done by \pkg{colortbl}. Of course, we restore the % value of |\CT@arc@| at the end of our environment. % \begin{macrocode} - \cs_gset_eq:NN \@@_old_CT@arc@ \CT@arc@ + \cs_gset_eq:NN \@@_old_CT@arc@ \CT@arc@ % \end{macrocode} % % We deactivate Tikz externalization because we will use \textsc{pgf} pictures @@ -9580,7 +9655,7 @@ version 2005/12/01 or later. % Now, we prepare the token list for the instructions that we will have to write % on the |aux| file at the end of the environment. % \begin{macrocode} - \tl_gclear:N \g_@@_aux_tl + \tl_gclear:N \g_@@_aux_tl % \end{macrocode} % % \begin{macrocode} @@ -9589,6 +9664,8 @@ version 2005/12/01 or later. \bool_set_true:N \l_@@_code_before_bool \tl_put_right:NV \l_@@_code_before_tl \g_@@_code_before_tl } + \tl_if_empty:NF \g_@@_pre_code_before_tl + { \bool_set_true:N \l_@@_code_before_bool } % \end{macrocode} % % The set of keys is not exactly the same for |{NiceArray}| and for the variants @@ -9895,7 +9972,7 @@ version 2005/12/01 or later. % \end{macrocode} % First, we will do an ``expansion'' of the preamble with the tools of the % package \pkg{array} itself. This ``expansion'' will expand all the constructions -% with |*| and with all column types (defined by the user or by various packages +% with |*| and all column types (defined by the user or by various packages % using |\newcolumntype|). % % Since we use the tools of \pkg{array} to do this expansion, we will have a @@ -9981,6 +10058,14 @@ version 2005/12/01 or later. % \begin{macrocode} \seq_clear:N \g_@@_cols_vlism_seq % \end{macrocode} +% +% \bigskip +% The following sequence will store the arguments of the successive |>| in the +% preamble. +% \begin{macrocode} + \tl_gclear_new:N \g_@@_pre_cell_tl +% \end{macrocode} +% % The counter |\l_tmpa_int| will count the number of consecutive occurrences % of the symbol \verb+|+. % \begin{macrocode} @@ -10080,7 +10165,7 @@ version 2005/12/01 or later. c { \@@_patch_preamble_i:n #1 } l { \@@_patch_preamble_i:n #1 } r { \@@_patch_preamble_i:n #1 } - > { \@@_patch_preamble_ii:nn #1 } + > { \@@_patch_preamble_xiv:n } ! { \@@_patch_preamble_ii:nn #1 } @ { \@@_patch_preamble_ii:nn #1 } | { \@@_patch_preamble_iii:n #1 } @@ -10089,8 +10174,8 @@ version 2005/12/01 or later. m { \@@_patch_preamble_iv:n #1 } \@@_V: { \@@_patch_preamble_v:n } V { \@@_patch_preamble_v:n } - \@@_w: { \@@_patch_preamble_vi:nnnn { } #1 } - \@@_W: { \@@_patch_preamble_vi:nnnn { \cs_set_eq:NN \hss \hfil } #1 } + \@@_w: { \@@_patch_preamble_vi:nnnn { } #1 } + \@@_W: { \@@_patch_preamble_vi:nnnn { \@@_special_W: } #1 } \@@_S: { \@@_patch_preamble_vii:n } ( { \@@_patch_preamble_viii:nn #1 } [ { \@@_patch_preamble_viii:nn #1 } @@ -10149,6 +10234,8 @@ version 2005/12/01 or later. % \begin{macrocode} \cs_new_protected:Npn \@@_patch_preamble_i:n #1 { + \tl_gput_right:NV \g_@@_preamble_tl \g_@@_pre_cell_tl + \tl_gclear:N \g_@@_pre_cell_tl \tl_gput_right:Nn \g_@@_preamble_tl { > { \@@_cell_begin:w \str_set:Nn \l_@@_hpos_cell_str { #1 } } @@ -10194,29 +10281,25 @@ version 2005/12/01 or later. \str_if_eq:nnTF { #1 } | { \@@_patch_preamble_iii:n | } { + \dim_set:Nn \l_tmpa_dim + { + \arrayrulewidth * \l_tmpa_int + + \doublerulesep * ( \l_tmpa_int - 1) + } \tl_gput_right:Nx \g_@@_preamble_tl { - \exp_not:N ! - { - \skip_horizontal:n - { % \end{macrocode} % Here, the command |\dim_eval:n| is mandatory. % \begin{macrocode} - \dim_eval:n - { - \arrayrulewidth * \l_tmpa_int - + \doublerulesep * ( \l_tmpa_int - 1) - } - } - } + \exp_not:N ! { \skip_horizontal:n { \dim_eval:n { \l_tmpa_dim } } } } - \tl_gput_right:Nx \g_@@_internal_code_after_tl + \tl_gput_right:Nx \g_@@_pre_code_after_tl { \@@_vline:n { position = \int_eval:n { \c@jCol + 1 } , multiplicity = \int_use:N \l_tmpa_int , + total-width = \dim_use:N \l_tmpa_dim % added 2022-08-06 } % \end{macrocode} % We don't have provided value for |start| nor for |end|, which means that the @@ -10230,16 +10313,23 @@ version 2005/12/01 or later. } } % \end{macrocode} -% +% +% \begin{macrocode} +\cs_new_protected:Npn \@@_patch_preamble_xiv:n #1 + { + \tl_gput_right:Nn \g_@@_pre_cell_tl { > { #1 } } + \@@_patch_preamble:n + } +% \end{macrocode} +% % \begin{macrocode} \bool_new:N \l_@@_bar_at_end_of_pream_bool % \end{macrocode} % -% \bigskip -% The specifier |p| (and also the specifiers |m| and |b|) have an optional -% argument between square brackets for a list of \emph{key}-\emph{value} pairs. -% Here are the corresponding keys. This set of keys will also be used by the |X| -% columns. +% \bigskip +% The specifier |p| (and also the specifiers |m|, |b|, |V| and |X|) have an +% optional argument between square brackets for a list of +% \emph{key}-\emph{value} pairs. Here are the corresponding keys. % \begin{macrocode} \keys_define:nn { WithArrows / p-column } { @@ -10249,8 +10339,32 @@ version 2005/12/01 or later. c .value_forbidden:n = true , l .code:n = \str_set:Nn \l_@@_hpos_col_str { l } , l .value_forbidden:n = true , - si .code:n = \str_set:Nn \l_@@_hpos_col_str { si } , - si .value_forbidden:n = true , + R .code:n = + \IfPackageLoadedTF { ragged2e } + { \str_set:Nn \l_@@_hpos_col_str { R } } + { + \@@_error_or_warning:n { ragged2e~not~loaded } + \str_set:Nn \l_@@_hpos_col_str { r } + } , + R .value_forbidden:n = true , + L .code:n = + \IfPackageLoadedTF { ragged2e } + { \str_set:Nn \l_@@_hpos_col_str { L } } + { + \@@_error_or_warning:n { ragged2e~not~loaded } + \str_set:Nn \l_@@_hpos_col_str { l } + } , + L .value_forbidden:n = true , + C .code:n = + \IfPackageLoadedTF { ragged2e } + { \str_set:Nn \l_@@_hpos_col_str { C } } + { + \@@_error_or_warning:n { ragged2e~not~loaded } + \str_set:Nn \l_@@_hpos_col_str { c } + } , + C .value_forbidden:n = true , + S .code:n = \str_set:Nn \l_@@_hpos_col_str { si } , + S .value_forbidden:n = true , p .code:n = \str_set:Nn \l_@@_vpos_col_str { p } , p .value_forbidden:n = true , t .meta:n = p , @@ -10300,14 +10414,22 @@ version 2005/12/01 or later. { % \end{macrocode} % The possible values of |\l_@@_hpos_col_str| are |j| (for \emph{justified} which is -% the initial value), |l|, |c| and |r| (when the user has used the corresponding -% key in the optional argument of the specifier). +% the initial value), |l|, |c|, |r|, |L|, |C| and |R| (when the user has used +% the corresponding key in the optional argument of the specifier). % \begin{macrocode} \str_set:Nn \l_@@_hpos_col_str { j } - \keys_set:nn { WithArrows / p-column } { #1 } + \tl_set:Nn \l_tmpa_tl { #1 } + \tl_replace_all:Nnn \l_tmpa_tl { \@@_S: } { S } + \@@_keys_p_column:V \l_tmpa_tl \@@_patch_preamble_iv_iv:nn { #2 } { minipage } } % \end{macrocode} +% +% \begin{macrocode} +\cs_new_protected:Npn \@@_keys_p_column:n #1 + { \keys_set_known:nnN { WithArrows / p-column } { #1 } \l_tmpa_tl } +\cs_generate_variant:Nn \@@_keys_p_column:n { V } +% \end{macrocode} % % \medskip % The first argument is the width of the column. The second is the type of @@ -10331,13 +10453,16 @@ version 2005/12/01 or later. { \str_set:Nn \exp_not:N \l_@@_hpos_cell_str { c } } { \str_set:Nn \exp_not:N \l_@@_hpos_cell_str - { \l_@@_hpos_col_str } + { \str_lowercase:V \l_@@_hpos_col_str } } \str_case:Vn \l_@@_hpos_col_str { c { \exp_not:N \centering } l { \exp_not:N \raggedright } r { \exp_not:N \raggedleft } + C { \exp_not:N \Centering } + L { \exp_not:N \RaggedRight } + R { \exp_not:N \RaggedLeft } } } { \str_if_eq:VnT \l_@@_vpos_col_str { m } \@@_center_cell_box: } @@ -10350,7 +10475,10 @@ version 2005/12/01 or later. { j } { c } { si } { c } } - { \l_@@_hpos_col_str } +% \end{macrocode} +% We use |\str_lowercase:n| to convert |R| to |r|, etc. +% \begin{macrocode} + { \str_lowercase:V \l_@@_hpos_col_str } } } % \end{macrocode} @@ -10384,11 +10512,16 @@ version 2005/12/01 or later. % % |#7| is the type of environment: |minipage| or |varwidth|. % -% |#8| is the lettre |c| or |r| or |l| which is the basic specificier of column +% |#8| is the letter |c| or |r| or |l| which is the basic specificier of column % which is used \emph{in fine}. % \begin{macrocode} \cs_new_protected:Npn \@@_patch_preamble_iv_v:nnnnnnnn #1 #2 #3 #4 #5 #6 #7 #8 { + \str_if_eq:VnTF \l_@@_hpos_col_str { si } + { \tl_gput_right:Nn \g_@@_preamble_tl { > { \@@_test_if_empty_for_S: } } } + { \tl_gput_right:Nn \g_@@_preamble_tl { > { \@@_test_if_empty: } } } + \tl_gput_right:NV \g_@@_preamble_tl \g_@@_pre_cell_tl + \tl_gclear:N \g_@@_pre_cell_tl \tl_gput_right:Nn \g_@@_preamble_tl { > { @@ -10410,7 +10543,7 @@ version 2005/12/01 or later. } % \end{macrocode} % Now, the potential code for the horizontal position of the content of the cell -% (|\centering|, |\raggedright|, |\raggedleft| or nothing). +% (|\centering|, |\raggedright|, |\RaggedRight|, etc.). % \begin{macrocode} #3 % \end{macrocode} @@ -10441,6 +10574,33 @@ version 2005/12/01 or later. % \end{macrocode} % % \bigskip +% \begin{macrocode} +\cs_new_protected:Npn \@@_test_if_empty: \ignorespaces #1 + { + \peek_meaning:NT \unskip + { + \tl_gput_right:Nn \g_@@_cell_after_hook_tl + { \box_set_wd:Nn \l_@@_cell_box \c_zero_dim } + } + #1 + } +% \end{macrocode} +% +% +% \begin{macrocode} +\cs_new_protected:Npn \@@_test_if_empty_for_S: #1 + { + \peek_meaning:NT \__siunitx_table_skip:n + { + \tl_gput_right:Nn \g_@@_cell_after_hook_tl + { \box_set_wd:Nn \l_@@_cell_box \c_zero_dim } + } + #1 + } +% \end{macrocode} +% +% +% \bigskip % The following command will be used in |m|-columns in order to center % vertically the box. In fact, despite its name, the command does not always % center the cell. Indeed, if there is only one row in the cell, it should not @@ -10490,7 +10650,9 @@ version 2005/12/01 or later. { \str_set:Nn \l_@@_vpos_col_str { p } \str_set:Nn \l_@@_hpos_col_str { j } - \keys_set:nn { WithArrows / p-column } { #1 } + \tl_set:Nn \l_tmpa_tl { #1 } + \tl_replace_all:Nnn \l_tmpa_tl { \@@_S: } { S } + \@@_keys_p_column:V \l_tmpa_tl \bool_if:NTF \c_@@_varwidth_loaded_bool { \@@_patch_preamble_iv_iv:nn { #2 } { varwidth } } { @@ -10505,6 +10667,8 @@ version 2005/12/01 or later. % \begin{macrocode} \cs_new_protected:Npn \@@_patch_preamble_vi:nnnn #1 #2 #3 #4 { + \tl_gput_right:NV \g_@@_preamble_tl \g_@@_pre_cell_tl + \tl_gclear:N \g_@@_pre_cell_tl \tl_gput_right:Nn \g_@@_preamble_tl { > { @@ -10521,9 +10685,9 @@ version 2005/12/01 or later. c < { \@@_cell_end: - #1 \hbox_set_end: \bool_if:NT \g_@@_rotate_bool \@@_rotate_cell_box: + #1 \@@_adjust_size_box: \makebox [ #4 ] [ #3 ] { \box_use_drop:N \l_@@_cell_box } } @@ -10535,7 +10699,19 @@ version 2005/12/01 or later. \@@_patch_preamble_xi:n } % \end{macrocode} -% +% +% \bigskip +% \begin{macrocode} +\cs_new_protected:Npn \@@_special_W: + { + \dim_compare:nNnT + { \box_wd:N \l_@@_cell_box } + > + \l_@@_col_width_dim + { \@@_warning:n { W~warning } } + } +% \end{macrocode} +% % \medskip % For |\@@_S:|. If the user has used |S[...]|, |S| has been replaced by |\@@_S:| % during the first expansion of the preamble (done with the tools of standard @@ -10564,6 +10740,8 @@ version 2005/12/01 or later. % \begin{macrocode} \cs_if_exist:NTF \siunitx_cell_begin:w { + \tl_gput_right:NV \g_@@_preamble_tl \g_@@_pre_cell_tl + \tl_gclear:N \g_@@_pre_cell_tl \tl_gput_right:Nn \g_@@_preamble_tl { > { @@ -10619,7 +10797,7 @@ version 2005/12/01 or later. % \begin{macrocode} \cs_new_protected:Npn \@@_patch_preamble_viii_i:nn #1 #2 { - \tl_gput_right:Nx \g_@@_internal_code_after_tl + \tl_gput_right:Nx \g_@@_pre_code_after_tl { \@@_delimiter:nnn #1 { \int_eval:n { \c@jCol + 1 } } \c_true_bool } \tl_if_in:nnTF { ( [ \{ ) ] \} } { #2 } { @@ -10650,7 +10828,7 @@ version 2005/12/01 or later. { \tl_gset:Nn \g_@@_right_delim_tl { #1 } } { \tl_gput_right:Nn \g_@@_preamble_tl { ! { \enskip } } - \tl_gput_right:Nx \g_@@_internal_code_after_tl + \tl_gput_right:Nx \g_@@_pre_code_after_tl { \@@_delimiter:nnn #1 { \int_use:N \c@jCol } \c_false_bool } \@@_patch_preamble:n #2 } @@ -10658,7 +10836,7 @@ version 2005/12/01 or later. { \tl_if_in:nnT { ( [ \{ } { #2 } { \tl_gput_right:Nn \g_@@_preamble_tl { ! { \enskip } } } - \tl_gput_right:Nx \g_@@_internal_code_after_tl + \tl_gput_right:Nx \g_@@_pre_code_after_tl { \@@_delimiter:nnn #1 { \int_use:N \c@jCol } \c_false_bool } \@@_patch_preamble:n #2 } @@ -10674,19 +10852,19 @@ version 2005/12/01 or later. \str_if_eq:VnTF \g_@@_right_delim_tl { . } { \tl_gput_right:Nn \g_@@_preamble_tl { ! { \enskip } } - \tl_gput_right:Nx \g_@@_internal_code_after_tl + \tl_gput_right:Nx \g_@@_pre_code_after_tl { \@@_delimiter:nnn #1 { \int_use:N \c@jCol } \c_false_bool } \tl_gset:Nn \g_@@_right_delim_tl { #2 } } { \tl_gput_right:Nn \g_@@_preamble_tl { ! { \enskip } } - \tl_gput_right:Nx \g_@@_internal_code_after_tl + \tl_gput_right:Nx \g_@@_pre_code_after_tl { \@@_delimiter:nnn #1 { \int_use:N \c@jCol } \c_false_bool } \@@_error:nn { double~closing~delimiter } { #2 } } } { - \tl_gput_right:Nx \g_@@_internal_code_after_tl + \tl_gput_right:Nx \g_@@_pre_code_after_tl { \@@_delimiter:nnn #1 { \int_use:N \c@jCol } \c_false_bool } \@@_error:nn { double~closing~delimiter } { #2 } \@@_patch_preamble:n #3 @@ -10752,7 +10930,10 @@ version 2005/12/01 or later. % \begin{macrocode} \int_zero_new:N \l_@@_weight_int \int_set:Nn \l_@@_weight_int { 1 } - \keys_set_known:nnN { WithArrows / p-column } { #1 } \l_tmpa_tl + \tl_set:Nn \l_tmpa_tl { #1 } + \tl_replace_all:Nnn \l_tmpa_tl { \@@_S: } { S } + \@@_keys_p_column:V \l_tmpa_tl + % \keys_set_known:nnN { WithArrows / p-column } { #1 } \l_tmpa_tl \keys_set:nV { WithArrows / X-column } \l_tmpa_tl \int_compare:nNnT \l_@@_weight_int < 0 { @@ -10842,12 +11023,16 @@ version 2005/12/01 or later. % \begin{macrocode} \cs_new_protected:Npn \@@_set_preamble:Nn #1 #2 { + \group_begin: + \@@_newcolumntype w [ 2 ] { \@@_w: { ##1 } { ##2 } } + \@@_newcolumntype W [ 2 ] { \@@_W: { ##1 } { ##2 } } \@temptokena { #2 } \@tempswatrue \@whilesw \if@tempswa \fi { \@tempswafalse \the \NC@list } \tl_gclear:N \g_@@_preamble_tl \exp_after:wN \@@_patch_m_preamble:n \the \@temptokena \q_stop - \tl_set_eq:NN #1 \g_@@_preamble_tl + \tl_gset_eq:NN #1 \g_@@_preamble_tl + \group_end: } % \end{macrocode} % @@ -10871,6 +11056,11 @@ version 2005/12/01 or later. \cs_set:Npn \@addamp { \if@firstamp \@firstampfalse \else \@preamerr 5 \fi } % \end{macrocode} % +% \begin{macrocode} + \@@_newcolumntype w [ 2 ] { \@@_w: { ##1 } { ##2 } } + \@@_newcolumntype W [ 2 ] { \@@_W: { ##1 } { ##2 } } +% \end{macrocode} +% % \medskip % You do the expansion of the (small) preamble with the tools of \pkg{array}. % \begin{macrocode} @@ -10962,8 +11152,8 @@ version 2005/12/01 or later. p { \@@_patch_m_preamble_iv:nnn t #1 } m { \@@_patch_m_preamble_iv:nnn c #1 } b { \@@_patch_m_preamble_iv:nnn b #1 } - \@@_w: { \@@_patch_m_preamble_v:nnnn { } #1 } - \@@_W: { \@@_patch_m_preamble_v:nnnn { \cs_set_eq:NN \hss \hfil } #1 } + \@@_w: { \@@_patch_m_preamble_v:nnnn { } #1 } + \@@_W: { \@@_patch_m_preamble_v:nnnn { \@@_special_W: } #1 } \q_stop { } } { \@@_fatal:nn { unknown~column~type } { #1 } } @@ -11046,6 +11236,7 @@ version 2005/12/01 or later. \tl_gput_right:Nn \g_@@_preamble_tl { > { + \dim_set:Nn \l_@@_col_width_dim { #4 } \hbox_set:Nw \l_@@_cell_box \@@_cell_begin:w \str_set:Nn \l_@@_hpos_cell_str { #3 } @@ -11053,9 +11244,9 @@ version 2005/12/01 or later. c < { \@@_cell_end: - #1 \hbox_set_end: \bool_if:NT \g_@@_rotate_bool \@@_rotate_cell_box: + #1 \@@_adjust_size_box: \makebox [ #4 ] [ #3 ] { \box_use_drop:N \l_@@_cell_box } } @@ -11240,7 +11431,7 @@ version 2005/12/01 or later. { { ! \seq_if_empty_p:N \g_@@_notes_seq } { ! \seq_if_empty_p:N \g_@@_notes_in_caption_seq } - { ! \tl_if_empty_p:V \l_@@_tabularnote_tl } + { ! \tl_if_empty_p:V \g_@@_tabularnote_tl } } \@@_insert_tabularnotes: \cs_set_eq:NN \tabularnote \@@_tabularnote_error:n @@ -11308,7 +11499,11 @@ version 2005/12/01 or later. % \begin{macrocode} \group_begin: \l_@@_notes_code_before_tl - \tl_if_empty:NF \l_@@_tabularnote_tl { \l_@@_tabularnote_tl \par } + \tl_if_empty:NF \g_@@_tabularnote_tl + { + \g_@@_tabularnote_tl \par + \tl_gclear:N \g_@@_tabularnote_tl + } % \end{macrocode} % We compose the tabular notes with a list of \pkg{enumitem}. The |\strut| and % the |\unskip| are designed to give the ability to put a |\bottomrule| at the @@ -12234,6 +12429,17 @@ version 2005/12/01 or later. \tl_if_empty:NT \l_@@_caption_tl { \@@_error_or_warning:n { label~without~caption } } } + \NewDocumentEnvironment { TabularNote } { b } + { + \bool_if:NTF \l_@@_in_code_after_bool + { \@@_error_or_warning:n { TabularNote~in~CodeAfter } } + { + \tl_if_empty:NF \g_@@_taublarnote_tl + { \tl_gput_right:Nn \g_@@_tabularnote_tl { \par } } + \tl_gput_right:Nn \g_@@_tabularnote_tl { ##1 } + } + } + { } \bool_set_true:N \l_@@_NiceTabular_bool \NiceArray { #2 } } @@ -12489,7 +12695,7 @@ version 2005/12/01 or later. % \end{macrocode} % % \bigskip -% Now, the internal |code-after| and then, the |\CodeAfter|. +% Now, the pre-code-after and then, the |\CodeAfter|. % \begin{macrocode} \bool_if:NT \c_@@_tikz_loaded_bool { @@ -12509,8 +12715,8 @@ version 2005/12/01 or later. \cs_set_eq:NN \OverBrace \@@_OverBrace \cs_set_eq:NN \ShowCellNames \@@_ShowCellNames \cs_set_eq:NN \line \@@_line - \g_@@_internal_code_after_tl - \tl_gclear:N \g_@@_internal_code_after_tl + \g_@@_pre_code_after_tl + \tl_gclear:N \g_@@_pre_code_after_tl % \end{macrocode} % When |light-syntax| is used, we insert systematically a |\CodeAfter| in the % flow. Thus, it's possible to have two instructions |\CodeAfter| and the second @@ -12527,10 +12733,20 @@ version 2005/12/01 or later. % \end{macrocode} % % \medskip +% The following code is a security for the case the user has used \pkg{babel} +% with the option \pkg{spanish}: in that case, the characters |>| and |<| are +% activated and Tikz is not able to solve the problem (even with the Tikz +% library \pkg{babel}). +% \begin{macrocode} + \int_compare:nNnT { \char_value_catcode:n { 60 } } = { 13 } + { \@@_rescan_for_spanish:N \g_nicematrix_code_after_tl } +% \end{macrocode} +% \medskip % And here's the |\CodeAfter|. Since the |\CodeAfter| may begin with an % ``argument'' between square brackets of the options, we extract and treat that % potential ``argument'' with the command |\@@_CodeAfter_keys:|. % \begin{macrocode} + \bool_set_true:N \l_@@_in_code_after_bool \exp_last_unbraced:NV \@@_CodeAfter_keys: \g_nicematrix_code_after_tl \scan_stop: \tl_gclear:N \g_nicematrix_code_after_tl @@ -12539,27 +12755,28 @@ version 2005/12/01 or later. % % % \medskip -% |\g_nicematrix_code_before_tl| is for instructions in the cells of the array such as +% |\g_@@_pre_code_before_tl| is for instructions in the cells of the array such as % |\rowcolor| and |\cellcolor| (when the key |colortbl-like| is in % force). These instructions will be written on the |aux| file to be added to % the |code-before| in the next run. % \begin{macrocode} + \tl_if_empty:NF \g_@@_pre_code_before_tl + { + \tl_gput_right:Nx \g_@@_aux_tl + { + \tl_gset:Nn \exp_not:N \g_@@_pre_code_before_tl + { \exp_not:V \g_@@_pre_code_before_tl } + } + \tl_gclear:N \g_@@_pre_code_before_tl + } \tl_if_empty:NF \g_nicematrix_code_before_tl { -% \end{macrocode} -% The command |\rowcolor| in tabular will in fact use |\rectanglecolor| in order -% to follow the behaviour of |\rowcolor| of \pkg{colortbl}. That's why there may -% be a command |\rectanglecolor| in |\g_nicematrix_code_before_tl|. In order to avoid an -% error during the expansion, we define a protected version of |\rectanglecolor|. -% \begin{macrocode} - \cs_set_protected:Npn \rectanglecolor { } - \cs_set_protected:Npn \columncolor { } \tl_gput_right:Nx \g_@@_aux_tl { \tl_gset:Nn \exp_not:N \g_@@_code_before_tl { \exp_not:V \g_nicematrix_code_before_tl } } - \bool_set_true:N \l_@@_code_before_bool + \tl_gclear:N \g_nicematrix_code_before_tl } % \end{macrocode} % @@ -14465,6 +14682,7 @@ version 2005/12/01 or later. \NewDocumentCommand \@@_RowStyle:n { O { } m } { \group_begin: + \tl_clear:N \l_tmpa_tl % value of \rowcolor \tl_clear:N \l_@@_color_tl \int_set:Nn \l_@@_key_nb_rows_int 1 \keys_set:nn { NiceMatrix / RowStyle } { #1 } @@ -14477,7 +14695,7 @@ version 2005/12/01 or later. % First, the end of the current row (we remind that |\RowStyle| applies to the % \emph{end} of the current row). % \begin{macrocode} - \tl_gput_right:Nx \g_nicematrix_code_before_tl + \tl_gput_right:Nx \g_@@_pre_code_before_tl { % \end{macrocode} % The command |\@@_exp_color_arg:NV| is \emph{fully expandable}. @@ -14491,7 +14709,7 @@ version 2005/12/01 or later. % \begin{macrocode} \int_compare:nNnT \l_@@_key_nb_rows_int > 1 { - \tl_gput_right:Nx \g_nicematrix_code_before_tl + \tl_gput_right:Nx \g_@@_pre_code_before_tl { \@@_exp_color_arg:NV \@@_rowcolor \l_tmpa_tl { @@ -14607,8 +14825,15 @@ version 2005/12/01 or later. % |\l_tmpa_int| will remain equal to $0$. % \begin{macrocode} \int_zero:N \l_tmpa_int - \seq_map_indexed_inline:Nn \g_@@_colors_seq - { \tl_if_eq:nnT { #1 } { ##2 } { \int_set:Nn \l_tmpa_int { ##1 } } } +% \end{macrocode} +% We don't take into account the colors like |myserie!!+| because those colors +% are special color from a |\definecolorseries| of \pkg{xcolor}. +% \begin{macrocode} + \str_if_in:nnF { #1 } { !! } + { + \seq_map_indexed_inline:Nn \g_@@_colors_seq + { \tl_if_eq:nnT { #1 } { ##2 } { \int_set:Nn \l_tmpa_int { ##1 } } } + } \int_compare:nNnTF \l_tmpa_int = \c_zero_int % \end{macrocode} % First, the case where the color is a \emph{new} color (not in the sequence). @@ -15099,19 +15324,17 @@ version 2005/12/01 or later. % \begin{macrocode} \NewDocumentCommand \@@_cellcolor_tabular { O { } m } { - \peek_remove_spaces:n - { - \tl_gput_right:Nx \g_nicematrix_code_before_tl - { + \tl_gput_right:Nx \g_@@_pre_code_before_tl + { % \end{macrocode} % We must not expand the color (|#2|) because the color may contain the token % |!| which may be activated by some packages (ex.: \pkg{babel} with the option % |french| on latex and pdflatex). % \begin{macrocode} - \@@_cellcolor [ #1 ] { \exp_not:n { #2 } } - { \int_use:N \c@iRow - \int_use:N \c@jCol } - } - } + \@@_cellcolor [ #1 ] { \exp_not:n { #2 } } + { \int_use:N \c@iRow - \int_use:N \c@jCol } + } + \ignorespaces } % \end{macrocode} % @@ -15121,15 +15344,13 @@ version 2005/12/01 or later. % \begin{macrocode} \NewDocumentCommand \@@_rowcolor_tabular { O { } m } { - \peek_remove_spaces:n - { - \tl_gput_right:Nx \g_nicematrix_code_before_tl - { - \@@_rectanglecolor [ #1 ] { \exp_not:n { #2 } } - { \int_use:N \c@iRow - \int_use:N \c@jCol } - { \int_use:N \c@iRow - \exp_not:n { \int_use:N \c@jCol } } - } - } + \tl_gput_right:Nx \g_@@_pre_code_before_tl + { + \@@_rectanglecolor [ #1 ] { \exp_not:n { #2 } } + { \int_use:N \c@iRow - \int_use:N \c@jCol } + { \int_use:N \c@iRow - \exp_not:n { \int_use:N \c@jCol } } + } + \ignorespaces } % \end{macrocode} % @@ -15151,7 +15372,7 @@ version 2005/12/01 or later. % instructions in the |\CodeBefore| in order to fill color by color (to avoid % the thin white lines). % \begin{macrocode} - \tl_gput_left:Nx \g_nicematrix_code_before_tl + \tl_gput_left:Nx \g_@@_pre_code_before_tl { \exp_not:N \columncolor [ #1 ] { \exp_not:n { #2 } } { \int_use:N \c@jCol } @@ -15898,7 +16119,7 @@ version 2005/12/01 or later. { \@@_compute_rule_width:n { multiplicity = #1 , #2 } \skip_vertical:n { \l_@@_rule_width_dim } - \tl_gput_right:Nx \g_@@_internal_code_after_tl + \tl_gput_right:Nx \g_@@_pre_code_after_tl { \@@_hline:n { @@ -16114,7 +16335,7 @@ version 2005/12/01 or later. { \@@_compute_rule_width:n { #1 } \skip_vertical:n { \l_@@_rule_width_dim } - \tl_gput_right:Nx \g_@@_internal_code_after_tl + \tl_gput_right:Nx \g_@@_pre_code_after_tl { \@@_hline:n { @@ -16168,7 +16389,7 @@ version 2005/12/01 or later. \str_if_in:nnTF { #2 } { - } { \@@_cut_on_hyphen:w #2 \q_stop } { \@@_cut_on_hyphen:w #2 - #2 \q_stop } - \tl_gput_right:Nx \g_@@_internal_code_after_tl + \tl_gput_right:Nx \g_@@_pre_code_after_tl { \@@_hline:n { @@ -16218,7 +16439,7 @@ version 2005/12/01 or later. % \begin{macrocode} \tl_gput_right:Nx \g_@@_preamble_tl { \exp_not:N ! { \skip_horizontal:n { \dim_use:N \l_@@_rule_width_dim } } } - \tl_gput_right:Nx \g_@@_internal_code_after_tl + \tl_gput_right:Nx \g_@@_pre_code_after_tl { \@@_vline:n { @@ -16276,8 +16497,10 @@ version 2005/12/01 or later. { \bool_lazy_all:nT { - { \int_compare_p:nNn \l_tmpa_tl > { #1 - 1 } } - { \int_compare_p:nNn \l_tmpa_tl < { #3 + 2 } } + { + ( \int_compare_p:nNn \l_tmpa_tl = { #1 } ) + || ( \int_compare_p:nNn \l_tmpa_tl = { #3 + 1 } ) + } { \int_compare_p:nNn \l_tmpb_tl > { #2 - 1 } } { \int_compare_p:nNn \l_tmpb_tl < { #4 + 1 } } } @@ -16292,8 +16515,10 @@ version 2005/12/01 or later. { { \int_compare_p:nNn \l_tmpa_tl > { #1 - 1 } } { \int_compare_p:nNn \l_tmpa_tl < { #3 + 1 } } - { \int_compare_p:nNn \l_tmpb_tl > { #2 - 1 } } - { \int_compare_p:nNn \l_tmpb_tl < { #4 + 2 } } + { + ( \int_compare_p:nNn \l_tmpb_tl = { #2 } ) + || ( \int_compare_p:nNn \l_tmpb_tl = { #4 + 1 } ) + } } { \bool_gset_false:N \g_tmpa_bool } } @@ -17082,7 +17307,7 @@ version 2005/12/01 or later. \int_gincr:N \g_@@_block_box_int \cs_set_protected_nopar:Npn \diagbox ##1 ##2 { - \tl_gput_right:Nx \g_@@_internal_code_after_tl + \tl_gput_right:Nx \g_@@_pre_code_after_tl { \@@_actually_diagbox:nnnnnn { \int_use:N \c@iRow } @@ -17253,16 +17478,16 @@ version 2005/12/01 or later. { \l_tmpa_tl { \exp_not:n { #3 } } - \exp_not:n - { - { - \bool_if:NTF \l_@@_NiceTabular_bool - { - \group_begin: - \bool_if:NF \l_@@_respect_arraystretch_bool - { \cs_set:Npn \arraystretch { 1 } } + { + \bool_if:NTF \l_@@_NiceTabular_bool + { + \group_begin: + \bool_if:NF \l_@@_respect_arraystretch_bool + { \cs_set:Npn \exp_not:N \arraystretch { 1 } } + \exp_not:n + { \dim_zero:N \extrarowheight - #4 + #4 % \end{macrocode} % If the box is rotated (the key |\rotate| may be in the previous |#4|), the % tabular used for the content of the cell will be constructed with a format @@ -17271,21 +17496,24 @@ version 2005/12/01 or later. % the tabular is the same as the external alignment of the tabular (that is to % say the position of the block in its zone of merged cells). % \begin{macrocode} - \bool_if:NT \g_@@_rotate_bool - { \str_set:Nn \l_@@_hpos_block_str c } - \use:x - { - \exp_not:N \begin { tabular } [ \l_@@_vpos_of_block_tl ] - { @ { } \l_@@_hpos_block_str @ { } } - } - #5 - \end { tabular } - \group_end: - } - { - \group_begin: - \bool_if:NF \l_@@_respect_arraystretch_bool - { \cs_set:Npn \arraystretch { 1 } } + \bool_if:NT \g_@@_rotate_bool + { \str_set:Nn \l_@@_hpos_block_str c } + \use:x + { + \exp_not:N \begin { tabular } [ \l_@@_vpos_of_block_tl ] + { @ { } \l_@@_hpos_block_str @ { } } + } + #5 + \end { tabular } + } + \group_end: + } + { + \group_begin: + \bool_if:NF \l_@@_respect_arraystretch_bool + { \cs_set:Npn \exp_not:N \arraystretch { 1 } } + \exp_not:n + { \dim_zero:N \extrarowheight #4 \bool_if:NT \g_@@_rotate_bool @@ -17299,10 +17527,10 @@ version 2005/12/01 or later. #5 \end { array } \c_math_toggle_token - \group_end: } + \group_end: } - } + } } } % \end{macrocode} @@ -17367,6 +17595,9 @@ version 2005/12/01 or later. v-center .bool_set:N = \l_@@_v_center_bool , v-center .default:n = true , v-center .initial:n = false , + transparent .bool_set:N = \l_@@_transparent_bool , + transparent .default:n = true , + transparent .initial:n = false , unknown .code:n = \@@_error:n { Unknown~key~for~Block } } % \end{macrocode} @@ -17472,8 +17703,11 @@ version 2005/12/01 or later. { \int_use:N \l_@@_last_row_int - \int_use:N \l_@@_last_col_int } } } - \bool_if:nT - { ! \l_@@_vlines_block_bool && ! \l_@@_hlines_block_bool } + \bool_if:nF + { + \l_@@_transparent_bool + || ( \l_@@_vlines_block_bool && \l_@@_hlines_block_bool ) + } { % \end{macrocode} % The sequence of the positions of the blocks (excepted the blocks with the key @@ -17486,9 +17720,6 @@ version 2005/12/01 or later. % \end{macrocode} % % \bigskip -% We have a problem here: if the final user has used the keys |hlines| and -% |color| together, the frame of the block is drawn with the color specified by -% |color| but the key |hlines| is no-op. % \begin{macrocode} \bool_lazy_and:nnT { ! (\tl_if_empty_p:N \l_@@_draw_tl) } @@ -17527,7 +17758,7 @@ version 2005/12/01 or later. % \begin{macrocode} \tl_if_empty:NF \l_@@_fill_tl { - \tl_gput_right:Nx \g_nicematrix_code_before_tl + \tl_gput_right:Nx \g_@@_pre_code_before_tl { \exp_not:N \roundedrectanglecolor \exp_args:NV \tl_if_head_eq_meaning:nNTF \l_@@_fill_tl [ @@ -17559,7 +17790,7 @@ version 2005/12/01 or later. % \begin{macrocode} \cs_set_protected_nopar:Npn \diagbox ##1 ##2 { - \tl_gput_right:Nx \g_@@_internal_code_after_tl + \tl_gput_right:Nx \g_@@_pre_code_after_tl { \@@_actually_diagbox:nnnnnn { #1 } @@ -17628,7 +17859,7 @@ version 2005/12/01 or later. % \begin{macrocode} \pgfpicture \pgfrememberpicturepositiononpagetrue - \pgf@relevantforpicturesizefalse + \pgf@relevantforpicturesizefalse \@@_qpoint:n { row - #1 } \dim_set_eq:NN \l_tmpa_dim \pgf@y \@@_qpoint:n { col - #2 } @@ -17912,10 +18143,9 @@ version 2005/12/01 or later. { \pgfpoint \l_@@_tmpc_dim \l_tmpb_dim } { \pgfpoint \l_@@_tmpd_dim \l_tmpa_dim } \pgfsetlinewidth { 1.1 \l_@@_line_width_dim } -% \end{macrocode} -% We can't use |\pgfusepathqstroke| because of the key |rounded-corners|. -% \begin{macrocode} - \pgfusepath { stroke } + \dim_compare:nNnTF \l_@@_rounded_corners_dim = \c_zero_dim + { \pgfusepathqstroke } + { \pgfusepath { stroke } } } \endpgfpicture \group_end: @@ -17960,7 +18190,8 @@ version 2005/12/01 or later. { position = ##1 , start = \l_@@_tmpc_tl , - end = \int_eval:n { \l_tmpa_tl - 1 } + end = \int_eval:n { \l_tmpa_tl - 1 } , + total-width = \dim_use:N \l_@@_line_width_dim % added 2022-08-06 } } } @@ -17984,7 +18215,7 @@ version 2005/12/01 or later. position = ##1 , start = \l_@@_tmpd_tl , end = \int_eval:n { \l_tmpb_tl - 1 } , - total-width = \arrayrulewidth + total-width = \dim_use:N \l_@@_line_width_dim % added 2022-08-06 } } } @@ -18186,7 +18417,13 @@ version 2005/12/01 or later. columns-type .value_required:n = true , l .meta:n = { columns-type = l } , r .meta:n = { columns-type = r } , - c .meta:n = { columns-type = c } + c .meta:n = { columns-type = c } , + delimiters / color .tl_set:N = \l_@@_delimiters_color_tl , + delimiters / color .value_required:n = true , + delimiters / max-width .bool_set:N = \l_@@_delimiters_max_width_bool , + delimiters / max-width .default:n = true , + delimiters .code:n = \keys_set:nn { NiceMatrix / delimiters } { #1 } , + delimiters .value_required:n = true , } % \end{macrocode} % @@ -18319,7 +18556,7 @@ version 2005/12/01 or later. % \begin{macrocode} \cs_new_protected:Npn \@@_diagbox:nn #1 #2 { - \tl_gput_right:Nx \g_@@_internal_code_after_tl + \tl_gput_right:Nx \g_@@_pre_code_after_tl { \@@_actually_diagbox:nnnnnn { \int_use:N \c@iRow } @@ -18503,7 +18740,7 @@ version 2005/12/01 or later. % (and |{pNiceArray}|, |{pNiceMatrix}|, etc.). % % A delimiter in the preamble of the array will write an instruction -% |\@@_delimiter:nnn| in the |\g_@@_internal_code_after_tl| (and also +% |\@@_delimiter:nnn| in the |\g_@@_pre_code_after_tl| (and also % potentially add instructions in the preamble provided to |\array| in order to % add space between columns). % @@ -18657,11 +18894,11 @@ version 2005/12/01 or later. } { \@@_error:n { Invalid~name } } } , + name .value_required:n = true , rules .code:n = \keys_set:nn { NiceMatrix / rules } { #1 } , rules .value_required:n = true , code .tl_set:N = \l_@@_code_tl , code .value_required:n = true , - name .value_required:n = true , unknown .code:n = \@@_error:n { Unknown~key~for~SubMatrix } } % \end{macrocode} @@ -18672,8 +18909,20 @@ version 2005/12/01 or later. { \peek_remove_spaces:n { - \tl_gput_right:Nn \g_@@_internal_code_after_tl - { \SubMatrix { #1 } { #2 } { #3 } { #4 } [ #5 ] } + \tl_gput_right:Nx \g_@@_pre_code_after_tl + { + \SubMatrix { #1 } { #2 } { #3 } { #4 } + [ + delimiters / color = \l_@@_delimiters_color_tl , + hlines = \l_@@_submatrix_hlines_clist , + vlines = \l_@@_submatrix_vlines_clist , + extra-height = \dim_use:N \l_@@_submatrix_extra_height_dim , + left-xshift = \dim_use:N \l_@@_submatrix_left_xshift_dim , + right-xshift = \dim_use:N \l_@@_submatrix_right_xshift_dim , + slim = \bool_to_str:N \l_@@_submatrix_slim_bool , + #5 + ] + } \@@_SubMatrix_in_code_before_i { #2 } { #3 } } } @@ -18703,7 +18952,7 @@ version 2005/12/01 or later. % % % \bigskip -% In the internal |code-after| and in the |\CodeAfter| the following command +% In the pre-code-after and in the |\CodeAfter| the following command % |\@@_SubMatrix| will be linked to |\SubMatrix|. % \begin{itemize} % \item |#1| is the left delimiter; @@ -19248,9 +19497,9 @@ version 2005/12/01 or later. { \@@_error:nn { Construct~too~large } { \OverBrace } } } { - \tl_clear:N \l_tmpa_tl % added the 2022-02-25 + \tl_clear:N \l_tmpa_tl \keys_set:nn { NiceMatrix / Brace } { #4 } - \tl_if_empty:NF \l_tmpa_tl { \color { \l_tmpa_tl } } % added the 2022-02-25 + \tl_if_empty:NF \l_tmpa_tl { \color { \l_tmpa_tl } } \pgfpicture \pgfrememberpicturepositiononpagetrue \pgf@relevantforpicturesizefalse @@ -19397,7 +19646,7 @@ version 2005/12/01 or later. % \subsection*{The command \textbackslash ShowCellNames} % % \begin{macrocode} -\NewDocumentCommand \@@_ShowCellNames { } +\NewDocumentCommand \@@_ShowCellNames_CodeBefore { } { \dim_zero_new:N \g_@@_tmpc_dim \dim_zero_new:N \g_@@_tmpd_dim @@ -19410,6 +19659,7 @@ version 2005/12/01 or later. \@@_qpoint:n { row - \int_eval:n { ##1 + 1 } } \dim_gset:Nn \g_tmpa_dim { ( \l_tmpa_dim + \pgf@y ) / 2 } \dim_gset:Nn \g_tmpb_dim { \l_tmpa_dim - \pgf@y } + \bool_if:NTF \l_@@_in_code_after_bool \end { pgfpicture } \int_step_inline:nn \c@jCol { @@ -19421,7 +19671,8 @@ version 2005/12/01 or later. \@@_qpoint:n { col - \int_eval:n { ####1 + 1 } } \dim_gset:Nn \g_@@_tmpd_dim { \pgf@x - \g_@@_tmpc_dim } \dim_gset_eq:NN \g_@@_tmpe_dim \pgf@x - \end { pgfpicture } + \endpgfpicture + \end { pgfpicture } \fp_set:Nn \l_tmpa_fp { \fp_min:nn @@ -19454,6 +19705,98 @@ version 2005/12/01 or later. } % \end{macrocode} % +% \begin{macrocode} +\NewDocumentCommand \@@_ShowCellNames { } + { + \bool_if:NT \l_@@_in_code_after_bool + { + \pgfpicture + \pgfrememberpicturepositiononpagetrue + \pgf@relevantforpicturesizefalse + \pgfpathrectanglecorners + { \@@_qpoint:n { 1 } } + { \@@_qpoint:n { \int_eval:n { \c@iRow + 1 } } } + \pgfsetfillopacity { 0.75 } + \pgfsetfillcolor { white } + \pgfusepathqfill + \endpgfpicture + } + \dim_zero_new:N \g_@@_tmpc_dim + \dim_zero_new:N \g_@@_tmpd_dim + \dim_zero_new:N \g_@@_tmpe_dim + \int_step_inline:nn \c@iRow + { + \bool_if:NTF \l_@@_in_code_after_bool + { + \pgfpicture + \pgfrememberpicturepositiononpagetrue + \pgf@relevantforpicturesizefalse + } + { \begin { pgfpicture } } + \@@_qpoint:n { row - ##1 } + \dim_set_eq:NN \l_tmpa_dim \pgf@y + \@@_qpoint:n { row - \int_eval:n { ##1 + 1 } } + \dim_gset:Nn \g_tmpa_dim { ( \l_tmpa_dim + \pgf@y ) / 2 } + \dim_gset:Nn \g_tmpb_dim { \l_tmpa_dim - \pgf@y } + \bool_if:NTF \l_@@_in_code_after_bool + { \endpgfpicture } + { \end { pgfpicture } } + \int_step_inline:nn \c@jCol + { + \hbox_set:Nn \l_tmpa_box + { + \normalfont \Large \sffamily \bfseries + \bool_if:NTF \l_@@_in_code_after_bool + { \color { red } } + { \color { red ! 50 } } + ##1 - ####1 + } + \bool_if:NTF \l_@@_in_code_after_bool + { + \pgfpicture + \pgfrememberpicturepositiononpagetrue + \pgf@relevantforpicturesizefalse + } + { \begin { pgfpicture } } + \@@_qpoint:n { col - ####1 } + \dim_gset_eq:NN \g_@@_tmpc_dim \pgf@x + \@@_qpoint:n { col - \int_eval:n { ####1 + 1 } } + \dim_gset:Nn \g_@@_tmpd_dim { \pgf@x - \g_@@_tmpc_dim } + \dim_gset_eq:NN \g_@@_tmpe_dim \pgf@x + \bool_if:NTF \l_@@_in_code_after_bool + { \endpgfpicture } + { \end { pgfpicture } } + \fp_set:Nn \l_tmpa_fp + { + \fp_min:nn + { + \fp_min:nn + { \dim_ratio:nn { \g_@@_tmpd_dim } { \box_wd:N \l_tmpa_box } } + { \dim_ratio:nn { \g_tmpb_dim } { \box_ht_plus_dp:N \l_tmpa_box } } + } + { 1.0 } + } + \box_scale:Nnn \l_tmpa_box { \fp_use:N \l_tmpa_fp } { \fp_use:N \l_tmpa_fp } + \pgfpicture + \pgfrememberpicturepositiononpagetrue + \pgf@relevantforpicturesizefalse + \pgftransformshift + { + \pgfpoint + { 0.5 * ( \g_@@_tmpc_dim + \g_@@_tmpe_dim ) } + { \dim_use:N \g_tmpa_dim } + } + \pgfnode + { rectangle } + { center } + { \box_use:N \l_tmpa_box } + { } + { } + \endpgfpicture + } + } + } +% \end{macrocode} % % \bigskip % \subsection*{We process the options at package loading} @@ -19681,7 +20024,7 @@ version 2005/12/01 or later. \@@_msg_new:nn { too~much~cols~for~matrix~with~last~col } { Too~much~columns.\\ - In~the~row~\int_eval:n { \c@jCol - 1 },~ + In~the~row~\int_eval:n { \c@iRow - 1 },~ you~try~to~use~more~columns~ than~allowed~by~your~\@@_full_name_env:.\@@_message_hdotsfor:\ The~maximal~number~of~columns~is~\int_eval:n { \l_@@_last_col_int - 1 }~ @@ -19904,6 +20247,15 @@ version 2005/12/01 or later. } % \end{macrocode} % +% +% \begin{macrocode} +\@@_msg_new:nn { W~warning } + { + Line~\msg_line_number:.~The~cell~is~too~wide~for~your~column~'W'~ + (row~\int_use:N \c@iRow). + } +% \end{macrocode} +% % \begin{macrocode} \@@_msg_new:nn { Construct~too~large } { @@ -19951,6 +20303,7 @@ version 2005/12/01 or later. Incompatible~keys.\\ You~can't~use~the~keys~'hlines',~'vlines'~or~'hvlines'~for~a~ '\token_to_str:N \Block'~when~the~key~'color'~or~'draw'~is~used.\\ + Maybe~it~will~possible~in~future~version.\\ Your~key~will~be~discarded. } % \end{macrocode} @@ -19967,7 +20320,16 @@ version 2005/12/01 or later. } % \end{macrocode} % -% \begin{macrocode} +% \begin{macrocode} +\@@_msg_new:nn { ragged2e~not~loaded } + { + You~have~to~load~'ragged2e'~in~order~to~use~the~key~'\l_keys_key_str'~in~ + your~column~'\l_@@_vpos_col_str'~(or~'X').~The~key~'\str_lowercase:V + \l_keys_key_str'~will~be~used~instead. + } +% \end{macrocode} +% +% \begin{macrocode} \@@_msg_new:nn { Invalid~name } { Invalid~name.\\ @@ -20153,7 +20515,7 @@ version 2005/12/01 or later. { Tikz~not~loaded.\\ You~can't~use~the~key~'tikz'~for~the~command~'\token_to_str:N - \Block'~because~you~have~not~loaded~Tikz.~ + \Block'~because~you~have~not~loaded~tikz.~ This~key~will~be~ignored. } % \end{macrocode} @@ -20221,8 +20583,10 @@ version 2005/12/01 or later. { Forbidden~command.\\ You~can't~use~the~command~\token_to_str:N\tabularnote\ - ~in~a~\@@_full_name_env:.~This~command~is~available~only~in~ - \{NiceTabular\},~\{NiceArray\}~and~\{NiceMatrix\}. \\ + ~here.~This~command~is~available~only~in~ + \{NiceTabular\},~\{NiceTabular*\}~and~\{NiceTabularX\}~or~in~ + the~argument~of~a~command~\token_to_str:N \caption\ included~ + in~an~environment~{table}. \\ This~command~will~be~ignored. } % \end{macrocode} @@ -20264,7 +20628,7 @@ version 2005/12/01 or later. { Tikz~not~loaded.\\ You~have~used~the~key~'tikz'~in~the~definition~of~a~ - customized~line~(with~'custom-line')~but~Tikz~is~not~loaded.~ + customized~line~(with~'custom-line')~but~tikz~is~not~loaded.~ You~can~go~on~but~you~will~have~another~error~if~you~actually~ use~that~custom~line. } @@ -20275,7 +20639,7 @@ version 2005/12/01 or later. { Tikz~not~loaded.\\ You~have~used~the~key~'tikz'~in~a~key~'borders'~(of~a~ - command~'\token_to_str:N\Block')~but~Tikz~is~not~loaded.~ + command~'\token_to_str:N\Block')~but~tikz~is~not~loaded.~ That~key~will~be~ignored. } % \end{macrocode} @@ -20332,6 +20696,16 @@ version 2005/12/01 or later. % \end{macrocode} % % \begin{macrocode} +\@@_msg_new:nn { TabularNote~in~CodeAfter } + { + Environment~{TabularNote}~forbidden.\\ + You~must~use~{TabularNote}~at~the~end~of~your~{NiceTabular}~ + but~*before*~the~\token_to_str:N \CodeAfter.\\ + This~environment~{TabularNote}~will~be~ignored. + } +% \end{macrocode} +% +% \begin{macrocode} \@@_msg_new:nn { varwidth~not~loaded } { varwidth~not~loaded.\\ @@ -20370,7 +20744,7 @@ version 2005/12/01 or later. { The~available~keys~are~(in~alphabetic~order):~b,~borders,~c,~draw,~fill,~ hlines,~hvlines,~l,~line-width,~name,~rounded-corners,~r,~respect-arraystretch, - ~t,~tikz~and~vlines. + ~t,~tikz,~transparent~and~vlines. } % \end{macrocode} % @@ -20419,6 +20793,22 @@ version 2005/12/01 or later. The~latter~is~for~the~command~\token_to_str:N \line. } % \end{macrocode} +% +% \begin{macrocode} +\@@_msg_new:nnn { Unknown~key~for~CodeBefore } + { + Unknown~key.\\ + The~key~'\l_keys_key_str'~is~unknown.\\ + It~will~be~ignored. \\ + \c_@@_available_keys_str + } + { + The~available~keys~are~(in~alphabetic~order):~ + create-cell-nodes,~ + delimiters/color~and~ + sub-matrix~(several~subkeys). + } +% \end{macrocode} % % \begin{macrocode} \@@_msg_new:nnn { Unknown~key~for~SubMatrix } @@ -20532,12 +20922,14 @@ version 2005/12/01 or later. right-margin,~ rules~(with~the~subkeys~'color'~and~'width'),~ small,~ - sub-matrix~(several~subkeys), + sub-matrix~(several~subkeys),~ vlines,~ xdots~(several~subkeys). } % \end{macrocode} % +% For `|{NiceArray}|`, the set of keys is the same as for |{NiceMatrix}| +% excepted that there is no |l| and |r|. % \begin{macrocode} \@@_msg_new:nnn { Unknown~key~for~NiceArray } { @@ -20566,7 +20958,6 @@ version 2005/12/01 or later. create-extra-nodes,~ create-medium-nodes,~ create-large-nodes,~ - delimiters/color,~ extra-left-margin,~ extra-right-margin,~ first-col,~ @@ -20578,8 +20969,6 @@ version 2005/12/01 or later. left-margin,~ light-syntax,~ name,~ - notes/bottomrule,~ - notes/para,~ nullify-dots,~ renew-dots,~ respect-arraystretch,~ @@ -20600,7 +20989,7 @@ version 2005/12/01 or later. % \medskip % This error message is used for the set of keys |NiceMatrix/NiceMatrix| and % |NiceMatrix/pNiceArray| (but not by |NiceMatrix/NiceArray| because, for this -% set of keys, there is also the keys |t|, |c| and~|b|). +% set of keys, there is no |l| and |r|). % \begin{macrocode} \@@_msg_new:nnn { Unknown~key~for~NiceMatrix } { @@ -20630,7 +21019,6 @@ version 2005/12/01 or later. create-extra-nodes,~ create-medium-nodes,~ create-large-nodes,~ - delimiters~(several~subkeys),~ extra-left-margin,~ extra-right-margin,~ first-col,~ @@ -20702,8 +21090,7 @@ version 2005/12/01 or later. left-margin,~ light-syntax,~ name,~ - notes/bottomrule,~ - notes/para,~ + notes~(several~subkeys),~ nullify-dots,~ renew-dots,~ respect-arraystretch,~ @@ -21349,6 +21736,14 @@ version 2005/12/01 or later. % Correction of a bug: it's now possible to use |\OverBrace| and |\UnderBrace| % with \pkg{unicode-math} (with XeLaTeX or LuaLaTeX). % +% \subsection*{Changes between version 6.12 and 6.13} +% +% New environment |{TabularNote}| in |{NiceTabular}| with the same semantic as +% the key |tabularnote| (for legibility). +% +% The command |\Hline| nows accepts options (between square brackets). +% +% % \newpage % \tableofcontents % @@ -21356,7 +21751,6 @@ version 2005/12/01 or later. % Local Variables: % TeX-fold-mode: t % TeX-fold-preserve-comments: nil -% flyspell-mode: nil % fill-column: 80 % End: diff --git a/macros/latex/contrib/nicematrix/nicematrix.pdf b/macros/latex/contrib/nicematrix/nicematrix.pdf index 88d123b069..cd44a1841f 100644 Binary files a/macros/latex/contrib/nicematrix/nicematrix.pdf and b/macros/latex/contrib/nicematrix/nicematrix.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md b/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md index 14c0c77bde..32ce2b1be1 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md +++ b/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md @@ -5,6 +5,15 @@ first release 0.95a, 2021-02-23 will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), this project uses date-based 'snapshot' version identifiers. +## [2022-08-24] + +### Changed + - internal cleanup + - prepare for change in l3backend object handling + +### Fixed + - ensure that pdfproducer is set with hyperxmp + ## [2022-07-08] ### Fixed - link detection if french is active (issue #28) diff --git a/macros/latex/contrib/pdfmanagement-testphase/README.md b/macros/latex/contrib/pdfmanagement-testphase/README.md index 2eae8e6757..0d96f71d82 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/README.md +++ b/macros/latex/contrib/pdfmanagement-testphase/README.md @@ -1,6 +1,6 @@ # LaTeX PDF management testphase bundle -Version: 0.95q, 2022-07-08 +Version: 0.95r, 2022-08-24 This package is used during a test phase to load the new PDF management code of LaTeX. diff --git a/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty index 6873467166..7400b4be95 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty +++ b/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty @@ -24,7 +24,7 @@ %% This file has the LPPL maintenance status "maintained". %% \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{color-ltx}[2022-07-08 v0.95q +\ProvidesPackage{color-ltx}[2022-08-24 v0.95r Standard LaTeX Color (patched for l3color, part of pdfmanagement-testphase, original version 2022/01/06 v1.3d) (DPC)] \edef\Gin@codes{% \catcode`\noexpand\^^A\the\catcode`\^^A\relax @@ -136,25 +136,18 @@ \c@lor@usename{#2}}}} \@onlypreamble\DefineNamedColor \protected\def\@expl@color@set@@nnn#1#2#3{} -\ifdefined\ExplSyntaxOn - \ExplSyntaxOn - \cs_gset_protected:Npn \@expl@color@set@@nnn #1 #2 #3 - { - \cs_if_exist:NT \color_set:nnn - { \cs_if_exist:cTF { __color_parse_model_ #2 :w } - { - \color_set:nnn {#1}{#2}{#3} - } - { %for dvi mode - \tl_if_eq:nnT{#2}{named} - { - \color_set:nn{#1}{#3} - } - } - } - } - \ExplSyntaxOff -\fi +\ExplSyntaxOn +\cs_set_protected:Npn \@expl@color@set@@nnn #1 #2 #3 + { + \str_if_eq:nnTF {#2}{named} + { + \color_set:nn {#1}{#3} + } + { + \color_set:nnn {#1}{#2}{#3} + } + } +\ExplSyntaxOff \newif\ifcolors@ \colors@true \def\c@lor@special#1#2{% diff --git a/macros/latex/contrib/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty index 733b017008..666d4d028b 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty +++ b/macros/latex/contrib/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty @@ -19,7 +19,7 @@ % % for those people who are interested. \NeedsTeXFormat{LaTeX2e}[2020/10/01] -\ProvidesExplPackage{colorspace-patches-tmp-ltx}{2022-07-08}{0.95q} +\ProvidesExplPackage{colorspace-patches-tmp-ltx}{2022-08-24}{0.95r} {temporay patches to for the colorspace package to test pdfresource management ... UF} \hook_gput_code:nnn {begindocument} {pdf} @@ -35,30 +35,30 @@ { \tl_if_exist:NT \spc@op { - \__pdf_backend_object_new:nn {__spc_extgstate_op_false}{dict} - \__pdf_backend_object_write:nn + \pdf_object_new:nn {__spc_extgstate_op_false}{dict} + \pdf_object_write:nn {__spc_extgstate_op_false} {/Type /ExtGState~/op~false~/OP~false} \pdfmanagement_add:nnn {Page/Resources/ExtGState} {SPCko} - {\__pdf_backend_object_ref:n {__spc_extgstate_op_false}} - \__pdf_backend_object_new:nn {__spc_extgstate_op_true0}{dict} - \__pdf_backend_object_write:nn + {\pdf_object_ref:n {__spc_extgstate_op_false}} + \pdf_object_new:nn {__spc_extgstate_op_true0}{dict} + \pdf_object_write:nn {__spc_extgstate_op_true0} {/Type /ExtGState~/op~true~/OP~true~/OPM~0}% \pdfmanagement_add:nnn {Page/Resources/ExtGState} {SPCmz} - {\__pdf_backend_object_ref:n {__spc_extgstate_op_true0}} - \__pdf_backend_object_new:nn {__spc_extgstate_op_true1}{dict} - \__pdf_backend_object_write:nn + {\pdf_object_ref:n {__spc_extgstate_op_true0}} + \pdf_object_new:nn {__spc_extgstate_op_true1}{dict} + \pdf_object_write:nn {__spc_extgstate_op_true1} {/Type /ExtGState~/op~true~/OP~true~/OPM~1}% \pdfmanagement_add:nnn {Page/Resources/ExtGState} {SPCop} - {\__pdf_backend_object_ref:n {__spc_extgstate_op_true1}} + {\pdf_object_ref:n {__spc_extgstate_op_true1}} } } diff --git a/macros/latex/contrib/pdfmanagement-testphase/fontspec-luatex-tmp-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/fontspec-luatex-tmp-ltx.sty index 366b860f22..4f52820adf 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/fontspec-luatex-tmp-ltx.sty +++ b/macros/latex/contrib/pdfmanagement-testphase/fontspec-luatex-tmp-ltx.sty @@ -40,7 +40,7 @@ \RequirePackage{xparse} \ProvidesExplPackage{fontspec-luatex-tmp-ltx}% - {2022/01/15}{2022-07-08}{0.95q} + {2022/01/15}{2022-08-24}{0.95r} %%^^A%% fontspec-code-load.dtx -- part of FONTSPEC %%^^A%% fontspec-code-vars.dtx -- part of FONTSPEC diff --git a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx index c0075f181a..a1616e6f17 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx @@ -83,7 +83,7 @@ % }^^A % } % -% \date{Version 0.95q, released 2022-07-08} +% \date{Version 0.95r, released 2022-08-24} % % \maketitle % \begin{documentation} @@ -560,7 +560,7 @@ % \item |backref| % \item |CJKbookmarks| this key should not be used anymore. At some time % it will be removed. -% \item |destlabels| (destination names are taken from \cs{label} if possible) +% \item |destlabel| (destination names are taken from \cs{label} if possible) % \item |encap| % \item |hyperfigures| (according to the \pkg{hyperref} manual % it makes figures hyper links, but actually is a no-op for most drivers, and it @@ -959,7 +959,7 @@ %<@@=hyp> % \end{macrocode} % \begin{macrocode} -\ProvidesFile{hgeneric-testphase.def}[2022-07-08 v0.95q % +\ProvidesFile{hgeneric-testphase.def}[2022-08-24 v0.95r % generic Hyperref driver for the LaTeX PDF management testphase bundle] \RequirePackage{etoolbox} %why? @@ -3090,12 +3090,8 @@ % \begin{macrocode} \keys_define:nn { hyp / setup } { - ,verbose .choice: - ,verbose / true .code:n = { \Hy@verbosetrue} - ,verbose / false .code:n = { \Hy@verbosefalse} - ,verbose .default:n = {true} - ,debug .meta:n = {verbose=#1} - ,debug .default:n = {true} + ,verbose .legacy_if_set:n = {Hy@verbose} + ,debug .legacy_if_set:n = {Hy@verbose} } \keys_define:nn { hyp / setup } { @@ -3120,27 +3116,12 @@ { ,extension .tl_set:N = \XR@ext ,extension .initial:n= pdf - ,hypertexnames .choice: - ,hypertexnames / true .code:n = { \Hy@hypertexnamestrue} - ,hypertexnames / false .code:n = { \Hy@hypertexnamesfalse} - ,hypertexnames .default:n = {true} + ,hypertexnames .legacy_if_set:n = {Hy@hypertexnames} ,linkfileprefix .tl_set:N = \Hy@linkfileprefix - ,localanchorname .choice: - ,localanchorname / true .code:n = { \Hy@localanchornametrue } - ,localanchorname / false .code:n = { \Hy@localanchornamefalse } - ,localanchorname .default:n = {true} - ,naturalnames .choice: - ,naturalnames / true .code:n = { \Hy@naturalnamestrue} - ,naturalnames / false .code:n = { \Hy@naturalnamesfalse} - ,naturalnames .default:n = {true} - ,pageanchor .choice: - ,pageanchor / true .code:n = { \Hy@pageanchortrue} - ,pageanchor / false .code:n = { \Hy@pageanchorfalse} - ,pageanchor .default:n = {true} - ,plainpages .choice: - ,plainpages / true .code:n = { \Hy@plainpagestrue} - ,plainpages / false .code:n = { \Hy@plainpagesfalse} - ,plainpages .default:n = {true} + ,localanchorname .legacy_if_set:n = {Hy@localanchorname} + ,naturalnames .legacy_if_set:n = {Hy@naturalnames} + ,pageanchor .legacy_if_set:n = {Hy@pageanchor} + ,plainpages .legacy_if_set:n = {Hy@plainpages} } \keys_define:nn { hyp / setup } @@ -3196,14 +3177,8 @@ ,bookmarks / false .code:n = {\RemoveFromHook {begindocument/before}[hyperref/bookmark]} ,bookmarks / true .code:n = {} ,bookmarks .default:n = {true} - ,bookmarksnumbered .choice: - ,bookmarksnumbered / false .code:n = { \Hy@bookmarksnumberedfalse } - ,bookmarksnumbered / true .code:n = { \Hy@bookmarksnumberedtrue } - ,bookmarksnumbered .default:n = {true} - ,bookmarksopen .choice: - ,bookmarksopen / false .code:n = { \Hy@bookmarksopenfalse } - ,bookmarksopen / true .code:n = { \Hy@bookmarksopentrue } - ,bookmarksopen .default:n = {true} + ,bookmarksnumbered .legacy_if_set:n = {Hy@bookmarksnumbered} + ,bookmarksopen .legacy_if_set:n = {Hy@bookmarksopen} ,bookmarksopenlevel .tl_set:N = \@bookmarksopenlevel ,bookmarkstype .tl_set:N = \Hy@bookmarkstype ,pdfcenterwindow .choice: @@ -5299,6 +5274,8 @@ \hss }% } +\@ifundefined{hyper@nopatch@sectioning} +{ \let\H@old@ssect\@ssect \def\@ssect#1#2#3#4#5{% \Hy@MakeCurrentHrefAuto{section*}% @@ -5387,6 +5364,7 @@ \H@old@sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]{#8}% }% } +}{} \expandafter\def\csname Parent-4\endcsname{} \expandafter\def\csname Parent-3\endcsname{} \expandafter\def\csname Parent-2\endcsname{} diff --git a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf index 5555737530..e19406467b 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf and b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty index 623388bcfc..5c77d8ce6b 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty +++ b/macros/latex/contrib/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty @@ -19,7 +19,7 @@ % % for those people who are interested. \NeedsTeXFormat{LaTeX2e}[2020/10/01] -\ProvidesExplPackage{hyperxmp-patches-tmp-ltx}{2022-07-08}{0.95q} +\ProvidesExplPackage{hyperxmp-patches-tmp-ltx}{2022-08-24}{0.95r} {Store hyperref metadata in XMP format / temporay patches to test pdfresource management ... UF} \cs_if_exist:NT \pdfmanagement_add:nnn @@ -153,6 +153,10 @@ {\AddToDocumentProperties[hyperref]{pdfauthor}{Title}} } +% hyperxmp recalculates pdfproduce at begin document and we should copy that definition +\AddToHook{begindocument/end} + {\edef\next{\noexpand\AddToDocumentProperties[hyperref]{pdfproducer}{\@pdfproducer}}\next} + \DeclareHookRule{begindocument/before}{pdfmanagement/firstaid/hyperxmp}{before}{hyperxmp} % hyperxmp puts the code into enddocument, but for xetex this is too late. diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx index 88fd3a3fd5..f9fc15bf4d 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx @@ -45,7 +45,7 @@ % }^^A % } % -% \date{Version 0.95q, released 2022-07-08} +% \date{Version 0.95r, released 2022-08-24} % % \maketitle % @@ -56,34 +56,34 @@ % \begin{macrocode} %\ProvidesExplFile %<*dvipdfmx> - {l3backend-testphase-dvipdfmx.def}{2022-07-08}{} + {l3backend-testphase-dvipdfmx.def}{2022-08-24}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvipdfmx} % %<*dvips> - {l3backend-testphase-dvips.def}{2022-07-08}{} + {l3backend-testphase-dvips.def}{2022-08-24}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvips} % %<*dvisvgm> - {l3backend-testphase-dvisvgm.def}{2022-07-08}{} + {l3backend-testphase-dvisvgm.def}{2022-08-24}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvisvgm} % %<*luatex> - {l3backend-testphase-luatex.def}{2022-07-08}{} + {l3backend-testphase-luatex.def}{2022-08-24}{} {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (LuaTeX)} % %<*pdftex> - {l3backend-testphase-pdftex.def}{2022-07-08}{} + {l3backend-testphase-pdftex.def}{2022-08-24}{} {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (pdfTeX)} % %<*xdvipdfmx> - {l3backend-testphase-xetex.def}{2022-07-08}{} + {l3backend-testphase-xetex.def}{2022-08-24}{} {LaTeX~PDF~management~testphase~bundle~backend~support: XeTeX} % % \end{macrocode} % \subsection{Crossreferences} % This uses the temporary l3ref-tmp.sty. It will % will be replaced by kernel code later. -% It is only need to get a reference for the absolute page counter. +% It is only needed to get a reference for the absolute page counter. % This uses the counter from the % new lthooks/ltshipout package. % \begin{macrocode} @@ -267,7 +267,7 @@ % \begin{NOTE}{UF} % path: Page % !!!!!!!!!!!!!!!!!!!!!! -% This part of the code depends on zref/xref as it sets labels. +% This part of the code depends on l3ref-tmp as it sets labels. % It also depends on code in l3pdfmanagement as the code uses the Core-dictionaries % !!!!!!!!!!!!!!!!!!!!!! % @@ -338,16 +338,9 @@ { %we need to know the page the resource should be added too. \int_gincr:N\g_@@_backend_resourceid_int - %\zref@labelbylist {l3pdf\int_use:N\g_@@_backend_resourceid_int} {l3pdf} - %\ref_label:en{l3pdf\int_use:N\g_@@_backend_resourceid_int}{abspage} - \@@_backend_ref_label:en { l3pdf\int_use:N\g_@@_backend_resourceid_int }{abspage} + \@@_backend_ref_label:en { l3pdf\int_use:N\g_@@_backend_resourceid_int }{abspage} \tl_set:Nx \l_@@_tmpa_tl { - %\zref@extractdefault -% {l3pdf\int_use:N\g_@@_backend_resourceid_int} -% {pdf@abspage} -% {0} -% \ref_value:en{l3pdf\int_use:N\g_@@_backend_resourceid_int}{abspage} \@@_backend_ref_value:en {l3pdf\int_use:N\g_@@_backend_resourceid_int}{abspage} } \pdfdict_if_exist:nF { g_@@_Core/backend_Page\l_@@_tmpa_tl} @@ -587,7 +580,7 @@ %<*pdftex|luatex> \clist_map_inline:Nn \c_@@_backend_PageResources_clist { - \@@_backend_object_new:nn {@@/Page/Resources/#1} {dict} + \pdf_object_new:nn {@@/Page/Resources/#1} {dict} \cs_if_exist:NT \tex_directlua:D { \tex_directlua:D @@ -631,7 +624,7 @@ \prop_if_empty:cF { \__kernel_pdfdict_name:n { g_@@_Core/Page/Resources/##1} } { - \@@_backend_object_write:nx + \pdf_object_write:nx { @@/Page/Resources/##1 } { \pdfdict_use:n { g_@@_Core/Page/Resources/##1} } } @@ -656,8 +649,8 @@ % \clist_map_inline:Nn \c_@@_backend_PageResources_clist { - \@@_backend_object_new:nn { @@/Page/Resources/#1 } { dict } - \hook_gput_code:nnn{shipout/firstpage}{pdf}{\@@_backend_object_write:nn { @@/Page/Resources/#1 } {}} + \pdf_object_new:nn { @@/Page/Resources/#1 } { dict } + \hook_gput_code:nnn{shipout/firstpage}{pdf}{\pdf_object_write:nn { @@/Page/Resources/#1 } {}} } \cs_new_protected:Npn \@@_backend_PageResources:n #1 { @@ -958,18 +951,9 @@ { \@@_backend_object_ref:n { #2 } } } { - %\zref@labelbylist -% { l3pdf\int_use:N\g_@@_backend_resourceid_int } -% { l3pdf } -% \ref_label:en{l3pdf\int_use:N\g_@@_backend_resourceid_int}{abspage} \@@_backend_ref_label:en{l3pdf\int_use:N\g_@@_backend_resourceid_int}{abspage} \tl_set:Nx \l_@@_tmpa_tl { - %\zref@extractdefault -% { l3pdf\int_use:N\g_@@_backend_resourceid_int } -% {pdf@abspage} -% {0} - %\ref_value:en{l3pdf\int_use:N\g_@@_backend_resourceid_int}{abspage} \@@_backend_ref_value:en{l3pdf\int_use:N\g_@@_backend_resourceid_int}{abspage} } \pdfdict_if_exist:nF { g_@@_Core/backend_Page\l_@@_tmpa_tl/Resources/Properties } @@ -997,18 +981,9 @@ { \@@_backend_object_last: } } { - %\zref@labelbylist -% { l3pdf\int_use:N\g_@@_backend_resourceid_int } -% { l3pdf } - %\ref_label:en{l3pdf\int_use:N\g_@@_backend_resourceid_int}{abspage} \@@_backend_ref_label:en{l3pdf\int_use:N\g_@@_backend_resourceid_int}{abspage} \tl_set:Nx \l_@@_tmpa_tl { - %\zref@extractdefault -% { l3pdf\int_use:N\g_@@_backend_resourceid_int } -% {pdf@abspage} -% {0} - % \ref_value:en{l3pdf\int_use:N\g_@@_backend_resourceid_int}{abspage} \@@_backend_ref_value:en{l3pdf\int_use:N\g_@@_backend_resourceid_int}{abspage} } \pdfdict_if_exist:nF { g_@@_Core/backend_Page\l_@@_tmpa_tl/Resources/Properties } diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf index 2b357b3eda..b74c3c95ba 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx index 97c0c5e8d6..399f483a7a 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Version 0.95q, released 2022-07-08} +% \date{Version 0.95r, released 2022-08-24} % % \maketitle % \begin{documentation} @@ -433,7 +433,7 @@ % \begin{macrocode} %<@@=pdfannot> %<*header> -\ProvidesExplPackage{l3pdfannot}{2022-07-08}{0.95q} +\ProvidesExplPackage{l3pdfannot}{2022-08-24}{0.95r} {PDF-annotations} \RequirePackage{l3pdfdict} % diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf index 5dbda679a0..702ae1a64e 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx index 8d32eeed54..5a7fba1352 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx @@ -50,7 +50,7 @@ % }^^A % } % -% \date{Version 0.95q, released 2022-07-08} +% \date{Version 0.95r, released 2022-08-24} % % \maketitle % \begin{documentation} @@ -209,7 +209,7 @@ % \begin{macrocode} %<@@=pdfdict> %<*header> -\ProvidesExplPackage{l3pdfdict}{2022-07-08}{0.95q} +\ProvidesExplPackage{l3pdfdict}{2022-08-24}{0.95r} {Tools for PDF dictionaries (LaTeX PDF management testphase bundle)} % % \end{macrocode} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf index 4e5c0bd5c5..bb93058f76 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx index 4fdc0bac2f..96e39426af 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx @@ -50,7 +50,7 @@ % }^^A % } % -% \date{Version 0.95q, released 2022-07-08} +% \date{Version 0.95r, released 2022-08-24} % % \maketitle % \begin{documentation} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf index 6b5122c3d5..a2136f3d33 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx index 5acdcd5681..ffa2b7ca3a 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx @@ -65,7 +65,7 @@ % }^^A % } % -% \date{Version 0.95q, released 2022-07-08} +% \date{Version 0.95r, released 2022-08-24} % % \maketitle % \begin{documentation} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf index 20a6ae6185..d075bd344f 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx index 7723bd2326..f9991ad304 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx @@ -50,7 +50,7 @@ % }^^A % } % -% \date{Version 0.95q, released 2022-07-08} +% \date{Version 0.95r, released 2022-08-24} % % \maketitle % \begin{documentation} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf index 26c1f00116..876073d8c7 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx index 8c7284694c..83b90edcdd 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx @@ -56,7 +56,7 @@ % }^^A % } % -% \date{Version 0.95q, released 2022-07-08} +% \date{Version 0.95r, released 2022-08-24} % % \maketitle % \begin{documentation} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf index 4795e9a50c..3557d2e663 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx index bb9ae7b7bb..1551e41fd0 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx @@ -84,7 +84,7 @@ % }^^A % } % -% \date{Version 0.95q, released 2022-07-08} +% \date{Version 0.95r, released 2022-08-24} % % \maketitle % \begin{documentation} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf index d177ccbf12..5f62fd992d 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx index cb7de4a167..f3497cb8fb 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx @@ -50,7 +50,7 @@ % }^^A % } % -% \date{Version 0.95q, released 2022-07-08} +% \date{Version 0.95r, released 2022-08-24} % % \maketitle % \begin{documentation} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf index 8a41e69f57..561066f44b 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx index 9a2aa3c091..51a81d2f01 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx @@ -70,7 +70,7 @@ % }^^A % } % -% \date{Version 0.95q, released 2022-07-08} +% \date{Version 0.95r, released 2022-08-24} % % \maketitle % \begin{documentation} @@ -974,7 +974,7 @@ %<*package> %<@@=pdffield> \NeedsTeXFormat{LaTeX2e} -\ProvidesExplPackage{l3pdffield-testphase}{2022-07-08}{0.95q}% +\ProvidesExplPackage{l3pdffield-testphase}{2022-08-24}{0.95r}% {form fields} % \end{macrocode} % \subsection{hyperref specific command} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf index e9b37dfed0..03a6bc7a6f 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx index c24f7b781d..5527a4e128 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx @@ -50,7 +50,7 @@ % }^^A % } % -% \date{Version 0.95q, released 2022-07-08} +% \date{Version 0.95r, released 2022-08-24} % % \maketitle % \begin{documentation} @@ -397,7 +397,7 @@ % % \begin{macrocode} %<*header> -\ProvidesExplPackage{l3pdffile}{2022-07-08}{0.95q} +\ProvidesExplPackage{l3pdffile}{2022-08-24}{0.95r} {embedding and referencing files in PDF---LaTeX PDF management testphase bundle} \RequirePackage{l3pdftools} %temporarly!! % diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf index 83b9c83d09..16a76d4976 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx index f29b7580fa..63865b4627 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx @@ -58,7 +58,7 @@ % }^^A % } % -% \date{Version 0.95q, released 2022-07-08} +% \date{Version 0.95r, released 2022-08-24} % % \maketitle % \begin{documentation} @@ -633,7 +633,7 @@ %<@@=pdfmanagement> %<*header> % -\ProvidesExplPackage{l3pdfmanagement}{2022-07-08}{0.95q} +\ProvidesExplPackage{l3pdfmanagement}{2022-08-24}{0.95r} {Management of core PDF dictionaries (LaTeX PDF management testphase bundle)} % % \end{macrocode} @@ -1279,8 +1279,8 @@ \prop_if_empty:cF { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AA } } { - \__pdf_backend_object_new:nn { @@/Catalog/AA } { dict } - \__pdf_backend_object_write:nx + \pdf_object_new:nn { @@/Catalog/AA } { dict } + \pdf_object_write:nx { @@/Catalog/AA } { \pdfdict_use:n { g__pdf_Core/Catalog/AA } } \exp_args:Nnx @@ -1309,8 +1309,8 @@ { \seq_if_empty:cF { g_@@_/Catalog/AcroForm/Fields_seq } { - \__pdf_backend_object_new:nn { @@/Catalog/AcroForm/Fields } { array } - \__pdf_backend_object_write:nx + \pdf_object_new:nn { @@/Catalog/AcroForm/Fields } { array } + \pdf_object_write:nx { @@/Catalog/AcroForm/Fields } { \seq_use:cn { g_@@_/Catalog/AcroForm/Fields_seq } {~} } \exp_args:Nnnx @@ -1321,9 +1321,9 @@ } \seq_if_empty:cF { g_@@_/Catalog/AcroForm/CO_seq } { - \__pdf_backend_object_new:nn { @@/Catalog/AcroForm/CO } { array } + \pdf_object_new:nn { @@/Catalog/AcroForm/CO } { array } \exp_args:Nnx - \__pdf_backend_object_write:nn + \pdf_object_write:nn { @@/Catalog/AcroForm/CO } { \seq_use:cn { g_@@_/Catalog/AcroForm/CO_seq } {~} } \exp_args:Nnnx @@ -1334,9 +1334,9 @@ } \prop_if_empty:cF { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm/DR/Font}} { - \__pdf_backend_object_new:nn { @@/Catalog/AcroForm/DR/Font } {dict} + \pdf_object_new:nn { @@/Catalog/AcroForm/DR/Font } {dict} \exp_args:Nnx - \__pdf_backend_object_write:nn + \pdf_object_write:nn { @@/Catalog/AcroForm/DR/Font } { \pdfdict_use:n { g__pdf_Core/Catalog/AcroForm/DR/Font } } \exp_args:Nnnx @@ -1347,9 +1347,9 @@ } \prop_if_empty:cF { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm/DR}} { - \__pdf_backend_object_new:nn { @@/Catalog/AcroForm/DR } {dict} + \pdf_object_new:nn { @@/Catalog/AcroForm/DR } {dict} \exp_args:Nnx - \__pdf_backend_object_write:nn + \pdf_object_write:nn { @@/Catalog/AcroForm/DR } { \pdfdict_use:n { g__pdf_Core/Catalog/AcroForm/DR } } \exp_args:Nnnx @@ -1360,9 +1360,9 @@ } \prop_if_empty:cF { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm} } { - \__pdf_backend_object_new:nn { @@/Catalog/AcroForm } {dict} + \pdf_object_new:nn { @@/Catalog/AcroForm } {dict} \exp_args:Nnx - \__pdf_backend_object_write:nn + \pdf_object_write:nn { @@/Catalog/AcroForm } { \pdfdict_use:n { g__pdf_Core/Catalog/AcroForm } } \exp_args:Nnnx @@ -1385,9 +1385,9 @@ \seq_if_empty:cF { g_@@_/Catalog/AF_seq } { - \__pdf_backend_object_new:nn { @@/Catalog/AF } { array } + \pdf_object_new:nn { @@/Catalog/AF } { array } \exp_args:Nnx - \__pdf_backend_object_write:nn + \pdf_object_write:nn { @@/Catalog/AF } { \seq_use:cn { g_@@_/Catalog/AF_seq } {~} } \exp_args:Nnx @@ -1409,9 +1409,9 @@ \prop_if_empty:cF { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/MarkInfo } } { - \__pdf_backend_object_new:nn { @@/Catalog/MarkInfo } { dict } + \pdf_object_new:nn { @@/Catalog/MarkInfo } { dict } \exp_args:Nnx - \__pdf_backend_object_write:nn + \pdf_object_write:nn { @@/Catalog/MarkInfo } { \pdfdict_use:n { g__pdf_Core/Catalog/MarkInfo } } \exp_args:Nnx @@ -1450,10 +1450,10 @@ > { 0 } { - \__pdf_backend_object_new:nn { @@/Catalog/OCProperties } { dict } + \pdf_object_new:nn { @@/Catalog/OCProperties } { dict } \seq_gpop_left:cN { g_@@_/Catalog/OCProperties/Configs_seq} \l_@@_tmpa_tl \exp_args:Nnx - \__pdf_backend_object_write:nn {@@/Catalog/OCProperties} + \pdf_object_write:nn {@@/Catalog/OCProperties} { /OCGs~[ \seq_use:cn { g_@@_/Catalog/OCProperties/OCGs_seq } {~} ] /D~\l_@@_tmpa_tl~ @@ -1481,9 +1481,9 @@ \seq_if_empty:cF { g_@@_/Catalog/OutputIntents_seq } { - \__pdf_backend_object_new:nn { @@/Catalog/OutputIntents } { array } + \pdf_object_new:nn { @@/Catalog/OutputIntents } { array } \exp_args:Nnx - \__pdf_backend_object_write:nn + \pdf_object_write:nn { @@/Catalog/OutputIntents } { \seq_use:cn { g_@@_/Catalog/OutputIntents_seq } {~} } \exp_args:Nnx @@ -1506,9 +1506,9 @@ \seq_if_empty:cF { g_@@_/Catalog/Requirements_seq } { - \__pdf_backend_object_new:nn { @@/Catalog/Requirements } { array } + \pdf_object_new:nn { @@/Catalog/Requirements } { array } \exp_args:Nnx - \__pdf_backend_object_write:nn + \pdf_object_write:nn { @@/Catalog/Requirements } { \seq_use:cn { g_@@_/Catalog/Requirements_seq } {~} } \exp_args:Nnx @@ -1531,9 +1531,9 @@ \prop_if_empty:cF { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/ViewerPreferences } } { - \__pdf_backend_object_new:nn { @@/Catalog/ViewerPreferences } { dict } + \pdf_object_new:nn { @@/Catalog/ViewerPreferences } { dict } \exp_args:Nnx - \__pdf_backend_object_write:nn + \pdf_object_write:nn { @@/Catalog/ViewerPreferences } { \pdfdict_use:n { g__pdf_Core/Catalog/ViewerPreferences } } \exp_args:Nnx diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf index f3df93793e..8f678cf00f 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx index 5cb8101352..d284c399a9 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx @@ -50,7 +50,7 @@ % }^^A % } % -% \date{Version 0.95q, released 2022-07-08} +% \date{Version 0.95r, released 2022-08-24} % % \maketitle % \begin{documentation} @@ -381,7 +381,7 @@ % \begin{macrocode} %<@@=pdfmeta> %<*header> -\ProvidesExplPackage{l3pdfmeta}{2022-07-08}{0.95q} +\ProvidesExplPackage{l3pdfmeta}{2022-08-24}{0.95r} {PDF-Standards---LaTeX PDF management testphase bundle} % % \end{macrocode} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf index a9f7e57966..d3647b4051 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx index 09885d9155..b7bd6a54ed 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx @@ -50,7 +50,7 @@ % }^^A % } % -% \date{Version 0.95q, released 2022-07-08} +% \date{Version 0.95r, released 2022-08-24} % % \maketitle % \begin{documentation} @@ -212,7 +212,7 @@ % % \begin{macrocode} %<*header> -\ProvidesExplPackage{l3pdftools}{2022-07-08}{0.95q} +\ProvidesExplPackage{l3pdftools}{2022-08-24}{0.95r} {candidate commands for l3pdf---LaTeX PDF management testphase bundle} % % \end{macrocode} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf index dbce88a787..b26d20df9d 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx index 80aa5201c3..3b7d724710 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Version 0.95q, released 2022-07-08} +% \date{Version 0.95r, released 2022-08-24} % % \maketitle % \begin{documentation} @@ -133,7 +133,7 @@ % \begin{macrocode} %<@@=pdf> %<*header> -\ProvidesExplPackage{l3pdfxform}{2022-07-08}{0.95q} +\ProvidesExplPackage{l3pdfxform}{2022-08-24}{0.95r} {command to create xforms (beta)---LaTeX PDF management testphase bundle} % % \end{macrocode} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf index 652c88ebba..ee6f8179e8 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx index 1c21229b75..ed9fda6588 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx @@ -48,7 +48,7 @@ % }^^A % } % -% \date{Version 0.95q, released 2022-07-08} +% \date{Version 0.95r, released 2022-08-24} % % \maketitle % \begin{documentation} @@ -217,7 +217,7 @@ % \begin{macrocode} %<@@=pdfmanagement> %<*header> -\ProvidesExplPackage{ltdocinit}{2022-07-08}{0.95q} +\ProvidesExplPackage{ltdocinit}{2022-08-24}{0.95r} {Initialize document metadata} % % \end{macrocode} diff --git a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf index 74f366d78f..cf8942cb50 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf and b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/output-patches-tmp-ltx.pdf b/macros/latex/contrib/pdfmanagement-testphase/output-patches-tmp-ltx.pdf index 79ddec156f..4db63d591e 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/output-patches-tmp-ltx.pdf and b/macros/latex/contrib/pdfmanagement-testphase/output-patches-tmp-ltx.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdflscape-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/pdflscape-ltx.sty index ff8088006c..1cefb7112c 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/pdflscape-ltx.sty +++ b/macros/latex/contrib/pdfmanagement-testphase/pdflscape-ltx.sty @@ -22,7 +22,7 @@ %% This work consists of the main source file pdflscape-ltx.sty %% \NeedsTeXFormat{LaTeX2e} -\ProvidesExplPackage{pdflscape-ltx}{2022-07-08}{0.95q} +\ProvidesExplPackage{pdflscape-ltx}{2022-08-24}{0.95r} {Display of landscape pages in PDF - adaption of pdflscape to the PDFmanagement bundle (testphase)} \DeclareOption*{\PassOptionsToPackage\CurrentOption{graphics}} diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx index 0ddec54f3f..f02cc7ec55 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx @@ -48,7 +48,7 @@ % }^^A % } % -% \date{Version 0.95q, released 2022-07-08} +% \date{Version 0.95r, released 2022-08-24} % % \maketitle % \begin{documentation} @@ -64,7 +64,7 @@ % |debug={firstaidoff={name1,name2,...},...}|. % \begin{macrocode} %<*package> -\ProvidesExplPackage{pdfmanagement-firstaid}{2022-07-08}{0.95q} +\ProvidesExplPackage{pdfmanagement-firstaid}{2022-08-24}{0.95r} {LaTeX PDF management testphase bundle / firstaid-patches} %<@@=pdfmanagement> @@ -175,7 +175,7 @@ { package/xcolor/after } - {\RequirePackage{xcolor-patches-tmp-ltx}\XC@@@@names} + {\RequirePackage{xcolor-patches-tmp-ltx}} } % \end{macrocode} % \subsection{\pkg{pgf}} diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf index bb0d5007de..1acdd4fefe 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf and b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx index c503632465..22f0445ac0 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx @@ -48,7 +48,7 @@ % }^^A % } % -% \date{Version 0.95q, released 2022-07-08} +% \date{Version 0.95r, released 2022-08-24} % % \maketitle % \begin{documentation} @@ -386,7 +386,7 @@ % \begin{macrocode} %<@@=pdf> %<*package> -\ProvidesExplPackage{pdfmanagement-testphase}{2022-07-08}{0.95q} +\ProvidesExplPackage{pdfmanagement-testphase}{2022-08-24}{0.95r} {LaTeX PDF management testphase bundle} \providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} \IfFormatAtLeastTF{2020-10-01}{}{ @@ -414,7 +414,7 @@ % to allow to set it in the document. % \begin{macrocode} %<*header> -\ProvidesExplFile{pdfmanagement-testphase.ltx}{2022-07-08}{0.95q} +\ProvidesExplFile{pdfmanagement-testphase.ltx}{2022-08-24}{0.95r} {PDF~management~code~(testphase)} % %<*package> diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf index 5cbb3a5591..d63d623952 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf and b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/transparent-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/transparent-ltx.sty index 8218bd26d7..bf44fbeb22 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/transparent-ltx.sty +++ b/macros/latex/contrib/pdfmanagement-testphase/transparent-ltx.sty @@ -3,7 +3,7 @@ %% a replacement for transparent sty from Heiko Oberdiek %% \NeedsTeXFormat{LaTeX2e}[2020/10/01] -\ProvidesExplPackage{transparent-ltx}{2022-07-08}{0.95q} +\ProvidesExplPackage{transparent-ltx}{2022-08-24}{0.95r} {Transparency with color stacks (replacement for transparent.sty from Heiko Oberdiek)}% \RequirePackage{l3opacity} diff --git a/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty index ad78d86b81..88c8bf739d 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty +++ b/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty @@ -1,91 +1,24 @@ %% LaTeX2e file `xcolor-patches.sty' %% -\ProvidesPackage{xcolor-patches-tmp-ltx}[2022-07-08 v0.95q patch xcolor for l3color] +\ProvidesPackage{xcolor-patches-tmp-ltx}[2022-08-24 v0.95r patch xcolor for l3color] \@ifundefined{color_set:nn}{\RequirePackage{l3color}}{} \ExplSyntaxOn -% #1 is the color name -% #2: model or models -% #3: value: either numbers or a color name -% #4 is the type: named or ps -\cs_gset_protected:Npn \__pdfmanagement_firstaid_xcolor_set:nnnn #1 #2 #3 #4 - { - \str_case:nnF {#4} - { - % we ignore the ps type for now. - {ps}{} - {named} - { - \cs_if_exist:cT { __color_parse_model_ #2 :w } - { - \color_set:nnn {#1}{#2}{#3} - } - } - } - { - \cs_if_exist:cTF { __color_parse_model_ #2 :w } - { - \color_set:nnn {#1}{#2}{#3} - } - { - \tl_if_eq:nnTF{#2}{named}%this the model not the type! - { - \color_set:nn{#1}{#3} - } - { - %this is for multi models, it will break if there is model - %l3 doesn't know, but the case is rare, so accept it for now. - \str_if_in:nnT {#2}{/} - { - \color_set:nnn{#1}{#2}{#3} - } - } - } - } - } -\cs_generate_variant:Nn \__pdfmanagement_firstaid_xcolor_set:nnnn {nonn} -\cs_set_eq:NN \@expl@xcolor@set@@nonn \__pdfmanagement_firstaid_xcolor_set:nonn -\cs_generate_variant:Nn \color_set:nn {ne} -\tl_new:N\l__pdfmanagement_firstaid_tmpa_tl -% the color name should be sanitized to avoid problems with e.g. french making ! active -\cs_new_protected:Npn \@expl@xcolor@set@@ne #1 #2 - { - \XC@edef\l__pdfmanagement_firstaid_tmpa_tl{#2} - \exp_args:NV \__color_if_defined:nT \l__pdfmanagement_firstaid_tmpa_tl - { \color_set:ne {#1}{\l__pdfmanagement_firstaid_tmpa_tl} } - } -\ExplSyntaxOff -%\pretocmd{\XC@col@rlet} {\@expl@color@set@@ne{#2}{#4}}{}{\fail} -\def\XC@col@rlet[#1]#2[#3]#4% - {\@expl@xcolor@set@@ne{#2}{#4}% - \begingroup - \edef\@@cls{#1}\XC@edef\@@nam{#2}\XC@sdef\@@mod{#3}\XC@edef\@@clr{#4}% - \XC@info\@@clr\@@tmp\XC@@tstfalse - \ifnum\@@tmp=\@ne\ifx\@@mod\@empty - \ifx\@@cls\@empty - \XC@@tsttrue - \else - \edef\@@tmp - {\expandafter\expandafter\expandafter\@secondoffive - \csname\string\color@\@@clr\endcsname}% - \ifx\@@cls\@@tmp\XC@@tsttrue\fi - \fi - \fi\fi - \ifXC@@tst - \XC@logdef\@@nam\XC@c@l@rlet\@@nam\@@clr - \else - \extractcolorspec\@@clr\@@clr - \ifx\@@mod\@empty\else - \expandafter\convertcolorspec\@@clr\@@mod\@@clr - \edef\@@clr{{\@@mod}{\@@clr}}\fi - \edef\@@tmp{\noexpand\XC@definecolor[\@@cls]{\@@nam}\@@clr}% - \fi - \expandafter\endgroup\@@tmp\xglobal@stop} +\cs_set_protected:Npn \expl@color@set@@nnn #1#2#3 + { + \color_set:nnn{#1}{#2}{#3} + } -%\pretocmd{\XC@definec@lor}{\@expl@color@set@@nnn{#2}{#4}{#5}}{}{\fail} +\cs_set_protected:Npn \expl@color@set@eq@@nn #1 #2 + { + \color_if_exist:nT{#2} + { + \color_set_eq:nn{#1}{#2} + } + } +\ExplSyntaxOff \def\XC@definec@lor[#1]#2[#3]#4#5% - {\@expl@xcolor@set@@nonn{#2}{#4}{#5}{#1}% - \begingroup + {\begingroup \XC@sdef\@@cls{#1}\XC@edef\@@nam{#2}\edef\colornameprefix{#3}% \XC@logdef\@@nam \XC@getmodclr02{#4}{#5}{\let\@@tmp\relax}% @@ -118,10 +51,18 @@ \toks@\expandafter{\@@drv}% \edef\@@tmp {\ifglobalcolors\global\else\xglobal@\fi - \noexpand\@namedef{\string\color@\@@nam}% - {\noexpand\xcolor@{\@@cls}{\the\toks@}{\@@mod}{\@@clr}}}% + \noexpand\@namedef{\@backslashchar color@\@@nam}% + {\noexpand\xcolor@{\@@cls}{\the\toks@}{\@@mod}{\@@clr}}% + \noexpand\expl@color@set@@nnn{\@@nam}{\@@mod}{\@@clr}}% \fi}% \expandafter\endgroup\@@tmp\xglobal@stop} +\def\XC@c@l@rlet#1#2% + {\@ifundefinedcolor{#2}% + {\c@lor@error{`#2'}\let\@@tmp\@empty}% + {\edef\@@tmp + {\ifglobalcolors\global\else\xglobal@\fi + \noexpand\XC@let@cc{\@backslashchar color@#1}{\@backslashchar color@#2}% + \noexpand\expl@color@set@eq@@nn{#1}{#2}}}} %re-predefine the colors \definecolorset{rgb/hsb/cmyk/gray}{}{}% @@ -139,4 +80,5 @@ gray,.5/.5,.5,.5/0,0,.5/0,0,0,.5;% lightgray,.75/.75,.75,.75/0,0,.75/0,0,0,.25} +\XC@@names \endinput diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf index 9deffa7cd7..8ba659bfe1 100644 Binary files a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf and b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf differ diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex index 300a92293f..ec1fd68cac 100644 --- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex +++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex @@ -38,6 +38,7 @@ \usepackage{listofitems} \usepackage{xintexpr} \usepackage{codehigh} +\usepackage{scontents} \usepackage{hyperref} \urlstyle{same} \hypersetup{pdfborder=0 0 0} @@ -55,8 +56,8 @@ \setlength{\parindent}{0pt} \definecolor{LightGray}{gray}{0.9} -\def\PLversion{1.2.2} -\def\PLdate{15 Août 2022} +\def\PLversion{1.2.3} +\def\PLdate{24 Août 2022} \tcbset{vignettes/.style={% nobeforeafter,box align=base,boxsep=0pt,enhanced,sharp corners=all,rounded corners=southeast,% @@ -906,7 +907,208 @@ Pour \textit{illustrer} un peu les \Cle{clés}, un petit schéma, avec les diff \newpage -\section{Code \& Console Python} +\section{Code Python \og simple \fg} + +\subsection{Introduction} + +\begin{codeidee} +Le {package} \ctex{listings} permet d'insérer et de formater du code, notamment du code Python. En \textit{partenariat} avec \ctex{tcolorbox}, on peut donc présenter \textit{joliment} du code python ! +\end{codeidee} + +\begin{codeinfo} +Le package \ctex{listings} ne nécessite pas de compilation particulière, au contraire d'autres (comme \ctex{pythontex} ou \ctex{minted}) qui seront présentés à la section suivante. +\end{codeinfo} + +\medskip + +\begin{codeinfo} +Le style utilisé pour formater le code Python n'est pas modifiable. Il donne un rendu proche de celui des packages commes \ctex{pythontex} ou \ctex{minted}. + +\smallskip + +Donc, si plusieurs \textit{méthodes} sont utilisées pour insérer du code Python (via les sections suivantes), le rendu peut être légèrement différent. +\end{codeinfo} + +\subsection{Présentation de code Python grâce à listings} + +\begin{codeidee} +L'environnement \ctex{\textbackslash envcodepython} (chargé par \ctex{ProfLycee} permet de présenter du code python, dans une \ctex{tcolorbox} avec un style particulier. +\end{codeidee} + +\smallskip + +\begin{codetex}[listing only] +\begin{envcodepython}(*)[largeur]{commandes tcbox} +... +\end{envcodepython} +\end{codetex} + +\smallskip + +\begin{codecles} +Plusieurs \Cle{arguments} sont disponibles : + +\begin{itemize} + \item la version \textit{étoilée} qui permet de ne pas afficher les numéros de lignes ; + \item le premier argument (optionnel), concerne la \Cle{largeur} de la \ctex{tcbox} ;\hfill{}défaut \Cle{\textbackslash linewidth} + \item le second argument (mandataire), concerne des \Cle{options} de la \ctex{tcbox} en \textit{langage tcolorbox}, comme l'alignement. +\end{itemize} +\end{codecles} + +\smallskip + +\begin{codeinfo} +Les environnements \ctex{DeclareTCBListing} créés par \ctex{tcolorbox} et \ctex{listings} ne sont pas compatibles avec les options \Cle{gobble} (pour supprimer les tabulations d'environnement), donc il faut bien penser à \og aligner \fg{} le code à gauche, pour éviter des tabulations non esthétiques ! +\end{codeinfo} + +\subsection{Insertion via un fichier \og externe \fg} + +\begin{codeidee} +Pour des raison pratiques, il est parfois intéressant d'avoir le code Python dans un fichier externe au ficher \ctex{tex}, ou bien créé directement par le fichier \ctex{tex} (via \ctex{scontents}, notamment, mais non chargé par \ctex{ProfLycee}). + +Dans ce cas, il n'est pas nécessaire d'aligner le code \og à gauche \fg, en utilisant une commande alternative. + +\smallskip + +Si cette méthode est utilisée, il ne faut oublier de charger le package \ctex{scontents}. +\end{codeidee} + +\begin{codetex}[listing only] +\usepackage{scontents} %si script déclaré dans le fichier tex +... +\envcodepythonfichier(*)[largeur]{commandes tcbox}{