texlive[63667] Master: simples-matrices (20jun22)

commits+karl at tug.org commits+karl at tug.org
Mon Jun 20 23:09:21 CEST 2022


Revision: 63667
          http://tug.org/svn/texlive?view=revision&revision=63667
Author:   karl
Date:     2022-06-20 23:09:21 +0200 (Mon, 20 Jun 2022)
Log Message:
-----------
simples-matrices (20jun22)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/simples-matrices/
    trunk/Master/texmf-dist/doc/latex/simples-matrices/LISEZMOI.md
    trunk/Master/texmf-dist/doc/latex/simples-matrices/MANIFEST.md
    trunk/Master/texmf-dist/doc/latex/simples-matrices/README.md
    trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices-eng.pdf
    trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices-eng.tex
    trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices-fra.pdf
    trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices-fra.tex
    trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices.pdf
    trunk/Master/texmf-dist/source/latex/simples-matrices/
    trunk/Master/texmf-dist/source/latex/simples-matrices/simples-matrices.dtx
    trunk/Master/texmf-dist/source/latex/simples-matrices/simples-matrices.ins
    trunk/Master/texmf-dist/tex/latex/simples-matrices/
    trunk/Master/texmf-dist/tex/latex/simples-matrices/simples-matrices.sty
    trunk/Master/tlpkg/tlpsrc/simples-matrices.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/simples-matrices/LISEZMOI.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/simples-matrices/LISEZMOI.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/simples-matrices/LISEZMOI.md	2022-06-20 21:09:21 UTC (rev 63667)
@@ -0,0 +1,24 @@
+<!-- Time-stamp: <2022-06-19 17:54:55 Yvon Henel (TdS)> -->
+
+# simples-matrices
+
+Auteur: Yvon Henel, alias _Le TeXnicien de surface_
+([contact](le.texnicien.de.surface at yvon-henel.fr))
+
+## LICENCE
+
+Le contenu de cette archive est placé sous la « LaTeX Project Public License ».
+Voir http://www.ctan.org/license/lppl1.3c 
+pour la licence.
+
+© 2022 Yvon Henel (Le TeXnicien de surface)
+
+## Description de l’extension
+
+Cette extension fournit des commandes pour définir et écrire des
+matrices en donnant leurs coefficients, par ligne, dans une liste de
+valeurs séparées par des virgules.
+
+## Historique
+
+* Version 1.0 — 2022-06-19 — Première version publique


Property changes on: trunk/Master/texmf-dist/doc/latex/simples-matrices/LISEZMOI.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/simples-matrices/MANIFEST.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/simples-matrices/MANIFEST.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/simples-matrices/MANIFEST.md	2022-06-20 21:09:21 UTC (rev 63667)
@@ -0,0 +1,103 @@
+# Manifest for simples-matrices
+
+This file is a listing of all files considered to be part of this package.
+It is automatically generated with `l3build manifest`.
+
+
+## Repository manifest
+
+The following groups list the files included in the development repository of the package.
+Files listed with a ‘†’ marker are included in the TDS but not CTAN files, and files listed
+with ‘‡’ are included in both.
+
+### Source files
+
+These are source files for a number of purposes, including the `unpack` process which
+generates the installation files of the package. Additional files included here will also
+be installed for processing such as testing.
+
+* simples-matrices.dtx ‡
+* simples-matrices.ins ‡
+
+### Typeset documentation source files
+
+These files are typeset using LaTeX to produce the PDF documentation for the package.
+
+* simples-matrices.dtx ‡
+
+### Documentation files
+
+These files form part of the documentation but are not typeset. Generally they will be
+additional input files for the typeset documentation files listed above.
+
+* LISEZMOI.md ‡
+* MANIFEST.md ‡
+* README.md ‡
+
+### Text files
+
+Plain text files included as documentation or metadata.
+
+* LISEZMOI.md ‡
+* MANIFEST.md ‡
+* README.md ‡
+
+### Derived files
+
+The files created by ‘unpacking’ the package sources. This typically includes
+`.sty` and `.cls` files created from DocStrip `.dtx` files.
+
+* simples-matrices.sty †
+
+### Typeset documents
+
+The output files (PDF, essentially) from typesetting the various source, demo,
+etc., package files.
+
+* simples-matrices.pdf ‡
+
+
+## TDS manifest
+
+The following groups list the files included in the TeX Directory Structure used to install
+the package into a TeX distribution.
+
+### Source files (TDS)
+
+All files included in the `simples-matrices/source` directory.
+
+* simples-matrices.dtx 
+* simples-matrices.ins 
+
+### TeX files (TDS)
+
+All files included in the `simples-matrices/tex` directory.
+
+* simples-matrices.sty 
+
+### Doc files (TDS)
+
+All files included in the `simples-matrices/doc` directory.
+
+* LISEZMOI.md 
+* MANIFEST.md 
+* README.md 
+* simples-matrices-eng.pdf 
+* simples-matrices-fra.pdf 
+* simples-matrices.pdf 
+
+
+## CTAN manifest
+
+The following group lists the files included in the CTAN package.
+
+### CTAN files
+
+* LISEZMOI.md 
+* MANIFEST.md 
+* README.md 
+* simples-matrices-eng.pdf 
+* simples-matrices-fra.pdf 
+* simples-matrices.dtx 
+* simples-matrices.ins 
+* simples-matrices.pdf 


Property changes on: trunk/Master/texmf-dist/doc/latex/simples-matrices/MANIFEST.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/simples-matrices/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/simples-matrices/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/simples-matrices/README.md	2022-06-20 21:09:21 UTC (rev 63667)
@@ -0,0 +1,26 @@
+<!-- Time-stamp: <2022-06-19 17:54:49 Yvon Henel (TdS)> -->
+
+# simples-matrices
+
+Author: Yvon Henel, aka Le TeXnicien de surface
+([contact](le.texnicien.de.surface at yvon-henel.fr))
+
+## LICENCE
+
+This material is subject to the LaTeX Project Public License. 
+See http://www.ctan.org/license/lppl1.3c 
+for the details of that license.
+
+© 2022 Yvon Henel (Le TeXnicien de surface)
+
+## Description of the Package
+
+This package provides macros to define and write matrices the
+coefficients of which are given, row by row, in a list of values
+separated by commas.
+
+## History
+
+* Version 1.0 — 2022-06-19 — First public version
+
+


Property changes on: trunk/Master/texmf-dist/doc/latex/simples-matrices/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices-eng.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices-eng.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices-eng.pdf	2022-06-20 21:08:21 UTC (rev 63666)
+++ trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices-eng.pdf	2022-06-20 21:09:21 UTC (rev 63667)

Property changes on: trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices-eng.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices-eng.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices-eng.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices-eng.tex	2022-06-20 21:09:21 UTC (rev 63667)
@@ -0,0 +1,519 @@
+%%
+%% This is file `simples-matrices-eng.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% simples-matrices.dtx  (with options: `doc,ENG')
+%% 
+%% Do not distribute this file without also distributing the
+%% source files specified above.
+%% 
+%% Do not distribute a modified version of this file.
+%% 
+%% File: simples-matrices.dtx
+%% Copyright (C) 2022 Yvon Henel aka Le TeXnicien de surface
+%%
+%% It may be distributed and/or modified under the conditions of the
+%% LaTeX Project Public License (LPPL), either version 1.3c of this
+%% license or (at your option) any later version.  The latest version
+%% of this license is in the file
+%%
+%%    http://www.latex-project.org/lppl.txt
+%%
+\RequirePackage{expl3}[2020/01/12]
+\GetIdInfo$Id: simples-matrices.dtx 1.0 2022-06-19 TdS $
+  {}
+\documentclass[full]{l3doc}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage[french,main=english]{babel}
+\usepackage{xparse}
+\usepackage{simples-matrices}
+\newcommand\BOP{\discretionary{}{}{}}
+\usepackage{xspace}
+\usepackage{csquotes}
+\usepackage{fancyvrb,fancyvrb-ex}
+\usepackage{mathtools}
+\usepackage{delarray}
+\usepackage{nicematrix}
+
+\providecommand\darg[3]{ \texttt{#1} \meta{#2} \texttt{#3} }
+
+\newcommand{\UnExemple}{%
+  \par \medskip \par \noindent
+  \begin{minipage}[c]{0.58\linewidth}
+    \VerbatimInput[gobble=0, frame=single]{code00.tex}
+  \end{minipage}
+  \hspace{\stretch{1}}
+  \begin{minipage}[c]{0.38\linewidth}
+    \input{code00}
+  \end{minipage}
+  \par \medskip}
+
+\begin{document}
+\title{\pkg{simples-matrices} user guide\thanks{This file describes
+    version~\ExplFileVersion, last revised~\ExplFileDate.\\
+    \emph{In memory of my maternal grandmother} Adrienne \textsc{Binaut}
+    (1908-03-23 -- 1997-06-08).}  }
+\author{Yvon Henel\thanks{E-mail:
+    \href{mailto:le.texnicien.de.surface at yvon-henel.fr}
+    {le.texnicien.de.surface at yvon-henel.fr}}}
+\maketitle
+\noindent\hrulefill
+
+\begin{abstract}
+A package to write matrices which are defined with a list of comma separated
+coefficients read by row.
+
+A macro enables the definition of a named matrix, another enables the writing of
+a named matrix. This package provides also some shortcuts for identity matrices
+and null matrices.
+
+The name of this package and of its macros are French based for there are
+already too many macros using the word ``matrix'' itself. The French
+``\foreignlanguage{french}{simples matrices}'' means ``simple
+matrices''. \emph{Just a letter apart!}
+\end{abstract}
+
+\noindent\hrulefill
+
+ \begin{otherlanguage}{french}
+\begin{abstract}
+Une extension pour écrire des matrices en donnant les coefficients par ligne
+sous la forme d'une liste de valeurs séparées par des virgules.
+
+Une macro permet de définir des matrices nommées et une autre permet d'écrire
+les matrices nommées. L'extension fournit également quelques raccourcis pour les
+matrices identité et les matrices nulles.
+
+La documentation française pour l'utilisateur de l'extension
+\pkg{simples-matrices} est disponible sous le nom de \texttt{simples-matrices-fra}.
+\end{abstract}
+\end{otherlanguage}
+
+\noindent\hrulefill
+
+\tableofcontents{}
+
+\vspace{3\baselineskip}
+
+The package \pkg{simples-matrices} requires \pkg{xparse} and \pkg{l3keys2e} used
+to define macros and manage key-options. It loads \pkg{amsmath} as well for
+ensuring a correct presentation of matrices.
+
+\textbf{Beware}: you have to provide the suitable mathematical environment to
+use the macros which print a matrix. Only the unstarred version of
+\cs{declarermatrice} may be used outside math-mode.
+
+
+\section{The Macros}
+\label{sec:macros}
+
+\pkg{simples-matrices} offers six main document macros.
+
+
+\subsection{Main Macros}
+\label{sec:main}
+
+This package has five main document macros viz.
+\begin{function}{\matrice}
+  \begin{syntax}
+    \cs{matrice}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\oarg{type}\marg{clist of coefficients}
+  \end{syntax}
+  where \meta{prefix} has the same meaning as the key \texttt{prefix};
+  \meta{clist of key-value pairs}, optional and void by default, can be used to
+  redefined the matrix-like environment; \meta{type} is a string of character
+  the usage of which is explained later ---see \ref{sec:matrix-type}--- and
+  \meta{clist of coefficients} is a clist of the coefficients of the matrix
+  given by row order.
+
+  The French \emph{matrice} means ``matrix''.
+
+  With \verb+\(\matrice{1, 2, 3, 4}\)+ we obtain \(\matrice{1, 2, 3, 4}\).
+
+  With \verb+\(\matrice(b)[3]{1, 2, 3, 4, 5, 6}\)+
+  we obtain \(\matrice(b)[3]{1, 2, 3, 4, 5, 6}\).
+
+\end{function}
+
+\begin{function}{\declarermatrice}
+  \begin{syntax}
+    \cs{declarermatrice*}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\marg{matrix name}\oarg{type}\marg{clist of coefficients}
+  \end{syntax}
+  where \meta{matrix name} is the name of the matrix to be used afterwards. The
+  other arguments, optional or mandatory, have the same meaning than above. The
+  starred version defines and prints the matrix. The unstarred version only
+  defines it.
+
+  The definition is global but one can redefine an existing named matrix with
+  the same function. \textbf{No check is done} to ensure that one is not
+  redefining a previously defined matrix.
+
+  The French \emph{déclarer une matrice} means ``declare a matrix''.
+
+\end{function}
+
+\begin{function}{\lamatrice}
+  \begin{syntax}
+    \cs{lamatrice}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\marg{matrix name}
+  \end{syntax}
+  prints the previously defined matrix the name of which is given by
+  \meta{matrix name}. The two optional arguments have the meaning as before.
+
+  The French \emph{la matrice} means ``the matrix''.
+\end{function}
+
+\begin{function}{\MatriceInterieur}
+  \begin{syntax}
+    \cs{MatriceInterieur}
+  \end{syntax}
+  gives the inner part of the last printed ---via \cs{matrice}--- or defined
+  ---via \cs{declarermatrice}--- matrix. It can be used inside an
+  \env{array}-like environment.
+
+  The French should be \emph{\foreignlanguage{french}{intérieur de la matrice}}
+  which means ``inside of the matrix''. What is implicit is the adjective
+  ``anonymous''. For named matrix see below.
+\end{function}
+
+\begin{function}{\LaMatriceInterieur}
+  \begin{syntax}
+    \cs{LaMatriceInterieur}\marg{matrix name}
+  \end{syntax}
+  gives the inner part of the matrix with name \meta{matrix name}. It can be
+  used inside an \env{array}-like environment.
+
+  Again false French but the parallel with \cs{lamatrice} should suggest that,
+  now, the matrix has a name and we have to use it.
+\end{function}
+
+See examples on page~\pageref{sec:examples}.
+
+\subsection{Setting the Keys}
+\label{sec:setting-keys}
+
+One can change the values of the keys of \pkg{simples-matrices} with
+\begin{function}{\simplesmatricessetup}
+  \begin{syntax}
+    \cs{simplesmatricessetup}\marg{clist of key-value pairs}
+  \end{syntax}
+  where \meta{clist of key-value pairs} is the usual clist of key-value pairs
+  setting one or many of the three keys of the package as presented on
+  page~\pageref{sec:keys}.
+
+  To stick to established convention the name of this macro is created from the
+  name of the package (reduced to \TeX{} letters) followed by \emph{setup}. I
+  apologize for that strange linguistic mixture.
+
+\end{function}
+\subsection{Shortcuts}
+\label{sec:shortcuts}
+
+There are also two \emph{shortcut} macros:
+
+\begin{function}{\matid}
+  \begin{syntax}
+    \cs{matid}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\oarg{coefficient}\marg{number of columns}
+  \end{syntax}
+  which write the identity matrix --- by default --- with \meta{number of
+    columns} columns. If \meta{coefficient} is given, we obtain a diagonal
+  matrix with all its coefficients equal to \meta{coefficient}.
+
+  The two first optional arguments have the same functionality as in the
+  preceding macros.
+
+  \emph{matid} stands for ``\foreignlanguage{French}{matrice identité}'' which means
+  ``identity matrix''.
+\end{function}
+
+\begin{function}{\matnulle}
+  \begin{syntax}
+    \cs{matnulle}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\oarg{coefficient}\marg{number of columns}
+  \end{syntax}
+  writes the null matrix with \meta{number of columns} columns ---by default---
+  or a matrix containing with \meta{number of columns} columns and all
+  coefficients equal to \meta{coefficient}.
+
+  The two first optional arguments have the same functionality as in the
+  preceding macros.
+
+  \emph{matnulle} stands for ``\foreignlanguage{French}{matrice nulle}'' which means
+  ``null matrix''.
+\end{function}
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\(\matid{3}\)\qquad \(\matid[9]{3}\)
+\par \medskip
+\(\matnulle{3}\)\qquad \(\matnulle[2]{3}\)
+\end{VerbatimOut}
+\UnExemple{}
+
+\section{The Package Options}
+\label{sec:keys}
+
+The package uses key-value options. There are four keys:
+\texttt{envir},
+\texttt{prefix},
+\texttt{typeord}
+and
+\texttt{argopt}.
+
+\begin{description}
+\item[\texttt{envir} (\textit{\texttt{string}})] the main and last part of the
+  name of the environment used to print the matrix. Its initial value is
+  \texttt{matrix}.
+
+\item[\texttt{prefix} (\textit{\texttt{string}})] a string which is prefixed to
+  \texttt{envir} to obtain the complete name of the environment. Its initial
+  value is \texttt{p}. Therefore, by default, the environment used to print the
+  matrix is \texttt{bmatrix} as defined by \pkg{amsmath}.
+
+\item[\texttt{typeord} (\textit{\texttt{string}})] a string which is the
+  ordinary ---i.~e. default--- value of the \meta{type} optional argument. The
+  initial value of the key is \texttt{C}.
+
+\item[\texttt{argopt} (\textit{\texttt{token list}})] for French
+  \foreignlanguage{french}{\emph{argument optionnel}} (optional argument). That
+  key is initially void. See page~\pageref{sec:delarray} for usage.
+\end{description}
+
+Moreover, an other key is available which is not an option of the package:
+\texttt{out-of-box} which is a metakey.
+
+With |\simplesmatricessetup{out-of-box}| we obtain the same effect as with
+|\simplesmatricessetup{prefix=p,|\BOP| envir=matrix,|%
+  \BOP| argopt=,|\BOP| typeord=C}|.
+
+
+\section{Examples}
+\label{sec:examples}
+\subsection{Without any special package}
+\label{sec:amsmath}
+
+That is with only \pkg{amsmath} loaded as done by this package.
+
+\subsubsection{Declaration and Usage}
+\label{sec:declar}
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\declarermatrice{A}{1, 2, 300, 400}
+\(\declarermatrice*{B}{a, b, c, d}\)
+\qquad \(\lamatrice{A}\) \par \bigskip
+\(\lamatrice(V){A}\)
+\qquad \(\lamatrice(b){B}\)
+\end{VerbatimOut}
+\UnExemple{}
+
+\subsubsection{The ``\texttt{type}'' argument}
+\label{sec:matrix-type}
+
+The last but one --- optional --- argument of macros \cs{matrice} and
+\cs{declarermatrice} defaults to \texttt{O}. In that case the value of the key
+\texttt{typeord} is used to determine the \emph{type} of the matrix input,
+see~\pageref{sec:matrix-type-key}.
+
+Its value can be a number, in which case it is the number of columns, or a
+string ---presently a one letter string--- among: \texttt{C}, \texttt{D},
+\texttt{I}, \texttt{J}, \texttt{S}, \texttt{T} and \texttt{x}.
+
+
+\medskip{}
+
+ \texttt{C} means square matrix for French ``\texttt{C}arré'' means ``square''.
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\[
+\matrice{1, 2, 3, 4, 5, 6, 7, 8, 9}
+\qquad
+\matrice[C]{1, 2, 3, 4, 5, 6, 7, 8, 9}
+\]
+\end{VerbatimOut}
+\UnExemple{}
+
+ \texttt{D} means \textbf{diagonal} matrix.
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\[
+  \matrice{1, 2, 3, 4}\qquad
+  \matrice[D]{1, 2, 3, 4}
+\]
+\end{VerbatimOut}
+\UnExemple{}
+
+\texttt{I} means lower triangular matrix. French ``\texttt{I}nférieur'' means
+``lower''; \texttt{J} means lower triangular matrix with zeros on the diagonal.
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\[
+  \matrice[I]{1, 2, 3}\qquad
+  \matrice[J]{1, 2, 3}
+\]
+\end{VerbatimOut}
+\UnExemple{}
+
+\texttt{S} means upper triangular matrix. French ``\texttt{S}upérieur'' means
+``upper''; \texttt{T} means upper triangular matrix with zeros on the diagonal.
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\[
+  \matrice[S]{1, 2, 3}\qquad
+  \matrice[T]{1, 2, 3}
+\]
+\end{VerbatimOut}
+\UnExemple{}
+
+\texttt{x} means \texttt{xcas}. With that value, one can copy-paste from
+\texttt{xcas} into the \LaTeX{} document.
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\[
+  \matrice[x]{[[7,1,3],[1,0,3],[5,1,2]]}
+\]
+\end{VerbatimOut}
+\UnExemple{}
+
+A number sets up the number of columns of the matrix.
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\[
+  \matrice[2]{1, 2, 3, 4, 5, 6}
+  \quad
+  \matrice[3]{1, 2, 3, 4, 5, 6}
+\]
+\end{VerbatimOut}
+\UnExemple{}
+
+\subsubsection{Using the ``\texttt{typeord}'' Key}
+\label{sec:matrix-type-key}
+
+In this document, the key \texttt{typeord} has the initial value of~\texttt{C}.
+
+
+\medskip{}
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\simplesmatricessetup{typeord=3}
+\(\matrice{1, 2, 3, 4, 5, 6}\)
+\simplesmatricessetup{typeord=2}
+\(\matrice{1, 2, 3, 4, 5, 6}\)
+\simplesmatricessetup{typeord=C}
+\(\matrice{1, 2, 3, 4}\)
+\end{VerbatimOut}
+\UnExemple{}
+
+The preceding code is but a mere illustration. In order to declare a type for
+one matrix it's more convenient to use the optional argument. However if one
+wants to write a lesson about upper triangular matrices\dots{}
+
+\subsubsection{Using the \cs{(La)MatriceInterieur} Macros}
+\label{sec:matint}
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\declarermatrice{B}[4]{
+\hline ein, zwei, drei, vier,
+\hline unos, dos, tres, cuatro,
+\hline unu, du, tri, kvar}
+\declarermatrice{A}[3]{one, two, three,
+un, deux, trois, uno, due, tre}
+\begin{tabular}{*{3}{l}}
+\MatriceInterieur
+\end{tabular}
+\par \medskip
+\begin{tabular}{|*{4}{l|}}
+\LaMatriceInterieur{B}\hline
+\end{tabular}
+\end{VerbatimOut}
+\UnExemple{}
+
+\subsection{Changing the Look}
+\label{sec:changelook}
+
+We can load other packages which deal with matrices such as \pkg{mathtools},
+\pkg{delarray} or \pkg{nicematrix}. In that case we can change the look of our
+matrices thanks to the option-key \texttt{envir}, \texttt{prefix} and
+\texttt{argopt}.
+
+This document loads the three packages \pkg{mathtools}, \pkg{delarray} and
+\pkg{nicematrix} in order to give the following examples.
+
+
+
+\subsubsection{With \pkg{mathtools}}
+\label{sec:mathtools}
+
+As already stated above there are two ways to use the option-keys: through
+\cs{simplesmatricesetup} or through the optional argument
+\darg{\string<}{clist of pairs of key-value}{\string>}. I show both.
+
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\simplesmatricessetup{
+  envir=matrix*, prefix=p, argopt=[r]}
+\(\matrice{1, 2, 30, 40}\) \qquad
+\simplesmatricessetup{out-of-box}
+\(\matrice{1, 2, 30, 40}\)
+\par \medskip
+\(\matrice(b)<envir=matrix*, argopt=[l]>
+    {1, 2, 30, 40}\)
+\end{VerbatimOut}
+\UnExemple{}
+
+\subsubsection{With \pkg{delarray}}
+\label{sec:delarray}
+
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\simplesmatricessetup{
+  envir=array, prefix=,
+  argopt=[c][{l c r}\}}
+\(\matrice{1, 2, 30, 40}\) \qquad
+\(\matid()<envir=array,
+  argopt={[c][{@{}l c r@{}}\}}>{3}\)
+\end{VerbatimOut}
+\UnExemple{}
+\simplesmatricessetup{out-of-box}
+
+\subsubsection{With \pkg{nicematrix}}
+\label{sec:nicematrix}
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\(\matrice<prefix=b, envir=NiceArray,
+argopt={{*{2}{c}|cc}}>{1, 2, 3, 4, 5, 6,
+7, 8, 9, 10, 11, 12, 13, 14, 15, 16}\)
+\end{VerbatimOut}
+ %| emacs
+\UnExemple{}
+
+In that case we need to double the curly braces around the column descriptors of
+the \texttt{array} environment because the first level is stripped off by
+\LaTeX{} when valuating the key.
+
+In the following example, for the second matrix, it is not necessary to surround
+the value of \texttt{argopt} with an extra pair of curly braces ---even if it is
+not dangerous--- for the presence of \texttt{[margin]} prevents \LaTeX{} to
+strip off the curly braces.
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\(\matrice<prefix=b, envir=NiceArray,
+argopt={{l c r}}>{1, 2, 3, 40, 50, 60,
+  700, 800, 900}\)
+\par \medskip
+\(\matrice<prefix=b, envir=NiceArray,
+argopt={l c r}[margin]>{1, 2, 3,
+  40, 50, 60, 700, 800, 900}\)
+\par \medskip
+\(\matrice<prefix=b, envir=NiceArray,
+argopt={{l c r}[margin]}>{1, 2, 3,
+  40, 50, 60, 700, 800, 900}\)
+\end{VerbatimOut}
+\UnExemple{}
+
+\vspace{\stretch{2}}
+
+\noindent\hspace*{0.2\textwidth}\hrulefill\hspace*{0.2\textwidth}
+\begin{center}
+  \textsl{Le TeXnicien de Surface scripsit.}
+\end{center}
+\noindent\hspace*{0.2\textwidth}\hrulefill\hspace*{0.2\textwidth}
+
+\vspace*{\stretch{2}}
+
+\end{document}
+\endinput
+%%
+%% End of file `simples-matrices-eng.tex'.


Property changes on: trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices-eng.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices-fra.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices-fra.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices-fra.pdf	2022-06-20 21:08:21 UTC (rev 63666)
+++ trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices-fra.pdf	2022-06-20 21:09:21 UTC (rev 63667)

Property changes on: trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices-fra.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices-fra.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices-fra.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices-fra.tex	2022-06-20 21:09:21 UTC (rev 63667)
@@ -0,0 +1,500 @@
+%%
+%% This is file `simples-matrices-fra.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% simples-matrices.dtx  (with options: `doc,FRA')
+%% 
+%% Do not distribute this file without also distributing the
+%% source files specified above.
+%% 
+%% Do not distribute a modified version of this file.
+%% 
+%% File: simples-matrices.dtx
+%% Copyright (C) 2022 Yvon Henel aka Le TeXnicien de surface
+%%
+%% It may be distributed and/or modified under the conditions of the
+%% LaTeX Project Public License (LPPL), either version 1.3c of this
+%% license or (at your option) any later version.  The latest version
+%% of this license is in the file
+%%
+%%    http://www.latex-project.org/lppl.txt
+%%
+\RequirePackage{expl3}[2020/01/12]
+\GetIdInfo$Id: simples-matrices.dtx 1.0 2022-06-19 TdS $
+  {}
+\documentclass[full]{l3doc}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage[english,main=french]{babel}
+\usepackage{xparse}
+\usepackage{simples-matrices}
+\newcommand\BOP{\discretionary{}{}{}}
+\usepackage{xspace}
+\usepackage{csquotes}
+\usepackage{fancyvrb,fancyvrb-ex}
+\usepackage{mathtools}
+\usepackage{delarray}
+\usepackage{nicematrix}
+
+\providecommand\darg[3]{ \texttt{#1} \meta{#2} \texttt{#3} }
+
+\newcommand{\UnExemple}{%
+  \par \medskip \par \noindent
+  \begin{minipage}[c]{0.58\linewidth}
+    \VerbatimInput[gobble=0, frame=single]{code00.tex}
+  \end{minipage}
+  \hspace{\stretch{1}}
+  \begin{minipage}[c]{0.38\linewidth}
+    \input{code00}
+  \end{minipage}
+  \par \medskip}
+
+\begin{document}
+\title{Guide de l'utilisateur de \pkg{simples-matrices}\thanks{Ce fichier décrit
+    la version~\ExplFileVersion, dernière révision~\ExplFileDate.\\
+    \emph{En souvenir de ma grand-mère maternelle}, Adrienne \textsc{Binaut}
+    (1908-03-23 -- 1997-06-08).}  }
+\author{Yvon Henel\thanks{E-mail:
+    \href{mailto:le.texnicien.de.surface at yvon-henel.fr}
+    {le.texnicien.de.surface at yvon-henel.fr}}}
+\maketitle
+\noindent\hrulefill
+
+\begin{abstract}
+Une extension pour écrire des matrices en donnant les coefficients par ligne
+sous la forme d'une liste de valeurs séparées par des virgules.
+
+Une macro permet de définir des matrices nommées et une autre permet d'écrire
+les matrices nommées. L'extension fournit également quelques raccourcis pour les
+matrices identité et les matrices nulles.
+\end{abstract}
+
+\noindent\hrulefill
+
+ \begin{otherlanguage}{english}
+\begin{abstract}
+A package to write matrices which are defined with a list of comma separated
+coefficients read by row.
+
+A macro enables the definition of a named matrix, another enables the writing of
+a named matrix. This package provides also some shortcuts for identity matrices
+and null matrices.
+
+The name of this package and of its macros are French based for there are
+already too many macros using the word ``matrix'' itself. The French
+``\foreignlanguage{french}{simples matrices}'' means ``simple
+matrices''. \emph{Just a letter apart!}
+
+The English documentation for the final user of the package
+\pkg{simples-matrices} is available in the file \texttt{simples-matrices-eng}.
+\end{abstract}
+\end{otherlanguage}
+
+\noindent\hrulefill
+
+\tableofcontents{}
+
+\vspace{3\baselineskip}
+
+L'extension \pkg{simples-matrices} utilise \pkg{xparse} et \pkg{l3keys2e} pour
+définir ses macros et gérer les clés d'option. Elle charge également
+\pkg{amsmath} pour obtenir une présentation convenable des matrices.
+
+\textbf{Attention}: vous devez fournir l'environnement mathématique adéquat pour
+utiliser les macros qui écrivent les matrices. Seule la version non-étoilée de
+\cs{declarermatrice} peut être utilisée en dehors du mode mathématique.
+
+\section{Les macros}
+\label{sec:macros}
+
+L'extension \pkg{simples-matrices} offre six macros de document.
+
+
+\subsection{Macros principales}
+\label{sec:principales}
+
+Les cinq macros principales de document sont les suivantes:
+
+\begin{function}{\matrice}
+  \begin{syntax}
+    \cs{matrice}\parg{prefixe}\darg{\string<}{vliste de paires de clé-valeur}{\string>}\oarg{type}\marg{vliste des coefficients}
+  \end{syntax}
+  où \meta{prefixe} a la même fonction que la clé \texttt{prefix}; \meta{vliste
+    de paires de clé-valeur}, optionnel et vide par défaut, peut être utiliser
+  pour redéfinit l'environnement de type \texttt{matrix};
+  \meta{type} est une chaine de caractère dont l'utilisation sera expliquée
+  ci-dessous --- voir~\ref{sec:matrix-type} --- et \meta{vliste des
+    coefficients} est la vliste des coefficients de la matrice donnés ligne par
+  ligne.
+
+  Avec \verb+\(\matrice{1, 2, 3, 4}\)+ on obtient \(\matrice{1, 2, 3, 4}\).
+
+  Avec \verb+\(\matrice(b)[3]{1, 2, 3, 4, 5, 6}\)+
+  on obtient \(\matrice(b)[3]{1, 2, 3, 4, 5, 6}\).
+
+\end{function}
+
+\begin{function}{\declarermatrice}
+  \begin{syntax}
+    \cs{declarermatrice*}\parg{prefix}\darg{\string<}{vliste de paires de clé-valeur}{\string>}\marg{nom}\oarg{type}\marg{vliste des coefficients}
+  \end{syntax}
+  où \meta{nom} est le nom de la matrice pour utilisation future. Les autres
+  arguments, optionnels ou obligatoires, ont la même signification que
+  ci-dessus. La version étoilée définit et écrit la matrice. La version
+  non-étoilée ne fait que la définir.
+
+  La définition est global mais on peut redéfinir une matrice nommée existante
+  avec la même fonction. \textbf{Aucun contrôle} n'est exercé pour s'assurer que
+  l'on n'est pas en train de redéfinir une matrice nommée précédemment définie.
+\end{function}
+
+\begin{function}{\lamatrice}
+  \begin{syntax}
+    \cs{lamatrice}\parg{prefix}\darg{\string<}{vliste de paires de clé-valeur}{\string>}\marg{matrix name}
+  \end{syntax}
+  écrit la matrice nommée de nom \meta{nom}.
+  Les deux arguments optionnels ont la même signification que ci-dessus.
+\end{function}
+
+\begin{function}{\MatriceInterieur}
+  \begin{syntax}
+    \cs{MatriceInterieur}
+  \end{syntax}
+  donne l'intérieur de la dernière matrice écrite --- via \cs{matrice} --- ou
+  définie --- via \cs{declarermatrice}. On peut l'utiliser dans un environnement
+  du genre \env{array}.
+\end{function}
+
+\begin{function}{\LaMatriceInterieur}
+  \begin{syntax}
+    \cs{LaMatriceInterieur}\marg{nom}
+  \end{syntax}
+  donne l'intérieur de la matrice de nom \meta{nom}. On peut l'utiliser dans un
+  environnement du genre \env{array}.
+\end{function}
+
+Voir les exemples en page~\pageref{sec:exemples}.
+
+\subsection{Valuer les clés}
+\label{sec:setting-keys}
+
+On peut changer les valeurs des clés de \pkg{simples-matrices} avec
+\begin{function}{\simplesmatricessetup}
+  \begin{syntax}
+    \cs{simplesmatricessetup}\marg{vliste de paires de clé-valeur}
+  \end{syntax}
+  où \meta{vliste de paires de clé-valeur} est l'habituelle vliste de paires de
+  clé-valeur valuant une ou plusieurs des trois clés de cette extension
+  telles que présentées ci-dessous en page~\pageref{sec:clefs}.
+
+  Pour suivre une convention désormais bien établie le nom de cette macro
+  consiste en le nom de l'extension --- réduite à ces lettres \TeX{}iennes ---
+  suivi de l'anglais \emph{setup}. Je demande pardon pour cette étrange mixture
+  linguistique.
+
+\end{function}
+\subsection{Raccourcis}
+\label{sec:shortcuts}
+
+L'extension propose deux macros \emph{raccourcis}:
+
+\begin{function}{\matid}
+  \begin{syntax}
+    \cs{matid}\parg{prefix}\darg{\string<}{vliste de paires de clé-valeur}{\string>}\oarg{coefficient}\marg{nombre de colonnes}
+  \end{syntax}
+  qui imprime la matrice identité --- par défaut --- avec
+  \meta{nombre de colonnes} colonnes.
+  Si \meta{coefficient} est fourni, on obtient une matrice diagonale
+  dont tous les coefficients non-nuls sont égaux à \meta{coefficient}.
+
+  Les deux premiers arguments optionnels ont la même fonction que dans les
+  macros précédentes.
+\end{function}
+
+\begin{function}{\matnulle}
+  \begin{syntax}
+    \cs{matnulle}\parg{prefix}\darg{\string<}{vliste de paires de clé-valeur}{\string>}\oarg{coefficient}\marg{nombre de colonnes}
+  \end{syntax}
+  imprime la matrice nulle \meta{nombre de colonnes} colonnes --- par défaut ---
+  ou une matrice de \meta{nombre de colonnes} colonnes dont tous les
+  coefficients sont égaux à \meta{coefficient}.
+
+  Les deux premiers arguments optionnels ont la même fonction que dans les
+  macros précédentes.
+\end{function}
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\(\matid{3}\)\qquad \(\matid[9]{3}\)
+\par \medskip
+\(\matnulle{3}\)\qquad \(\matnulle[2]{3}\)
+\end{VerbatimOut}
+\UnExemple{}
+
+
+\section{Les options de l'extension}
+\label{sec:clefs}
+
+L'extension utilise le système de clefs-valeurs pour ses options. Elle possède
+quatre clés: \texttt{envir}, \texttt{prefix}, \texttt{typeord} et \texttt{argopt}.
+
+\begin{description}
+\item[\texttt{envir} (\textit{\texttt{chaine de caractères}})] la partie finale
+  du nom de l'environnement utilisé pour imprimer la matrice. Sa valeur initiale
+  est \texttt{matrix}.
+
+\item[\texttt{prefix} (\textit{\texttt{chaine de caractères}})], caractères
+  placés devant \texttt{envir} pour fournir le nom complet de l'environnement
+  utilisé pour imprimer la matrice. Sa valeur initiale est \texttt{p}. Cela fait
+  que l'environnement par défaut est \texttt{pmatrix} fourni par \pkg{amsmath}.
+
+\item[\texttt{typeord} (\textit{\texttt{chaine de caractères}})] définit la
+  valeur ordinaire --- c.-à-d. par défaut --- de l'argument optionnel
+  \meta{type}. La valeur initiale de la clé est \texttt{C}.
+
+\item[\texttt{argopt} (\textit{\texttt{liste de lexèmes}}, anglais:
+  \foreignlanguage{english}{token list})]. Cette clé est vide par défaut. Voir
+  page~\pageref{sec:delarray} pour son utilisation.
+\end{description}
+
+De plus, une clé supplémentaire existe qui est une métaclé:
+\texttt{out-of-box}.
+
+Avec |\simplesmatricessetup{out-of-box}| on obtient le même effet qu'avec
+|\simplesmatricessetup{prefix=p,|\BOP| envir=matrix,|%
+  \BOP| argopt=,|\BOP| typeord=C}|.
+
+\section{Exemples}
+\label{sec:exemples}
+\subsection{Sans extension particulière}
+\label{sec:amsmath}
+
+C'est-à-dire en chargeant uniquement \pkg{amsmath} comme le fait cette extension.
+
+\subsubsection{Déclaration et utilisation}
+\label{sec:declar}
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\declarermatrice{A}{1, 2, 300, 400}
+\(\declarermatrice*{B}{a, b, c, d}\)
+\qquad \(\lamatrice{A}\) \par \bigskip
+\(\lamatrice(V){A}\)
+\qquad \(\lamatrice(b){B}\)
+\end{VerbatimOut}
+\UnExemple{}
+
+
+\subsubsection{L'argument \og \texttt{type}\fg}
+\label{sec:matrix-type}
+
+L'avant dernier argument --- optionnel --- des macros \cs{matrice} et
+\cs{declarermatrice} vaut par défaut \texttt{O}. Dans ce cas, c'est la valeur de
+la clé \texttt{typeord} qui est utilisée pour déterminer le \emph{type} des
+données de la matrice, voir~\pageref{sec:matrix-type-key}.
+
+Sinon, il peut prendre une valeur numérique qui est le nombre de colonnes de la
+matrice ou encore une chaine de caractères --- à ce jour, une seule lettre ---
+parmi: \texttt{C}, \texttt{D}, \texttt{I}, \texttt{J}, \texttt{S}, \texttt{T} et
+\texttt{x}.
+
+\medskip{}
+
+ \texttt{C} signifie matrice \textbf{carrée}.
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\[
+\matrice{1, 2, 3, 4, 5, 6, 7, 8, 9}
+\qquad
+\matrice[C]{1, 2, 3, 4, 5, 6, 7, 8, 9}
+\]
+\end{VerbatimOut}
+\UnExemple{}
+
+ \texttt{D} signifie matrice \textbf{diagonale}.
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\[
+  \matrice{1, 2, 3, 4}\qquad
+  \matrice[D]{1, 2, 3, 4}
+\]
+\end{VerbatimOut}
+\UnExemple{}
+
+\texttt{I} signifie matrice triangulaire \textbf{inférieure}; \texttt{J}
+signifie matrice triangulaire inférieure avec des zéros sur la diagonale.
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\[
+  \matrice[I]{1, 2, 3}\qquad
+  \matrice[J]{1, 2, 3}
+\]
+\end{VerbatimOut}
+\UnExemple{}
+
+\texttt{S} signifie matrice triangulaire \textbf{supérieure}; \texttt{T}
+signifie matrice triangulaire supérieure avec des zéros sur la diagonale.
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\[
+  \matrice[S]{1, 2, 3}\qquad
+  \matrice[T]{1, 2, 3}
+\]
+\end{VerbatimOut}
+\UnExemple{}
+
+\texttt{x} signifie \texttt{xcas}. Avec cette valeur, on peut copier-coller de
+\texttt{xcas} dans le document \LaTeX{}.
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\[
+  \matrice[x]{[[7,1,3],[1,0,3],[5,1,2]]}
+\]
+\end{VerbatimOut}
+\UnExemple{}
+
+Un nombre donne le nombre de colonnes de la matrice.
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\[
+  \matrice[2]{1, 2, 3, 4, 5, 6}
+  \quad
+  \matrice[3]{1, 2, 3, 4, 5, 6}
+\]
+\end{VerbatimOut}
+\UnExemple{}
+
+
+\subsubsection{Utilisation de la clé \og \texttt{typeord}\fg}
+\label{sec:matrix-type-key}
+
+Dans ce document, la clé \texttt{typeord} a comme valeur initiale~\texttt{C}.
+
+\medskip{}
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\simplesmatricessetup{typeord=3}
+\(\matrice{1, 2, 3, 4, 5, 6}\)
+\simplesmatricessetup{typeord=2}
+\(\matrice{1, 2, 3, 4, 5, 6}\)
+\simplesmatricessetup{typeord=C}
+\(\matrice{1, 2, 3, 4}\)
+\end{VerbatimOut}
+\UnExemple{}
+
+Le code précédent n'est, bien entendu, donné qu'à titre d'illustration. Pour une
+déclaration de type ne concernant qu'une seule matrice, on aura intérêt à
+utiliser l'argument optionnel. Cependant si on veut rédiger un cours sur les
+matrices triangulaires supérieures\dots{}
+
+\subsubsection{Utilisation des macros \cs{(La)MatriceInterieur}}
+\label{sec:matint}
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\declarermatrice{B}[4]{
+\hline ein, zwei, drei, vier,
+\hline unos, dos, tres, cuatro,
+\hline unu, du, tri, kvar}
+\declarermatrice{A}[3]{one, two, three,
+un, deux, trois, uno, due, tre}
+\begin{tabular}{*{3}{l}}
+\MatriceInterieur
+\end{tabular}
+\par \medskip
+\begin{tabular}{|*{4}{l|}}
+\LaMatriceInterieur{B}\hline
+\end{tabular}
+\end{VerbatimOut}
+\UnExemple{}
+
+
+\subsection{Changer l'aspect}
+\label{sec:aspect}
+
+On peut charger d'autres extensions qui permettent de présenter des matrices
+comme \pkg{mathtools}, \pkg{delarray} ou \pkg{nicematrix}. Dans ce cas on peut
+changer l'aspect de nos matrices grace aux clés d'option \texttt{envir},
+\texttt{prefix} et \texttt{argopt}.
+
+Ce document charge les trois extensions \pkg{mathtools}, \pkg{delarray} et
+\pkg{nicematrix} pour présenter les exemples suivants.
+
+
+\subsubsection{Avec \pkg{mathtools}}
+\label{sec:mathtools}
+
+Comme déjà signalé, il y a deux façons d'utiliser les clés d'option: à l'aide de
+\cs{simplesmatricesetup} ou en utilisant l'argument optionnel
+\darg{\string<}{vliste de paires de clé-valeur}{\string>}.  Je montre les deux.
+
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\simplesmatricessetup{
+  envir=matrix*, prefix=p, argopt=[r]}
+\(\matrice{1, 2, 30, 40}\) \qquad
+\simplesmatricessetup{out-of-box}
+\(\matrice{1, 2, 30, 40}\)
+\par \medskip
+\(\matrice(b)<envir=matrix*, argopt=[l]>
+    {1, 2, 30, 40}\)
+\end{VerbatimOut}
+\UnExemple{}
+
+\subsubsection{Avec \pkg{delarray}}
+\label{sec:delarray}
+
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\simplesmatricessetup{
+  envir=array, prefix=,
+  argopt=[c][{l c r}\}}
+\(\matrice{1, 2, 30, 40}\) \qquad
+\(\matid()<envir=array,
+  argopt={[c][{@{}l c r@{}}\}}>{3}\)
+\end{VerbatimOut}
+\UnExemple{}
+\simplesmatricessetup{out-of-box}
+
+\subsubsection{Avec \pkg{nicematrix}}
+\label{sec:nicematrix}
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\(\matrice<prefix=b, envir=NiceArray,
+argopt={{*{2}{c}|cc}}>{1, 2, 3, 4, 5, 6,
+7, 8, 9, 10, 11, 12, 13, 14, 15, 16}\)
+\end{VerbatimOut}
+ %| emacs
+\UnExemple{}
+
+Dans ce cas il faut doubler les accolades entourant les descripteurs de colonnes
+de l'environnement \texttt{array} car \LaTeX{} retire un niveau d'accolades en
+valuant la clé.
+
+Dans l'exemple suivant, pour la deuxième matrice, il n'est pas nécessaire
+d'entourer la valeur de \texttt{argopt} d'une paire d'accolades --- même si ça
+n'est pas dangereux --- car la présence de \texttt{[margin]} empêche \LaTeX{} de
+supprimer une paire d'accolades.
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\(\matrice<prefix=b, envir=NiceArray,
+argopt={{l c r}}>{1, 2, 3, 40, 50, 60,
+  700, 800, 900}\)
+\par \medskip
+\(\matrice<prefix=b, envir=NiceArray,
+argopt={l c r}[margin]>{1, 2, 3,
+  40, 50, 60, 700, 800, 900}\)
+\par \medskip
+\(\matrice<prefix=b, envir=NiceArray,
+argopt={{l c r}[margin]}>{1, 2, 3,
+  40, 50, 60, 700, 800, 900}\)
+\end{VerbatimOut}
+\UnExemple{}
+
+\vspace{\stretch{2}}
+
+\noindent\hspace*{0.2\textwidth}\hrulefill\hspace*{0.2\textwidth}
+\begin{center}
+  \textsl{Le TeXnicien de Surface scripsit.}
+\end{center}
+\noindent\hspace*{0.2\textwidth}\hrulefill\hspace*{0.2\textwidth}
+
+\vspace*{\stretch{2}}
+
+\end{document}
+\endinput
+%%
+%% End of file `simples-matrices-fra.tex'.


Property changes on: trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices-fra.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices.pdf	2022-06-20 21:08:21 UTC (rev 63666)
+++ trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices.pdf	2022-06-20 21:09:21 UTC (rev 63667)

Property changes on: trunk/Master/texmf-dist/doc/latex/simples-matrices/simples-matrices.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/simples-matrices/simples-matrices.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/simples-matrices/simples-matrices.dtx	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/simples-matrices/simples-matrices.dtx	2022-06-20 21:09:21 UTC (rev 63667)
@@ -0,0 +1,1583 @@
+% \iffalse meta-comment
+%
+%% File: simples-matrices.dtx 
+%% Copyright (C) 2022 Yvon Henel aka Le TeXnicien de surface
+%%
+%% It may be distributed and/or modified under the conditions of the
+%% LaTeX Project Public License (LPPL), either version 1.3c of this
+%% license or (at your option) any later version.  The latest version
+%% of this license is in the file
+%%
+%%    http://www.latex-project.org/lppl.txt
+%%
+%
+%<*driver|package|doc>
+\RequirePackage{expl3}[2020/01/12]
+\GetIdInfo$Id: simples-matrices.dtx 1.0 2022-06-19 TdS $
+  {}
+%</driver|package|doc>
+%<*driver>
+\documentclass[full]{l3doc}
+% \usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage{amsmath}
+\usepackage[french,main=english]{babel}
+\usepackage{simples-matrices}
+\usepackage{xspace}
+\usepackage{csquotes}
+
+\providecommand\darg[3]{ \texttt{#1} \meta{#2} \texttt{#3} }
+
+\begin{document}
+  \DocInput{\jobname.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \title{^^A
+%   The \pkg{simples-matrices} package^^A
+%   \thanks{This file describes v\ExplFileVersion, last revised \ExplFileDate.}^^A
+% }
+%
+% \author{^^A
+%  Yvon Henel\thanks^^A
+%    {^^A
+%      E-mail:
+%        \href{mailto:le.texnicien.de.surface at yvon-henel.fr}
+%          {le.texnicien.de.surface at yvon-henel.fr}^^A
+%    }^^A
+% }
+%
+% \date{Released \ExplFileDate}
+%
+% \maketitle
+% 
+% \changes{v1.0}{2022/06/08}{First public
+% version.\foreignlanguage{french}{\emph{Première version publique.}}}
+%
+% \thispagestyle{empty}
+% 
+% \noindent\hrulefill
+%
+% \begin{otherlanguage}{french}
+% \begin{abstract}
+%   Cette extension fournit des commandes pour définir et écrire des matrices en
+%   donnant leurs coefficients, par ligne, dans une vliste (liste de valeurs
+%   séparées par des virgules).
+% 
+%   La documentation française pour l'utilisateur de l'extension
+%   \pkg{simples-matrices} est disponible sous le nom de
+%   \texttt{simples-matrices-fra}. 
+% \end{abstract}
+% \end{otherlanguage}
+% 
+% \noindent\hrulefill
+%
+% \begin{abstract}
+%   This package provides macros to define and write matrices the coefficients
+%   of which are given, row by row, in a clist (list of values separated by
+%   commas).
+%   
+%   The English documentation for the final user of the package
+%   \pkg{simples-matrices} is available in the file
+%   \texttt{simples-matrices-eng}.
+% \end{abstract}
+% 
+% \noindent\hrulefill
+% 
+% \begin{documentation}
+%
+%
+%\section{Summary of Syntax of Document Commands}
+%\label{sec:summary}
+%
+%
+% 
+% \begin{function}{\matrice}
+% \begin{syntax}
+% \cs{matrice}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\oarg{type}\marg{clist of coefficients}
+% \end{syntax}
+% \end{function}
+% 
+% \begin{function}{\declarermatrice}
+%   \begin{syntax}
+%     \cs{declarermatrice*}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\marg{matrix name}\oarg{type}\marg{clist of coefficients}
+%   \end{syntax}
+% \end{function}
+% 
+% \begin{function}{\lamatrice}
+%   \begin{syntax}
+%     \cs{lamatrice}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\marg{matrix name}
+%   \end{syntax}
+% \end{function}
+%
+% \begin{function}{\MatriceInterieur}
+%   \begin{syntax}
+%     \cs{MatriceInterieur}
+%   \end{syntax}
+% \end{function}
+%
+% \begin{function}{\LaMatriceInterieur}
+%   \begin{syntax}
+%     \cs{LaMatriceInterieur}\marg{matrix name}
+%   \end{syntax}
+% \end{function}
+% 
+% \begin{function}{\simplesmatricessetup}
+%   \begin{syntax}
+%     \cs{simplesmatricessetup}\marg{clist of key-value pairs}
+%   \end{syntax}
+% \end{function}
+% 
+% \begin{function}{\matid}
+%   \begin{syntax}
+%     \cs{matid}\oarg{diagonal coefficient, default \(1\)}\marg{size of the square matrix}
+%   \end{syntax}
+% \end{function}
+% 
+% \begin{function}{\matnulle}
+%   \begin{syntax}
+%     \cs{matid}\oarg{diagonal coefficient, default \(0\)}\marg{size of the square matrix}
+%   \end{syntax}
+% \end{function}
+% 
+% \end{documentation}
+%
+% \iffalse
+%<*doc> 
+\documentclass[full]{l3doc}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+%<FRA>\usepackage[english,main=french]{babel}
+%<ENG>\usepackage[french,main=english]{babel}
+\usepackage{xparse}
+\usepackage{simples-matrices}
+\newcommand\BOP{\discretionary{}{}{}}
+\usepackage{xspace}
+\usepackage{csquotes}
+\usepackage{fancyvrb,fancyvrb-ex}
+\usepackage{mathtools}
+\usepackage{delarray}
+\usepackage{nicematrix}
+
+\providecommand\darg[3]{ \texttt{#1} \meta{#2} \texttt{#3} }
+
+\newcommand{\UnExemple}{%
+  \par \medskip \par \noindent
+  \begin{minipage}[c]{0.58\linewidth}
+    \VerbatimInput[gobble=0, frame=single]{code00.tex}
+  \end{minipage}
+  \hspace{\stretch{1}}
+  \begin{minipage}[c]{0.38\linewidth}
+    \input{code00}
+  \end{minipage}
+  \par \medskip}
+
+\begin{document}
+%<*FRA>
+\title{Guide de l'utilisateur de \pkg{simples-matrices}\thanks{Ce fichier décrit
+    la version~\ExplFileVersion, dernière révision~\ExplFileDate.\\
+    \emph{En souvenir de ma grand-mère maternelle}, Adrienne \textsc{Binaut}
+    (1908-03-23 -- 1997-06-08).}  }
+%</FRA>
+%<*ENG>
+\title{\pkg{simples-matrices} user guide\thanks{This file describes
+    version~\ExplFileVersion, last revised~\ExplFileDate.\\
+    \emph{In memory of my maternal grandmother} Adrienne \textsc{Binaut}
+    (1908-03-23 -- 1997-06-08).}  }
+%</ENG>
+\author{Yvon Henel\thanks{E-mail:
+    \href{mailto:le.texnicien.de.surface at yvon-henel.fr}
+    {le.texnicien.de.surface at yvon-henel.fr}}}
+\maketitle
+\noindent\hrulefill
+
+\begin{abstract}
+%<*FRA>
+Une extension pour écrire des matrices en donnant les coefficients par ligne
+sous la forme d'une liste de valeurs séparées par des virgules.
+
+Une macro permet de définir des matrices nommées et une autre permet d'écrire
+les matrices nommées. L'extension fournit également quelques raccourcis pour les
+matrices identité et les matrices nulles.
+%</FRA>
+%<*ENG>
+A package to write matrices which are defined with a list of comma separated
+coefficients read by row.
+
+A macro enables the definition of a named matrix, another enables the writing of
+a named matrix. This package provides also some shortcuts for identity matrices
+and null matrices.
+
+The name of this package and of its macros are French based for there are
+already too many macros using the word ``matrix'' itself. The French
+``\foreignlanguage{french}{simples matrices}'' means ``simple
+matrices''. \emph{Just a letter apart!}
+%</ENG>
+\end{abstract}
+
+\noindent\hrulefill
+
+%<FRA> \begin{otherlanguage}{english}
+%<ENG> \begin{otherlanguage}{french}
+\begin{abstract}
+%<*FRA> 
+A package to write matrices which are defined with a list of comma separated
+coefficients read by row.
+
+A macro enables the definition of a named matrix, another enables the writing of
+a named matrix. This package provides also some shortcuts for identity matrices
+and null matrices.
+
+The name of this package and of its macros are French based for there are
+already too many macros using the word ``matrix'' itself. The French
+``\foreignlanguage{french}{simples matrices}'' means ``simple
+matrices''. \emph{Just a letter apart!}
+
+The English documentation for the final user of the package
+\pkg{simples-matrices} is available in the file \texttt{simples-matrices-eng}. 
+%</FRA>
+%<*ENG>
+Une extension pour écrire des matrices en donnant les coefficients par ligne
+sous la forme d'une liste de valeurs séparées par des virgules.
+
+Une macro permet de définir des matrices nommées et une autre permet d'écrire
+les matrices nommées. L'extension fournit également quelques raccourcis pour les
+matrices identité et les matrices nulles.
+
+
+La documentation française pour l'utilisateur de l'extension
+\pkg{simples-matrices} est disponible sous le nom de \texttt{simples-matrices-fra}. 
+%</ENG>
+\end{abstract}
+\end{otherlanguage}
+
+\noindent\hrulefill
+
+\tableofcontents{}
+
+\vspace{3\baselineskip}
+
+
+%<*ENG>
+The package \pkg{simples-matrices} requires \pkg{xparse} and \pkg{l3keys2e} used
+to define macros and manage key-options. It loads \pkg{amsmath} as well for
+ensuring a correct presentation of matrices.
+
+\textbf{Beware}: you have to provide the suitable mathematical environment to
+use the macros which print a matrix. Only the unstarred version of
+\cs{declarermatrice} may be used outside math-mode.
+
+%</ENG>
+%<*FRA>
+L'extension \pkg{simples-matrices} utilise \pkg{xparse} et \pkg{l3keys2e} pour
+définir ses macros et gérer les clés d'option. Elle charge également
+\pkg{amsmath} pour obtenir une présentation convenable des matrices.
+
+\textbf{Attention}: vous devez fournir l'environnement mathématique adéquat pour
+utiliser les macros qui écrivent les matrices. Seule la version non-étoilée de
+\cs{declarermatrice} peut être utilisée en dehors du mode mathématique.
+%</FRA>
+
+%<*ENG>
+\section{The Macros}
+\label{sec:macros}
+
+\pkg{simples-matrices} offers six main document macros.
+
+%</ENG>
+%<*FRA>
+\section{Les macros}
+\label{sec:macros}
+
+L'extension \pkg{simples-matrices} offre six macros de document.
+
+%</FRA> 
+
+%<*ENG>
+\subsection{Main Macros}
+\label{sec:main}
+
+This package has five main document macros viz.
+\begin{function}{\matrice}
+  \begin{syntax}
+    \cs{matrice}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\oarg{type}\marg{clist of coefficients}
+  \end{syntax}
+  where \meta{prefix} has the same meaning as the key \texttt{prefix};
+  \meta{clist of key-value pairs}, optional and void by default, can be used to
+  redefined the matrix-like environment; \meta{type} is a string of character
+  the usage of which is explained later ---see \ref{sec:matrix-type}--- and
+  \meta{clist of coefficients} is a clist of the coefficients of the matrix
+  given by row order.
+
+  The French \emph{matrice} means ``matrix''.
+
+  With \verb+\(\matrice{1, 2, 3, 4}\)+ we obtain \(\matrice{1, 2, 3, 4}\).
+
+  With \verb+\(\matrice(b)[3]{1, 2, 3, 4, 5, 6}\)+
+  we obtain \(\matrice(b)[3]{1, 2, 3, 4, 5, 6}\).
+  
+\end{function}
+
+\begin{function}{\declarermatrice}
+  \begin{syntax}
+    \cs{declarermatrice*}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\marg{matrix name}\oarg{type}\marg{clist of coefficients}
+  \end{syntax}
+  where \meta{matrix name} is the name of the matrix to be used afterwards. The
+  other arguments, optional or mandatory, have the same meaning than above. The
+  starred version defines and prints the matrix. The unstarred version only
+  defines it.
+
+  The definition is global but one can redefine an existing named matrix with
+  the same function. \textbf{No check is done} to ensure that one is not
+  redefining a previously defined matrix.
+
+  The French \emph{déclarer une matrice} means ``declare a matrix''.
+  
+\end{function}
+
+\begin{function}{\lamatrice}
+  \begin{syntax}
+    \cs{lamatrice}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\marg{matrix name}
+  \end{syntax}
+  prints the previously defined matrix the name of which is given by
+  \meta{matrix name}. The two optional arguments have the meaning as before.
+
+  The French \emph{la matrice} means ``the matrix''.
+\end{function}
+
+\begin{function}{\MatriceInterieur}
+  \begin{syntax}
+    \cs{MatriceInterieur}
+  \end{syntax}
+  gives the inner part of the last printed ---via \cs{matrice}--- or defined
+  ---via \cs{declarermatrice}--- matrix. It can be used inside an
+  \env{array}-like environment.
+
+  The French should be \emph{\foreignlanguage{french}{intérieur de la matrice}}
+  which means ``inside of the matrix''. What is implicit is the adjective
+  ``anonymous''. For named matrix see below.
+\end{function}
+
+\begin{function}{\LaMatriceInterieur}
+  \begin{syntax}
+    \cs{LaMatriceInterieur}\marg{matrix name}
+  \end{syntax}
+  gives the inner part of the matrix with name \meta{matrix name}. It can be
+  used inside an \env{array}-like environment.
+
+  Again false French but the parallel with \cs{lamatrice} should suggest that,
+  now, the matrix has a name and we have to use it. 
+\end{function}
+
+See examples on page~\pageref{sec:examples}.
+%</ENG>
+%<*FRA>
+\subsection{Macros principales}
+\label{sec:principales}
+
+Les cinq macros principales de document sont les suivantes: 
+
+\begin{function}{\matrice}
+  \begin{syntax}
+    \cs{matrice}\parg{prefixe}\darg{\string<}{vliste de paires de clé-valeur}{\string>}\oarg{type}\marg{vliste des coefficients}
+  \end{syntax}
+  où \meta{prefixe} a la même fonction que la clé \texttt{prefix}; \meta{vliste
+    de paires de clé-valeur}, optionnel et vide par défaut, peut être utiliser
+  pour redéfinit l'environnement de type \texttt{matrix};
+  \meta{type} est une chaine de caractère dont l'utilisation sera expliquée
+  ci-dessous --- voir~\ref{sec:matrix-type} --- et \meta{vliste des
+    coefficients} est la vliste des coefficients de la matrice donnés ligne par
+  ligne. 
+
+  Avec \verb+\(\matrice{1, 2, 3, 4}\)+ on obtient \(\matrice{1, 2, 3, 4}\).
+
+  Avec \verb+\(\matrice(b)[3]{1, 2, 3, 4, 5, 6}\)+
+  on obtient \(\matrice(b)[3]{1, 2, 3, 4, 5, 6}\).
+  
+\end{function}
+
+\begin{function}{\declarermatrice}
+  \begin{syntax}
+    \cs{declarermatrice*}\parg{prefix}\darg{\string<}{vliste de paires de clé-valeur}{\string>}\marg{nom}\oarg{type}\marg{vliste des coefficients}
+  \end{syntax}
+  où \meta{nom} est le nom de la matrice pour utilisation future. Les autres
+  arguments, optionnels ou obligatoires, ont la même signification que
+  ci-dessus. La version étoilée définit et écrit la matrice. La version
+  non-étoilée ne fait que la définir.
+
+  La définition est global mais on peut redéfinir une matrice nommée existante
+  avec la même fonction. \textbf{Aucun contrôle} n'est exercé pour s'assurer que
+  l'on n'est pas en train de redéfinir une matrice nommée précédemment définie.
+\end{function}
+
+\begin{function}{\lamatrice}
+  \begin{syntax}
+    \cs{lamatrice}\parg{prefix}\darg{\string<}{vliste de paires de clé-valeur}{\string>}\marg{matrix name}
+  \end{syntax}
+  écrit la matrice nommée de nom \meta{nom}.
+  Les deux arguments optionnels ont la même signification que ci-dessus.
+\end{function}
+
+\begin{function}{\MatriceInterieur}
+  \begin{syntax}
+    \cs{MatriceInterieur}
+  \end{syntax}
+  donne l'intérieur de la dernière matrice écrite --- via \cs{matrice} --- ou
+  définie --- via \cs{declarermatrice}. On peut l'utiliser dans un environnement
+  du genre \env{array}.
+\end{function}
+
+\begin{function}{\LaMatriceInterieur}
+  \begin{syntax}
+    \cs{LaMatriceInterieur}\marg{nom}
+  \end{syntax}
+  donne l'intérieur de la matrice de nom \meta{nom}. On peut l'utiliser dans un
+  environnement du genre \env{array}.
+\end{function}
+
+
+Voir les exemples en page~\pageref{sec:exemples}.
+%</FRA> 
+
+%<*ENG>
+\subsection{Setting the Keys}
+\label{sec:setting-keys}
+
+One can change the values of the keys of \pkg{simples-matrices} with 
+\begin{function}{\simplesmatricessetup}
+  \begin{syntax}
+    \cs{simplesmatricessetup}\marg{clist of key-value pairs}
+  \end{syntax}
+  where \meta{clist of key-value pairs} is the usual clist of key-value pairs
+  setting one or many of the three keys of the package as presented on
+  page~\pageref{sec:keys}.
+
+  To stick to established convention the name of this macro is created from the
+  name of the package (reduced to \TeX{} letters) followed by \emph{setup}. I
+  apologize for that strange linguistic mixture.
+  
+\end{function}
+%</ENG>
+%<*FRA>
+\subsection{Valuer les clés}
+\label{sec:setting-keys}
+
+On peut changer les valeurs des clés de \pkg{simples-matrices} avec
+\begin{function}{\simplesmatricessetup}
+  \begin{syntax}
+    \cs{simplesmatricessetup}\marg{vliste de paires de clé-valeur}
+  \end{syntax}
+  où \meta{vliste de paires de clé-valeur} est l'habituelle vliste de paires de
+  clé-valeur valuant une ou plusieurs des trois clés de cette extension
+  telles que présentées ci-dessous en page~\pageref{sec:clefs}. 
+
+  Pour suivre une convention désormais bien établie le nom de cette macro
+  consiste en le nom de l'extension --- réduite à ces lettres \TeX{}iennes ---
+  suivi de l'anglais \emph{setup}. Je demande pardon pour cette étrange mixture
+  linguistique. 
+  
+\end{function}
+%</FRA>
+%<*ENG>
+\subsection{Shortcuts}
+\label{sec:shortcuts}
+
+There are also two \emph{shortcut} macros: 
+
+\begin{function}{\matid}
+  \begin{syntax}
+    \cs{matid}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\oarg{coefficient}\marg{number of columns}
+  \end{syntax}
+  which write the identity matrix --- by default --- with \meta{number of
+    columns} columns. If \meta{coefficient} is given, we obtain a diagonal
+  matrix with all its coefficients equal to \meta{coefficient}.
+
+  The two first optional arguments have the same functionality as in the
+  preceding macros.
+
+  \emph{matid} stands for ``\foreignlanguage{French}{matrice identité}'' which means
+  ``identity matrix''.
+\end{function}
+
+\begin{function}{\matnulle}
+  \begin{syntax}
+    \cs{matnulle}\parg{prefix}\darg{\string<}{clist of key-value pairs}{\string>}\oarg{coefficient}\marg{number of columns}
+  \end{syntax}
+  writes the null matrix with \meta{number of columns} columns ---by default---
+  or a matrix containing with \meta{number of columns} columns and all
+  coefficients equal to \meta{coefficient}.
+
+  The two first optional arguments have the same functionality as in the
+  preceding macros.
+
+  \emph{matnulle} stands for ``\foreignlanguage{French}{matrice nulle}'' which means
+  ``null matrix''.
+\end{function}
+%</ENG>
+%<*FRA>
+\subsection{Raccourcis}
+\label{sec:shortcuts}
+
+L'extension propose deux macros \emph{raccourcis}:
+
+\begin{function}{\matid}
+  \begin{syntax}
+    \cs{matid}\parg{prefix}\darg{\string<}{vliste de paires de clé-valeur}{\string>}\oarg{coefficient}\marg{nombre de colonnes}
+  \end{syntax}
+  qui imprime la matrice identité --- par défaut --- avec
+  \meta{nombre de colonnes} colonnes.
+  Si \meta{coefficient} est fourni, on obtient une matrice diagonale
+  dont tous les coefficients non-nuls sont égaux à \meta{coefficient}.
+
+  Les deux premiers arguments optionnels ont la même fonction que dans les
+  macros précédentes.
+\end{function}
+
+\begin{function}{\matnulle}
+  \begin{syntax}
+    \cs{matnulle}\parg{prefix}\darg{\string<}{vliste de paires de clé-valeur}{\string>}\oarg{coefficient}\marg{nombre de colonnes}
+  \end{syntax}
+  imprime la matrice nulle \meta{nombre de colonnes} colonnes --- par défaut ---
+  ou une matrice de \meta{nombre de colonnes} colonnes dont tous les
+  coefficients sont égaux à \meta{coefficient}.
+
+  Les deux premiers arguments optionnels ont la même fonction que dans les
+  macros précédentes.
+\end{function}
+%</FRA>
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\(\matid{3}\)\qquad \(\matid[9]{3}\)
+\par \medskip
+\(\matnulle{3}\)\qquad \(\matnulle[2]{3}\)
+\end{VerbatimOut}
+\UnExemple{}
+
+%<*ENG>
+\section{The Package Options}
+\label{sec:keys}
+
+The package uses key-value options. There are four keys:
+\texttt{envir}, 
+\texttt{prefix},
+\texttt{typeord}
+and
+\texttt{argopt}.
+
+\begin{description}
+\item[\texttt{envir} (\textit{\texttt{string}})] the main and last part of the
+  name of the environment used to print the matrix. Its initial value is
+  \texttt{matrix}.
+  
+\item[\texttt{prefix} (\textit{\texttt{string}})] a string which is prefixed to
+  \texttt{envir} to obtain the complete name of the environment. Its initial
+  value is \texttt{p}. Therefore, by default, the environment used to print the
+  matrix is \texttt{bmatrix} as defined by \pkg{amsmath}.
+
+\item[\texttt{typeord} (\textit{\texttt{string}})] a string which is the
+  ordinary ---i.~e. default--- value of the \meta{type} optional argument. The
+  initial value of the key is \texttt{C}.
+
+\item[\texttt{argopt} (\textit{\texttt{token list}})] for French
+  \foreignlanguage{french}{\emph{argument optionnel}} (optional argument). That
+  key is initially void. See page~\pageref{sec:delarray} for usage.
+\end{description}
+
+Moreover, an other key is available which is not an option of the package:
+\texttt{out-of-box} which is a metakey.
+
+With |\simplesmatricessetup{out-of-box}| we obtain the same effect as with
+|\simplesmatricessetup{prefix=p,|\BOP| envir=matrix,|%
+  \BOP| argopt=,|\BOP| typeord=C}|.
+%</ENG>
+
+%<*FRA>
+\section{Les options de l'extension} 
+\label{sec:clefs} 
+
+L'extension utilise le système de clefs-valeurs pour ses options. Elle possède
+quatre clés: \texttt{envir}, \texttt{prefix}, \texttt{typeord} et \texttt{argopt}.
+
+\begin{description}
+\item[\texttt{envir} (\textit{\texttt{chaine de caractères}})] la partie finale
+  du nom de l'environnement utilisé pour imprimer la matrice. Sa valeur initiale
+  est \texttt{matrix}.
+  
+\item[\texttt{prefix} (\textit{\texttt{chaine de caractères}})], caractères
+  placés devant \texttt{envir} pour fournir le nom complet de l'environnement
+  utilisé pour imprimer la matrice. Sa valeur initiale est \texttt{p}. Cela fait
+  que l'environnement par défaut est \texttt{pmatrix} fourni par \pkg{amsmath}.
+
+\item[\texttt{typeord} (\textit{\texttt{chaine de caractères}})] définit la
+  valeur ordinaire --- c.-à-d. par défaut --- de l'argument optionnel
+  \meta{type}. La valeur initiale de la clé est \texttt{C}.
+
+\item[\texttt{argopt} (\textit{\texttt{liste de lexèmes}}, anglais:
+  \foreignlanguage{english}{token list})]. Cette clé est vide par défaut. Voir
+  page~\pageref{sec:delarray} pour son utilisation.
+\end{description}
+
+De plus, une clé supplémentaire existe qui est une métaclé:
+\texttt{out-of-box}. 
+
+Avec |\simplesmatricessetup{out-of-box}| on obtient le même effet qu'avec
+|\simplesmatricessetup{prefix=p,|\BOP| envir=matrix,|%
+  \BOP| argopt=,|\BOP| typeord=C}|.
+%</FRA> 
+
+%<*ENG>
+\section{Examples}
+\label{sec:examples}
+\subsection{Without any special package}
+\label{sec:amsmath}
+
+That is with only \pkg{amsmath} loaded as done by this package.
+
+\subsubsection{Declaration and Usage}
+\label{sec:declar}
+%</ENG>
+%<*FRA>
+\section{Exemples}
+\label{sec:exemples}
+\subsection{Sans extension particulière}
+\label{sec:amsmath}
+
+C'est-à-dire en chargeant uniquement \pkg{amsmath} comme le fait cette extension.
+
+\subsubsection{Déclaration et utilisation}
+\label{sec:declar}
+%</FRA> 
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\declarermatrice{A}{1, 2, 300, 400}
+\(\declarermatrice*{B}{a, b, c, d}\)
+\qquad \(\lamatrice{A}\) \par \bigskip
+\(\lamatrice(V){A}\)
+\qquad \(\lamatrice(b){B}\)
+\end{VerbatimOut}
+\UnExemple{}
+
+%<*ENG>
+\subsubsection{The ``\texttt{type}'' argument}
+\label{sec:matrix-type}
+
+The last but one --- optional --- argument of macros \cs{matrice} and
+\cs{declarermatrice} defaults to \texttt{O}. In that case the value of the key
+\texttt{typeord} is used to determine the \emph{type} of the matrix input,
+see~\pageref{sec:matrix-type-key}.
+
+Its value can be a number, in which case it is the number of columns, or a
+string ---presently a one letter string--- among: \texttt{C}, \texttt{D},
+\texttt{I}, \texttt{J}, \texttt{S}, \texttt{T} and \texttt{x}.
+%</ENG>
+
+%<*FRA>
+\subsubsection{L'argument \og \texttt{type}\fg}
+\label{sec:matrix-type}
+
+L'avant dernier argument --- optionnel --- des macros \cs{matrice} et
+\cs{declarermatrice} vaut par défaut \texttt{O}. Dans ce cas, c'est la valeur de
+la clé \texttt{typeord} qui est utilisée pour déterminer le \emph{type} des
+données de la matrice, voir~\pageref{sec:matrix-type-key}. 
+
+Sinon, il peut prendre une valeur numérique qui est le nombre de colonnes de la
+matrice ou encore une chaine de caractères --- à ce jour, une seule lettre ---
+parmi: \texttt{C}, \texttt{D}, \texttt{I}, \texttt{J}, \texttt{S}, \texttt{T} et
+\texttt{x}.
+%</FRA>
+
+\medskip{}
+
+%<FRA> \texttt{C} signifie matrice \textbf{carrée}.
+%<ENG> \texttt{C} means square matrix for French ``\texttt{C}arré'' means ``square''.
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\[
+\matrice{1, 2, 3, 4, 5, 6, 7, 8, 9}
+\qquad 
+\matrice[C]{1, 2, 3, 4, 5, 6, 7, 8, 9}
+\]
+\end{VerbatimOut}
+\UnExemple{}
+
+%<FRA> \texttt{D} signifie matrice \textbf{diagonale}.
+%<ENG> \texttt{D} means \textbf{diagonal} matrix.
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\[
+  \matrice{1, 2, 3, 4}\qquad 
+  \matrice[D]{1, 2, 3, 4}
+\]
+\end{VerbatimOut}
+\UnExemple{}
+
+%<*FRA>
+\texttt{I} signifie matrice triangulaire \textbf{inférieure}; \texttt{J}
+signifie matrice triangulaire inférieure avec des zéros sur la diagonale.
+%</FRA>
+%<*ENG>
+\texttt{I} means lower triangular matrix. French ``\texttt{I}nférieur'' means
+``lower''; \texttt{J} means lower triangular matrix with zeros on the diagonal.
+%</ENG>
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\[
+  \matrice[I]{1, 2, 3}\qquad 
+  \matrice[J]{1, 2, 3}
+\]
+\end{VerbatimOut}
+\UnExemple{}
+
+%<*FRA>
+\texttt{S} signifie matrice triangulaire \textbf{supérieure}; \texttt{T}
+signifie matrice triangulaire supérieure avec des zéros sur la diagonale.
+%</FRA>
+%<*ENG>
+\texttt{S} means upper triangular matrix. French ``\texttt{S}upérieur'' means
+``upper''; \texttt{T} means upper triangular matrix with zeros on the diagonal.
+%</ENG>
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\[
+  \matrice[S]{1, 2, 3}\qquad 
+  \matrice[T]{1, 2, 3}
+\]
+\end{VerbatimOut}
+\UnExemple{}
+
+%<*FRA>
+\texttt{x} signifie \texttt{xcas}. Avec cette valeur, on peut copier-coller de
+\texttt{xcas} dans le document \LaTeX{}. 
+%</FRA>
+%<*ENG>
+\texttt{x} means \texttt{xcas}. With that value, one can copy-paste from
+\texttt{xcas} into the \LaTeX{} document.
+%</ENG>
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\[
+  \matrice[x]{[[7,1,3],[1,0,3],[5,1,2]]}
+\]
+\end{VerbatimOut}
+\UnExemple{}
+
+%<*FRA>
+Un nombre donne le nombre de colonnes de la matrice.
+%</FRA>
+%<*ENG>
+A number sets up the number of columns of the matrix.
+%</ENG>
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\[
+  \matrice[2]{1, 2, 3, 4, 5, 6}
+  \quad
+  \matrice[3]{1, 2, 3, 4, 5, 6}
+\]
+\end{VerbatimOut}
+\UnExemple{}
+
+
+%<*ENG>
+\subsubsection{Using the ``\texttt{typeord}'' Key}
+\label{sec:matrix-type-key}
+
+In this document, the key \texttt{typeord} has the initial value of~\texttt{C}.
+%</ENG>
+
+%<*FRA>
+\subsubsection{Utilisation de la clé \og \texttt{typeord}\fg}
+\label{sec:matrix-type-key}
+
+Dans ce document, la clé \texttt{typeord} a comme valeur initiale~\texttt{C}.
+%</FRA>
+
+\medskip{}
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\simplesmatricessetup{typeord=3}
+\(\matrice{1, 2, 3, 4, 5, 6}\) 
+\simplesmatricessetup{typeord=2}
+\(\matrice{1, 2, 3, 4, 5, 6}\) 
+\simplesmatricessetup{typeord=C}
+\(\matrice{1, 2, 3, 4}\)
+\end{VerbatimOut}
+\UnExemple{}
+
+%<*FRA>
+Le code précédent n'est, bien entendu, donné qu'à titre d'illustration. Pour une
+déclaration de type ne concernant qu'une seule matrice, on aura intérêt à
+utiliser l'argument optionnel. Cependant si on veut rédiger un cours sur les
+matrices triangulaires supérieures\dots{}
+%</FRA>
+%<*ENG>
+The preceding code is but a mere illustration. In order to declare a type for
+one matrix it's more convenient to use the optional argument. However if one
+wants to write a lesson about upper triangular matrices\dots{}
+%</ENG>
+
+%<*ENG>
+\subsubsection{Using the \cs{(La)MatriceInterieur} Macros}
+\label{sec:matint}
+%</ENG>
+%<*FRA>
+\subsubsection{Utilisation des macros \cs{(La)MatriceInterieur}}
+\label{sec:matint}
+%</FRA>
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\declarermatrice{B}[4]{
+\hline ein, zwei, drei, vier, 
+\hline unos, dos, tres, cuatro, 
+\hline unu, du, tri, kvar}
+\declarermatrice{A}[3]{one, two, three, 
+un, deux, trois, uno, due, tre}
+\begin{tabular}{*{3}{l}}
+\MatriceInterieur
+\end{tabular}
+\par \medskip
+\begin{tabular}{|*{4}{l|}}
+\LaMatriceInterieur{B}\hline 
+\end{tabular}
+\end{VerbatimOut}
+\UnExemple{}
+
+%<*ENG>
+\subsection{Changing the Look}
+\label{sec:changelook}
+
+We can load other packages which deal with matrices such as \pkg{mathtools}, 
+\pkg{delarray} or \pkg{nicematrix}. In that case we can change the look of our
+matrices thanks to the option-key \texttt{envir}, \texttt{prefix} and
+\texttt{argopt}.
+
+This document loads the three packages \pkg{mathtools}, \pkg{delarray} and
+\pkg{nicematrix} in order to give the following examples.
+
+%</ENG>
+
+%<*FRA>
+\subsection{Changer l'aspect}
+\label{sec:aspect}
+
+On peut charger d'autres extensions qui permettent de présenter des matrices
+comme \pkg{mathtools}, \pkg{delarray} ou \pkg{nicematrix}. Dans ce cas on peut
+changer l'aspect de nos matrices grace aux clés d'option \texttt{envir},
+\texttt{prefix} et \texttt{argopt}.
+
+Ce document charge les trois extensions \pkg{mathtools}, \pkg{delarray} et
+\pkg{nicematrix} pour présenter les exemples suivants.
+
+%</FRA>
+
+%<*ENG>
+\subsubsection{With \pkg{mathtools}}
+\label{sec:mathtools}
+
+As already stated above there are two ways to use the option-keys: through
+\cs{simplesmatricesetup} or through the optional argument
+\darg{\string<}{clist of pairs of key-value}{\string>}. I show both. 
+
+%</ENG>
+%<*FRA>
+\subsubsection{Avec \pkg{mathtools}}
+\label{sec:mathtools}
+
+Comme déjà signalé, il y a deux façons d'utiliser les clés d'option: à l'aide de
+\cs{simplesmatricesetup} ou en utilisant l'argument optionnel
+\darg{\string<}{vliste de paires de clé-valeur}{\string>}.  Je montre les deux. 
+
+%</FRA>
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\simplesmatricessetup{
+  envir=matrix*, prefix=p, argopt=[r]}
+\(\matrice{1, 2, 30, 40}\) \qquad
+\simplesmatricessetup{out-of-box}
+\(\matrice{1, 2, 30, 40}\) 
+\par \medskip
+\(\matrice(b)<envir=matrix*, argopt=[l]>
+    {1, 2, 30, 40}\)
+\end{VerbatimOut}
+\UnExemple{}
+
+%<*ENG>
+\subsubsection{With \pkg{delarray}}
+\label{sec:delarray}
+
+%</ENG>
+%<*FRA>
+\subsubsection{Avec \pkg{delarray}}
+\label{sec:delarray}
+
+%</FRA>
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\simplesmatricessetup{
+  envir=array, prefix=, 
+  argopt=[c][{l c r}\}}
+\(\matrice{1, 2, 30, 40}\) \qquad
+\(\matid()<envir=array, 
+  argopt={[c][{@{}l c r@{}}\}}>{3}\)
+\end{VerbatimOut}
+\UnExemple{}
+\simplesmatricessetup{out-of-box}
+
+
+%<*ENG>
+\subsubsection{With \pkg{nicematrix}}
+\label{sec:nicematrix}
+%</ENG>
+%<*FRA>
+\subsubsection{Avec \pkg{nicematrix}}
+\label{sec:nicematrix}
+%</FRA>
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\(\matrice<prefix=b, envir=NiceArray, 
+argopt={{*{2}{c}|cc}}>{1, 2, 3, 4, 5, 6, 
+7, 8, 9, 10, 11, 12, 13, 14, 15, 16}\)
+\end{VerbatimOut}
+ %| emacs
+\UnExemple{}
+
+%<*ENG>
+In that case we need to double the curly braces around the column descriptors of
+the \texttt{array} environment because the first level is stripped off by
+\LaTeX{} when valuating the key.
+
+In the following example, for the second matrix, it is not necessary to surround
+the value of \texttt{argopt} with an extra pair of curly braces ---even if it is
+not dangerous--- for the presence of \texttt{[margin]} prevents \LaTeX{} to
+strip off the curly braces.
+%</ENG>
+%<*FRA>
+Dans ce cas il faut doubler les accolades entourant les descripteurs de colonnes
+de l'environnement \texttt{array} car \LaTeX{} retire un niveau d'accolades en
+valuant la clé.
+
+Dans l'exemple suivant, pour la deuxième matrice, il n'est pas nécessaire
+d'entourer la valeur de \texttt{argopt} d'une paire d'accolades --- même si ça
+n'est pas dangereux --- car la présence de \texttt{[margin]} empêche \LaTeX{} de
+supprimer une paire d'accolades.
+%</FRA>
+
+\begin{VerbatimOut}[gobble=0]{code00.tex}
+\(\matrice<prefix=b, envir=NiceArray, 
+argopt={{l c r}}>{1, 2, 3, 40, 50, 60, 
+  700, 800, 900}\)
+\par \medskip
+\(\matrice<prefix=b, envir=NiceArray, 
+argopt={l c r}[margin]>{1, 2, 3, 
+  40, 50, 60, 700, 800, 900}\)
+\par \medskip
+\(\matrice<prefix=b, envir=NiceArray, 
+argopt={{l c r}[margin]}>{1, 2, 3, 
+  40, 50, 60, 700, 800, 900}\)
+\end{VerbatimOut}
+\UnExemple{}
+
+
+\vspace{\stretch{2}}
+
+\noindent\hspace*{0.2\textwidth}\hrulefill\hspace*{0.2\textwidth}
+\begin{center}
+  \textsl{Le TeXnicien de Surface scripsit.}
+\end{center}
+\noindent\hspace*{0.2\textwidth}\hrulefill\hspace*{0.2\textwidth}
+
+\vspace*{\stretch{2}}
+
+\end{document}
+%</doc> 
+% \fi
+% \begin{implementation}
+%
+% \section{\pkg{simples-matrices} implementation}
+%
+% 
+% \iffalse
+%<*package>
+% \fi
+% 
+%\subsection{Loading And Greeting}
+%\label{sec:loading}
+% 
+%    \begin{macrocode}
+%<@@=SMPLMTRC>
+%    \end{macrocode}
+%  
+%    \begin{macrocode}
+\RequirePackage{l3keys2e,xparse}
+\ProvidesExplPackage
+{simples-matrices} {2022/06/08} {1.0} {defining and printing matrices}
+\RequirePackage{amsmath}
+%    \end{macrocode}
+% 
+% \pkg{amsmath} is the only auxiliary package loaded. We need it to write the
+% matrices.
+%
+%\subsection{Keys And Options}
+%\label{sec:keysandoptions}
+%
+% I'm using the key management mechanism of \LaTeX3.  
+% 
+%    \begin{macrocode}
+\keys_define:nn {simples-matrices}
+{
+  envir .tl_set:N = \g_@@_nom_environnement_tl,
+  envir .initial:n = {matrix},  
+  prefix .tl_set:N = \g_@@_prefix_environnement_tl,
+  prefix .initial:n = {p},
+  argopt .tl_set:N = \g@@_argument_environnement_tl,
+  argopt .initial:n = { },
+  typeord .str_set:N = \g_@@_type_ordinaire_str,
+  typeord .initial:n = { C },
+}
+\ProcessKeysOptions {simples-matrices}
+%    \end{macrocode}
+% 
+% The keys above defined the package options. The next one may be usefull to
+% return to a kind of neutral state.
+% 
+%    \begin{macrocode}
+\keys_define:nn {simples-matrices}
+{
+  out-of-box .meta:n = {prefix=p, envir=matrix, argopt=, typeord=C},  
+}
+%    \end{macrocode}
+% 
+%
+%\subsection{Constants And Variables}
+%\label{sec:const-var}
+%
+% To handle the syntax of \texttt{xcas} matrices, I resort to \emph{regex} so I
+% have to create some constant \emph{regexes}. Some comments are just there to
+% prevent \texttt{emacs} to go too far in formating the code.
+% 
+%    \begin{macrocode}
+\regex_const:Nn \c_@@_xcas_debut_regexp {\[\[} %\]\]
+\regex_const:Nn \c_@@_xcas_fin_regexp {\]\]}
+\regex_const:Nn \c_@@_xcas_milieu_regexp{\],\ *\[} %\]
+%    \end{macrocode}
+% 
+% Now come error messages: the first deals with bad numbers of coefficient for
+% matrices of type I, J, S or T; the second appears when dealing with an x~type
+% matrix.
+% 
+%    \begin{macrocode}
+\msg_new:nnnn{simples-matrices}{errorIJST}
+{The~number~of~coefficients~does~not~fit~the~matrix-type}
+{I~was~expecting~#1~coefficients~and~obtain~only~#2.}
+
+\msg_new:nnnn{simples-matrices}{errorx}
+{The~data~do~not~seem~to~match~the~x-type}
+{I~was~expecting~the~data~to~begin~with~"[["}
+%    \end{macrocode}
+% 
+% To contain the inner part of the matrix, we need a token list global
+% variable. I chose to built it with a non-letter to try to prevent name clash.
+% 
+%    \begin{macrocode}
+\tl_new:c {g_@@_contenu_anonyme*_tl}
+%    \end{macrocode}
+% 
+% \begin{macro}{\@@_creer_matrice_aux:}
+% 
+% When this macro is called, \cs{g_tmpa_int} contains the number of columns of
+% the matrix and \cs{g_tmpa_seq} the \emph{sequence} of coefficients.
+% 
+%    \begin{macrocode}
+\cs_new:Nn \@@_creer_matrice_aux:
+{
+  \tl_gclear:c {g_@@_contenu_anonyme*_tl}
+
+  \seq_map_indexed_inline:Nn \g_tmpa_seq
+  {
+    \tl_gput_right:cn {g_@@_contenu_anonyme*_tl} { ##2  }
+    \int_compare:nNnTF { \int_mod:nn {##1} { \g_tmpa_int } } = { 0 }
+    {
+      \tl_gput_right:cn {g_@@_contenu_anonyme*_tl} { \\ }
+    }
+    {
+      \tl_gput_right:cn {g_@@_contenu_anonyme*_tl} { &  }
+    }
+  }
+}
+%    \end{macrocode}
+% 
+% At the end of this macro, \cs{g_@@_contenu_anonyme*_tl} contains the inner
+% part of the matrix.
+% 
+% \end{macro}  
+% 
+% For I need to match a text against a regex constant, I create a variant of one
+% of the function of \LaTeX3: 
+%    \begin{macrocode}
+\cs_generate_variant:Nn \regex_match:nnF { nVF }
+%    \end{macrocode}
+% 
+% The next macro does the bulk of the work in reading the coefficients in the
+% second argument and managing them according to the data-type which is given in
+% the first argument.
+% 
+% \begin{macro}{\@@_creer_matrice:nn}
+% 
+%  To be on the safe side, I begin with clearing the variable. 
+%    \begin{macrocode}
+\cs_new:Nn \@@_creer_matrice:nn
+{
+  \tl_gclear:c {g_@@_contenu_anonyme*_tl}
+%    \end{macrocode}
+%  I then read the first argument inside \cs{l_tmpa_str} with \cs{str_set:Nx} in
+%  case the string is contained in a variable.
+%    \begin{macrocode}
+  \str_set:Nx \l_tmpa_str { #1 }
+%    \end{macrocode}
+%  If \verb|#1| is equal to \texttt{O}, I fetch the data-type in the string valued
+%  through the key \texttt{typeord}. 
+%    \begin{macrocode}
+  \str_if_eq:VnT \l_tmpa_str { O }
+  {
+    \str_set:NV \l_tmpa_str \g_@@_type_ordinaire_str
+  }
+%    \end{macrocode}
+%  We enter now the first \texttt{case} which depends on the data-type. The
+%  first case deals with the \texttt{x}-type. Here we obtain the inner part of
+%  the matrix by replacing, according to \emph{regex}. There is no need to
+%  calculate anything. 
+% 
+% If ever there are other types of the same kind ---e.~g. to deal with
+% \texttt{maxima} syntax or the like--- those types would be dealt with here. 
+% 
+%    \begin{macrocode}
+  \str_case:VnF \l_tmpa_str
+  { 
+    { x } {
+      \tl_set:Nn \l_tmpa_tl { #2 }
+
+      \regex_match:nVF {\A\s*\[\[} %\]\]
+      \l_tmpa_tl 
+      {
+          \msg_fatal:nn{simples-matrices} {errorx}
+      }
+      
+      \regex_replace_all:NnN \c_@@_xcas_debut_regexp { } \l_tmpa_tl
+      \regex_replace_all:NnN \c_@@_xcas_fin_regexp { \c{\\} } \l_tmpa_tl
+      \regex_replace_all:NnN \c_@@_xcas_milieu_regexp { \c{\\} } \l_tmpa_tl
+      \regex_replace_all:nnN { , }{ & } \l_tmpa_tl
+
+      \tl_set_eq:cN {g_@@_contenu_anonyme*_tl} \l_tmpa_tl
+    } 
+  }
+%    \end{macrocode}
+% The \texttt{x} -type is done. Now for the \texttt{false} part of the
+% \texttt{case} where I will take care of the other kind of data-types, those
+% which require calculations.
+% 
+% I prepare the work by reading the second argument inside the \emph{sequence}
+% \cs{g_tmpa_seq} and cleaning \cs{g_tmpb_seq}.
+%    \begin{macrocode}
+  { 
+    \seq_set_from_clist:Nn \g_tmpa_seq { #2 }
+    \seq_clear:N \l_tmpb_seq
+%    \end{macrocode}
+%  Now come the second \texttt{case}: 
+%    \begin{macrocode}
+    \str_case:VnF \l_tmpa_str
+    { 
+%    \end{macrocode}
+%  The first case is that of the square matrices. I calculate the number of
+%  columns as the square root of the number of coefficients. There is, as for
+%  now, no check for correctness because in case of bad number of coefficients
+%  there will just be a strange matrix, with void cells. 
+%    \begin{macrocode}
+      { C } { 
+        \int_set:Nn \g_tmpb_int { \seq_count:N \g_tmpa_seq }
+        \int_set:Nn \g_tmpa_int { \fp_to_int:n { sqrt(\g_tmpb_int) } }
+      }
+%    \end{macrocode}
+% In case of a diagonal matrix, the number of columns is simply the number of
+% coefficients but we have to create the suitable \emph{sequence}. The trick is
+% just to add as many zeros as there are columns between each given coefficient.
+%    \begin{macrocode}
+      { D } {
+        \int_set:Nn \g_tmpa_int { \seq_count:N \g_tmpa_seq }
+        \seq_pop_left:NN \g_tmpa_seq \l_tmpa_tl
+        \seq_put_right:NV \l_tmpb_seq \l_tmpa_tl
+
+        \bool_until_do:nn { \seq_if_empty_p:N \g_tmpa_seq }
+        {
+          \int_step_inline:nn { \g_tmpa_int } 
+          {
+            \seq_put_right:Nn \l_tmpb_seq { 0 }
+          }
+          \seq_pop:NN \g_tmpa_seq \l_tmpa_tl
+          \seq_put_right:NV \l_tmpb_seq \l_tmpa_tl
+        }
+        \seq_set_eq:NN \g_tmpa_seq \l_tmpb_seq
+      } 
+%    \end{macrocode}
+%  The code for the next four cases is very similar. We have to calculate the
+%  number of columns from the number of coefficient and then complete the
+%  \emph{sequence} of coefficients.
+% 
+%  Here I check the correctness because, otherwise, in case of error \LaTeX{}
+%  doesn't behave kindly.
+% 
+%  The number of coefficients \emph{non-necessarily} null in a triangular matrix
+%  with \(n\)~columns is \(n(n+1)/2\) or \(n(n-1)/2\) if the diagonal is
+%  \emph{null}. Therefore the computing of \cs{g_tmpa_int} from \cs{g_tmpb_int}
+%  which is equal to the number of coefficients, that is the number of items in
+%  the \emph{sequence} \cs{g_tmpa_seq}.
+% 
+% In the first case (upper triangular) there are coefficients on the diagonal so
+% we have to append \(L-1\) zeros before \(N+1-L\) coefficients where \(L\) is
+% the line number and \(N\) the number of columns.
+% 
+%    \begin{macrocode}
+      { S } {
+        \int_set:Nn \g_tmpb_int { \seq_count:N \g_tmpa_seq }
+        \int_set:Nn \g_tmpa_int
+        {
+          \fp_to_int:n { ( sqrt(1 + 8*\g_tmpb_int) - 1 ) / 2 }
+        }
+%    \end{macrocode}
+%  We check for correctness and abort in case of discrepancy.
+%    \begin{macrocode}
+        \int_compare:nNnF
+        {2*\g_tmpb_int} = { \g_tmpa_int * (\g_tmpa_int + 1)}
+        {
+          \msg_fatal:nnxx{simples-matrices}
+          {errorIJST}
+          {\int_to_arabic:n{(\g_tmpa_int * (\g_tmpa_int + 1))/2}}
+          {\int_to_arabic:n{\g_tmpb_int}}
+        }
+%    \end{macrocode}
+%  \verb|##1| is the line number of the matrix
+%    \begin{macrocode}
+        
+        \int_step_inline:nn { \g_tmpa_int } 
+        {
+          \int_step_inline:nn { ##1 - 1 }
+          {
+            \seq_put_right:Nn \l_tmpb_seq {0}
+          }
+          \int_step_inline:nn { \g_tmpa_int - ##1 + 1 }
+          {
+            \seq_pop:NN \g_tmpa_seq \l_tmpa_tl
+            \seq_put_right:NV \l_tmpb_seq \l_tmpa_tl
+          }
+        }
+        
+        \seq_set_eq:NN \g_tmpa_seq \l_tmpb_seq
+        
+      } 
+%    \end{macrocode}
+%  When there are zeros on the diagonal, the formula changes a tiny bit: append
+%  \(L\) zeros before \(N-L\) coefficients. 
+%    \begin{macrocode}
+      { T } {
+        \int_set:Nn \g_tmpb_int { \seq_count:N \g_tmpa_seq }
+        \int_set:Nn \g_tmpa_int
+        {
+          \fp_to_int:n { (1 + sqrt(1 + 8*\g_tmpb_int) ) / 2 }
+        }
+        \int_compare:nNnF
+        {2*\g_tmpb_int} = { \g_tmpa_int * (\g_tmpa_int - 1)}
+        {
+          \msg_fatal:nnxx{simples-matrices}
+          {errorIJST}
+          {\int_to_arabic:n{(\g_tmpa_int * (\g_tmpa_int - 1))/2}}
+          {\int_to_arabic:n{\g_tmpb_int}}
+        }
+        \int_step_inline:nn { \g_tmpa_int } 
+        {
+          \int_step_inline:nn { ##1 }
+          {
+            \seq_put_right:Nn \l_tmpb_seq {0}
+          }
+          \int_step_inline:nn { \g_tmpa_int - ##1 }
+          {
+            \seq_pop:NN \g_tmpa_seq \l_tmpa_tl
+            \seq_put_right:NV \l_tmpb_seq \l_tmpa_tl
+          }
+        }
+        \seq_set_eq:NN \g_tmpa_seq \l_tmpb_seq
+      } 
+%    \end{macrocode}
+%  Now come the cases for lower triangular matrices. First \emph{with diagonal}.
+%    \begin{macrocode}
+      { I } {
+        \int_set:Nn \g_tmpb_int { \seq_count:N \g_tmpa_seq }
+        \int_set:Nn \g_tmpa_int
+        {
+          \fp_to_int:n { ( sqrt(1 + 8*\g_tmpb_int) - 1 ) / 2 }
+        }
+        \int_compare:nNnF
+        {2*\g_tmpb_int} = { \g_tmpa_int * (\g_tmpa_int + 1)}
+        {
+          \msg_fatal:nnxx{simples-matrices}
+          {errorIJST}
+          {\int_to_arabic:n{(\g_tmpa_int * (\g_tmpa_int + 1))/2}}
+          {\int_to_arabic:n{\g_tmpb_int}}
+        }
+        \int_step_inline:nn { \g_tmpa_int } 
+        {
+          \int_step_inline:nn { ##1 }
+          {
+            \seq_pop:NN \g_tmpa_seq \l_tmpa_tl
+            \seq_put_right:NV \l_tmpb_seq \l_tmpa_tl
+          }
+          \int_step_inline:nn { \g_tmpa_int - ##1 }
+          {
+            \seq_put_right:Nn \l_tmpb_seq {0}
+          }
+        }
+        \seq_set_eq:NN \g_tmpa_seq \l_tmpb_seq
+      }
+%    \end{macrocode}
+%  Secondly \emph{without diagonal}.
+%    \begin{macrocode}
+      { J } {
+        \int_set:Nn \g_tmpb_int { \seq_count:N \g_tmpa_seq }
+        \int_set:Nn \g_tmpa_int
+        {
+          \fp_to_int:n { (1 + sqrt(1 + 8*\g_tmpb_int) ) / 2 }
+        }
+        \int_compare:nNnF
+        {2*\g_tmpb_int} = { \g_tmpa_int * (\g_tmpa_int - 1)}
+        {
+          \msg_fatal:nnxx{simples-matrices}
+          {errorIJST}
+          {\int_to_arabic:n{(\g_tmpa_int * (\g_tmpa_int - 1))/2}}
+          {\int_to_arabic:n{\g_tmpb_int}}
+        }
+        \int_step_inline:nn { \g_tmpa_int } 
+        {
+          \int_step_inline:nn { ##1 -1}
+          {
+            \seq_pop:NN \g_tmpa_seq \l_tmpa_tl
+            \seq_put_right:NV \l_tmpb_seq \l_tmpa_tl
+          }
+          \int_step_inline:nn { \g_tmpa_int - ##1 + 1}
+          {
+            \seq_put_right:Nn \l_tmpb_seq {0}
+          }
+        }
+        \seq_set_eq:NN \g_tmpa_seq \l_tmpb_seq
+      }
+    }
+%    \end{macrocode}
+%  Here we attain the \texttt{false} part of the second \texttt{case}. We assume
+%  that we have a number in \verb|#1|.
+%    \begin{macrocode}
+    { 
+      \int_set:Nn \g_tmpa_int { \l_tmpa_str }
+    }
+%    \end{macrocode}
+%  If all is well, here it ends well with the number of columns in
+%  \cs{g_tmpa_int} and all the coefficients of the matrix in \cs{g_tmpa_seq}. So
+%  it's time to call 
+%    \begin{macrocode}
+    \@@_creer_matrice_aux:
+  } 
+}
+%    \end{macrocode}
+% \end{macro} 
+% 
+% \begin{macro}{\MatriceInterieur}
+%   A document command to access the inner part of the \textbf{last} printed
+%   ---via \cs{matrice}--- or defined ---via \cs{declarermatrice}--- matrix. 
+% 
+%   This macro can be placed inside an \env{array}-like environment.
+%    \begin{macrocode}
+\cs_new:Npn \MatriceInterieur
+{
+  \tl_use:c { g_@@_contenu_anonyme*_tl }
+}
+%    \end{macrocode}
+% \end{macro} 
+% 
+% 
+% \begin{macro}{\LaMatriceInterieur}
+% A version to access the inner part of a named matrix: 
+% 
+%    \begin{macrocode}
+\cs_new:Npn \LaMatriceInterieur #1
+{
+  \tl_use:c { g_@@_contenu_nom_#1_tl }
+}
+%    \end{macrocode}
+% \end{macro} 
+% 
+% 
+% The next macro is used to print a matrix. Its name means \emph{prepare (the)
+% presentation} of the matrix. It builds the name of the environment, taking
+% care of possible arguments of the said environment. 
+% 
+% \begin{macro}{\@@_preparer_presentation:nn}
+% At the end of the macro, \cs{g_tmpa_tl} contains the \emph{overture} of the
+% environment and \cs{g_tmpb_tl} the \emph{grand final}.
+% 
+%    \begin{macrocode}
+\cs_new:Nn \@@_preparer_presentation:nn
+{
+  \IfValueT{#1}
+  {
+    \keys_set:nn {simples-matrices} {prefix = #1}
+  }
+  \IfValueT{#2}
+  {
+    \keys_set:nn {simples-matrices} { #2 }
+  }
+  \tl_set:NV \l_tmpa_tl \g_@@_prefix_environnement_tl
+  \tl_put_right:NV \l_tmpa_tl \g_@@_nom_environnement_tl      
+  \tl_set:Nn \g_tmpa_tl { \begin{\l_tmpa_tl} }
+  \tl_put_right:NV \g_tmpa_tl \g@@_argument_environnement_tl
+  \tl_set:Nn \g_tmpb_tl {\end{\l_tmpa_tl} }
+}
+%    \end{macrocode}
+% \end{macro}
+% 
+% Now comes the first main document command which prints the matrix from the
+% data-type and coefficients. It assigns the different arguments to the
+% auxiliary macros and finishes with using the token lists created by the
+% auxiliaries.
+% 
+% \begin{macro}{\matrice}
+%    \begin{macrocode}
+\NewDocumentCommand{\matrice}{ d() d<> O{O} m }
+{
+  \@@_creer_matrice:nn { #3 } { #4 }
+  \@@_preparer_presentation:nn { #1 } { #2 }
+  \tl_use:N \g_tmpa_tl
+  \tl_use:c { g_@@_contenu_anonyme*_tl }
+  \tl_use:N \g_tmpb_tl
+}
+%    \end{macrocode}
+% \end{macro} 
+% 
+% I provide a way of changing the keys inside the document with the usual
+% \emph{setup} macro:
+% \begin{macro}{\simplesmatricessetup}
+%    \begin{macrocode}
+\NewDocumentCommand{\simplesmatricessetup}{m}
+{
+  \keys_set:nn {simples-matrices} { #1 }
+}
+%    \end{macrocode}
+% \end{macro}
+% 
+% Another main document command to define a named matrix. The starred version
+% defines and prints.
+% 
+% The first mandatory argument ---the 4th of all--- should contain the ``name''
+% of the matrix with which one can recall the matrix using \cs{lamatrice}.
+% \begin{macro}{\declarermatrice}
+%    \begin{macrocode}
+\NewDocumentCommand{\declarermatrice}{ s d() d<> m  O{O} m }
+{
+  \@@_creer_matrice:nn { #5 } { #6 }
+  \tl_gset_eq:cc {g_@@_contenu_nom_#4_tl} {g_@@_contenu_anonyme*_tl}
+  \IfBooleanT { #1 }
+  {
+    \@@_preparer_presentation:nn { #2 } { #3 }
+    \tl_use:N \g_tmpa_tl
+    \tl_use:c { g_@@_contenu_anonyme*_tl }
+    \tl_use:N \g_tmpb_tl
+  }
+}
+%    \end{macrocode}
+% \end{macro}
+% 
+% To print a named matrix: 
+% \begin{macro}{\lamatrice}
+%    \begin{macrocode}
+\NewDocumentCommand{\lamatrice}{ d() d<> m }
+{
+  \@@_preparer_presentation:nn { #1 } { #2 }
+  \tl_use:N \g_tmpa_tl
+  \tl_use:c { g_@@_contenu_nom_#3_tl }
+  \tl_use:N \g_tmpb_tl
+}
+%    \end{macrocode}
+% \end{macro}  
+% 
+% For the next commands, I need a variant:  
+%    \begin{macrocode}
+\cs_generate_variant:Nn \@@_creer_matrice:nn { nV }
+%    \end{macrocode}
+% 
+% The auxiliary macro to print an identity matrix. \verb|#1| will receive the value
+% to print in the diagonal ---defaulting to \(1\)--- and \verb|#2| the number of
+% columns. 
+% \begin{macro}{\@@_creer_matrice_identite:nn}
+%    \begin{macrocode}
+\cs_new:Nn \@@_creer_matrice_identite:nn
+{
+  \clist_clear:N \l_tmpa_clist 
+  \int_step_inline:nn { #2 }
+  {
+    \clist_put_left:Nn \l_tmpa_clist { #1 }
+  }
+  \@@_creer_matrice:nV {D} \l_tmpa_clist
+}
+%    \end{macrocode}
+% \end{macro}
+% 
+% I can then use it to define the document command: 
+% \begin{macro}{\matid}
+%    \begin{macrocode}
+\NewDocumentCommand{\matid}{ d() d<> O{1} m}
+{
+  \@@_creer_matrice_identite:nn { #3 } { #4 }
+  \@@_preparer_presentation:nn  { #1 } { #2 }
+  \tl_use:N \g_tmpa_tl
+  \tl_use:c { g_@@_contenu_anonyme*_tl }
+  \tl_use:N \g_tmpb_tl
+}
+%    \end{macrocode}
+% \end{macro}
+% 
+% I follow the same pattern for null matrices. First the auxiliary macro, \verb|#2|
+% is the number of columns, \verb|#1| the value of all the coefficients ---defaulting
+% to \(0\)---.
+% \begin{macro}{\@@_creer_matrice_nulle:nn}
+%    \begin{macrocode}
+\cs_new:Nn \@@_creer_matrice_nulle:nn
+{
+  \clist_clear:N \l_tmpa_clist 
+  \int_step_inline:nn { #2*#2 }
+  {
+    \clist_put_left:Nn \l_tmpa_clist { #1 }
+  }
+  \@@_creer_matrice:nV {C} \l_tmpa_clist
+}
+%    \end{macrocode}
+% \end{macro}
+% 
+% I can again use it to define the document command: 
+% \begin{macro}{\matnulle}
+%    \begin{macrocode}
+\NewDocumentCommand{\matnulle}{ d() d<> O{0} m}
+{
+  \@@_creer_matrice_nulle:nn {#3} {#4}
+  \@@_preparer_presentation:nn { #1 } { #2 }
+  \tl_use:N \g_tmpa_tl
+  \tl_use:c { g_@@_contenu_anonyme*_tl }
+  \tl_use:N \g_tmpb_tl
+}
+%    \end{macrocode}
+% \end{macro}
+% 
+% \iffalse
+%</package>
+% \fi
+% 
+% \end{implementation}
+%
+% \Finale \PrintChanges\PrintIndex
+% 
+\endinput
+%%% Local Variables: 
+%%% mode: doctex
+%%% coding: utf-8
+%%% fill-column: 80
+%%% TeX-master: t
+%%% End: 


Property changes on: trunk/Master/texmf-dist/source/latex/simples-matrices/simples-matrices.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/simples-matrices/simples-matrices.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/simples-matrices/simples-matrices.ins	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/simples-matrices/simples-matrices.ins	2022-06-20 21:09:21 UTC (rev 63667)
@@ -0,0 +1,34 @@
+\iffalse meta-comment
+
+File simples-matrices.ins Copyright (C) 2019, 2020 Yvon Henel
+
+It may be distributed and/or modified under the conditions of the
+LaTeX Project Public License (LPPL), either version 1.3c of this
+license or (at your option) any later version.  The latest version
+of this license is in the file
+
+   http://www.latex-project.org/lppl.txt
+
+\fi
+
+\input l3docstrip.tex
+\askforoverwritefalse
+
+\preamble
+
+Do not distribute this file without also distributing the
+source files specified above.
+
+Do not distribute a modified version of this file.
+
+\endpreamble
+
+\keepsilent
+
+\generate{
+   \file{simples-matrices.sty}{\from{simples-matrices.dtx}{package}}
+   \file{simples-matrices-fra.tex}{\from{simples-matrices.dtx}{doc,FRA}}
+   \file{simples-matrices-eng.tex}{\from{simples-matrices.dtx}{doc,ENG}}
+}
+
+\endbatchfile

Added: trunk/Master/texmf-dist/tex/latex/simples-matrices/simples-matrices.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/simples-matrices/simples-matrices.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/simples-matrices/simples-matrices.sty	2022-06-20 21:09:21 UTC (rev 63667)
@@ -0,0 +1,341 @@
+%%
+%% This is file `simples-matrices.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% simples-matrices.dtx  (with options: `package')
+%% 
+%% Do not distribute this file without also distributing the
+%% source files specified above.
+%% 
+%% Do not distribute a modified version of this file.
+%% 
+%% File: simples-matrices.dtx
+%% Copyright (C) 2022 Yvon Henel aka Le TeXnicien de surface
+%%
+%% It may be distributed and/or modified under the conditions of the
+%% LaTeX Project Public License (LPPL), either version 1.3c of this
+%% license or (at your option) any later version.  The latest version
+%% of this license is in the file
+%%
+%%    http://www.latex-project.org/lppl.txt
+%%
+\RequirePackage{expl3}[2020/01/12]
+\GetIdInfo$Id: simples-matrices.dtx 1.0 2022-06-19 TdS $
+  {}
+\RequirePackage{l3keys2e,xparse}
+\ProvidesExplPackage
+{simples-matrices} {2022/06/08} {1.0} {defining and printing matrices}
+\RequirePackage{amsmath}
+\keys_define:nn {simples-matrices}
+{
+  envir .tl_set:N = \g__SMPLMTRC_nom_environnement_tl,
+  envir .initial:n = {matrix},
+  prefix .tl_set:N = \g__SMPLMTRC_prefix_environnement_tl,
+  prefix .initial:n = {p},
+  argopt .tl_set:N = \g__SMPLMTRC_argument_environnement_tl,
+  argopt .initial:n = { },
+  typeord .str_set:N = \g__SMPLMTRC_type_ordinaire_str,
+  typeord .initial:n = { C },
+}
+\ProcessKeysOptions {simples-matrices}
+\keys_define:nn {simples-matrices}
+{
+  out-of-box .meta:n = {prefix=p, envir=matrix, argopt=, typeord=C},
+}
+\regex_const:Nn \c__SMPLMTRC_xcas_debut_regexp {\[\[} %\]\]
+\regex_const:Nn \c__SMPLMTRC_xcas_fin_regexp {\]\]}
+\regex_const:Nn \c__SMPLMTRC_xcas_milieu_regexp{\],\ *\[} %\]
+\msg_new:nnnn{simples-matrices}{errorIJST}
+{The~number~of~coefficients~does~not~fit~the~matrix-type}
+{I~was~expecting~#1~coefficients~and~obtain~only~#2.}
+
+\msg_new:nnnn{simples-matrices}{errorx}
+{The~data~do~not~seem~to~match~the~x-type}
+{I~was~expecting~the~data~to~begin~with~"[["}
+\tl_new:c {g__SMPLMTRC_contenu_anonyme*_tl}
+\cs_new:Nn \__SMPLMTRC_creer_matrice_aux:
+{
+  \tl_gclear:c {g__SMPLMTRC_contenu_anonyme*_tl}
+
+  \seq_map_indexed_inline:Nn \g_tmpa_seq
+  {
+    \tl_gput_right:cn {g__SMPLMTRC_contenu_anonyme*_tl} { ##2  }
+    \int_compare:nNnTF { \int_mod:nn {##1} { \g_tmpa_int } } = { 0 }
+    {
+      \tl_gput_right:cn {g__SMPLMTRC_contenu_anonyme*_tl} { \\ }
+    }
+    {
+      \tl_gput_right:cn {g__SMPLMTRC_contenu_anonyme*_tl} { &  }
+    }
+  }
+}
+\cs_generate_variant:Nn \regex_match:nnF { nVF }
+\cs_new:Nn \__SMPLMTRC_creer_matrice:nn
+{
+  \tl_gclear:c {g__SMPLMTRC_contenu_anonyme*_tl}
+  \str_set:Nx \l_tmpa_str { #1 }
+  \str_if_eq:VnT \l_tmpa_str { O }
+  {
+    \str_set:NV \l_tmpa_str \g__SMPLMTRC_type_ordinaire_str
+  }
+  \str_case:VnF \l_tmpa_str
+  {
+    { x } {
+      \tl_set:Nn \l_tmpa_tl { #2 }
+
+      \regex_match:nVF {\A\s*\[\[} %\]\]
+      \l_tmpa_tl
+      {
+          \msg_fatal:nn{simples-matrices} {errorx}
+      }
+
+      \regex_replace_all:NnN \c__SMPLMTRC_xcas_debut_regexp { } \l_tmpa_tl
+      \regex_replace_all:NnN \c__SMPLMTRC_xcas_fin_regexp { \c{\\} } \l_tmpa_tl
+      \regex_replace_all:NnN \c__SMPLMTRC_xcas_milieu_regexp { \c{\\} } \l_tmpa_tl
+      \regex_replace_all:nnN { , }{ & } \l_tmpa_tl
+
+      \tl_set_eq:cN {g__SMPLMTRC_contenu_anonyme*_tl} \l_tmpa_tl
+    }
+  }
+  {
+    \seq_set_from_clist:Nn \g_tmpa_seq { #2 }
+    \seq_clear:N \l_tmpb_seq
+    \str_case:VnF \l_tmpa_str
+    {
+      { C } {
+        \int_set:Nn \g_tmpb_int { \seq_count:N \g_tmpa_seq }
+        \int_set:Nn \g_tmpa_int { \fp_to_int:n { sqrt(\g_tmpb_int) } }
+      }
+      { D } {
+        \int_set:Nn \g_tmpa_int { \seq_count:N \g_tmpa_seq }
+        \seq_pop_left:NN \g_tmpa_seq \l_tmpa_tl
+        \seq_put_right:NV \l_tmpb_seq \l_tmpa_tl
+
+        \bool_until_do:nn { \seq_if_empty_p:N \g_tmpa_seq }
+        {
+          \int_step_inline:nn { \g_tmpa_int }
+          {
+            \seq_put_right:Nn \l_tmpb_seq { 0 }
+          }
+          \seq_pop:NN \g_tmpa_seq \l_tmpa_tl
+          \seq_put_right:NV \l_tmpb_seq \l_tmpa_tl
+        }
+        \seq_set_eq:NN \g_tmpa_seq \l_tmpb_seq
+      }
+      { S } {
+        \int_set:Nn \g_tmpb_int { \seq_count:N \g_tmpa_seq }
+        \int_set:Nn \g_tmpa_int
+        {
+          \fp_to_int:n { ( sqrt(1 + 8*\g_tmpb_int) - 1 ) / 2 }
+        }
+        \int_compare:nNnF
+        {2*\g_tmpb_int} = { \g_tmpa_int * (\g_tmpa_int + 1)}
+        {
+          \msg_fatal:nnxx{simples-matrices}
+          {errorIJST}
+          {\int_to_arabic:n{(\g_tmpa_int * (\g_tmpa_int + 1))/2}}
+          {\int_to_arabic:n{\g_tmpb_int}}
+        }
+
+        \int_step_inline:nn { \g_tmpa_int }
+        {
+          \int_step_inline:nn { ##1 - 1 }
+          {
+            \seq_put_right:Nn \l_tmpb_seq {0}
+          }
+          \int_step_inline:nn { \g_tmpa_int - ##1 + 1 }
+          {
+            \seq_pop:NN \g_tmpa_seq \l_tmpa_tl
+            \seq_put_right:NV \l_tmpb_seq \l_tmpa_tl
+          }
+        }
+
+        \seq_set_eq:NN \g_tmpa_seq \l_tmpb_seq
+
+      }
+      { T } {
+        \int_set:Nn \g_tmpb_int { \seq_count:N \g_tmpa_seq }
+        \int_set:Nn \g_tmpa_int
+        {
+          \fp_to_int:n { (1 + sqrt(1 + 8*\g_tmpb_int) ) / 2 }
+        }
+        \int_compare:nNnF
+        {2*\g_tmpb_int} = { \g_tmpa_int * (\g_tmpa_int - 1)}
+        {
+          \msg_fatal:nnxx{simples-matrices}
+          {errorIJST}
+          {\int_to_arabic:n{(\g_tmpa_int * (\g_tmpa_int - 1))/2}}
+          {\int_to_arabic:n{\g_tmpb_int}}
+        }
+        \int_step_inline:nn { \g_tmpa_int }
+        {
+          \int_step_inline:nn { ##1 }
+          {
+            \seq_put_right:Nn \l_tmpb_seq {0}
+          }
+          \int_step_inline:nn { \g_tmpa_int - ##1 }
+          {
+            \seq_pop:NN \g_tmpa_seq \l_tmpa_tl
+            \seq_put_right:NV \l_tmpb_seq \l_tmpa_tl
+          }
+        }
+        \seq_set_eq:NN \g_tmpa_seq \l_tmpb_seq
+      }
+      { I } {
+        \int_set:Nn \g_tmpb_int { \seq_count:N \g_tmpa_seq }
+        \int_set:Nn \g_tmpa_int
+        {
+          \fp_to_int:n { ( sqrt(1 + 8*\g_tmpb_int) - 1 ) / 2 }
+        }
+        \int_compare:nNnF
+        {2*\g_tmpb_int} = { \g_tmpa_int * (\g_tmpa_int + 1)}
+        {
+          \msg_fatal:nnxx{simples-matrices}
+          {errorIJST}
+          {\int_to_arabic:n{(\g_tmpa_int * (\g_tmpa_int + 1))/2}}
+          {\int_to_arabic:n{\g_tmpb_int}}
+        }
+        \int_step_inline:nn { \g_tmpa_int }
+        {
+          \int_step_inline:nn { ##1 }
+          {
+            \seq_pop:NN \g_tmpa_seq \l_tmpa_tl
+            \seq_put_right:NV \l_tmpb_seq \l_tmpa_tl
+          }
+          \int_step_inline:nn { \g_tmpa_int - ##1 }
+          {
+            \seq_put_right:Nn \l_tmpb_seq {0}
+          }
+        }
+        \seq_set_eq:NN \g_tmpa_seq \l_tmpb_seq
+      }
+      { J } {
+        \int_set:Nn \g_tmpb_int { \seq_count:N \g_tmpa_seq }
+        \int_set:Nn \g_tmpa_int
+        {
+          \fp_to_int:n { (1 + sqrt(1 + 8*\g_tmpb_int) ) / 2 }
+        }
+        \int_compare:nNnF
+        {2*\g_tmpb_int} = { \g_tmpa_int * (\g_tmpa_int - 1)}
+        {
+          \msg_fatal:nnxx{simples-matrices}
+          {errorIJST}
+          {\int_to_arabic:n{(\g_tmpa_int * (\g_tmpa_int - 1))/2}}
+          {\int_to_arabic:n{\g_tmpb_int}}
+        }
+        \int_step_inline:nn { \g_tmpa_int }
+        {
+          \int_step_inline:nn { ##1 -1}
+          {
+            \seq_pop:NN \g_tmpa_seq \l_tmpa_tl
+            \seq_put_right:NV \l_tmpb_seq \l_tmpa_tl
+          }
+          \int_step_inline:nn { \g_tmpa_int - ##1 + 1}
+          {
+            \seq_put_right:Nn \l_tmpb_seq {0}
+          }
+        }
+        \seq_set_eq:NN \g_tmpa_seq \l_tmpb_seq
+      }
+    }
+    {
+      \int_set:Nn \g_tmpa_int { \l_tmpa_str }
+    }
+    \__SMPLMTRC_creer_matrice_aux:
+  }
+}
+\cs_new:Npn \MatriceInterieur
+{
+  \tl_use:c { g__SMPLMTRC_contenu_anonyme*_tl }
+}
+\cs_new:Npn \LaMatriceInterieur #1
+{
+  \tl_use:c { g__SMPLMTRC_contenu_nom_#1_tl }
+}
+\cs_new:Nn \__SMPLMTRC_preparer_presentation:nn
+{
+  \IfValueT{#1}
+  {
+    \keys_set:nn {simples-matrices} {prefix = #1}
+  }
+  \IfValueT{#2}
+  {
+    \keys_set:nn {simples-matrices} { #2 }
+  }
+  \tl_set:NV \l_tmpa_tl \g__SMPLMTRC_prefix_environnement_tl
+  \tl_put_right:NV \l_tmpa_tl \g__SMPLMTRC_nom_environnement_tl
+  \tl_set:Nn \g_tmpa_tl { \begin{\l_tmpa_tl} }
+  \tl_put_right:NV \g_tmpa_tl \g__SMPLMTRC_argument_environnement_tl
+  \tl_set:Nn \g_tmpb_tl {\end{\l_tmpa_tl} }
+}
+\NewDocumentCommand{\matrice}{ d() d<> O{O} m }
+{
+  \__SMPLMTRC_creer_matrice:nn { #3 } { #4 }
+  \__SMPLMTRC_preparer_presentation:nn { #1 } { #2 }
+  \tl_use:N \g_tmpa_tl
+  \tl_use:c { g__SMPLMTRC_contenu_anonyme*_tl }
+  \tl_use:N \g_tmpb_tl
+}
+\NewDocumentCommand{\simplesmatricessetup}{m}
+{
+  \keys_set:nn {simples-matrices} { #1 }
+}
+\NewDocumentCommand{\declarermatrice}{ s d() d<> m  O{O} m }
+{
+  \__SMPLMTRC_creer_matrice:nn { #5 } { #6 }
+  \tl_gset_eq:cc {g__SMPLMTRC_contenu_nom_#4_tl} {g__SMPLMTRC_contenu_anonyme*_tl}
+  \IfBooleanT { #1 }
+  {
+    \__SMPLMTRC_preparer_presentation:nn { #2 } { #3 }
+    \tl_use:N \g_tmpa_tl
+    \tl_use:c { g__SMPLMTRC_contenu_anonyme*_tl }
+    \tl_use:N \g_tmpb_tl
+  }
+}
+\NewDocumentCommand{\lamatrice}{ d() d<> m }
+{
+  \__SMPLMTRC_preparer_presentation:nn { #1 } { #2 }
+  \tl_use:N \g_tmpa_tl
+  \tl_use:c { g__SMPLMTRC_contenu_nom_#3_tl }
+  \tl_use:N \g_tmpb_tl
+}
+\cs_generate_variant:Nn \__SMPLMTRC_creer_matrice:nn { nV }
+\cs_new:Nn \__SMPLMTRC_creer_matrice_identite:nn
+{
+  \clist_clear:N \l_tmpa_clist
+  \int_step_inline:nn { #2 }
+  {
+    \clist_put_left:Nn \l_tmpa_clist { #1 }
+  }
+  \__SMPLMTRC_creer_matrice:nV {D} \l_tmpa_clist
+}
+\NewDocumentCommand{\matid}{ d() d<> O{1} m}
+{
+  \__SMPLMTRC_creer_matrice_identite:nn { #3 } { #4 }
+  \__SMPLMTRC_preparer_presentation:nn  { #1 } { #2 }
+  \tl_use:N \g_tmpa_tl
+  \tl_use:c { g__SMPLMTRC_contenu_anonyme*_tl }
+  \tl_use:N \g_tmpb_tl
+}
+\cs_new:Nn \__SMPLMTRC_creer_matrice_nulle:nn
+{
+  \clist_clear:N \l_tmpa_clist
+  \int_step_inline:nn { #2*#2 }
+  {
+    \clist_put_left:Nn \l_tmpa_clist { #1 }
+  }
+  \__SMPLMTRC_creer_matrice:nV {C} \l_tmpa_clist
+}
+\NewDocumentCommand{\matnulle}{ d() d<> O{0} m}
+{
+  \__SMPLMTRC_creer_matrice_nulle:nn {#3} {#4}
+  \__SMPLMTRC_preparer_presentation:nn { #1 } { #2 }
+  \tl_use:N \g_tmpa_tl
+  \tl_use:c { g__SMPLMTRC_contenu_anonyme*_tl }
+  \tl_use:N \g_tmpb_tl
+}
+\endinput
+%%
+%% End of file `simples-matrices.sty'.


Property changes on: trunk/Master/texmf-dist/tex/latex/simples-matrices/simples-matrices.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2022-06-20 21:08:21 UTC (rev 63666)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2022-06-20 21:09:21 UTC (rev 63667)
@@ -724,7 +724,7 @@
     sidecap sidenotes sidenotesplus sides signchart silence sillypage
     simple-resume-cv simple-thesis-dissertation simplebnf simplecd simplecv
     simpleicons simpleinvoice simplekv simplenodes
-    simpleoptics simpler-wick simplewick
+    simpleoptics simpler-wick simples-matrices simplewick
     simplified-latex simplivre simurgh
     sistyle sitem siunits siunitx
     skak skaknew skb skdoc skeldoc skeycommand skeyval

Modified: trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc	2022-06-20 21:08:21 UTC (rev 63666)
+++ trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc	2022-06-20 21:09:21 UTC (rev 63667)
@@ -196,6 +196,7 @@
 depend shuffle
 depend simplebnf
 depend simpler-wick
+depend simples-matrices
 depend simplewick
 depend sistyle
 depend siunits

Added: trunk/Master/tlpkg/tlpsrc/simples-matrices.tlpsrc
===================================================================


More information about the tex-live-commits mailing list.