diff options
Diffstat (limited to 'macros/latex/contrib/csvsimple/csvsimple.tex')
-rw-r--r-- | macros/latex/contrib/csvsimple/csvsimple.tex | 40 |
1 files changed, 29 insertions, 11 deletions
diff --git a/macros/latex/contrib/csvsimple/csvsimple.tex b/macros/latex/contrib/csvsimple/csvsimple.tex index 73855697f6..924a819584 100644 --- a/macros/latex/contrib/csvsimple/csvsimple.tex +++ b/macros/latex/contrib/csvsimple/csvsimple.tex @@ -1,10 +1,10 @@ % \LaTeX-Main\ % !TeX encoding=UTF-8 -%% The LaTeX package csvsimple - version 1.21 (2019/04/09) +%% The LaTeX package csvsimple - version 1.22 (2021/06/07) %% csvsimple.tex: Manual %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2008-2019 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2008-2021 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -124,8 +124,8 @@ pdfkeywords={csv file, comma separated values, key value syntax} } -\def\version{1.21}% -\def\datum{2019/04/09}% +\def\version{1.22}% +\def\datum{2021/06/07}% \makeindex @@ -143,7 +143,7 @@ \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; email: \href{mailto:thomas.sturm@unibw.de}{thomas.sturm@unibw.de}}\par\medskip -\normalsize\url{http://www.ctan.org/pkg/csvsimple}\par +\normalsize\url{https://www.ctan.org/pkg/csvsimple}\par \url{https://github.com/T-F-S/csvsimple} } \end{center} @@ -181,7 +181,7 @@ Mind the following restrictions: with external tools, see \Fullref{sec:Sorting}. \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 not quoted or quoted with +\item Values are expected to be either not quoted or quoted with curly braces |{}| of \TeX\ groups. Other quotes like doublequotes are not supported directly, but can be achieved with external tools, see \Fullref{sec:importeddata}. @@ -290,16 +290,19 @@ The next example shows such a style definition with the convenience macro entries to column names by \refKey{/csv/head to column names}. For this, the header entries have to be without spaces and special characters. But you can always assign entries to canonical macro names by hand like in the examples -above. +above. Here, we also add a \refKey{/csv/head to column names prefix} to avoid +macro name clashes. \begin{dispExample} \csvstyle{myTableStyle}{tabular=|r|l|c|, table head=\hline & Person & Matr.~No.\\\hline\hline, late after line=\\\hline, - head to column names} + head to column names, + head to column names prefix=MY, + } \csvreader[myTableStyle]{grade.csv}{}% - {\thecsvrow & \givenname~\name & \matriculation}% + {\thecsvrow & \MYgivenname~\MYname & \MYmatriculation}% \end{dispExample} @@ -781,7 +784,7 @@ to be used inside these macros. Additional command definition keys are provided for the supported tables, see Section~\ref{subsec:tabsupport} from page~\pageref{subsec:tabsupport}. - +\clearpage \subsection{Header Processing and Column Name Assignment}% \begin{docCsvKey}{head}{\colOpt{=true\textbar false}}{default |true|, initially |true|} @@ -814,6 +817,22 @@ see Section~\ref{subsec:tabsupport} from page~\pageref{subsec:tabsupport}. as macro names for the columns. This option can be used only, if the header entries do not contain spaces and special characters to be used as feasible \LaTeX\ macro names. + Note that the macro definition is \emph{global} and may therefore override + existing macros for the rest of the document. Adding + \refKey{/csv/head to column names prefix} may help to avoid unwanted + overrides. +\end{docCsvKey} + + +\begin{docCsvKey}[][doc new=2019-07-16]{head to column names prefix}{=\meta{text}}{no default, initially empty} + The given \meta{text} is prefixed to the name of all macros generated by + \refKey{/csv/head to column names}. For example, if you use the settings +\begin{dispListing} + head to column names, + head to column names prefix=MY, +\end{dispListing} + a header entry |section| will generate the corresponding macro + |\MYsection| instead of destroying the standard \LaTeX\ |\section| macro. \end{docCsvKey} @@ -1798,7 +1817,6 @@ add an invisible dummy column with |c@{}| as first column: \end{dispExample} - \clearpage Now, the preceding table shall be sorted by the \emph{cats} values. If the \csvsorter\ program is properly installed, |