From 9bc7de9073221ddd11a3898e299443bee067a3d8 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 16 Oct 2023 19:58:01 +0000 Subject: csvsimple (16oct23) git-svn-id: svn://tug.org/texlive/trunk@68566 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/csvsimple/CHANGES.md | 23 ++ Master/texmf-dist/doc/latex/csvsimple/README.md | 2 +- .../doc/latex/csvsimple/csvsimple-doc.sty | 6 +- .../doc/latex/csvsimple/csvsimple-example.pdf | Bin 72043 -> 72044 bytes .../doc/latex/csvsimple/csvsimple-example.tex | 2 +- .../doc/latex/csvsimple/csvsimple-l3.pdf | Bin 921414 -> 933300 bytes .../doc/latex/csvsimple/csvsimple-l3.tex | 371 ++++++++++++++------- .../doc/latex/csvsimple/csvsimple-legacy.pdf | Bin 690970 -> 690985 bytes .../doc/latex/csvsimple/csvsimple-legacy.tex | 2 +- .../texmf-dist/doc/latex/csvsimple/csvsimple.pdf | Bin 295749 -> 295804 bytes .../texmf-dist/doc/latex/csvsimple/csvsimple.tex | 2 +- 11 files changed, 274 insertions(+), 134 deletions(-) (limited to 'Master/texmf-dist/doc/latex') diff --git a/Master/texmf-dist/doc/latex/csvsimple/CHANGES.md b/Master/texmf-dist/doc/latex/csvsimple/CHANGES.md index 769baa5b68c..18e055de832 100644 --- a/Master/texmf-dist/doc/latex/csvsimple/CHANGES.md +++ b/Master/texmf-dist/doc/latex/csvsimple/CHANGES.md @@ -16,6 +16,29 @@ and this project adheres to ### Security +## [2.5.0] - 2023-10-16 + +### Added +- New survey tables (issue #29): + - `\csvautotabularray` + - `\csvautotabularray*` + - `\csvautolongtabularray` + - `\csvautolongtabularray*` +- New corresponding options (issue #29) + - `autotabularray` + - `autotabularray*` + - `autolongtabularray` + - `autolongtabularray*` + +### Changed +- Documentation typos fixed (issue #30) +- Survey tables moved into a separate section + +### Fixed +- `collect data` does not collect `after first line` (issue #28) + + + ## [2.4.0] - 2023-05-09 ### Added diff --git a/Master/texmf-dist/doc/latex/csvsimple/README.md b/Master/texmf-dist/doc/latex/csvsimple/README.md index f0c928fe02c..d72e0a6cc71 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.4.0 (2023/05/09) +# The LaTeX package csvsimple - version 2.5.0 (2023/10/16) > Copyright (c) 2008-2023 by Prof. Dr. Dr. Thomas F. Sturm diff --git a/Master/texmf-dist/doc/latex/csvsimple/csvsimple-doc.sty b/Master/texmf-dist/doc/latex/csvsimple/csvsimple-doc.sty index b30ec16b39c..36f052ac9b4 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.4.0 (2023/05/09) +%% The LaTeX package csvsimple - version 2.5.0 (2023/10/16) %% 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.4.0}% -\def\datum{2023/05/09}% +\def\version{2.5.0}% +\def\datum{2023/10/16}% \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 index 13485dc4d86..8915e27291f 100644 Binary files a/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.pdf and b/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.pdf differ diff --git a/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.tex b/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.tex index 3d0fdd04483..5d872f5fb26 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.4.0 (2023/05/09) +%% The LaTeX package csvsimple - version 2.5.0 (2023/10/16) %% 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 index 460c0de9fb5..9bf62e2f408 100644 Binary files a/Master/texmf-dist/doc/latex/csvsimple/csvsimple-l3.pdf and b/Master/texmf-dist/doc/latex/csvsimple/csvsimple-l3.pdf differ diff --git a/Master/texmf-dist/doc/latex/csvsimple/csvsimple-l3.tex b/Master/texmf-dist/doc/latex/csvsimple/csvsimple-l3.tex index 32595572b50..3377217755f 100644 --- a/Master/texmf-dist/doc/latex/csvsimple/csvsimple-l3.tex +++ b/Master/texmf-dist/doc/latex/csvsimple/csvsimple-l3.tex @@ -1,6 +1,7 @@ % \LaTeX-Main\ % !TeX encoding=UTF-8 -%% The LaTeX package csvsimple - version 2.4.0 (2023/05/09) +% !TeX spellcheck=en_US +%% The LaTeX package csvsimple - version 2.5.0 (2023/10/16) %% csvsimple.tex: Manual %% %% ------------------------------------------------------------------------------------------- @@ -52,7 +53,7 @@ {\large Thomas F.~Sturm% \footnote{Prof.~Dr.~Dr.~Thomas F.~Sturm, Institut f\"{u}r Mathematik und Informatik, University of the Bundeswehr Munich, D-85577 Neubiberg, Germany; - email: \href{mailto:thomas.sturm@unibw.de}{thomas.sturm@unibw.de}}\par\medskip + email: \href{mailto:thomas.sturm@unibw.de}{thomas.sturm@unibw.de}}\par\medskip \normalsize\url{https://www.ctan.org/pkg/csvsimple}\par \url{https://github.com/T-F-S/csvsimple} } @@ -429,109 +430,6 @@ is useless for |\csvreader|. \end{dispExample} \end{docCommand} -\bigskip - -The following |\csvauto...| commands are intended for quick data overview -with limited formatting potential. -See Subsection~\ref{subsec:tabsupport} on page \pageref{subsec:tabsupport} -for the general table options in combination with \refCom{csvreader} and -\refCom{csvloop}. - -\begin{docCommands}[ - doc parameter = \oarg{options}\marg{file name} - ] - { - { doc name = csvautotabular }, - { doc name = csvautotabular*, doc new = 2021-06-25 } - } - |\csvautotabular| or |\csvautotabular*| - is an abbreviation for the application of the option key - \refKey{/csvsim/autotabular} or \refKey{/csvsim/autotabular*} - together with other \meta{options} to \refCom{csvloop}. - This macro reads the whole CSV file denoted by \meta{file name} - with an automated formatting. - The star variant treats the first line as data line and not as header line. -\begin{dispExample} -\csvautotabular*{grade.csv} -\end{dispExample} -\begin{dispExample} -\csvautotabular[filter equal={\csvcoliv}{f}]{grade.csv} -\end{dispExample} -\end{docCommands} - -\clearpage - -\begin{docCommands}[ - doc parameter = \oarg{options}\marg{file name} - ] - { - { doc name = csvautolongtable }, - { doc name = csvautolongtable*, doc new = 2021-06-25 } - } - |\csvautolongtable| or |\csvautolongtable*| - is an abbreviation for the application of the option key - \refKey{/csvsim/autolongtable} or \refKey{/csvsim/autolongtable*} - together with other \meta{options} to \refCom{csvloop}. - This macro reads the whole CSV file denoted by \meta{file name} - with an automated formatting. - For application, the package |longtable| is required which has to be - loaded in the preamble. - The star variant treats the first line as data line and not as header line. -\begin{dispListing} -\csvautolongtable{grade.csv} -\end{dispListing} -\csvautolongtable{grade.csv} -\end{docCommands} - - - -\begin{docCommands}[ - doc parameter = \oarg{options}\marg{file name} - ] - { - { doc name = csvautobooktabular }, - { doc name = csvautobooktabular*, doc new = 2021-06-25 } - } - |\csvautobooktabular| or |\csvautobooktabular*| - is an abbreviation for the application of the option key - \refKey{/csvsim/autobooktabular} or \refKey{/csvsim/autobooktabular*} - together with other \meta{options} to \refCom{csvloop}. - This macro reads the whole CSV file denoted by \meta{file name} - with an automated formatting. - For application, the package |booktabs| is required which has to be - loaded in the preamble. - The star variant treats the first line as data line and not as header line. -\begin{dispExample} -\csvautobooktabular{grade.csv} -\end{dispExample} -\end{docCommands} - - -\begin{docCommands}[ - doc parameter = \oarg{options}\marg{file name} - ] - { - { doc name = csvautobooklongtable }, - { doc name = csvautobooklongtable*, doc new = 2021-06-25 } - } - |\csvautobooklongtable| or |\csvautobooklongtable*| - is an abbreviation for the application of the option key - \refKey{/csvsim/autobooklongtable} or \refKey{/csvsim/autobooklongtable*} - together with other \meta{options} to \refCom{csvloop}. - This macro reads the whole CSV file denoted by \meta{file name} - with an automated formatting. - For application, the packages |booktabs| and |longtable| are required which have to be - loaded in the preamble. - The star variant treats the first line as data line and not as header line. -\begin{dispListing} -\csvautobooklongtable{grade.csv} -\end{dispListing} -\csvautobooklongtable{grade.csv} -\end{docCommands} - - - -\clearpage \begin{docCommand}[doc updated = 2021-06-25]{csvset}{\marg{options}} Sets \meta{options} for every following @@ -564,6 +462,7 @@ The following students passed the test in mathematics:\\ \end{dispExample} \end{docCommand} +\enlargethispage*{1cm} \begin{docCommand}{csvnames}{\marg{key}\marg{assignments}} Abbreviation for |\csvstyle{|\meta{key}|}{column names=|\marg{assignments}|}| @@ -723,7 +622,7 @@ purpose: Typesets the current data line number. This is the current number of accepted data lines without the header line. Despite of the name, there is no associated \LaTeX\ counter |csvrow|, - but \refCom{thecsvrow} is an accessor the \LaTeX3 integer + but \refCom{thecsvrow} accesses the \LaTeX3 integer \refCom{g_csvsim_row_int}. \end{docCommands} @@ -736,7 +635,7 @@ purpose: is either computed from the first valid line (header or data) or given by \refKey{/csvsim/column count}. Despite of the name, there is no associated \LaTeX\ counter |csvcolumncount|, - but \refCom{thecsvcolumncount} is an accessor the \LaTeX3 integer + but \refCom{thecsvcolumncount} accesses the \LaTeX3 integer \refCom{g_csvsim_columncount_int}. \begin{dispExample} \csvreader{grade.csv}{}{}% @@ -769,6 +668,210 @@ is \thecsvinputline{}. +\clearpage +\section{Macros for Automatic Survey Tables}\label{sec:autotable}% + +The following |\csvauto...| commands are intended for quick data overview +with \emph{limited} formatting potential. +The most customizable |\csvauto...| commands are +\refCom{csvautotabularray} and friends. + +For full control see Subsection~\ref{subsec:tabsupport} on page \pageref{subsec:tabsupport} +for the general table options in combination with \refCom{csvreader} and +\refCom{csvloop}. + +\begin{docCommands}[ + doc parameter = \oarg{options}\marg{file name} + ] + { + { doc name = csvautotabular }, + { doc name = csvautotabular*, doc new = 2021-06-25 } + } + |\csvautotabular| or |\csvautotabular*| + is an abbreviation for the application of the option key + \refKey{/csvsim/autotabular} or \refKey{/csvsim/autotabular*} + together with other \meta{options} to \refCom{csvloop}. + This macro reads the whole CSV file denoted by \meta{file name} + with an automated formatting. + The star variant treats the first line as data line and not as header line. +\begin{dispExample} +\csvautotabular*{grade.csv} +\end{dispExample} +\begin{dispExample} +\csvautotabular[filter equal={\csvcoliv}{f}]{grade.csv} +\end{dispExample} +\end{docCommands} + + + +\begin{docCommands}[ + doc parameter = \oarg{options}\marg{file name} + ] + { + { doc name = csvautolongtable }, + { doc name = csvautolongtable*, doc new = 2021-06-25 } + } + |\csvautolongtable| or |\csvautolongtable*| + is an abbreviation for the application of the option key + \refKey{/csvsim/autolongtable} or \refKey{/csvsim/autolongtable*} + together with other \meta{options} to \refCom{csvloop}. + This macro reads the whole CSV file denoted by \meta{file name} + with an automated formatting. + For application, the package \ctanpkg{longtable} is required which has to be + loaded in the preamble. + The star variant treats the first line as data line and not as header line. +\begin{dispListing} +\csvautolongtable{grade.csv} +\end{dispListing} +\csvautolongtable{grade.csv} +\end{docCommands} + + +\clearpage + + +\begin{docCommands}[ + doc parameter = \oarg{options}\marg{file name} + ] + { + { doc name = csvautobooktabular }, + { doc name = csvautobooktabular*, doc new = 2021-06-25 } + } + |\csvautobooktabular| or |\csvautobooktabular*| + is an abbreviation for the application of the option key + \refKey{/csvsim/autobooktabular} or \refKey{/csvsim/autobooktabular*} + together with other \meta{options} to \refCom{csvloop}. + This macro reads the whole CSV file denoted by \meta{file name} + with an automated formatting. + For application, the package \ctanpkg{booktabs} is required which has to be + loaded in the preamble. + The star variant treats the first line as data line and not as header line. +\begin{dispExample} +\csvautobooktabular{grade.csv} +\end{dispExample} +\end{docCommands} + + +\begin{docCommands}[ + doc parameter = \oarg{options}\marg{file name} + ] + { + { doc name = csvautobooklongtable }, + { doc name = csvautobooklongtable*, doc new = 2021-06-25 } + } + |\csvautobooklongtable| or |\csvautobooklongtable*| + is an abbreviation for the application of the option key + \refKey{/csvsim/autobooklongtable} or \refKey{/csvsim/autobooklongtable*} + together with other \meta{options} to \refCom{csvloop}. + This macro reads the whole CSV file denoted by \meta{file name} + with an automated formatting. + For application, the packages \ctanpkg{booktabs} and \ctanpkg{longtable} are required which have to be + loaded in the preamble. + The star variant treats the first line as data line and not as header line. +\begin{dispListing} +\csvautobooklongtable{grade.csv} +\end{dispListing} +\csvautobooklongtable{grade.csv} +\end{docCommands} + + +\clearpage + +\begin{docCommands}[ + doc parameter = \oarg{options}\marg{file name}\oarg{taboptions 1}\oarg{taboptions 2}, + doc new = 2023-10-13 + ] + { + { doc name = csvautotabularray }, + { doc name = csvautotabularray* }, + { doc name = csvautolongtabularray }, + { doc name = csvautolongtabularray* }, + } + These macros are abbreviations for the application of the option keys + \refKey{/csvsim/autotabularray}, \refKey{/csvsim/autotabularray*},\\ + \refKey{/csvsim/autolongtabularray}, or \refKey{/csvsim/autolongtabularray*} + together with other \meta{options} to \refCom{csvloop}. + These macros read the whole CSV file denoted by \meta{file name} + with an automated formatting. + For application, the package \ctanpkg{tabularray} is required which has to be + loaded in the preamble. + \refCom{csvautotabularray} uses the \docAuxEnvironment*{tblr} environment and + \refCom{csvautolongtabularray} uses the \docAuxEnvironment*{longtblr} environment. + The star variants treat the first line as data line and not as header line.\par + Options to the table environments from \ctanpkg{tabularray} may be given + by either setting \refKey{/csvsim/generic table options} or + using \meta{taboptions 1} and \meta{taboptions 2}.\par + The default setting is +\begin{dispListing} +generic table options = + { { + row{1} = {font=\bfseries}, + hline{1,Z} = {0.8pt}, + hline{2} = {0.4pt}, + } } +\end{dispListing} + For the star variants, the default setting is +\begin{dispListing} +generic table options = + { { + hline{1,Z} = {0.8pt}, + } } +\end{dispListing} + +Examples: + +\begin{dispExample} +\csvautotabularray{grade.csv} +\end{dispExample} + +\begin{dispExample} +\csvautotabularray[table centered, + generic table options = + {{ + row{odd} = {red!85!gray!7}, + row{1} = {bg=red!85!gray, fg=white, font=\bfseries}, + }} + ] + {grade.csv} +\end{dispExample} + +\clearpage + +Alternatively to \refKey{/csvsim/generic table options} +(and overruling this option), one may give options to +\docAuxEnvironment*{tblr} or \docAuxEnvironment*{longtblr} +using \meta{taboptions 1} and \meta{taboptions 2}. +If \meta{taboptions 2} is \emph{not present}, then \meta{taboptions 1} +is used as mandatory argument. +Otherwise, \meta{taboptions 1} is used as optional argument and +\meta{taboptions 2} as mandatory argument. + +\begin{dispExample} +\csvautotabularray[table centered] + {grade.csv} + [ + row{odd} = {red!85!gray!7}, + row{1} = {bg=red!85!gray, fg=white, font=\bfseries}, + ] +\end{dispExample} + + +\begin{dispExample} +\csvautotabularray[table centered] + {grade.csv} + [ + tall, + caption = {My table}, + remark{Note} = {My remark}, + ] + [ + row{odd} = {red!85!gray!7}, + row{1} = {bg=red!85!gray, fg=white, font=\bfseries}, + ] +\end{dispExample} + + +\end{docCommands} \clearpage @@ -1209,7 +1312,7 @@ filter options: \begin{docCsvKeys}[ doc parameter = {=\marg{floating point expression}}, - doc description = {style,no default}, + doc description = {style, no default}, doc new = {2022-10-21} ] { @@ -1223,7 +1326,7 @@ filter options: \begin{docCsvKeys}[ doc parameter = {=\marg{boolean expression}}, - doc description = {style,no default}, + doc description = {style, no default}, doc new = {2022-10-21} ] { @@ -1637,7 +1740,8 @@ are described with predefined keys. The following keys allow to use further \subsubsection{General Survey Tables}\label{subsubsec:table_survey} The following |auto| options are the counterparts for the respective quick -overview commands like \refCom{csvautotabular}. They are listed for +overview commands like \refCom{csvautotabular}, see Section~\ref{sec:autotable}. +They are listed for completeness, but are unlikely to be used directly. \begin{docCsvKeys}[ @@ -1695,6 +1799,25 @@ completeness, but are unlikely to be used directly. \end{docCsvKeys} +\begin{docCsvKeys}[ + doc parameter = {=\meta{file name}}, + doc description = no default, + doc new = {2023-10-13} + ] + { + { doc name = autotabularray }, + { doc name = autotabularray* }, + { doc name = autolongtabularray }, + { doc name = autolongtabularray* }, + } + Reads the whole CSV file denoted \meta{file name} with an automated formatting + using the required |tabularray| package. + \refKey{/csvsim/autotabularray} uses the \docAuxEnvironment*{tblr} environment and + \refKey{/csvsim/autolongtabularray} uses the \docAuxEnvironment*{longtblr} environment. + The star variants treat the first line as data line and not as header line. +\end{docCsvKeys} + + \clearpage \subsection{Special Characters}\label{subsec:specchar} Be default, the CSV content is treated like normal \LaTeX\ text, see @@ -2841,29 +2964,23 @@ Display data from line 3 on:\par \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. +The following example uses \refCom{csvautotabularray} to display the whole +table. Note that the \ctanpkg{tabularray} options are given as last +optional argument. \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% -} +\csvautotabularray[table centered]{data.csv} + [ + row{odd} = {blue!85!gray!7}, + row{1} = {blue!50!gray!25, font=\bfseries}, + hline{1,Z} = {0.1em, blue!50!black}, + hline{2} = {blue!50!black} + ] \end{dispExample} + \clearpage \subsection{Imported CSV data}\label{sec:importeddata}% If data is imported from other applications, there is not always a choice diff --git a/Master/texmf-dist/doc/latex/csvsimple/csvsimple-legacy.pdf b/Master/texmf-dist/doc/latex/csvsimple/csvsimple-legacy.pdf index ebf97bfd4e8..a2b995531c5 100644 Binary files a/Master/texmf-dist/doc/latex/csvsimple/csvsimple-legacy.pdf and b/Master/texmf-dist/doc/latex/csvsimple/csvsimple-legacy.pdf differ diff --git a/Master/texmf-dist/doc/latex/csvsimple/csvsimple-legacy.tex b/Master/texmf-dist/doc/latex/csvsimple/csvsimple-legacy.tex index 1fe95b89b8d..290d512fb53 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.4.0 (2023/05/09) +%% The LaTeX package csvsimple - version 2.5.0 (2023/10/16) %% csvsimple.tex: Manual %% %% ------------------------------------------------------------------------------------------- diff --git a/Master/texmf-dist/doc/latex/csvsimple/csvsimple.pdf b/Master/texmf-dist/doc/latex/csvsimple/csvsimple.pdf index 8a9fb039bbf..e4b5badc01d 100644 Binary files a/Master/texmf-dist/doc/latex/csvsimple/csvsimple.pdf and b/Master/texmf-dist/doc/latex/csvsimple/csvsimple.pdf differ diff --git a/Master/texmf-dist/doc/latex/csvsimple/csvsimple.tex b/Master/texmf-dist/doc/latex/csvsimple/csvsimple.tex index 5aa9e34ca78..7e4e93d1edd 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.4.0 (2023/05/09) +%% The LaTeX package csvsimple - version 2.5.0 (2023/10/16) %% csvsimple.tex: Manual %% %% ------------------------------------------------------------------------------------------- -- cgit v1.2.3