texlive[72387] Master: commalists-tools (26sep24)

commits+karl at tug.org commits+karl at tug.org
Thu Sep 26 21:42:42 CEST 2024


Revision: 72387
          https://tug.org/svn/texlive?view=revision&revision=72387
Author:   karl
Date:     2024-09-26 21:42:42 +0200 (Thu, 26 Sep 2024)
Log Message:
-----------
commalists-tools (26sep24)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/libexec/ctan2tds
    trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/commalists-tools/
    trunk/Master/texmf-dist/doc/latex/commalists-tools/README.md
    trunk/Master/texmf-dist/doc/latex/commalists-tools/commalists-tools-doc.pdf
    trunk/Master/texmf-dist/doc/latex/commalists-tools/commalists-tools-doc.tex
    trunk/Master/texmf-dist/tex/latex/commalists-tools/
    trunk/Master/texmf-dist/tex/latex/commalists-tools/commalists-tools.sty
    trunk/Master/tlpkg/tlpsrc/commalists-tools.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/commalists-tools/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/commalists-tools/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/commalists-tools/README.md	2024-09-26 19:42:42 UTC (rev 72387)
@@ -0,0 +1,6 @@
+This package provides some macros for manipulating numeral comma separated lists.
+Available tools are adding, removing, counting, testing, reversing, sorting, etc
+---------------------------------------------------------------------------------
+Author..: Cédric Pierquet
+email...: cpierquet at outlook.fr
+Licence.: Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
\ No newline at end of file


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

Index: trunk/Master/texmf-dist/doc/latex/commalists-tools/commalists-tools-doc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/commalists-tools/commalists-tools-doc.pdf	2024-09-25 23:42:26 UTC (rev 72386)
+++ trunk/Master/texmf-dist/doc/latex/commalists-tools/commalists-tools-doc.pdf	2024-09-26 19:42:42 UTC (rev 72387)

Property changes on: trunk/Master/texmf-dist/doc/latex/commalists-tools/commalists-tools-doc.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/commalists-tools/commalists-tools-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/commalists-tools/commalists-tools-doc.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/commalists-tools/commalists-tools-doc.tex	2024-09-26 19:42:42 UTC (rev 72387)
@@ -0,0 +1,415 @@
+% !TeX TXS-program:compile = txs:///arara
+% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode}
+% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode}
+
+\documentclass[11pt,a4paper]{ltxdoc}
+\usepackage{bera}
+\usepackage{inconsolata}
+\usepackage[T1]{fontenc}
+\usepackage[scale=0.875]{cabin}
+\usepackage{commalists-tools}
+\usepackage{fancyvrb}
+\usepackage{fancyhdr}
+\usepackage{tabularray}
+\usepackage{fontawesome5}
+\fancyhf{}
+\renewcommand{\headrulewidth}{0pt}
+\lfoot{\sffamily\small [commalists-tools]}
+\cfoot{\sffamily\small - \thepage{} -}
+\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}}
+\usepackage{hologo}
+\providecommand\tikzlogo{Ti\textit{k}Z}
+\providecommand\TeXLive{\TeX{}Live\xspace}
+\let\TikZ\tikzlogo
+
+\usepackage{hyperref}
+\urlstyle{same}
+\hypersetup{pdfborder=0 0 0}
+\usepackage[margin=2cm]{geometry}
+\setlength{\parindent}{0pt}
+\def\TPversion{0.1.0}
+\def\TPdate{25/09/2024}
+\usepackage{tcolorbox}
+\usepackage{pgffor}
+\tcbuselibrary{breakable,skins,hooks,listingsutf8}
+%\usepackage{soul}
+%\sethlcolor{lightgray!25}
+
+\lstset{
+	language=[LaTeX]TeX,%
+	basicstyle=\ttfamily,%
+	keywordstyle={\color{blue}},%
+	classoffset=0,%
+	keywords={},%
+	alsoletter={-},%
+	keywordstyle={\color{blue}},%
+	classoffset=1,%
+	alsoletter={-},%
+	morekeywords={commalists-tools},%
+	keywordstyle={\color{violet}},%
+	classoffset=2,%
+	alsoletter={-},%
+	morekeywords={\sortasclist,\sortdeslist,\addvalinlist,\removevalinlist,\boolvalinlist,\xintifvalinlist,\countvalinlist,\minoflist,\maxoflist,\meanoflist,\sumoflist,\prodoflist,\reverselist,\getvaluefromlist},%
+	keywordstyle={\color{green!50!black}},%
+	classoffset=3,%
+	morekeywords={},%
+	keywordstyle={\color{orange}}
+}
+
+\newtcblisting{DemoCode}[1]{%
+	enhanced,width=\linewidth,%
+	bicolor,size=title,%
+	colback=cyan!10!white,%
+	colbacklower=cyan!5!white,%
+	colframe=cyan!75!black,%
+	listing options={%
+		breaklines=true,%
+		breakatwhitespace=true,%
+		style=tcblatex,basicstyle=\small\ttfamily,%
+		tabsize=4,%
+		commentstyle={\itshape\color{gray}},
+		keywordstyle={\color{blue}},%
+		classoffset=0,%
+		keywords={\usepackage,\includegraphics,xstring,listofitems,\readlist,\showitems,\xintFor,\xintSeq},%
+		alsoletter={-},%
+		keywordstyle={\color{blue}},%
+		classoffset=1,%
+		alsoletter={-},%
+		morekeywords={euromoney},%
+		keywordstyle={\color{violet}},%
+		classoffset=2,%
+		alsoletter={-},%
+		morekeywords={\sortasclist,\sortdeslist,\addvalinlist,\removevalinlist,\boolvalinlist,\xintifvalinlist,\countvalinlist,\minoflist,\maxoflist,\meanoflist,\sumoflist,\prodoflist,\reverselist,\getvaluefromlist},%
+		keywordstyle={\color{green!50!black}},%
+		classoffset=3,%
+		morekeywords={},%
+		keywordstyle={\color{orange}}
+	},%
+	#1
+}
+
+\newtcbinputlisting\DemoCodeFile[1]{%
+	enhanced,width=\linewidth,%
+	bicolor,size=title,%
+	colback=lightgray!10!white,%
+	colbacklower=lightgray!5!white,%
+	colframe=lightgray!75!black,%
+	listing options={%
+		breaklines=true,%
+		breakatwhitespace=true,%
+		style=tcblatex,
+		basicstyle=\scriptsize\ttfamily,%
+		tabsize=4,%
+		commentstyle={\itshape\color{gray}},%
+		%lastline=148
+	},%
+	breakable,
+	listing only,%
+	listing file={#1}
+}
+
+\NewDocumentCommand\ShowCode{ m }{%
+	\lstinline{#1}%
+}
+
+\begin{document}
+
+\thispagestyle{empty}
+
+\begin{center}
+	\begin{minipage}{0.88\linewidth}
+		\begin{tcolorbox}[colframe=yellow,colback=yellow!15]
+			\begin{center}
+				\renewcommand{\arraystretch}{1.25}%
+				\begin{tabular}{c}
+					{\Huge \texttt{commalists-tools}}\\
+					\\
+					{\LARGE Macros for manipulating numeral} \\
+					{\LARGE comma separated lists :} \\
+					{\LARGE sorting, adding, removing, etc} \\
+					\\
+					{\small \texttt{Version \TPversion{} -- \TPdate}}
+				\end{tabular}
+			\end{center}
+		\end{tcolorbox}
+	\end{minipage}
+\end{center}
+
+\begin{center}
+	\begin{tabular}{c}
+		\texttt{Cédric Pierquet}\\
+		{\ttfamily c pierquet -- at -- outlook . fr}\\
+		\texttt{\url{https://github.com/cpierquet/commalists-tools}} \\
+	\end{tabular}
+\end{center}
+
+\hrule
+
+\vfill
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5,listing only}
+\def\mytestlist{14,10,15,11,9,10}
+\minoflist*{\mytestlist}
+\maxoflist*{14,10,15,11,9,10}
+\sortasclist*{\mytestlist}
+\meanoflist*{\mytestlist}
+\removevalinlist*{10}{\mytestlist}
+\xintifvalinlist{15}{\mytestlist}{true}{false}
+\end{tcblisting}
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+\def\mytestlist{14,10,15,11,9,10}
+We consider the list : \mytestlist\par\smallskip
+The minimum value is \minoflist*{\mytestlist} and the maximum is \maxoflist*{14,10,15,11,9,10}\par\smallskip
+Ascending sorted list is \sortasclist*{\mytestlist}\par\smallskip
+Meaning value of the list is \meanoflist*{\mytestlist}\par\smallskip
+If we remove the value 10, the the list is \removevalinlist*{10}{\mytestlist}\par\smallskip
+We test if 15 is in the list : \xintifvalinlist{15}{\mytestlist}{true}{false}
+\end{tcolorbox}
+
+\vfill~
+
+%\hrule
+%
+%\medskip
+
+%\emph{%
+%	The \textsf{luarandom} package do the same things, but with the obligation to compile with \hologo{LuaLaTeX}.
+%}
+%
+%\medskip
+
+\hrule
+
+\vspace*{5mm}
+
+\pagebreak
+
+\phantomsection
+
+\hypertarget{matoc}{}
+
+\tableofcontents
+
+\vspace*{5mm}
+
+%\hrule
+
+\pagebreak
+
+\section{Loading, useful packages}
+
+In order to load \texttt{randintlist}, simply use :
+
+\begin{DemoCode}{listing only}
+\usepackage{commalists-tools}
+\end{DemoCode}
+
+Loaded packages are \texttt{listofitems}, \texttt{xintexpr} and \texttt{xstring}.
+
+\smallskip
+
+The idea is to propose "reusage" of lists with \texttt{listofitems} or other commands, for example.
+
+\section{The Macros}
+
+\subsection{Global usage}
+
+Package \texttt{commalists-tools} supports (basic) manipulations on numeral comma separated lists :
+
+\begin{itemize}
+	\item sorting ;
+	\item adding values ;
+	\item removing values ;
+	\item counting values ;
+	\item mean, sum, product ;
+	\item etc
+\end{itemize}
+
+Starred versions only print the result, whereas non starred versions store the result into a macro.
+
+\medskip
+
+\hfill\textbf{All engines \TeX\ are compatible with this package.}\hfill~
+
+\subsection{The macros for calculing}
+
+\begin{DemoCode}{listing only}
+%getting min of list, only printing
+\minoflist*{list}
+%storing min of list into \macro (\resmin by default)
+\minoflist{list}[\macro]
+%getting max of list, only printing
+\maxoflist*{list}
+%storing max of list into \macro (\resmax by default)
+\maxoflist{list}[\macro]
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%only printing
+\minoflist*{14,10,15,11,9,10} and \maxoflist*{14,10,15,11,9,10} \\
+%storing min/max of list
+\def\mytestlist{10,14.5,20,12,8.5}
+\minoflist{\mytestlist}[\mymin]Min of list is \mymin\ \&
+\maxoflist{\mytestlist}[\mymax]Max of list is \mymax
+\end{DemoCode}
+
+\begin{DemoCode}{listing only}
+%getting mean of list, only printing
+\meanoflist*{list}
+%storing mean of list into \macro (\resmean by default)
+\meanoflist{list}[\macro]
+%getting sum of list, only printing
+\sumoflist*{list}
+%storing max of list into \macro (\ressum by default)
+\sumoflist{list}[\macro]
+%getting prod of list, only printing
+\prodoflist*{list}
+%storing max of list into \macro (\resprod by default)
+\prodoflist{list}[\macro]
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%only printing
+\meanoflist*{14,10,15,11,9,10} \\
+%storing
+\meanoflist{14,10,15,11,9,10}[\mymean]\mymean \\
+%only printing
+\sumoflist*{14,10,15,11,9,10} and \prodoflist*{14,10,15,11,9,10} \\
+%storing
+\sumoflist{14,10,15,11,9,10}[\mysum]\prodoflist{14,10,15,11,9,10}[\myprod]
+The sum is \mysum\ and the prod is \myprod
+\end{DemoCode}
+
+\subsection{Macros for manipulating}
+
+\begin{DemoCode}{listing only}
+%sorting (asc), only printing
+\sortasclist*{list}
+%sorting (asc) and storing (overwrite)
+\sortasclist{list}
+%sorting (des), only printing
+\sortdeslist*{list}
+%sorting (des) and storing (overwrite)
+\sortdeslist{list}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%sorting (asc), only printing
+\sortasclist*{14,10,15,11,9,10}\\
+%sorting (asc) and storing (overwrite)
+\def\tmpsortlist{14,10,15,11,9,10}
+\sortasclist{\tmpsortlist}\tmpsortlist\\
+%analysing
+\readlist*\tmpSORTlist{\tmpsortlist}
+\showitems{\tmpSORTlist}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%sorting (des), only printing
+\sortdeslist*{14,10,15,11,9,10}\\
+%sorting (asc) and storing (overwrite)
+\def\tmpsortlist{14,10,15,11,9,10}
+\sortdeslist{\tmpsortlist}\tmpsortlist\\
+%analysing
+\readlist*\tmpSORTlist{\tmpsortlist}
+\showitems{\tmpSORTlist}
+\end{DemoCode}
+
+\begin{DemoCode}{listing only}
+%adding, only printing
+\addvalinlist*{values}{list}
+%adding and storing (overwrite)
+\addvalinlist{values}{list}
+%removing, only printing
+\removevalinlist*{value}{list}
+%removing and storing (overwrite)
+\removevalinlist{value}{list}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%only printing
+\addvalinlist*{3}{1,2,5,6}\\
+%defining and adding
+\def\tmpaddlist{1,2,4,5,6}
+\addvalinlist{3}{\tmpaddlist}\tmpaddlist\\
+%analysing
+\readlist*\tmpADDlist{\tmpaddlist}
+\showitems{\tmpADDlist}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%only printing
+\removevalinlist*{3}{1,2,3,6,3,1,5,7,3}\\
+%defining and removing
+\def\tmpremlist{1,2,3,6,3,1,5,7,3}
+\removevalinlist{3}{\tmpremlist}\tmpremlist\\
+%analysing
+\readlist*\tmpREMlist{\tmpremlist}
+\showitems{\tmpREMlist}
+\end{DemoCode}
+
+\begin{DemoCode}{listing only}
+%reversing, only printing
+\reverselist*{list}
+%reversing and storing (overwrite)
+\reverselist{list}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%only printing
+\reverselist*{14,10,15,11,9,10}\\
+%reversing and storing
+%storing
+\reverselist{14,10,15,11,9,10}[\myreverse]\myreverse\\
+%analysing
+\readlist*\tmpREVERSElist{\myreverse}
+\showitems{\tmpREVERSElist}
+\end{DemoCode}
+
+\subsection{Macros with testing}
+
+\begin{DemoCode}{listing only}
+%testing if value is in list, with boolean result in \macro (\resisinlist by default)
+\boolvalinlist{value}{list}[\macro]
+%conditionnal test if value is in list, according to xint syntax
+\xintifvalinlist{3}{0,1,2,3}{true}{false}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%test with xint syntax
+\xintifvalinlist{-1}{0,1,2,3}{true}{false}\\
+%test with xint syntax
+\xintifvalinlist{3}{0,1,2,3}{true}{false}\\
+%boolean macro
+\def\myteslist{0,5,10,5,6,9,7,8}
+\boolvalinlist{5}{\myteslist}[\resisinlist]\resisinlist
+\end{DemoCode}
+
+\begin{DemoCode}{listing only}
+%counting value, only printing
+\countvalinlist*{value}{list}
+%counting value, with result in \macro (\rescount by default)
+\countvalinlist{value}{list}[\macro]
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%only printing
+\countvalinlist*{8}{1,2,3,4,5,6,6,7,8,8,8,9}\\
+%storing
+\def\tmpcountlist{1,2,3,4,5,6,6,7,8,8,8,9}
+\countvalinlist{6}{\tmpcountlist}[\rescountsix]\rescountsix\\
+\countvalinlist{10}{\tmpcountlist}[\rescountten]\rescountten
+\end{DemoCode}
+
+\pagebreak
+
+\section{History}
+
+\texttt{0.1.0 : Initial version}
+
+\section{The code}
+
+\DemoCodeFile{commalists-tools.sty}
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/commalists-tools/commalists-tools-doc.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/commalists-tools/commalists-tools.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/commalists-tools/commalists-tools.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/commalists-tools/commalists-tools.sty	2024-09-26 19:42:42 UTC (rev 72387)
@@ -0,0 +1,188 @@
+% Author     : C. Pierquet
+% licence    : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{commalists-tools}[2024/09/25 0.1.0 Basic operations for numeral comma separated lists]
+
+%------History
+% 0.1.0	Initial version
+
+%------Packages
+\RequirePackage{listofitems}
+\RequirePackage{xintexpr}
+\RequirePackage{xstring}
+
+%-----Macros (LaTeX3...) for sorting
+\ExplSyntaxOn
+\NewDocumentCommand\sortasclist{ s m }
+{
+	\clist_set:Nx \l_foo_clist {#2}
+	\clist_sort:Nn \l_foo_clist{
+		\int_compare:nNnTF { ##1 } > { ##2 }
+			{ \sort_return_swapped: }
+			{ \sort_return_same: }
+	}
+	\IfBooleanTF{#1}%if star := just printing // if not, storing
+		{%
+			{\l_foo_clist}%
+		}%
+		{%
+			\xdef#2{\l_foo_clist}%
+		}%
+}
+
+\NewDocumentCommand\sortdeslist{ s m }
+{
+	\clist_set:Nx \l_foo_clist {#2}
+	\clist_sort:Nn \l_foo_clist{
+		\int_compare:nNnTF { ##1 } < { ##2 }
+			{ \sort_return_swapped: }
+			{ \sort_return_same: }
+	}
+	\IfBooleanTF{#1}%if star := just printing // if not, storing
+		{%
+			{\l_foo_clist}%
+		}%
+		{%
+			\xdef#2{\l_foo_clist}%
+		}%
+} 
+\ExplSyntaxOff
+
+%----Macros (LaTeX2)
+\NewDocumentCommand\addvalinlist{ s m m }{%
+	\IfBooleanTF{#1}%if star := just printing // if not, storing
+		{%
+			#3,#2%
+		}%
+		{%
+			\xdef#3{#3,#2}%
+		}%
+}
+
+\NewDocumentCommand\removevalinlist{ s m m }{%
+	\readlist*\tmplistread{#3}%
+	\xdef\tmpresremovelist{}%
+	\xintFor* ##1 in {\xintSeq{1}{\tmplistreadlen}}\do{%
+		\xintifboolexpr{ \tmplistread[##1] == #2}%
+			{}%
+			{%
+				\xintifboolexpr{ ##1 == 1 }%
+					{%
+						\xdef\tmpresremovelist{\tmplistread[##1]}%
+					}%
+					{%
+						\xdef\tmpresremovelist{\tmpresremovelist,\tmplistread[##1]}%
+					}%
+			}%
+	}%
+	\IfBooleanTF{#1}%if star := just printing // if not, storing
+		{%
+			\tmpresremovelist%
+		}%
+		{%
+			\xdef#3{\tmpresremovelist}%
+		}%
+}
+
+\NewDocumentCommand\boolvalinlist{ m m O{\resisinlist} }{%
+	\IfSubStr{,#2,}{,#1,}{\def#3{1}}{\def#3{0}}%
+}
+
+\NewDocumentCommand\xintifvalinlist{ m m m m }{%
+	\IfSubStr{,#2,}{,#1,}{\xdef\RESTMPVALUE{1}}{\xdef\RESTMPVALUE{0}}%
+	\xintifboolexpr{ \RESTMPVALUE == 1}{#3}{#4}%
+}
+
+\NewDocumentCommand\countvalinlist{ s m m O{\rescount} }{%
+	\readlist*\tmplistread{#3}%
+	\xdef#4{0}%
+	\xintFor* ##1 in {\xintSeq{1}{\tmplistreadlen}}\do{%
+		\xintifboolexpr{ \tmplistread[##1] == #2}%
+		{%
+			\xdef#4{\fpeval{#4+1}}%
+		}%
+		{}%
+	}%
+	\IfBooleanT{#1}%if star := just printing // if not, storing
+		{%
+			#4%
+		}%
+}
+
+\NewDocumentCommand\minoflist{ s m O{\resmin} }{%
+	\IfBooleanTF{#1}%
+		{%
+			\fpeval{min(#2)}%
+		}%
+		{%
+			\xdef#3{\fpeval{min(#2)}}%
+		}%
+}
+
+\NewDocumentCommand\maxoflist{ s m O{\resmax} }{%
+	\IfBooleanTF{#1}%
+		{%
+			\fpeval{max(#2)}%
+		}%
+		{%
+			\xdef#3{\fpeval{max(#2)}}%
+		}%
+}
+
+\NewDocumentCommand\meanoflist{ s m O{\resmean} }{%
+	\xdef#3{0}%
+	\readlist*\tmpmeanlist{#2}%
+	\xintFor* ##1 in {\xintSeq{1}{\tmpmeanlistlen}}\do{%
+		\xdef#3{\fpeval{#3+\tmpmeanlist[##1]}}%
+	}%
+	\xdef#3{\fpeval{(#3)/\tmpmeanlistlen}}%
+	\IfBooleanT{#1}%if star := just printing // if not, storing
+		{%
+			#3%
+		}%
+}
+
+\NewDocumentCommand\sumoflist{ s m O{\ressum} }{%
+	\xdef#3{0}%
+	\readlist*\tmpsumlist{#2}%
+	\xintFor* ##1 in {\xintSeq{1}{\tmpsumlistlen}}\do{%
+		\xdef#3{\fpeval{#3+\tmpsumlist[##1]}}%
+	}%
+	\IfBooleanT{#1}%if star := just printing // if not, storing
+		{%
+			#3%
+		}%
+}
+
+\NewDocumentCommand\prodoflist{ s m O{\resprod} }{%
+	\xdef#3{1}%
+	\readlist*\tmpprodlist{#2}%
+	\xintFor* ##1 in {\xintSeq{1}{\tmpprodlistlen}}\do{%
+		\xdef#3{\fpeval{(#3)*\tmpprodlist[##1]}}%
+	}%
+	\IfBooleanT{#1}%if star := just printing // if not, storing
+		{%
+			#3%
+		}%
+}
+
+\NewDocumentCommand\reverselist{ s m O{\resrevlist} }{%
+	\readlist*\tmpreverselist{#2}%
+	\xdef#3{\tmpreverselist[-1]}%
+	\xintFor* ##1 in {\xintSeq{2}{\tmpreverselistlen}}\do{%
+		\xdef#3{#3,\tmpreverselist[-##1]}%
+	}%
+	\IfBooleanT{#1}%if star := just printing // if not, storing
+		{%
+			#3%
+		}%
+}
+
+\NewDocumentCommand\getvaluefromlist{ s m m O{\resmyelt} }{%
+	\readlist*\tmpreadlist{#2}%
+	\xdef#4{\tmpreadlist[#3]}%
+	\IfBooleanT{#1}{#4}%
+}
+
+\endinput
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/tex/latex/commalists-tools/commalists-tools.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	2024-09-25 23:42:26 UTC (rev 72386)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2024-09-26 19:42:42 UTC (rev 72387)
@@ -207,7 +207,8 @@
     colorsep colorspace colortab
     colortbl colorwav colorweb colourchange
     combelow combine combinedgraphics combofont comfortaa comicneue
-    comma commado commath commedit comment commonunicode commutative-diagrams
+    comma commado commalists-tools commath commedit comment
+    commonunicode commutative-diagrams
     compactbib compare competences
     complexity components comprehensive computational-complexity
     concepts concmath concmath-fonts concmath-otf concprog concrete

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2024-09-25 23:42:26 UTC (rev 72386)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2024-09-26 19:42:42 UTC (rev 72387)
@@ -1725,6 +1725,7 @@
  'cmcyr'		=> '&POSTcmcyr',
  'codedescribe'		=> '&POST_onelevel',
  'coloredbelts'		=> '&POST_onelevel',
+ 'commalists-tools'	=> '&POST_onelevel',
  'context'		=> '&POSTcontext',
  'context-games'	=> '&POSTcontext_games',
  'context-legacy'	=> '&POSTcontext_legacy',

Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2024-09-25 23:42:26 UTC (rev 72386)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2024-09-26 19:42:42 UTC (rev 72387)
@@ -245,6 +245,7 @@
 depend combine
 depend comma
 depend commado
+depend commalists-tools
 depend commedit
 depend comment
 depend commonunicode

Added: trunk/Master/tlpkg/tlpsrc/commalists-tools.tlpsrc
===================================================================


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