texlive[67058] Master/texmf-dist: csvsimple (9may23)

commits+karl at tug.org commits+karl at tug.org
Tue May 9 22:07:42 CEST 2023


Revision: 67058
          http://tug.org/svn/texlive?view=revision&revision=67058
Author:   karl
Date:     2023-05-09 22:07:41 +0200 (Tue, 09 May 2023)
Log Message:
-----------
csvsimple (9may23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/csvsimple/CHANGES.md
    trunk/Master/texmf-dist/doc/latex/csvsimple/README.md
    trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple-doc.sty
    trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.pdf
    trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.tex
    trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple-l3.pdf
    trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple-l3.tex
    trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple-legacy.pdf
    trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple-legacy.tex
    trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple.pdf
    trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple.tex
    trunk/Master/texmf-dist/tex/latex/csvsimple/csvsimple-l3.sty
    trunk/Master/texmf-dist/tex/latex/csvsimple/csvsimple-legacy.sty
    trunk/Master/texmf-dist/tex/latex/csvsimple/csvsimple.sty

Modified: trunk/Master/texmf-dist/doc/latex/csvsimple/CHANGES.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/csvsimple/CHANGES.md	2023-05-08 23:49:28 UTC (rev 67057)
+++ trunk/Master/texmf-dist/doc/latex/csvsimple/CHANGES.md	2023-05-09 20:07:41 UTC (rev 67058)
@@ -16,9 +16,29 @@
 ### Security
 
 
+## [2.4.0] - 2023-05-09
 
-## [2.3.2 - 2022-09-20]
+### Added
+- New additive filter options (issue #24):
+    - `and filter bool`
+    - `and filter fp`
+    - `and filter strcmp`
+    - `and filter not strcmp`
+    - `or filter bool`
+    - `or filter fp`
+    - `or filter strcmp`
+    - `or filter not strcmp`
+- Hook `csvsimple/csvline` added with example for doublequote replacement (issue #19)
+- Option setting `separator = space` (issue #20)
 
+### Changed
+- The content of `range` is now expanded before processing it
+- Implementation of `filter bool`, `filter fp`, `filter strcmp`, `filter not strcmp`
+
+
+
+## [2.3.2] - 2022-09-20
+
 ### Fixed
 - The `\ifcsvfirstrow` command doesn't work (issue #23)
 

Modified: trunk/Master/texmf-dist/doc/latex/csvsimple/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/csvsimple/README.md	2023-05-08 23:49:28 UTC (rev 67057)
+++ trunk/Master/texmf-dist/doc/latex/csvsimple/README.md	2023-05-09 20:07:41 UTC (rev 67058)
@@ -1,7 +1,7 @@
-# The LaTeX package csvsimple - version 2.3.2 (2022/09/20)
+# The LaTeX package csvsimple - version 2.4.0 (2023/05/09)
 
 
-> Copyright (c) 2008-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+> Copyright (c) 2008-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
 
 > This work may be distributed and/or modified under the
 > conditions of the LaTeX Project Public License, either version 1.3

Modified: trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple-doc.sty
===================================================================
--- trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple-doc.sty	2023-05-08 23:49:28 UTC (rev 67057)
+++ trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple-doc.sty	2023-05-09 20:07:41 UTC (rev 67058)
@@ -1,9 +1,9 @@
 % !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.3.2 (2022/09/20)
+%% The LaTeX package csvsimple - version 2.4.0 (2023/05/09)
 %% csvsimple-doc.sty: style file for the documentation
 %%
 %% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2008-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2008-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
 %% -------------------------------------------------------------------------------------------
 %%
 %% This work may be distributed and/or modified under the
@@ -18,8 +18,8 @@
 %%
 %% This work consists of all files listed in README.md
 %%
-\def\version{2.3.2}%
-\def\datum{2022/09/20}%
+\def\version{2.4.0}%
+\def\datum{2023/05/09}%
 
 \IfFileExists{csvsimple-doc.cfg}{\input{csvsimple-doc.cfg}}{}\providecommand\csvpkgprefix{}
 

Modified: trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.tex	2023-05-08 23:49:28 UTC (rev 67057)
+++ trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.tex	2023-05-09 20:07:41 UTC (rev 67058)
@@ -1,8 +1,8 @@
-%% The LaTeX package csvsimple - version 2.3.2 (2022/09/20)
+%% The LaTeX package csvsimple - version 2.4.0 (2023/05/09)
 %% csvsimple-example.tex: an example for csvsimple
 %%
 %% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2008-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2008-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
 %% -------------------------------------------------------------------------------------------
 %%
 %% This work may be distributed and/or modified under the

Modified: trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple-l3.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple-l3.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple-l3.tex	2023-05-08 23:49:28 UTC (rev 67057)
+++ trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple-l3.tex	2023-05-09 20:07:41 UTC (rev 67058)
@@ -1,10 +1,10 @@
 % \LaTeX-Main\
 % !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.3.2 (2022/09/20)
+%% The LaTeX package csvsimple - version 2.4.0 (2023/05/09)
 %% csvsimple.tex: Manual
 %%
 %% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2008-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2008-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
 %% -------------------------------------------------------------------------------------------
 %%
 %% This work may be distributed and/or modified under the
@@ -51,7 +51,7 @@
 \end{tcolorbox}
 {\large Thomas F.~Sturm%
   \footnote{Prof.~Dr.~Dr.~Thomas F.~Sturm, Institut f\"{u}r Mathematik und Informatik,
-    Universit\"{a}t der Bundeswehr M\"{u}nchen, D-85577 Neubiberg, Germany;
+    University of the Bundeswehr Munich, D-85577 Neubiberg, Germany;
      email: \href{mailto:thomas.sturm at unibw.de}{thomas.sturm at unibw.de}}\par\medskip
 \normalsize\url{https://www.ctan.org/pkg/csvsimple}\par
 \url{https://github.com/T-F-S/csvsimple}
@@ -116,9 +116,10 @@
 \item Values are expected to be comma separated, but the package
   provides support for other separators, see \Fullref{sec:separators}.
 \item Values are expected to be either not quoted or quoted with
-  curly braces |{}| of \TeX\ groups. Other quotes like doublequotes
+  curly braces |{}| of \TeX\ groups. Other quotes like double-quotes
   are not supported directly, but can be achieved
   with external tools, see \Fullref{sec:importeddata}.
+  For approximate patching see \Fullref{sec:hooks}.
 \item Every data line is expected to contain the same amount of values.
   Unfeasible data lines are silently ignored by default, but this can
   be configured, see \Fullref{sec:consistency}.
@@ -209,7 +210,7 @@
 \end{dispExample}
 
 \smallskip
-An even more comfortable and preferrable way to create a table is setting
+An even more comfortable and preferable way to create a table is setting
 appropriate option keys. Note, that this gives you the possibility to create a
 meta key (called style here) which contains the whole table creation
 using \refCom{csvstyle} or |keys_define:nn| from |l3keys|.
@@ -741,7 +742,7 @@
 \csvreader{grade.csv}{}{}%
 The last file consists of \thecsvcolumncount{} columns and
 \thecsvrow{} accepted data lines. The total number of lines
-ist \thecsvinputline{}.
+is \thecsvinputline{}.
 \end{dispExample}
 \end{docCommands}
 
@@ -754,7 +755,7 @@
   current number of all data lines including the header line and all
   lines filtered out.
   Despite of the name, there is no associated \LaTeX\ counter |csvinputline|,
-  but \refCom{thecsvinputline} is an accessor the \LaTeX3 integer
+  but \refCom{thecsvinputline} accesses the \LaTeX3 integer
   \refCom{g_csvsim_inputline_int}.
 \begin{dispExample}
 \csvreader[
@@ -990,7 +991,7 @@
 \subsection{Consistency Check}\label{sec:consistency}%
 
 \begin{docCsvKey}{check column count}{\colOpt{=true\textbar false}}{default |true|, initially |true|}
-  This key defines, wether the number of entries in a data line is checked against
+  This key defines, whether the number of entries in a data line is checked against
   an expected value or not.\\
   If |true|, every non consistent line is ignored without announcement.\\
   If |false|, every line is accepted and may produce an error during
@@ -1033,10 +1034,10 @@
 The following string compare filters \refKey{/csvsim/filter strcmp} and
 \refKey{/csvsim/filter equal} are identical by logic, but differ in implementation.
 
-\begin{docCsvKey}{filter strcmp}{=\marg{stringA}\marg{stringB}}{style, no default}
+\begin{docCsvKey}[][doc updated=2022-10-21]{filter strcmp}{=\marg{stringA}\marg{stringB}}{no default}
   Only lines where \meta{stringA} and \meta{stringB} are equal after expansion
   are accepted.
-  The implementation is done with \refCom{ifcsvstrcmp}.
+  The implementation is done with \docAuxCommand*{str_if_eq_p:ee}.
 \begin{dispExample}
 % \usepackage{booktabs}
 \csvreader[
@@ -1052,14 +1053,14 @@
 \end{docCsvKey}
 
 
-\begin{docCsvKey}{filter not strcmp}{=\marg{stringA}\marg{stringB}}{style, no default}
+\begin{docCsvKey}[][doc updated=2022-10-21]{filter not strcmp}{=\marg{stringA}\marg{stringB}}{no default}
   Only lines where \meta{stringA} and \meta{stringB} are not equal after expansion
   are accepted.
-  The implementation is done with \refCom{ifcsvnotstrcmp}.
+  The implementation is done with \docAuxCommand*{str_if_eq_p:ee}.
 \end{docCsvKey}
 
 
-\begin{docCsvKey}{filter equal}{=\marg{stringA}\marg{stringB}}{style, no default}
+\begin{docCsvKey}{filter equal}{=\marg{stringA}\marg{stringB}}{no default}
   Only lines where \meta{stringA} and \meta{stringB} are equal after expansion
   are accepted.
   The implementation is done with the \ctanpkg{ifthen} package (loading required!).
@@ -1066,7 +1067,7 @@
 \end{docCsvKey}
 
 
-\begin{docCsvKey}{filter not equal}{=\marg{stringA}\marg{stringB}}{style, no default}
+\begin{docCsvKey}{filter not equal}{=\marg{stringA}\marg{stringB}}{no default}
   Only lines where \meta{stringA} and \meta{stringB} are not equal after expansion
   are accepted.
   The implementation is done with the \ctanpkg{ifthen} package (loading required!).
@@ -1073,7 +1074,7 @@
 \end{docCsvKey}
 
 
-\begin{docCsvKey}[][doc new=2021-06-25]{filter fp}{=\meta{floating point expression}}{no default}
+\begin{docCsvKey}[][doc new and updated={2021-06-25}{2022-10-21}]{filter fp}{=\marg{floating point expression}}{no default}
   Only data lines which fulfill a \LaTeX3 \meta{floating point expression}
     (|l3fp|, \ctanpkg{xfp}) are accepted.
 \begin{dispExample}
@@ -1095,7 +1096,7 @@
 
 \clearpage
 
-\begin{docCsvKey}[][doc new=2021-06-25]{filter bool}{=\meta{boolean expression}}{no default}
+\begin{docCsvKey}[][doc new and updated={2021-06-25}{2022-10-21}]{filter bool}{=\marg{boolean expression}}{no default}
   Only data lines which fulfill a \LaTeX3 \meta{boolean expression} are accepted.
   Note that such an \meta{boolean expression} needs expl3 code.
   To preprocess the data line before testing the \meta{boolean expression},
@@ -1108,8 +1109,8 @@
   {
     filter~bool =
       {
-        \int_compare_p:n   { \matriculation > 20000 } &&
-        \str_compare_p:eNe { \gender } = { m }
+        \int_compare_p:n { \matriculation > 20000 } &&
+        \str_if_eq_p:ee  { \gender }{ m }
       }
   }
 \ExplSyntaxOff
@@ -1136,8 +1137,8 @@
 %>> list only matriculation numbers greater than 20000, list only men <<
 \csvfilterbool{myfilter}
   {
-    \int_compare_p:n   { \matriculation > 20000 } &&
-    \str_compare_p:eNe { \gender } = { m }
+    \int_compare_p:n { \matriculation > 20000 } &&
+    \str_if_eq_p:ee  { \gender }{ m }
   }
 \ExplSyntaxOff
 
@@ -1154,7 +1155,86 @@
 \end{docCommand}
 
 
+\clearpage
 
+The following filter options are \emph{appendable} to the expl3 based
+filter options:
+\begin{itemize}
+\item \refKey{/csvsim/filter strcmp}
+\item \refKey{/csvsim/filter not strcmp}
+\item \refKey{/csvsim/filter fp}
+\item \refKey{/csvsim/filter bool}
+\end{itemize}
+
+\begin{docCsvKeys}[
+    doc parameter   = {=\marg{stringA}\marg{stringB}},
+    doc description = {no default},
+    doc new = {2022-10-21}
+  ]
+  {
+    { doc name = and filter strcmp  },
+    { doc name = or filter strcmp },
+  }
+  Like \refKey{/csvsim/filter strcmp}, but appended to a required existing
+  expl3 based filter with \emph{and} (|&&|) resp. \emph{or} (\texttt{\textbar\textbar}).
+
+\begin{dispExample}
+\csvreader[
+    head to column names,
+    tabular    = llll,
+    table head = \toprule & \bfseries Name & \bfseries Matr & \bfseries Grade\\\midrule,
+    table foot = \bottomrule,
+    filter fp  = {\matriculation>20000},
+    and filter strcmp = {\gender}{m},
+  ]{grade.csv}{}{%
+    \thecsvrow & \slshape\name, \givenname & \matriculation & \grade
+  }
+\end{dispExample}
+\end{docCsvKeys}
+
+
+\begin{docCsvKeys}[
+    doc parameter   = {=\marg{stringA}\marg{stringB}},
+    doc description = {no default},
+    doc new = {2022-10-21}
+  ]
+  {
+    { doc name = and filter not strcmp  },
+    { doc name = or filter not strcmp },
+  }
+  Like \refKey{/csvsim/filter not strcmp}, but appended to a required existing
+  expl3 based filter with \emph{and} (|&&|) resp. \emph{or} (\texttt{\textbar\textbar}).
+\end{docCsvKeys}
+
+
+\begin{docCsvKeys}[
+    doc parameter   = {=\marg{floating point expression}},
+    doc description = {style,no default},
+    doc new = {2022-10-21}
+  ]
+  {
+    { doc name = and filter fp  },
+    { doc name = or filter fp },
+  }
+  Like \refKey{/csvsim/filter fp}, but appended to a required existing
+  expl3 based filter with \emph{and} (|&&|) resp. \emph{or} (\texttt{\textbar\textbar}).
+\end{docCsvKeys}
+
+
+\begin{docCsvKeys}[
+    doc parameter   = {=\marg{boolean expression}},
+    doc description = {style,no default},
+    doc new = {2022-10-21}
+  ]
+  {
+    { doc name = and filter bool },
+    { doc name = or filter bool },
+  }
+  Like \refKey{/csvsim/filter bool}, but appended to a required existing
+  expl3 based filter with \emph{and} (|&&|) resp. \emph{or} (\texttt{\textbar\textbar}).
+\end{docCsvKeys}
+
+
 \clearpage
 
 \begin{docCsvKey}[][doc new=2016-07-01]{filter test}{=\meta{condition}}{no default}
@@ -1291,7 +1371,7 @@
 line 10 to 30 of the accepted lines.
 
 
-\begin{docCsvKey}[][doc new=2021-06-29]{range}{=\brackets{\meta{range1},\meta{range2},\meta{range3},... }}{no default, initially empty}
+\begin{docCsvKey}[][doc new and updated={2021-06-29}{2022-09-21}]{range}{=\brackets{\meta{range1},\meta{range2},\meta{range3},... }}{no default, initially empty}
   Defines a comma separated list of line ranges. If a line number \refCom{thecsvrow}
   satisfies one or more of the given \meta{range1}, \meta{range2}, \ldots,
   the corresponding line is processed and displayed.
@@ -1701,7 +1781,7 @@
 \subsection{Separators}\label{sec:separators}%
 \begin{docCsvKey}{separator}{=\meta{sign}}{no default, initially |comma|}
   \catcode `|=12
-  Sets the \meta{sign} which is treates as separator between the data values
+  Sets the \meta{sign} which is treated as separator between the data values
   of a data line. Feasible values are:
   \begin{itemize}
   \item\docValue{comma}: This is the initial value with '\texttt{,}' as separator.
@@ -1737,6 +1817,23 @@
 
 \item\docValue{tab}: Sets the separator to the tabulator sign.
   Automatically, \refKey{/csvsim/respect tab} is set also.
+
+\clearpage
+\item\docValue{space}:\tcbdocmarginnote{\tcbdocnew{2023-05-08}}
+  Sets the separator to space(s).
+\begin{dispExample}
+% \usepackage{tcolorbox} for tcbverbatimwrite
+\begin{tcbverbatimwrite}{space.csv}
+  name     givenname matriculation gender grade
+  Maier    Hans      12345         m      1.0
+  Huber    Anna      23456         f      2.3
+  Weißbäck Werner    34567         m      5.0
+\end{tcbverbatimwrite}
+
+\csvautobooktabular[separator=space]{space.csv}
+\end{dispExample}
+  Note that leading spaces are ignored and multiple spaces are treated as one space.
+  To denote an empty data cell insert \verb+{}+, e.g. \verb*+1 {} 3+.
   \end{itemize}
 \end{docCsvKey}
 
@@ -2188,6 +2285,31 @@
 
 
 \clearpage
+\section{Hooks}\label{sec:hooks}%
+The following hook(s) are present following \LaTeX's hook management.
+
+\begin{description}
+\item[\textcolor{DarkViolet}{\ttfamily csvsimple/csvline}]
+  \tcbdocmarginnote{\tcbdocnew{2023-05-08}}
+  This hook adds code after reading
+  a line into \refCom{csvline} and before processing this line.
+  The token list \refCom{csvline} may be manipulated with a global assignment.\par
+  The following example replaces every \verb+"..."+ by \verb+{...}+ to
+  approximate double-quote processing within \LaTeX. Still, masking of double-quotes
+  or nesting will not work.
+\begin{dispListing}
+\AddToHook{csvsimple/csvline}
+  {
+    \tl_set_eq:NN \l_tmpa_tl \csvline
+    \regex_replace_all:nnN { "([^"]+)" } { {\1} } \l_tmpa_tl
+    \tl_gset_eq:NN \csvline \l_tmpa_tl
+  }
+\end{dispListing}
+
+\end{description}
+
+
+\clearpage
 \section{Examples}%
 
 \subsection{A Serial Letter}%
@@ -2465,7 +2587,7 @@
 
 \clearpage
 
-It is also possible to create on-the-fly tables using calcations of
+It is also possible to create on-the-fly tables using calculations of
 the given data. The following example shows cat values bisected and
 dog values doubled.
 

Modified: trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple-legacy.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple-legacy.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple-legacy.tex	2023-05-08 23:49:28 UTC (rev 67057)
+++ trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple-legacy.tex	2023-05-09 20:07:41 UTC (rev 67058)
@@ -1,10 +1,10 @@
 % \LaTeX-Main\
 % !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.3.2 (2022/09/20)
+%% The LaTeX package csvsimple - version 2.4.0 (2023/05/09)
 %% csvsimple.tex: Manual
 %%
 %% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2008-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2008-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
 %% -------------------------------------------------------------------------------------------
 %%
 %% This work may be distributed and/or modified under the
@@ -45,7 +45,7 @@
 \end{tcolorbox}
 {\large Thomas F.~Sturm%
   \footnote{Prof.~Dr.~Dr.~Thomas F.~Sturm, Institut f\"{u}r Mathematik und Informatik,
-    Universit\"{a}t der Bundeswehr M\"{u}nchen, D-85577 Neubiberg, Germany;
+    University of the Bundeswehr Munich, D-85577 Neubiberg, Germany;
      email: \href{mailto:thomas.sturm at unibw.de}{thomas.sturm at unibw.de}}\par\medskip
 \normalsize\url{https://www.ctan.org/pkg/csvsimple}\par
 \url{https://github.com/T-F-S/csvsimple}

Modified: trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple.tex	2023-05-08 23:49:28 UTC (rev 67057)
+++ trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple.tex	2023-05-09 20:07:41 UTC (rev 67058)
@@ -1,10 +1,10 @@
 % \LaTeX-Main\
 % !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.3.2 (2022/09/20)
+%% The LaTeX package csvsimple - version 2.4.0 (2023/05/09)
 %% csvsimple.tex: Manual
 %%
 %% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2008-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2008-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
 %% -------------------------------------------------------------------------------------------
 %%
 %% This work may be distributed and/or modified under the
@@ -43,7 +43,7 @@
 \end{tcolorbox}
 {\large Thomas F.~Sturm%
   \footnote{Prof.~Dr.~Dr.~Thomas F.~Sturm, Institut f\"{u}r Mathematik und Informatik,
-    Universit\"{a}t der Bundeswehr M\"{u}nchen, D-85577 Neubiberg, Germany;
+    University of the Bundeswehr Munich, D-85577 Neubiberg, Germany;
      email: \href{mailto:thomas.sturm at unibw.de}{thomas.sturm at unibw.de}}\par\medskip
 \normalsize\url{https://www.ctan.org/pkg/csvsimple}\par
 \url{https://github.com/T-F-S/csvsimple}

Modified: trunk/Master/texmf-dist/tex/latex/csvsimple/csvsimple-l3.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/csvsimple/csvsimple-l3.sty	2023-05-08 23:49:28 UTC (rev 67057)
+++ trunk/Master/texmf-dist/tex/latex/csvsimple/csvsimple-l3.sty	2023-05-09 20:07:41 UTC (rev 67058)
@@ -1,8 +1,8 @@
-%% The LaTeX package csvsimple - version 2.3.2 (2022/09/20)
+%% The LaTeX package csvsimple - version 2.4.0 (2023/05/09)
 %% csvsimple-l3.sty: Simple LaTeX CSV file processing (LaTeX3)
 %%
 %% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2008-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2008-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
 %% -------------------------------------------------------------------------------------------
 %%
 %% This work may be distributed and/or modified under the
@@ -17,7 +17,7 @@
 %%
 %% This work consists of all files listed in README.md
 %%
-\ProvidesExplPackage{csvsimple-l3}{2022/09/20}{2.3.2}
+\ProvidesExplPackage{csvsimple-l3}{2023/05/09}{2.4.0}
   {LaTeX3 CSV file processing}
 
 
@@ -79,7 +79,6 @@
 
 \tl_const:Nn \c__csvsim_par_tl { \par }
 
-
 \tl_new:N \g__csvsim_after_table_tl
 \tl_new:N \g__csvsim_before_table_tl
 \tl_new:N \g__csvsim_begin_table_center_tl
@@ -114,7 +113,9 @@
 \tl_new:N \g__csvsim_table_foot_tl
 \tl_new:N \g__csvsim_table_head_tl
 
+\tl_new:N \l__csvsim_filter_condition_tl
 
+
 \group_begin:
   \char_set_catcode_other:n { 9 }
   \str_const:Nn \c__csvsim_tab_str { ^^I }
@@ -122,6 +123,7 @@
 
 \regex_const:Nn \c__csvsim_integer_regex {\A\d+\Z}
 
+\cs_generate_variant:Nn \bool_gset:Nn { NV }
 \cs_generate_variant:Nn \seq_gset_split:Nnn { NVV }
 
 
@@ -156,6 +158,8 @@
 
 %---- core loop processing
 
+\NewHook{csvsimple/csvline}
+
 \cs_new_protected_nopar:Npn \__csvsim_read_line:
   {
     \group_begin:
@@ -169,6 +173,7 @@
         \msg_error:nnx { csvsimple }{ file-error }{ \g__csvsim_curfilename_str }
       }
     \group_end:
+    \UseHook{csvsimple/csvline}
   }
 
 
@@ -621,6 +626,10 @@
         \tl_gset:NV \g__csvsim_separator_tl \c__csvsim_tab_str
         \csvset{respect~tab}
       },
+    separator/space .code:n =
+      {
+        \tl_gset:Nn \g__csvsim_separator_tl {~}
+      },
     every~csv                  .meta:n = {},
     no~head                    .meta:n = { head=false },
     no~check~column~count      .meta:n = { check~column~count=false },
@@ -679,6 +688,16 @@
   }
 
 
+\cs_new_protected_nopar:Npn \__csvsim_set_filter_bool:n #1
+  {
+    \tl_set:Nn \l__csvsim_filter_condition_tl { #1 }
+    \tl_gset:Nn \g__csvsim_filter_tl
+      {
+        \bool_gset:NV \g__csvsim_line_accepted_bool \l__csvsim_filter_condition_tl
+      }
+  }
+
+
 \NewDocumentCommand \csvfilteraccept { }
   {
     \__csvsim_set_filter:n
@@ -723,20 +742,52 @@
       },
     filter~bool .code:n =
       {
-        \__csvsim_set_filter:n
-          {
-            \bool_gset:Nn \g__csvsim_line_accepted_bool { #1 }
-          }
+        \__csvsim_set_filter_bool:n { #1 }
       },
     filter~fp .code:n =
       {
-        \__csvsim_set_filter:n
-          {
-            \bool_gset:Nn \g__csvsim_line_accepted_bool { \fp_compare_p:n{#1} }
-          }
+        \__csvsim_set_filter_bool:n { \fp_compare_p:n {#1} }
       },
-    filter~strcmp     .meta:n = { filter~test=\ifcsvstrcmp #1 },
-    filter~not~strcmp .meta:n = { filter~test=\ifcsvnotstrcmp #1 },
+    filter~strcmp .code:n =
+      {
+        \__csvsim_set_filter_bool:n { \str_if_eq_p:ee #1 }
+      },
+    filter~not~strcmp .code:n =
+      {
+        \__csvsim_set_filter_bool:n { !\str_if_eq_p:ee #1 }
+      },
+    and~filter~bool .code:n =
+      {
+        \tl_put_right:Nn \l__csvsim_filter_condition_tl { && #1 }
+      },
+    and~filter~fp .code:n =
+      {
+        \tl_put_right:Nn \l__csvsim_filter_condition_tl { && \fp_compare_p:n {#1} }
+      },
+    and~filter~strcmp .code:n =
+      {
+        \tl_put_right:Nn \l__csvsim_filter_condition_tl { && \str_if_eq_p:ee #1 }
+      },
+    and~filter~not~strcmp .code:n =
+      {
+        \tl_put_right:Nn \l__csvsim_filter_condition_tl { && !\str_if_eq_p:ee #1 }
+      },
+    or~filter~bool .code:n =
+      {
+        \tl_put_right:Nn \l__csvsim_filter_condition_tl { || #1 }
+      },
+    or~filter~fp .code:n =
+      {
+        \tl_put_right:Nn \l__csvsim_filter_condition_tl { || \fp_compare_p:n {#1} }
+      },
+    or~filter~strcmp .code:n =
+      {
+        \tl_put_right:Nn \l__csvsim_filter_condition_tl { || \str_if_eq_p:ee #1 }
+      },
+    or~filter~not~strcmp .code:n =
+      {
+        \tl_put_right:Nn \l__csvsim_filter_condition_tl { || !\str_if_eq_p:ee #1 }
+      },
   }
 
 
@@ -846,12 +897,13 @@
         { #1 }
   }
 
+\cs_generate_variant:Nn \__csvsim_set_range:n { e }
 
 \keys_define:nn { csvsim }
   {
     range .code:n =
       {
-        \__csvsim_set_range:n {#1}
+        \__csvsim_set_range:e {#1}
       },
   }
 

Modified: trunk/Master/texmf-dist/tex/latex/csvsimple/csvsimple-legacy.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/csvsimple/csvsimple-legacy.sty	2023-05-08 23:49:28 UTC (rev 67057)
+++ trunk/Master/texmf-dist/tex/latex/csvsimple/csvsimple-legacy.sty	2023-05-09 20:07:41 UTC (rev 67058)
@@ -1,8 +1,8 @@
-%% The LaTeX package csvsimple - version 2.3.2 (2022/09/20)
+%% The LaTeX package csvsimple - version 2.4.0 (2023/05/09)
 %% csvsimple-legacy.sty: Simple LaTeX CSV file processing (LaTeX2e)
 %%
 %% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2008-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2008-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
 %% -------------------------------------------------------------------------------------------
 %%
 %% This work may be distributed and/or modified under the
@@ -18,7 +18,7 @@
 %% This work consists of all files listed in README.md
 %%
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{csvsimple-legacy}[2022/09/20 version 2.3.2 LaTeX2e CSV file processing]
+\ProvidesPackage{csvsimple-legacy}[2023/05/09 version 2.4.0 LaTeX2e CSV file processing]
 
 
 %---- check package

Modified: trunk/Master/texmf-dist/tex/latex/csvsimple/csvsimple.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/csvsimple/csvsimple.sty	2023-05-08 23:49:28 UTC (rev 67057)
+++ trunk/Master/texmf-dist/tex/latex/csvsimple/csvsimple.sty	2023-05-09 20:07:41 UTC (rev 67058)
@@ -1,8 +1,8 @@
-%% The LaTeX package csvsimple - version 2.3.2 (2022/09/20)
+%% The LaTeX package csvsimple - version 2.4.0 (2023/05/09)
 %% csvsimple.sty: Simple LaTeX CSV file processing
 %%
 %% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2008-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2008-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
 %% -------------------------------------------------------------------------------------------
 %%
 %% This work may be distributed and/or modified under the
@@ -19,7 +19,7 @@
 %%
 \RequirePackage{l3keys2e}
 
-\ProvidesExplPackage{csvsimple}{2022/09/20}{2.3.2}
+\ProvidesExplPackage{csvsimple}{2023/05/09}{2.4.0}
   {LaTeX CSV file processing}
 
 \cs_if_exist:NT \c__csvsim_package_expl_bool



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