summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/csvsimple
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-02-02 03:04:47 +0000
committerNorbert Preining <norbert@preining.info>2022-02-02 03:04:47 +0000
commit460879b45ff6e83765da88734e8cc0c6da5043eb (patch)
tree8bbeaad213d6647db82d17b25a6ffd5bab08da18 /macros/latex/contrib/csvsimple
parent811714247a66acfce87bba00b9758441ff9d1413 (diff)
CTAN sync 202202020304
Diffstat (limited to 'macros/latex/contrib/csvsimple')
-rw-r--r--macros/latex/contrib/csvsimple/CHANGES.md14
-rw-r--r--macros/latex/contrib/csvsimple/README.md2
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-doc.sty6
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-example.pdfbin75628 -> 75624 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-example.tex2
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-l3.pdfbin1087253 -> 1093900 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-l3.sty53
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-l3.tex56
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-legacy.pdfbin823839 -> 823702 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-legacy.sty4
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-legacy.tex2
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple.pdfbin309007 -> 309204 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple.sty4
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple.tex2
14 files changed, 106 insertions, 39 deletions
diff --git a/macros/latex/contrib/csvsimple/CHANGES.md b/macros/latex/contrib/csvsimple/CHANGES.md
index 717bee870a..f41204bcb7 100644
--- a/macros/latex/contrib/csvsimple/CHANGES.md
+++ b/macros/latex/contrib/csvsimple/CHANGES.md
@@ -17,6 +17,20 @@ and this project adheres to
+## [2.3.0] - 2022-02-01
+
+### Added
+- Option `column names detection` (related to issue #16)
+- Documentation: csvautotabular inspired example for tabularray.
+
+### Changed
+- `\csvlinetotablerow` changed to be expandable and to be
+ usable inside a *Data Collection* (issue #16)
+- Options `autotabular`, `autobooktabular`, `autolongtable`, `autobooklongtable`
+ use `column names detection=false` now.
+
+
+
## [2.2.1] - 2022-01-07
### Fixed
diff --git a/macros/latex/contrib/csvsimple/README.md b/macros/latex/contrib/csvsimple/README.md
index 64b189014c..f874770dd8 100644
--- a/macros/latex/contrib/csvsimple/README.md
+++ b/macros/latex/contrib/csvsimple/README.md
@@ -1,4 +1,4 @@
-# The LaTeX package csvsimple - version 2.2.1 (2022/01/07)
+# The LaTeX package csvsimple - version 2.3.0 (2022/02/01)
> Copyright (c) 2008-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
diff --git a/macros/latex/contrib/csvsimple/csvsimple-doc.sty b/macros/latex/contrib/csvsimple/csvsimple-doc.sty
index 913d36faa0..4d4d8beba8 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-doc.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple-doc.sty
@@ -1,5 +1,5 @@
% !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.2.1 (2022/01/07)
+%% The LaTeX package csvsimple - version 2.3.0 (2022/02/01)
%% csvsimple-doc.sty: style file for the documentation
%%
%% -------------------------------------------------------------------------------------------
@@ -18,8 +18,8 @@
%%
%% This work consists of all files listed in README.md
%%
-\def\version{2.2.1}%
-\def\datum{2022/01/07}%
+\def\version{2.3.0}%
+\def\datum{2022/02/01}%
\IfFileExists{csvsimple-doc.cfg}{\input{csvsimple-doc.cfg}}{}\providecommand\csvpkgprefix{}
diff --git a/macros/latex/contrib/csvsimple/csvsimple-example.pdf b/macros/latex/contrib/csvsimple/csvsimple-example.pdf
index 5bf8775667..b59dc4f269 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-example.pdf
+++ b/macros/latex/contrib/csvsimple/csvsimple-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/csvsimple/csvsimple-example.tex b/macros/latex/contrib/csvsimple/csvsimple-example.tex
index 9c06e60240..ee5efffe8a 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-example.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple-example.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package csvsimple - version 2.2.1 (2022/01/07)
+%% The LaTeX package csvsimple - version 2.3.0 (2022/02/01)
%% csvsimple-example.tex: an example for csvsimple
%%
%% -------------------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/csvsimple/csvsimple-l3.pdf b/macros/latex/contrib/csvsimple/csvsimple-l3.pdf
index e456d428df..2ed9105de7 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-l3.pdf
+++ b/macros/latex/contrib/csvsimple/csvsimple-l3.pdf
Binary files differ
diff --git a/macros/latex/contrib/csvsimple/csvsimple-l3.sty b/macros/latex/contrib/csvsimple/csvsimple-l3.sty
index 12230aa6e6..1af04edf9c 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-l3.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple-l3.sty
@@ -1,4 +1,4 @@
-%% The LaTeX package csvsimple - version 2.2.1 (2022/01/07)
+%% The LaTeX package csvsimple - version 2.3.0 (2022/02/01)
%% csvsimple-l3.sty: Simple LaTeX CSV file processing (LaTeX3)
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README.md
%%
-\ProvidesExplPackage{csvsimple-l3}{2022/01/07}{2.2.1}
+\ProvidesExplPackage{csvsimple-l3}{2022/02/01}{2.3.0}
{LaTeX3 CSV file processing}
@@ -41,6 +41,7 @@
\bool_new:N \g__csvsim_check_column_count_bool
\bool_new:N \g__csvsim_collect_data_bool
+\bool_new:N \g__csvsim_colnames_detection_bool
\bool_new:N \g__csvsim_firstline_bool
\bool_new:N \g__csvsim_head_bool
\bool_new:N \g__csvsim_head_to_colnames_bool
@@ -196,7 +197,6 @@
{
\tl_set:No \l_tmpa_tl {\cs:w csvcol\int_to_roman:n{#1} \cs_end:}
\exp_args:NnV \cs_set_nopar:cpn {__csvsim__/\l_tmpa_tl} \l_tmpa_tl
-
\bool_if:NT \g__csvsim_head_to_colnames_bool
{
\tl_set:No \l_tmpb_tl {\cs:w \g__csvsim_headname_prefix_tl \l_tmpa_tl \cs_end:}
@@ -216,7 +216,10 @@
{
\int_gzero:N \g_csvsim_columncount_int
\__csvsim_scan_line:
- \int_step_function:nN \g_csvsim_columncount_int \__csvsim_process_head_name:n
+ \bool_if:NT \g__csvsim_colnames_detection_bool
+ {
+ \int_step_function:nN \g_csvsim_columncount_int \__csvsim_process_head_name:n
+ }
}
}
@@ -401,22 +404,28 @@
%---- auxiliary user macros
-\NewDocumentCommand \csvlinetotablerow { }
+% \NewDocumentCommand \csvlinetotablerow { }
+ % {
+ % \tl_clear:N \l_tmpa_tl
+ % \bool_set_false:N \l_tmpa_bool
+ % \seq_map_inline:Nn \g__csvsim_line_seq
+ % {
+ % \bool_if:NTF \l_tmpa_bool
+ % {
+ % \tl_put_right:Nn \l_tmpa_tl { & ##1 }
+ % }
+ % {
+ % \tl_put_right:Nn \l_tmpa_tl { ##1 }
+ % \bool_set_true:N \l_tmpa_bool
+ % }
+ % }
+ % \l_tmpa_tl
+ % }
+
+
+\NewExpandableDocumentCommand \csvlinetotablerow { }
{
- \tl_clear:N \l_tmpa_tl
- \bool_set_false:N \l_tmpa_bool
- \seq_map_inline:Nn \g__csvsim_line_seq
- {
- \bool_if:NTF \l_tmpa_bool
- {
- \tl_put_right:Nn \l_tmpa_tl { & ##1 }
- }
- {
- \tl_put_right:Nn \l_tmpa_tl { ##1 }
- \bool_set_true:N \l_tmpa_bool
- }
- }
- \l_tmpa_tl
+ \seq_use:Nn \g__csvsim_line_seq { & }
}
@@ -593,6 +602,7 @@
head .bool_gset:N = \g__csvsim_head_bool,
head~to~column~names~prefix .tl_gset:N = \g__csvsim_headname_prefix_tl,
head~to~column~names .bool_gset:N = \g__csvsim_head_to_colnames_bool,
+ column~names~detection .bool_gset:N = \g__csvsim_colnames_detection_bool,
column~count .int_gset:N = \g_csvsim_columncount_int,
separator .choice:,
separator/comma .code:n =
@@ -1178,6 +1188,7 @@
{
_autotabular_ = #1,
head,
+ column~names~detection = false,
after~head = \g__csvsim_before_table_tl
\begin{tabular}{|*{\int_use:N\g_csvsim_columncount_int}{l|}}
\g__csvsim_table_head_tl,
@@ -1198,6 +1209,7 @@
{
_autotabular_ = #1,
head,
+ column~names~detection = false,
after~head = \g__csvsim_before_table_tl
\begin{tabular}{*{\int_use:N\g_csvsim_columncount_int}{l}}
\g__csvsim_table_head_tl,
@@ -1224,6 +1236,7 @@
{
_autolongtable_ = #1,
head,
+ column~names~detection = false,
after~head = \g__csvsim_before_table_tl
\begin{longtable}{|*{\int_use:N\g_csvsim_columncount_int}{l|}}
\g__csvsim_table_head_tl,
@@ -1244,6 +1257,7 @@
{
_autolongtable_ = #1,
head,
+ column~names~detection = false,
after~head = \g__csvsim_before_table_tl
\begin{longtable}{*{\int_use:N\g_csvsim_columncount_int}{l}}
\g__csvsim_table_head_tl,
@@ -1408,6 +1422,7 @@
command = \csvline,
column~names~reset,
head,
+ column~names~detection,
check~column~count,
head~to~column~names~prefix = ,
head~to~column~names = false,
diff --git a/macros/latex/contrib/csvsimple/csvsimple-l3.tex b/macros/latex/contrib/csvsimple/csvsimple-l3.tex
index a8ed99a34b..d8bd01a613 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-l3.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple-l3.tex
@@ -1,6 +1,6 @@
% \LaTeX-Main\
% !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.2.1 (2022/01/07)
+%% The LaTeX package csvsimple - version 2.3.0 (2022/02/01)
%% csvsimple.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
@@ -708,12 +708,13 @@ purpose:
\end{docCommand}
-\begin{docCommand}[doc updated=2016-07-01]{csvlinetotablerow}{}
+\clearpage
+\begin{docCommand}[doc updated=2022-01-11]{csvlinetotablerow}{}
Typesets the current processed data line with |&| between the entries.
- %Most users will never apply this command.
+ This macro is \emph{expandable}.
\end{docCommand}
-\clearpage
+
\begin{docCommands}{
{ doc name = thecsvrow , doc updated = 2021-06-25 },
{ doc name = g_csvsim_row_int, doc new = 2021-06-25 }
@@ -975,6 +976,16 @@ see Section~\ref{subsec:tabsupport} from page~\pageref{subsec:tabsupport}.
\end{docCsvKey}
+\begin{docCsvKey}[][doc new=2022-02-01]{column names detection}{\colOpt{=true\textbar false}}{default |true|, initially |true|}
+ If this key is set, the header line is detected for names which can be used
+ for \refKey{/csvsim/column names} and \refKey{/csvsim/head to column names}.
+ Otherwise, these options are not functional.\\
+ This key can and should be set to |false|, if the header line contains
+ macros or characters not allowed inside \LaTeX\ control sequences, because
+ otherwise compilation error are to be expected.
+\end{docCsvKey}
+
+
\clearpage
\subsection{Consistency Check}\label{sec:consistency}%
@@ -1554,7 +1565,7 @@ completeness, but are unlikely to be used directly.
doc description = no default,
]
{
- { doc name = autotabular },
+ { doc name = autotabular, doc updated = {2022-02-01} },
{ doc name = autotabular* },
}
Reads the whole CSV file denoted \meta{file name} with an automated formatting.
@@ -1567,7 +1578,7 @@ completeness, but are unlikely to be used directly.
doc description = no default,
]
{
- { doc name = autolongtable },
+ { doc name = autolongtable, doc updated = {2022-02-01} },
{ doc name = autolongtable* },
}
Reads the whole CSV file denoted \meta{file name} with an automated formatting
@@ -1581,7 +1592,7 @@ completeness, but are unlikely to be used directly.
doc description = no default,
]
{
- { doc name = autobooktabular },
+ { doc name = autobooktabular, doc updated = {2022-02-01} },
{ doc name = autobooktabular* },
}
Reads the whole CSV file denoted \meta{file name} with an automated formatting
@@ -1595,7 +1606,7 @@ completeness, but are unlikely to be used directly.
doc description = no default,
]
{
- { doc name = autobooklongtable },
+ { doc name = autobooklongtable, doc updated = {2022-02-01} },
{ doc name = autobooklongtable* },
}
Reads the whole CSV file denoted \meta{file name} with an automated formatting
@@ -2032,6 +2043,7 @@ Observe the following hints for \refKey{/csvsim/command}:
the \emph{value} of this macro to \refCom{csvdatacollection}.
This is optional, if |\csvcoli| contains numbers or text without active
characters, but essential, if it contains macros.
+\item \refCom{csvlinetotablerow} is to be used \emph{without} |\csvexpval|.
\item For macros like |\textbf| use |\csvexpnot\textbf| to \emph{prevent}
expansion.
\item Using computations or not expandable conditionals may likely cause
@@ -2071,7 +2083,7 @@ Sets the collection macro to an alternative for \refCom{csvdatacollection}.
\begin{docCommand}[doc new=2021-07-06]{csvdatacollection}{}
Macro which contains the collected data of a CSV file processed with
\refKey{/csvsim/collect data}. This macro name can be changed by
- settiing \refKey{/csvsim/data collection}.
+ setting \refKey{/csvsim/data collection}.
\end{docCommand}
@@ -2088,6 +2100,8 @@ Sets the collection macro to an alternative for \refCom{csvdatacollection}.
Alternatively, |\noexpand| could be used.
\end{docCommand}
+The following macros can only be used inside keys which are \emph{not}
+collected to \refCom{csvdatacollection}, e.g. inside \refKey{/csvsim/after filter}.
\begin{docCommand}[doc new=2021-07-06]{csvcollectn}{\marg{code}}
Appends the given \meta{code} to \refCom{csvdatacollection}.\\
@@ -2703,6 +2717,30 @@ Display data from line 3 on:\par
\end{dispExample}
+\clearpage
+
+The following example displays a \ctanpkg{tabularray} variant of the
+\refCom{csvautotabular} command. Note the \refKey{/csvsim/no head} option
+to read the first line as data line. Also note that \refCom{csvlinetotablerow}
+is used without preceding modifier.
+
+\begin{dispExample}
+% \usepackage{tabularray}
+\csvreader[
+ no head,
+ centered tabularray =
+ {
+ row{odd} = {blue!85!gray!7},
+ row{1} = {blue!50!gray!25, font=\bfseries},
+ },
+ table head = {\hline[0.1em,blue!50!black]},
+ table foot = {\hline[0.1em,blue!50!black]},
+ late after first line = {\\\hline[blue!50!black]},
+]{data.csv}{}{%
+ \csvlinetotablerow%
+}
+\end{dispExample}
+
\clearpage
\subsection{Imported CSV data}\label{sec:importeddata}%
diff --git a/macros/latex/contrib/csvsimple/csvsimple-legacy.pdf b/macros/latex/contrib/csvsimple/csvsimple-legacy.pdf
index 2679c11d73..dc99089c0a 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-legacy.pdf
+++ b/macros/latex/contrib/csvsimple/csvsimple-legacy.pdf
Binary files differ
diff --git a/macros/latex/contrib/csvsimple/csvsimple-legacy.sty b/macros/latex/contrib/csvsimple/csvsimple-legacy.sty
index 8451131c6e..9495978c55 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-legacy.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple-legacy.sty
@@ -1,4 +1,4 @@
-%% The LaTeX package csvsimple - version 2.2.1 (2022/01/07)
+%% The LaTeX package csvsimple - version 2.3.0 (2022/02/01)
%% csvsimple-legacy.sty: Simple LaTeX CSV file processing (LaTeX2e)
%%
%% -------------------------------------------------------------------------------------------
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README.md
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{csvsimple-legacy}[2022/01/07 version 2.2.1 LaTeX2e CSV file processing]
+\ProvidesPackage{csvsimple-legacy}[2022/02/01 version 2.3.0 LaTeX2e CSV file processing]
%---- check package
diff --git a/macros/latex/contrib/csvsimple/csvsimple-legacy.tex b/macros/latex/contrib/csvsimple/csvsimple-legacy.tex
index 711798f4a9..bffc4b53b4 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-legacy.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple-legacy.tex
@@ -1,6 +1,6 @@
% \LaTeX-Main\
% !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.2.1 (2022/01/07)
+%% The LaTeX package csvsimple - version 2.3.0 (2022/02/01)
%% csvsimple.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/csvsimple/csvsimple.pdf b/macros/latex/contrib/csvsimple/csvsimple.pdf
index 8ef7047fb2..0b356e3122 100644
--- a/macros/latex/contrib/csvsimple/csvsimple.pdf
+++ b/macros/latex/contrib/csvsimple/csvsimple.pdf
Binary files differ
diff --git a/macros/latex/contrib/csvsimple/csvsimple.sty b/macros/latex/contrib/csvsimple/csvsimple.sty
index 9d8f85bbb3..b34de03816 100644
--- a/macros/latex/contrib/csvsimple/csvsimple.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple.sty
@@ -1,4 +1,4 @@
-%% The LaTeX package csvsimple - version 2.2.1 (2022/01/07)
+%% The LaTeX package csvsimple - version 2.3.0 (2022/02/01)
%% csvsimple.sty: Simple LaTeX CSV file processing
%%
%% -------------------------------------------------------------------------------------------
@@ -19,7 +19,7 @@
%%
\RequirePackage{l3keys2e}
-\ProvidesExplPackage{csvsimple}{2022/01/07}{2.2.1}
+\ProvidesExplPackage{csvsimple}{2022/02/01}{2.3.0}
{LaTeX CSV file processing}
\cs_if_exist:NT \c__csvsim_package_expl_bool
diff --git a/macros/latex/contrib/csvsimple/csvsimple.tex b/macros/latex/contrib/csvsimple/csvsimple.tex
index 0f98435406..a9870b5063 100644
--- a/macros/latex/contrib/csvsimple/csvsimple.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple.tex
@@ -1,6 +1,6 @@
% \LaTeX-Main\
% !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.2.1 (2022/01/07)
+%% The LaTeX package csvsimple - version 2.3.0 (2022/02/01)
%% csvsimple.tex: Manual
%%
%% -------------------------------------------------------------------------------------------