diff options
14 files changed, 106 insertions, 39 deletions
diff --git a/Master/texmf-dist/doc/latex/csvsimple/CHANGES.md b/Master/texmf-dist/doc/latex/csvsimple/CHANGES.md index 717bee870a3..f41204bcb7a 100644 --- a/Master/texmf-dist/doc/latex/csvsimple/CHANGES.md +++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/doc/latex/csvsimple/README.md b/Master/texmf-dist/doc/latex/csvsimple/README.md index 64b189014c5..f874770dd8b 100644 --- a/Master/texmf-dist/doc/latex/csvsimple/README.md +++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/doc/latex/csvsimple/csvsimple-doc.sty b/Master/texmf-dist/doc/latex/csvsimple/csvsimple-doc.sty index 913d36faa06..4d4d8beba87 100644 --- a/Master/texmf-dist/doc/latex/csvsimple/csvsimple-doc.sty +++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.pdf b/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.pdf Binary files differindex 5bf8775667d..b59dc4f2694 100644 --- a/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.pdf +++ b/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.pdf diff --git a/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.tex b/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.tex index 9c06e60240b..ee5efffe8a2 100644 --- a/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.tex +++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/doc/latex/csvsimple/csvsimple-l3.pdf b/Master/texmf-dist/doc/latex/csvsimple/csvsimple-l3.pdf Binary files differindex e456d428dff..2ed9105de7a 100644 --- a/Master/texmf-dist/doc/latex/csvsimple/csvsimple-l3.pdf +++ b/Master/texmf-dist/doc/latex/csvsimple/csvsimple-l3.pdf diff --git a/Master/texmf-dist/doc/latex/csvsimple/csvsimple-l3.tex b/Master/texmf-dist/doc/latex/csvsimple/csvsimple-l3.tex index a8ed99a34b3..d8bd01a6138 100644 --- a/Master/texmf-dist/doc/latex/csvsimple/csvsimple-l3.tex +++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/doc/latex/csvsimple/csvsimple-legacy.pdf b/Master/texmf-dist/doc/latex/csvsimple/csvsimple-legacy.pdf Binary files differindex 2679c11d73e..dc99089c0a0 100644 --- a/Master/texmf-dist/doc/latex/csvsimple/csvsimple-legacy.pdf +++ b/Master/texmf-dist/doc/latex/csvsimple/csvsimple-legacy.pdf diff --git a/Master/texmf-dist/doc/latex/csvsimple/csvsimple-legacy.tex b/Master/texmf-dist/doc/latex/csvsimple/csvsimple-legacy.tex index 711798f4a93..bffc4b53b45 100644 --- a/Master/texmf-dist/doc/latex/csvsimple/csvsimple-legacy.tex +++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/doc/latex/csvsimple/csvsimple.pdf b/Master/texmf-dist/doc/latex/csvsimple/csvsimple.pdf Binary files differindex 8ef7047fb25..0b356e31227 100644 --- a/Master/texmf-dist/doc/latex/csvsimple/csvsimple.pdf +++ b/Master/texmf-dist/doc/latex/csvsimple/csvsimple.pdf diff --git a/Master/texmf-dist/doc/latex/csvsimple/csvsimple.tex b/Master/texmf-dist/doc/latex/csvsimple/csvsimple.tex index 0f98435406c..a9870b5063b 100644 --- a/Master/texmf-dist/doc/latex/csvsimple/csvsimple.tex +++ b/Master/texmf-dist/doc/latex/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 %% %% ------------------------------------------------------------------------------------------- diff --git a/Master/texmf-dist/tex/latex/csvsimple/csvsimple-l3.sty b/Master/texmf-dist/tex/latex/csvsimple/csvsimple-l3.sty index 12230aa6e64..1af04edf9cf 100644 --- a/Master/texmf-dist/tex/latex/csvsimple/csvsimple-l3.sty +++ b/Master/texmf-dist/tex/latex/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/Master/texmf-dist/tex/latex/csvsimple/csvsimple-legacy.sty b/Master/texmf-dist/tex/latex/csvsimple/csvsimple-legacy.sty index 8451131c6ef..9495978c55c 100644 --- a/Master/texmf-dist/tex/latex/csvsimple/csvsimple-legacy.sty +++ b/Master/texmf-dist/tex/latex/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/Master/texmf-dist/tex/latex/csvsimple/csvsimple.sty b/Master/texmf-dist/tex/latex/csvsimple/csvsimple.sty index 9d8f85bbb3d..b34de03816a 100644 --- a/Master/texmf-dist/tex/latex/csvsimple/csvsimple.sty +++ b/Master/texmf-dist/tex/latex/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 |