texlive[41597] Master/texmf-dist: csvsimple (1jul16)

commits+karl at tug.org commits+karl at tug.org
Sat Jul 2 00:04:23 CEST 2016


Revision: 41597
          http://tug.org/svn/texlive?view=revision&revision=41597
Author:   karl
Date:     2016-07-02 00:04:23 +0200 (Sat, 02 Jul 2016)
Log Message:
-----------
csvsimple (1jul16)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/csvsimple/CHANGES
    trunk/Master/texmf-dist/doc/latex/csvsimple/README
    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.pdf
    trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple.tex
    trunk/Master/texmf-dist/tex/latex/csvsimple/csvsimple.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/csvsimple/encoding.xml

Modified: trunk/Master/texmf-dist/doc/latex/csvsimple/CHANGES
===================================================================
--- trunk/Master/texmf-dist/doc/latex/csvsimple/CHANGES	2016-07-01 22:04:04 UTC (rev 41596)
+++ trunk/Master/texmf-dist/doc/latex/csvsimple/CHANGES	2016-07-01 22:04:23 UTC (rev 41597)
@@ -1,7 +1,7 @@
-%% The LaTeX package csvsimple - version 1.12 (2014/07/14)
+%% The LaTeX package csvsimple - version 1.20 (2016/07/01)
 %%
 %% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2008-2014 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2008-2016 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
 %% -------------------------------------------------------------------------------------------
 %%
 %% This work may be distributed and/or modified under the
@@ -89,3 +89,16 @@
   new key 'csvsorter token'
 - changed: encircling column entry braces removed for all entries for better siunitx compatibility
 - documentation revised and extended with siunitx examples
+
+version 1.20 (2016/07/01):
+- implementation changed from \roman to \romannumeral
+- write18 replace by \ShellEscape from the shellesc package
+- '\csvlinetotablerow' implemented more efficiently
+- '\csvloop' made long
+- new string comparison macros:
+  '\ifcsvstrequal', '\ifcsvprostrequal', '\ifcsvstrcmp', '\ifcsvnotstrcmp'
+- new filter options:
+  'filter ifthen', 'filter test', 'filter expr', 'full filter',
+  'filter strcmp', 'filter not strcmp'
+- code optimizations
+- documentation revised

Modified: trunk/Master/texmf-dist/doc/latex/csvsimple/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/csvsimple/README	2016-07-01 22:04:04 UTC (rev 41596)
+++ trunk/Master/texmf-dist/doc/latex/csvsimple/README	2016-07-01 22:04:23 UTC (rev 41597)
@@ -1,7 +1,7 @@
-%% The LaTeX package csvsimple - version 1.12 (2014/07/14)
+%% The LaTeX package csvsimple - version 1.20 (2016/07/01)
 %%
 %% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2008-2014 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2008-2016 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
 %% -------------------------------------------------------------------------------------------
 %%
 %% This work may be distributed and/or modified under the
@@ -35,6 +35,7 @@
   'csvsimple-example.pdf'     Compiled example
   'amountsort.xml'            csvsorter configuration file (example)
   'catsort.xml'               csvsorter configuration file (example)
+  'encoding.xml'              csvsorter configuration file (example)
   'gradesort.xml'             csvsorter configuration file (example)
   'matriculationsort.xml'     csvsorter configuration file (example)
   'namesort.xml'              csvsorter configuration file (example)

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	2016-07-01 22:04:04 UTC (rev 41596)
+++ trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.tex	2016-07-01 22:04:23 UTC (rev 41597)
@@ -1,8 +1,8 @@
-%% The LaTeX package csvsimple - version 1.12 (2014/07/14)
+%% The LaTeX package csvsimple - version 1.20 (2016/07/01)
 %% csvsimple-example.tex: an example for csvsimple
 %%
 %% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2008-2014 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2008-2016 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.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple.tex	2016-07-01 22:04:04 UTC (rev 41596)
+++ trunk/Master/texmf-dist/doc/latex/csvsimple/csvsimple.tex	2016-07-01 22:04:23 UTC (rev 41597)
@@ -1,9 +1,10 @@
 % \LaTeX-Main\
-%% The LaTeX package csvsimple - version 1.12 (2014/07/14)
+% !TeX encoding=UTF-8
+%% The LaTeX package csvsimple - version 1.20 (2016/07/01)
 %% csvsimple.tex: Manual
 %%
 %% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2008-2014 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2008-2016 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
 %% -------------------------------------------------------------------------------------------
 %%
 %% This work may be distributed and/or modified under the
@@ -21,17 +22,19 @@
 \documentclass[a4paper,11pt]{ltxdoc}
 
 \usepackage[T1]{fontenc}
-\usepackage[latin1]{inputenc}
+\usepackage[utf8]{inputenc}
 \usepackage[english]{babel}
 \usepackage{lmodern,parskip,array,ifthen,calc,makeidx}
 \usepackage{amsmath,amssymb}
 \usepackage[svgnames,table,hyperref]{xcolor}
 \usepackage{tikz,siunitx}
+\usepackage{varioref}
 \usepackage[pdftex,bookmarks,raiselinks,pageanchor,hyperindex,colorlinks]{hyperref}
 \urlstyle{sf}
+\usepackage{cleveref}
 
 \usepackage[a4paper,left=2.5cm,right=2.5cm,top=1.5cm,bottom=1.5cm,
-    marginparsep=5mm,marginparwidth=10mm,
+    marginparsep=3mm,marginparwidth=18mm,
     headheight=0mm,headsep=0cm,
     footskip=1.5cm,includeheadfoot]{geometry}
 \usepackage{fancyhdr}
@@ -51,54 +54,64 @@
 \setlength{\bibitemsep}{\smallskipamount}
 \addbibresource{\jobname.bib}
 
-\usepackage[most,documentation]{tcolorbox}
 \usepackage{longtable,booktabs}
 \usepackage{csvsimple}
 
+\usepackage{tcolorbox}
+\tcbuselibrary{skins,xparse,minted,breakable,documentation,raster}
+
+\definecolor{Green_Dark}{rgb}{0.078431,0.407843,0.176471}
+\definecolor{Blue_Dark}{rgb}{0.090196,0.211765,0.364706}
+\definecolor{Blue_Bright}{rgb}{0.858824,0.898039,0.945098}
+
 \tcbset{skin=enhanced,
+  minted options={fontsize=\footnotesize},
   doc head={colback=yellow!10!white,interior style=fill},
   doc head key={colback=magenta!5!white,interior style=fill},
   color key=DarkViolet,
   color value=Teal,
   color color=Teal,
-  index colorize,index annotate}
-
-\lstdefinestyle{mydocumentation}{style=tcbdocumentation,
-  classoffset=0,
-  texcsstyle=\color{blue},
-  % LaTeX and other packages
-  moretexcs={arrayrulecolor,draw,includegraphics,ifthenelse,isodd,lipsum,path,pgfkeysalso},
-  classoffset=1,
-  moretexcs={%
-    csvset,csvreader,csvautotabular,csvloop,csvautolongtable,csvstyle,
-    csvnames,csvheadset,csviffirstrow,csvifoddrow,csvfilteraccept,
-    csvfilterreject,csvline,thecsvrow,thecsvinputline,csvlinetotablerow,
-    csvautobooktabular,csvautobooklongtable,
+  color counter=Orange!85!black,
+  color length=Orange!85!black,
+  index colorize,
+  index annotate,
+  beforeafter example/.style={
+    before skip=4pt plus 2pt minus 1pt,
+    after skip=8pt plus 4pt minus 2pt
+  },
+  docexample/.style={bicolor,
+    beforeafter example,
+    arc is angular,fonttitle=\bfseries,
+    %fontupper=\tiny\itshape,
+    fontlower=\footnotesize,
+    %colframe=Blue_Dark,
+    %colback=Blue_Bright!75,
+    colframe=green!25!yellow!50!black,
+    colback=green!25!yellow!7,
+    colbacklower=white,
+%    drop fuzzy shadow,
+    drop fuzzy shadow=green!25!yellow!50!black,
+    listing engine=minted,
+    documentation minted style=colorful,
+    documentation minted options={fontsize=\footnotesize},
     },
-  texcsstyle=\color{Definition}\bfseries,
-  classoffset=2,
-  keywordstyle=\color{Option}\bfseries,
-  % option list
-  morekeywords={%
-    },
-  classoffset=0% restore default
-  }
-
-\tcbset{documentation listing style=mydocumentation,%
-  docexample/.style={enhanced,colframe=Navy!50!ExampleFrame,colback=Navy!5!ExampleBack,fontlower=\footnotesize,
-    bicolor,colbacklower=ExampleBack!5!white,drop fuzzy shadow},
 }
 
+\renewcommand*{\tcbdocnew}[1]{\textcolor{green!50!black}{\sffamily\bfseries N} #1}
+\renewcommand*{\tcbdocupdated}[1]{\textcolor{blue!75!black}{\sffamily\bfseries U} #1}
 
-
 \tcbmakedocSubKey{docCsvKey}{csv}
 
 \NewDocumentCommand{\csvsorter}{}{\textsf{\bfseries\color{red!20!black}CSV-Sorter}}
 
-\newtcbinputlisting{\csvlisting}[1]{docexample,listing style=tcbdocumentation,fonttitle=\bfseries,
-  listing only,title={CSV file \flqq\texttt{\detokenize{#1.csv}}\frqq},listing file=#1.csv}
+%\newtcbinputlisting{\csvlisting}[1]{docexample,listing style=tcbdocumentation,fonttitle=\bfseries,
+%  listing only,title={CSV file \flqq\texttt{\detokenize{#1.csv}}\frqq},listing file=#1.csv}
+\newtcbinputlisting{\csvlisting}[1]{docexample,minted options={fontsize=\footnotesize},minted language=latex,
+  fonttitle=\bfseries,listing only,title={CSV file \flqq\texttt{\detokenize{#1.csv}}\frqq},listing file=#1.csv}
 
-\newtcbinputlisting{\xmllisting}[1]{docexample,listing options={style=tcbdocumentation,language=XML},
+%\newtcbinputlisting{\xmllisting}[1]{docexample,listing options={style=tcbdocumentation,language=XML},
+%  fonttitle=\bfseries,listing only,title={Configuration file \flqq\texttt{\detokenize{#1.xml}}\frqq},listing file=#1.xml}
+\newtcbinputlisting{\xmllisting}[1]{docexample,minted options={fontsize=\footnotesize},minted language=xml,
   fonttitle=\bfseries,listing only,title={Configuration file \flqq\texttt{\detokenize{#1.xml}}\frqq},listing file=#1.xml}
 
 \NewTotalTCBox{\verbbox}{m}{enhanced,on line,size=fbox,frame empty,colback=red!5!white,
@@ -111,8 +124,8 @@
   pdfkeywords={csv file, comma separated values, key value syntax}
 }
 
-\def\version{1.12}%
-\def\datum{2014/07/14}%
+\def\version{1.20}%
+\def\datum{2016/07/01}%
 \makeindex
 
 
@@ -119,17 +132,20 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{document}
 \begin{center}
-\vspace*{5mm}
-\begin{tcolorbox}[enhanced,
-  center upper,width=10cm,boxrule=0.4pt,
-  colback=white,colframe=black!50!yellow,drop fuzzy midday shadow=black!50!yellow]
-{\bfseries\LARGE The \texttt{csvsimple} package\par}\medskip
-{\large Manual for version \version\ (\datum)\par}
-\end{tcolorbox}\bigskip
+\begin{tcolorbox}[enhanced,hbox,tikznode,left=8mm,right=8mm,boxrule=0.4pt,
+  colback=white,colframe=black!50!yellow,
+  drop lifted shadow=black!50!yellow,arc is angular,
+  before=\par\vspace*{5mm},after=\par\bigskip]
+{\bfseries\LARGE The \texttt{csvsimple} package}\\[3mm]
+{\large Manual for version \version\ (\datum)}
+\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;
-     email: \href{mailto:thomas.sturm at unibw.de}{thomas.sturm at unibw.de}} }
+     email: \href{mailto:thomas.sturm at unibw.de}{thomas.sturm at unibw.de}}\par\medskip
+\normalsize\url{http://www.ctan.org/pkg/csvsimple}\par
+\url{https://github.com/T-F-S/csvsimple}
+}
 \end{center}
 \bigskip
 \begin{absquote}
@@ -142,6 +158,7 @@
   or data base storage.
 \end{absquote}
 
+\clearpage
 \tableofcontents
 
 \clearpage
@@ -149,10 +166,10 @@
 The |csvsimple| package is applied to the processing of
 CSV\footnote{CSV file: file with comma separated values.} files.
 This processing is controlled by key value assignments according to the
-syntax of |pgfkeys| \cite{tantau:2013a}. Sample applications of the package
+syntax of |pgfkeys| \cite{tantau:2015a}. Sample applications of the package
 are tabular lists, serial letters, and charts.
 
-An alternative to |csvsimple| is the |datatool| package \cite{talbot:2014a}
+An alternative to |csvsimple| is the |datatool| package \cite{talbot:2016a}
 which provides considerably more functions and allows sorting of data by \LaTeX.
 |csvsimple| has a different approach for the user interface and
 is deliberately restricted to some basic functions with fast
@@ -161,7 +178,9 @@
 
 \subsection{Loading the Package}
 The package |csvsimple| loads the packages
-|pgfkeys| \cite{tantau:2013a} and |ifthen| \cite{carlisle:2001b}.
+|pgfkeys| \cite{tantau:2015a},
+|etoolbox| \cite{lehmann:2015a},
+and |ifthen| \cite{carlisle:2014c}.
 |csvsimple| itself is loaded in the usual manner in the preamble:
 \begin{dispListing}
 \usepackage{csvsimple}
@@ -168,9 +187,9 @@
 \end{dispListing}
 
 Not automatically loaded, but used for many examples are the packages
-|longtable| \cite{carlisle:2004a}
+|longtable| \cite{carlisle:2014d}
 and
-|booktabs| \cite{fear:2005a}.
+|booktabs| \cite{fear:2016a}.
 
 \subsection{First Steps}
 Every line of a processable CSV file has to contain an identical amount of
@@ -185,7 +204,7 @@
 name,givenname,matriculation,gender,grade
 Maier,Hans,12345,m,1.0
 Huber,Anna,23456,f,2.3
-Wei\ss{}b\"{a}ck,Werner,34567,m,5.0
+Weißbäck,Werner,34567,m,5.0
 Bauer,Maria,19202,f,3.3
 \end{tcbverbatimwrite}
 %-- end embedded file --
@@ -330,10 +349,10 @@
 a certificate is printed only for students with grade unequal to 5.0.
 
 \begin{dispExample}
-\csvreader[filter not equal={\grade}{5.0}]%
+\csvreader[filter not strcmp={\grade}{5.0}]%
   {grade.csv}{1=\name,2=\firstname,3=\matnumber,4=\gender,5=\grade}%
   {\begin{center}\Large\bfseries Certificate in Mathematics\end{center}
-  \large\ifthenelse{\equal{\gender}{f}}{Ms.}{Mr.}
+  \large\ifcsvstrcmp{\gender}{f}{Ms.}{Mr.}
   \firstname~\name, matriculation number \matnumber, has passed the test
   in mathematics with grade \grade.\par\ldots\par
   }%
@@ -480,7 +499,7 @@
 \begin{dispExample}
 \csvset{grade list/.style=
     {column names={name=\name,givenname=\firstname,grade=\grade}},
-  passed/.style={filter not equal={\grade}{5.0}} }
+  passed/.style={filter not strcmp={\grade}{5.0}} }
 
 The following students passed the test in mathematics:
 \csvreader[grade list,passed]{grade.csv}{}{\firstname\ \name\ (\grade); }%
@@ -498,7 +517,7 @@
   to define additional \meta{assignments} of macros to columns.
 \begin{dispExample}
 \csvnames{grade list}{name=\name,givenname=\firstname,grade=\grade}
-\csvstyle{passed}{filter not equal={\grade}{5.0}}
+\csvstyle{passed}{filter not strcmp={\grade}{5.0}}
 
 The following students passed the test in mathematics:
 \csvreader[grade list,passed]{grade.csv}{}{\firstname\ \name\ (\grade); }%
@@ -575,11 +594,11 @@
 \begin{docCommand}{csvfilteraccept}{}
   All following consistent data lines will be accepted and processed.
   This command overwrites all previous filter settings and may be used
-  inside \refKey{/csv/before filter} to implement
+  inside \refKey{/csv/full filter} to implement
   an own filtering rule together with |\csvfilterreject|.
 \begin{dispExample}
 \csvreader[autotabular,
-  before filter=\ifthenelse{\equal{\csvcoliv}{m}}{\csvfilteraccept}{\csvfilterreject}
+  full filter=\ifcsvstrcmp{\csvcoliv}{m}{\csvfilteraccept}{\csvfilterreject}
   ]{grade.csv}{}{\csvlinetotablerow}%
 \end{dispExample}
 \end{docCommand}
@@ -614,7 +633,7 @@
   The \LaTeX\ counter |csvinputline| can be addressed directly in the usual way,
   e.\,g. by |\roman{csvinputline}|.
 \begin{dispExample}
-\csvreader[no head, filter equal={\thecsvinputline}{3}]%
+\csvreader[no head, filter test=\ifnumequal{\thecsvinputline}{3}]%
   {grade.csv}{}%
   {The line with number \thecsvinputline\ contains: \csvline}%
 \end{dispExample}
@@ -621,7 +640,7 @@
 \end{docCommand}
 
 
-\begin{docCommand}{csvlinetotablerow}{}
+\begin{docCommand}[doc updated=2016-00-00]{csvlinetotablerow}{}
   Typesets the current processed data line with |&| between the entries.
   %Most users will never apply this command.
 \end{docCommand}
@@ -637,28 +656,29 @@
 
 \subsection{Command Definition}%--------%[[
 
-\begin{docCsvKey}{before reading}{=\meta{macros}}{no default, initially empty}
-  Sets the \meta{macros} to be executed before the CSV file is processed.
+\begin{docCsvKey}{before reading}{=\meta{code}}{no default, initially empty}
+  Sets the \meta{code} to be executed before the CSV file is processed.
 \end{docCsvKey}
 
-\begin{docCsvKey}{after head}{=\meta{macros}}{no default, initially empty}
-  Sets the \meta{macros} to be executed after the header line is read.
+\begin{docCsvKey}{after head}{=\meta{code}}{no default, initially empty}
+  Sets the \meta{code} to be executed after the header line is read.
 \end{docCsvKey}
 
-\begin{docCsvKey}{before filter}{=\meta{macros}}{no default, initially empty}
-  Sets the \meta{macros} to be executed after reading and consistency checking
+\begin{docCsvKey}{before filter}{=\meta{code}}{no default, initially empty}
+  Sets the \meta{code} to be executed after reading and consistency checking
   of a data line. They are executed before any filter condition is checked,
   see \refKey{/csv/filter}.
+  Also see \refKey{/csv/full filter}.
 \end{docCsvKey}
 
-\begin{docCsvKey}{late after head}{=\meta{macros}}{no default, initially empty}
-  Sets the \meta{macros} to be executed after reading and disassembling
+\begin{docCsvKey}{late after head}{=\meta{code}}{no default, initially empty}
+  Sets the \meta{code} to be executed after reading and disassembling
   of the first accepted data line. They are executed before further processing
   of this line.
 \end{docCsvKey}
 
-\begin{docCsvKey}{late after line}{=\meta{macros}}{no default, initially empty}
-  Sets the \meta{macros} to be executed after reading and disassembling
+\begin{docCsvKey}{late after line}{=\meta{code}}{no default, initially empty}
+  Sets the \meta{code} to be executed after reading and disassembling
   of the next accepted data line (after \refKey{/csv/before filter}).
   They are executed before further processing of this next line.
   |late after line| overwrites |late after first line| and |late after last line|.
@@ -667,55 +687,55 @@
 \end{docCsvKey}
 
 
-\begin{docCsvKey}{late after first line}{=\meta{macros}}{no default, initially empty}
-  Sets the \meta{macros} to be executed after reading and disassembling
+\begin{docCsvKey}{late after first line}{=\meta{code}}{no default, initially empty}
+  Sets the \meta{code} to be executed after reading and disassembling
   of the second accepted data line instead of \refKey{/csv/late after line}.
   This key has to be set after |late after line|.
 \end{docCsvKey}
 
 
-\begin{docCsvKey}{late after last line}{=\meta{macros}}{no default, initially empty}
-  Sets the \meta{macros} to be executed after processing of the last
+\begin{docCsvKey}{late after last line}{=\meta{code}}{no default, initially empty}
+  Sets the \meta{code} to be executed after processing of the last
   accepted data line instead of \refKey{/csv/late after line}.
   This key has to be set after |late after line|.
 \end{docCsvKey}
 
 
-\begin{docCsvKey}{before line}{=\meta{macros}}{no default, initially empty}
-  Sets the \meta{macros} to be executed after \refKey{/csv/late after line}
+\begin{docCsvKey}{before line}{=\meta{code}}{no default, initially empty}
+  Sets the \meta{code} to be executed after \refKey{/csv/late after line}
   and before \refKey{/csv/command}.
   |before line| overwrites |before first line|.
 \end{docCsvKey}
 
 
-\begin{docCsvKey}{before first line}{=\meta{macros}}{no default, initially empty}
-  Sets the \meta{macros} to be executed instead of \refKey{/csv/before line}
+\begin{docCsvKey}{before first line}{=\meta{code}}{no default, initially empty}
+  Sets the \meta{code} to be executed instead of \refKey{/csv/before line}
   for the first accepted data line.
   This key has to be set after |before line|.
 \end{docCsvKey}
 
 
-\begin{docCsvKey}{command}{=\meta{macros}}{no default, initially \cs{csvline}}
-  Sets the \meta{macros} to be executed for every accepted data line.
+\begin{docCsvKey}{command}{=\meta{code}}{no default, initially \cs{csvline}}
+  Sets the \meta{code} to be executed for every accepted data line.
   They are executed between \refKey{/csv/before line} and \refKey{/csv/after line}.
 \end{docCsvKey}
 
 
-\begin{docCsvKey}{after line}{=\meta{macros}}{no default, initially empty}
-  Sets the \meta{macros} to be executed for every accepted data line
+\begin{docCsvKey}{after line}{=\meta{code}}{no default, initially empty}
+  Sets the \meta{code} to be executed for every accepted data line
   after \refKey{/csv/command}.
   |after line| overwrites |after first line|.
 \end{docCsvKey}
 
 
-\begin{docCsvKey}{after first line}{=\meta{macros}}{no default, initially empty}
-  Sets the \meta{macros} to be executed instead of \refKey{/csv/after line}
+\begin{docCsvKey}{after first line}{=\meta{code}}{no default, initially empty}
+  Sets the \meta{code} to be executed instead of \refKey{/csv/after line}
   for the first accepted data line.
   This key has to be set after |after line|.
 \end{docCsvKey}
 
-\begin{docCsvKey}{after reading}{=\meta{macros}}{no default, initially empty}
-  Sets the \meta{macros} to be executed after the CSV file is processed.
+\begin{docCsvKey}{after reading}{=\meta{code}}{no default, initially empty}
+  Sets the \meta{code} to be executed after the CSV file is processed.
 \end{docCsvKey}
 
 
@@ -777,7 +797,7 @@
 
 
 \clearpage
-\subsection{Consistency Check and Filtering}%
+\subsection{Consistency Check}%
 
 \begin{docCsvKey}{check column count}{\colOpt{=true\textbar false}}{default |true|, initially |true|}
   This key defines, if the number of entries in a data line is checked against
@@ -801,8 +821,8 @@
 \end{docCsvKey}
 
 
-\begin{docCsvKey}{on column count error}{=\meta{macros}}{no default, initially empty}
-  \meta{macros} to be executed for unfeasible data lines.
+\begin{docCsvKey}{on column count error}{=\meta{code}}{no default, initially empty}
+  \meta{code} to be executed for unfeasible data lines.
 \end{docCsvKey}
 
 
@@ -811,14 +831,107 @@
 \end{docCsvKey}
 
 
-\begin{docCsvKey}{filter}{=\meta{condition}}{no default}
+\clearpage
+\subsection{Filtering}%
+
+\begin{docCsvKey}[][doc new=2016-00-00]{filter test}{=\meta{condition}}{no default}
   Only data lines which fulfill a logical \meta{condition} are accepted.
-  For the \meta{condition}, every term from the |ifthen| package \cite{carlisle:2001b}
+  For the \meta{condition}, every single test normally employed like
+\begin{dispListing}
+\iftest{some testing}{true}{false}
+\end{dispListing}
+  can be used as
+\begin{dispListing}
+filter test=\iftest{some testing},
+\end{dispListing}
+  For |\iftest|, tests from the |etoolbox| package \cite{lehmann:2015a} like
+  |\ifnumcomp|, |\ifdimgreater|, etc. and from \Fullref{sec:stringtests} can be used.
+
+\begin{dispExample}
+\csvreader[head to column names,tabular=llll,
+  table head=\toprule & \bfseries Name & \bfseries Matr & \bfseries Grade\\\midrule,
+  table foot=\bottomrule,
+  %>> list only matriculation numbers greater than 20000 <<
+  filter test=\ifnumgreater{\matriculation}{20000},
+  ]{grade.csv}{}{%
+    \thecsvrow & \slshape\name, \givenname & \matriculation & \grade}
+\end{dispExample}
+\end{docCsvKey}
+
+
+\begin{docCsvKey}{filter strcmp}{=\marg{stringA}\marg{stringB}}{style, no default}
+  Only lines where \meta{stringA} and \meta{stringB} are equal after expansion
+  are accepted.
+  The implementation is done with \refCom{ifcsvstrcmp}.
+\end{docCsvKey}
+
+
+\begin{docCsvKey}{filter not strcmp}{=\marg{stringA}\marg{stringB}}{style, no default}
+  Only lines where \meta{stringA} and \meta{stringB} are not equal after expansion
+  are accepted.
+  The implementation is done with \refCom{ifcsvnotstrcmp}.
+\end{docCsvKey}
+
+
+\begin{docCsvKey}[][doc new=2016-00-00]{filter expr}{=\meta{condition}}{no default}
+  Only data lines which fulfill a logical \meta{condition} are accepted.
+  For the \meta{condition}, every boolean expression
+  from the |etoolbox| package \cite{lehmann:2015a} is feasible.
+  To preprocess the data line before testing the \meta{condition},
+  the option key \refKey{/csv/before filter} can be used.
+\begin{dispExample}
+\csvreader[head to column names,tabular=llll,
+  table head=\toprule & \bfseries Name & \bfseries Matr & \bfseries Grade\\\midrule,
+  table foot=\bottomrule,
+  %>> list only matriculation numbers greater than 20000
+  %   and grade less than 4.0 <<
+  filter expr={     test{\ifnumgreater{\matriculation}{20000}}
+                and test{\ifdimless{\grade pt}{4.0pt}}          },
+  ]{grade.csv}{}{%
+    \thecsvrow & \slshape\name, \givenname & \matriculation & \grade}
+\end{dispExample}
+\end{docCsvKey}
+
+\clearpage
+\begin{docCsvKey}[][doc new=2016-00-00]{filter ifthen}{=\meta{condition}}{no default}
+  Only data lines which fulfill a logical \meta{condition} are accepted.
+  For the \meta{condition}, every term from the |ifthen| \cite{carlisle:2014c} package
   is feasible.
   To preprocess the data line before testing the \meta{condition},
   the option key \refKey{/csv/before filter} can be used.
+
+\begin{dispExample}
+\csvreader[head to column names,tabular=llll,
+  table head=\toprule & \bfseries Name & \bfseries Matr & \bfseries Grade\\\midrule,
+  table foot=\bottomrule,
+  %>> list only female persons <<
+  filter ifthen=\equal{\gender}{f},
+  ]{grade.csv}{}{%
+    \thecsvrow & \slshape\name, \givenname & \matriculation & \grade}
+\end{dispExample}
+
 \end{docCsvKey}
 
+
+\begin{docCsvKey}{filter}{=\meta{condition}}{no default}
+  Alias for \refKey{/csv/filter ifthen}.
+\end{docCsvKey}
+
+\begin{docCsvKey}{filter equal}{=\marg{stringA}\marg{stringB}}{style, no default}
+  Only lines where \meta{stringA} and \meta{stringB} are equal after expansion
+  are accepted.
+  The implementation is done with the |ifthen| \cite{carlisle:2014c} package.
+\end{docCsvKey}
+
+
+\begin{docCsvKey}{filter not equal}{=\marg{stringA}\marg{stringB}}{style, no default}
+  Only lines where \meta{stringA} and \meta{stringB} are not equal after expansion
+  are accepted.
+  The implementation is done with the |ifthen| \cite{carlisle:2014c} package.
+\end{docCsvKey}
+
+
+
 \begin{docCsvKey}{no filter}{}{no value, initially set}
   Clears a set filter.
 \end{docCsvKey}
@@ -834,18 +947,30 @@
 \end{docCsvKey}
 
 
-\begin{docCsvKey}{filter equal}{=\marg{string A}\marg{string B}}{style, no default}
-  Only lines where \meta{string A} and \meta{string B} are equal after expansion
-  are accepted.
+
+\enlargethispage*{2cm}
+\begin{docCsvKey}[][doc new=2016-00-00]{full filter}{=\meta{code}}{no default}
+  Technically, this key is an alias for \refKey{/csv/before filter}.
+  Philosophically, \refKey{/csv/before filter} computes something before
+  a filter condition is set, but \refKey{/csv/full filter} should implement
+  the full filtering. Especially, \refCom{csvfilteraccept} or
+  \refCom{csvfilterreject} \emph{should} be set inside the \meta{code}.
+\begin{dispExample}
+\csvreader[head to column names,tabular=llll,
+  table head=\toprule & \bfseries Name & \bfseries Matr & \bfseries Grade\\\midrule,
+  table foot=\bottomrule,
+  %>> list only matriculation numbers greater than 20000
+  %   and grade less than 4.0 <<
+  full filter=\ifnumgreater{\matriculation}{20000}
+                {\ifdimless{\grade pt}{4.0pt}{\csvfilteraccept}{\csvfilterreject}}
+                {\csvfilterreject},
+  ]{grade.csv}{}{%
+    \thecsvrow & \slshape\name, \givenname & \matriculation & \grade}
+\end{dispExample}
 \end{docCsvKey}
 
 
-\begin{docCsvKey}{filter not equal}{=\marg{string A}\marg{string B}}{style, no default}
-  Only lines where \meta{string A} and \meta{string B} are not equal after expansion
-  are accepted.
-\end{docCsvKey}
 
-
 %]]
 
 
@@ -887,26 +1012,26 @@
 \end{docCsvKey}
 
 
-\begin{docCsvKey}{before table}{=\meta{macros}}{no default, initially empty}
-  Sets the \meta{macros} to be executed before |\begin{tabular}| or before |\begin{longtable}|
+\begin{docCsvKey}{before table}{=\meta{code}}{no default, initially empty}
+  Sets the \meta{code} to be executed before |\begin{tabular}| or before |\begin{longtable}|
   or before |\begin{tabbing}|, respectively.
 \end{docCsvKey}
 
 
-\begin{docCsvKey}{table head}{=\meta{macros}}{no default, initially empty}
-  Sets the \meta{macros} to be executed after |\begin{tabular}| or after |\begin{longtable}|
+\begin{docCsvKey}{table head}{=\meta{code}}{no default, initially empty}
+  Sets the \meta{code} to be executed after |\begin{tabular}| or after |\begin{longtable}|
   or after |\begin{tabbing}|, respectively.
 \end{docCsvKey}
 
 
-\begin{docCsvKey}{table foot}{=\meta{macros}}{no default, initially empty}
-  Sets the \meta{macros} to be executed before |\end{tabular}| or before |\end{longtable}|
+\begin{docCsvKey}{table foot}{=\meta{code}}{no default, initially empty}
+  Sets the \meta{code} to be executed before |\end{tabular}| or before |\end{longtable}|
   or before |\end{tabbing}|, respectively.
 \end{docCsvKey}
 
 
-\begin{docCsvKey}{after table}{=\meta{macros}}{no default, initially empty}
-  Sets the \meta{macros} to be executed after |\end{tabular}| or after |\end{longtable}|
+\begin{docCsvKey}{after table}{=\meta{code}}{no default, initially empty}
+  Sets the \meta{code} to be executed after |\end{tabular}| or after |\end{longtable}|
   or after |\end{tabbing}|, respectively.
 \end{docCsvKey}
 
@@ -1038,7 +1163,7 @@
   name;givenname;matriculation;gender;grade
   Maier;Hans;12345;m;1.0
   Huber;Anna;23456;f;2.3
-  Wei\ss{}b\"{a}ck;Werner;34567;m;5.0
+  Weißbäck;Werner;34567;m;5.0
 \end{tcbverbatimwrite}
 
 \csvautobooktabular[separator=semicolon]{testsemi.csv}
@@ -1052,7 +1177,7 @@
   name|givenname|matriculation|gender|grade
   Maier|Hans|12345|m|1.0
   Huber|Anna|23456|f|2.3
-  Wei\ss{}b\"{a}ck|Werner|34567|m|5.0
+  Weißbäck|Werner|34567|m|5.0
 \end{tcbverbatimwrite}
 
 \csvautobooktabular[separator=pipe]{pipe.csv}
@@ -1178,9 +1303,9 @@
   If \csvsorter\ was completely installed following its documentation, there is
   nothing to change here. If the |csvsorter.jar| file is inside the same
   directory as the \LaTeX\ source file, you may configure:% preferrably inside the preamble:
-  \begin{dispListing}
-  \csvset{csvsorter command=java -jar csvsorter.jar}
-  \end{dispListing}
+\begin{dispListing}
+\csvset{csvsorter command=java -jar csvsorter.jar}
+\end{dispListing}
 \end{docCsvKey}
 
 \begin{docCsvKey}{csvsorter configpath}{=\meta{path}}{no default, initially |.|}
@@ -1187,17 +1312,17 @@
   Sorting with \csvsorter\ is done using XML configuration files. If these files
   are not stored inside the same directory as the \LaTeX\ source file, a
   \meta{path} to access them can be configured:
-  \begin{dispListing}
-  \csvset{csvsorter configpath=xmlfiles}
-  \end{dispListing}
+\begin{dispListing}
+\csvset{csvsorter configpath=xmlfiles}
+\end{dispListing}
   Here, the configuration files would be stored in a subdirectory named |xmlfiles|.
 \end{docCsvKey}
 
 \begin{docCsvKey}{csvsorter log}{=\meta{file name}}{no default, initially |csvsorter.log|}
   Sets the log file of \csvsorter\ to the given \meta{file name}.
-  \begin{dispListing}
-  \csvset{csvsorter log=outdir/csvsorter.log}
-  \end{dispListing}
+\begin{dispListing}
+\csvset{csvsorter log=outdir/csvsorter.log}
+\end{dispListing}
   Here, the log file is written to a subdirectory named |outdir|.
 \end{docCsvKey}
 
@@ -1205,9 +1330,9 @@
 \begin{docCsvKey}{csvsorter token}{=\meta{file name}}{no default, initially |\textbackslash jobname.csvtoken|}
   Sets \meta{file name} as token file. This is an auxiliary file which
   communicates the success of \csvsorter\ to |csvsimple|.
-  \begin{dispListing}
-  \csvset{csvsorter log=outdir/\jobname.csvtoken}
-  \end{dispListing}
+\begin{dispListing}
+\csvset{csvsorter log=outdir/\jobname.csvtoken}
+\end{dispListing}
   Here, the token file is written to a subdirectory named |outdir|.
 \end{docCsvKey}
 
@@ -1307,7 +1432,52 @@
 \end{docCsvKey}
 
 
+\clearpage
+\section{String Tests}\label{sec:stringtests}%
 
+The following string tests are complementing the string tests
+from the |etoolbox| \cite{lehmann:2015a} package. They all do the same, i.e.,
+comparing expanded strings for equality.
+\begin{itemize}
+\item\refCom{ifcsvstrcmp} is the most efficient method, because it uses
+  native compiler string comparison (if available).
+\item\refCom{ifcsvstrequal} does not rely on a compiler. It also is the
+  fallback implementation for \refCom{ifcsvstrcmp}, if there is no
+  native comparison method.
+\item\refCom{ifcsvprostrequal} is possibly more failsafe than the other two
+  string tests. It may be used, if strings contain dirty things like |\textbf{A}|.
+\end{itemize}
+\medskip
+
+\begin{docCommand}[doc new=2016-00-00]{ifcsvstrcmp}{\marg{stringA}\marg{stringB}\marg{true}\marg{false}}
+  Compares two strings and executes \meta{true} if they are equal, and \meta{false} otherwise.
+  The comparison is done using |\pdfstrcmp|, if compilation is done with pdf\LaTeX.
+  The comparison is done using |\pdf at strcmp|, if the package |pdftexcmds| is
+  loaded and compilation is done with lua\LaTeX\ or Xe\LaTeX.
+  Otherwise, \refCom{ifcsvstrcmp} is identical to \refCom{ifcsvstrequal}.
+  This command cannot be used inside the preamble.
+\end{docCommand}
+
+
+\begin{docCommand}[doc new=2016-00-00]{ifcsvnotstrcmp}{\marg{stringA}\marg{stringB}\marg{true}\marg{false}}
+  Compares two strings and executes \meta{true} if they are \emph{not} equal, and \meta{false} otherwise.
+  The implementation uses \refCom{ifcsvstrcmp}.
+\end{docCommand}
+
+
+\begin{docCommand}[doc new=2016-00-00]{ifcsvstrequal}{\marg{stringA}\marg{stringB}\marg{true}\marg{false}}
+  Compares two strings and executes \meta{true} if they are equal, and \meta{false} otherwise.
+  The strings are expanded with |\edef| in the test.
+\end{docCommand}
+
+\begin{docCommand}[doc new=2016-00-00]{ifcsvprostrequal}{\marg{stringA}\marg{stringB}\marg{true}\marg{false}}
+  Compares two strings and executes \meta{true} if they are equal, and \meta{false} otherwise.
+  The strings are expanded with |\protected at edef| in the test, i.e. parts of the
+  strings which are protected stay unexpanded.
+\end{docCommand}
+
+
+
 \clearpage
 \section{Examples}%
 
@@ -1321,8 +1491,8 @@
 name,givenname,gender,degree,street,zip,location,bonus
 Maier,Hans,m,,Am Bachweg 17,10010,Hopfingen,20
     % next line with a comma in curly braces
-Huber,Erna,f,Dr.,{Moosstra\ss{}e 32, Hinterschlag},10020,\"{O}rtingstetten,30
-Wei\ss{}b\"{a}ck,Werner,m,Prof. Dr.,Brauallee 10,10030,Klingenbach,40
+Huber,Erna,f,Dr.,{Moosstraße 32, Hinterschlag},10020,Örtingstetten,30
+Weißbäck,Werner,m,Prof. Dr.,Brauallee 10,10030,Klingenbach,40
     % this line is ignored %
   Siebener ,  Franz,m,   ,  Blaumeisenweg 12  , 10040 ,  Pardauz , 50
     % preceding and trailing spaces in entries are removed %
@@ -1348,13 +1518,13 @@
 
 \begin{dispExample}
 % this example requires the tcolorbox package
-\newcommand{\ifmale}[2]{\ifthenelse{\equal{\gender}{m}}{#1}{#2}}
+\newcommand{\ifmale}[2]{\ifcsvstrcmp{\gender}{m}{#1}{#2}}
 
 \csvreader[head to column names]{address.csv}{}{%
 \begin{tcolorbox}[colframe=DarkGray,colback=White,arc=0mm,width=(\linewidth-2pt)/2,
       equal height group=letter,before=,after=\hfill,fonttitle=\bfseries,
       adjusted title={Letter to \name}]
-  \ifthenelse{\equal{\degree}{}}{\ifmale{Mr.}{Ms.}}{\degree}~\givenname~\name\\
+  \ifcsvstrcmp{\degree}{}{\ifmale{Mr.}{Ms.}}{\degree}~\givenname~\name\\
   \street\\\zip~\location
   \tcblower
   {\itshape Dear \ifmale{Sir}{Madam},}\\
@@ -1373,9 +1543,9 @@
 \begin{tcbverbatimwrite}{data.csv}
 land,group,amount
 Bayern,A,1700
-Baden-W\"{u}rttemberg,A,2300
+Baden-Württemberg,A,2300
 Sachsen,B,1520
-Th\"{u}ringen,A,1900
+Thüringen,A,1900
 Hessen,B,2100
 \end{tcbverbatimwrite}
 %-- end embedded file --
@@ -1564,10 +1734,10 @@
 
 \csvlisting{data_numbers}
 
-The |siunitx| \cite{wright:2013a} package provides a new column type |S|
+The |siunitx| \cite{wright:2016a} package provides a new column type |S|
 which can align material using a number of different strategies.
 The following example demonstrates the application with CSV reading.
-The package documentation \cite{wright:2013a} contains a huge amount
+The package documentation \cite{wright:2016a} contains a huge amount
 of formatting options.
 
 \begin{dispExample}
@@ -1583,6 +1753,32 @@
 \end{dispExample}
 
 \clearpage
+Special care is needed, if the \emph{first} column is to be formatted with
+the column type |S|. The number detection of |siunitx| is disturbed by
+the line reading code of |csvsimple| which actually is present at the
+first column. To avoid this problem, the content of the first column
+could be formatted not by the table format definition, but by using a
+suitable |\tablenum| formatting directly, see |siunitx| \cite{wright:2016a}.
+
+Another and very nifty workaround suggested by Enrico Gregorio is to
+add an invisible dummy column with |c@{}| as first column:
+
+
+\begin{dispExample}
+% \usepackage{siunitx,array,booktabs}
+\csvloop{
+  file=data_numbers.csv,
+  head to column names,
+  before reading=\centering\sisetup{table-number-alignment=center},
+  tabular={c@{}S[table-format=2.2e1]S},
+  table head= & \textbf{Cats} & \textbf{Dogs}\\\midrule,
+  command= & \cats & \dogs,
+  table foot=\bottomrule}
+\end{dispExample}
+
+
+
+\clearpage
 Now, the preceding table shall be sorted by the \emph{cats} values.
 If the \csvsorter\ program is properly installed,
 see Subsection~\ref{sec:Sorting} on page~\pageref{sec:Sorting},
@@ -1617,9 +1813,9 @@
 %-- file embedded for simplicity --
 \begin{tcbverbatimwrite}{data_headless.csv}
 Bayern,A,1700
-Baden-W\"{u}rttemberg,A,2300
+Baden-Württemberg,A,2300
 Sachsen,B,1520
-Th\"{u}ringen,A,1900
+Thüringen,A,1900
 Hessen,B,2100
 \end{tcbverbatimwrite}
 %-- end embedded file --
@@ -1668,7 +1864,7 @@
 
 \clearpage
 \subsection{Imported CSV data}\label{importeddata}%
-If data is important from other applications, there is not always a choice
+If data is imported from other applications, there is not always a choice
 to format in comma separated values with curly brackets.
 
 Consider the following example data file:
@@ -1678,7 +1874,7 @@
 "name";"address";"email"
 "Frank Smith";"Yellow Road 123, Brimblsby";"frank.smith at organization.org"
 "Mary May";"Blue Alley 2a, London";"mmay at maybe.uk"
-"Hans Meier";"Hauptstrasse 32, Berlin";"hans.meier at corporation.de"
+"Hans Meier";"Hauptstraße 32, Berlin";"hans.meier at corporation.de"
 \end{tcbverbatimwrite}
 %-- end embedded file --
 
@@ -1715,35 +1911,115 @@
 
 
 \clearpage
+\subsection{Encoding}\label{encoding}%
+If the CSV file has a different encoding than the \LaTeX\ source file,
+then special care is needed.
 
+\begin{itemize}
+\item The most obvious treatment is to change the encoding of the CSV file
+  or the \LaTeX\ source file to match the other one (every good editor
+  supports such a conversion). This is the easiest choice, if there a no
+  good reasons against such a step. E.g., unfortunately, several tools
+  under Windows need the CSV file to be |cp1252| encoded while
+  the \LaTeX\ source file may need to be |utf8| encoded.
+
+\item The |inputenc| package allows to switch the encoding inside the
+  document, say from |utf8| to |cp1252|. Just be aware that you should only
+  use pure ASCII for additional texts inside the switched region.
+\begin{dispListing}
+% !TeX encoding=UTF-8
+% ....
+\usepackage[utf8]{inputenc}
+% ....
+\begin{document}
+% ....
+\inputencoding{latin1}% only use ASCII from here, e.g. "Uberschrift
+\csvreader[%...
+  ]{data_cp1252.csv}{%...
+  }{% ....
+  }
+\inputencoding{utf8}
+% ....
+\end{document}
+\end{dispListing}
+
+\item As a variant to the last method, the encoding switch can be done
+  using options from |csvsimple|:
+\begin{dispListing}
+% !TeX encoding=UTF-8
+% ....
+\usepackage[utf8]{inputenc}
+% ....
+\begin{document}
+% ....
+% only use ASCII from here, e.g. "Uberschrift
+\csvreader[%...
+  before reading=\inputencoding{latin1},
+  after reading=\inputencoding{utf8},
+  ]{data_cp1252.csv}{%...
+  }{% ....
+  }
+% ....
+\end{document}
+\end{dispListing}
+
+\pagebreak\item
+If the \csvsorter\ program is properly installed,
+see Subsection~\ref{sec:Sorting} on page~\pageref{sec:Sorting},
+the CSV file can be re-encoded on-the-fly
+with the following configuration file for \csvsorter:
+
+\xmllisting{encoding}
+
+\begin{dispListing}
+% !TeX encoding=UTF-8
+% ....
+\usepackage[utf8]{inputenc}
+% ....
+\begin{document}
+% ....
+\csvreader[%...
+  sort by=encoding.xml,
+  ]{data_cp1252.csv}{%...
+  }{% ....
+  }
+% ....
+\end{document}
+\end{dispListing}
+
+
+\end{itemize}
+
+
+
+
+\clearpage
+
 % Actually, it is not a good idea to include the references like this!
 % Do not follow this bad example ...
 \begin{tcbverbatimwrite}{\jobname.bib}
- at manual{tantau:2013a,
+ at manual{tantau:2015a,
    author    = {Till Tantau},
    title     = {The TikZ and PGF Packages},
-   subtitle  = {Manual for version 3.0.0},
-   url       = {http://sourceforge.net/projects/pgf/},
-   date      = {2013-12-20},
+   subtitle  = {Manual for version 3.0.1a},
+   url       = {http://mirrors.ctan.org/graphics/pgf/base/doc/pgfmanual.pdf},
+   date      = {2015-08-29},
 }
 
-
- at manual{carlisle:2001b,
+ at manual{carlisle:2014c,
    author    = {David Carlisle},
    title     = {The ifthen package},
-   url       = {http://mirror.ctan.org/macros/latex/base/},
-   Xnote      = {},
-   day       = 26,
-   month     = may,
-   year      = 2001,
+   url       = {http://mirror.ctan.org/macros/latex/base/ifthen.pdf},
+   date      = {2014-09-29},
    language  = {english}
 }
 
- at manual{talbot:2014a,
+
+ at manual{talbot:2016a,
   author    = {Nicola L. C. Talbot},
-  title     = {User Manual for the datatool bundle version 2.20},
-  url       = {http://mirror.ctan.org/macros/latex/contrib/datatool/datatool.pdf},
-  date      = {2014-02-03},
+  title     = {User Manual for the datatool bundle version 2.25},
+  url       = {http://mirrors.ctan.org/macros/latex/contrib/datatool/datatool-user.pdf},
+  date      = {2016-01-18},
 }
 
 @manual{sturm:2014j,
@@ -1755,30 +2031,38 @@
    language    = {english}
 }
 
- at manual{carlisle:2004a,
+ at manual{carlisle:2014d,
    author    = {David Carlisle},
    title     = {The longtable package},
    url       = {http://mirror.ctan.org/macros/latex/required/tools/longtable.pdf},
-   date      = {2004-02-01},
+   date      = {2014-10-28},
    language  = {english}
 }
 
- at manual{fear:2005a,
+
+ at manual{fear:2016a,
    author    = {Simon Fear},
    title     = {Publication quality tables in \LaTeX},
    url       = {http://mirror.ctan.org/macros/latex/contrib/booktabs/booktabs.pdf},
-   date      = {2005-04-15},
+   date      = {2016-04-29},
    language  = {english}
 }
 
- at manual{wright:2013a,
+ at manual{wright:2016a,
    author    = {Joseph Wright},
    title     = {siunitx --- A comprehensive (SI) units package},
    url       = {http://mirror.ctan.org/macros/latex/contrib/siunitx/siunitx.pdf},
-   date      = {2013-07-31},
+   date      = {2016-03-01},
    language  = {english}
 }
 
+ at manual{lehmann:2015a,
+   author    = {Philipp Lehman and Joseph Wright},
+   title     = {The etoolbox Package},
+   url       = {http://mirror.ctan.org/macros/latex/contrib/etoolbox/etoolbox.pdf},
+   date      = {2015-08-02},
+}
+
 \end{tcbverbatimwrite}
 
 

Added: trunk/Master/texmf-dist/doc/latex/csvsimple/encoding.xml
===================================================================
--- trunk/Master/texmf-dist/doc/latex/csvsimple/encoding.xml	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/csvsimple/encoding.xml	2016-07-01 22:04:23 UTC (rev 41597)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<csv>
+  <noHeader/>
+  <bracket empty="true"/>
+  <charset in="windows-1252" out="UTF-8"/>
+</csv>

Modified: trunk/Master/texmf-dist/tex/latex/csvsimple/csvsimple.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/csvsimple/csvsimple.sty	2016-07-01 22:04:04 UTC (rev 41596)
+++ trunk/Master/texmf-dist/tex/latex/csvsimple/csvsimple.sty	2016-07-01 22:04:23 UTC (rev 41597)
@@ -1,8 +1,8 @@
-%% The LaTeX package csvsimple - version 1.12 (2014/07/14)
+%% The LaTeX package csvsimple - version 1.20 (2016/07/01)
 %% csvsimple.sty: Simple LaTeX CSV file processing
 %%
 %% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2008-2014 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2008-2016 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,9 +18,9 @@
 %% This work consists of all files listed in README
 %%
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{csvsimple}[2014/07/14 version 1.12 LaTeX CSV file processing]
+\ProvidesPackage{csvsimple}[2016/07/01 version 1.20 LaTeX CSV file processing]
 
-\RequirePackage{pgfkeys,ifthen}
+\RequirePackage{pgfkeys,ifthen,etoolbox,shellesc}
 
 
 %---- general
@@ -35,13 +35,6 @@
 
 \def\csv at empty{}
 
-\def\csv at addto@macro#1#2{%
-  \begingroup%
-    \toks@\expandafter{#1#2}%
-    \xdef#1{\the\toks@}%
-  \endgroup%
-  }
-
 \long\def\csviffirstrow#1#2{%
   \ifnum\c at csvrow=1%
     \long\def\csviffirstrow at doit{#1}%
@@ -60,12 +53,16 @@
   \csvifoddrow at doit%
 }
 
-\def\csv at and{&}
-
-\def\csvlinetotablerow{%
-  \setcounter{csvcol}{0}%
-  \stepcounter{csvcol}\csv at current@col%
-  \whiledo{\thecsvcol<\csv at columncount}{\csv at and\stepcounter{csvcol}\csv at current@col}%
+\def\csv at assemble@csvlinetotablerow{%
+  \global\c at csvcol 1\relax%
+  \xdef\csvlinetotablerow{\expandonce{\csname csvcol\romannumeral\c at csvcol\endcsname}}%
+  \ifnum\c at csvcol<\csv at columncount\relax%
+    \loop%
+      \global\advance\c at csvcol 1\relax%
+      \xappto\csvlinetotablerow{\noexpand&\expandonce{\csname csvcol\romannumeral\c at csvcol\endcsname}}%
+    \ifnum\c at csvcol<\csv at columncount\relax\repeat%
+  \fi%
+  \csvlinetotablerow%
 }
 
 
@@ -91,39 +88,39 @@
 \def\csv at breakline@kernel#1{%
   \ifx\csv at termination#1\let\nextcol=\relax\else%
     \let\nextcol=\csv at breakline%
-    \stepcounter{csvcol}%
+    \global\advance\c at csvcol 1\relax%
     \def\csv at col@body{#1}%
     \csv at TrimSpaces\csv at col@body%
     \csv at TrimBraces\csv at col@body%
     \toks@\expandafter{\csv at col@body}%
-    \expandafter\xdef\csname csvcol\roman{csvcol}\endcsname{\the\toks@}%
+    \expandafter\xdef\csname csvcol\romannumeral\c at csvcol\endcsname{\the\toks@}%
   \fi%
   \nextcol%
-  }
+}
 
 % comma
 \def\csv at breakline@A#1,{\csv at breakline@kernel{#1}}
 
 \def\csv at scanline@A#1{%
-  \setcounter{csvcol}{0}%
+  \global\c at csvcol 0\relax%
   \csv at breakline#1,\csv at termination,%
-  }
+}
 
 % semi colon
 \def\csv at breakline@B#1;{\csv at breakline@kernel{#1}}
 
 \def\csv at scanline@B#1{%
-  \setcounter{csvcol}{0}%
+  \global\c at csvcol 0\relax%
   \csv at breakline#1;\csv at termination;%
-  }
+}
 
 % pipe
 \def\csv at breakline@C#1|{\csv at breakline@kernel{#1}}
 
 \def\csv at scanline@C#1{%
-  \setcounter{csvcol}{0}%
+  \global\c at csvcol 0\relax%
   \csv at breakline#1|\csv at termination|%
-  }
+}
 
 % tab
 \catcode`\^^I=12
@@ -130,9 +127,9 @@
 \def\csv at breakline@D#1^^I{\csv at breakline@kernel{#1}}
 
 \def\csv at scanline@D#1{%
-  \setcounter{csvcol}{0}%
+  \global\c at csvcol 0\relax%
   \csv at breakline#1^^I\csv at termination^^I%
-  }
+}
 \catcode`\^^I=10
 
 % expands a CSV line and scans content
@@ -140,7 +137,7 @@
   \toks@\expandafter{#1}%
   \edef\@csv at scanline{\noexpand\csv at scanline{\the\toks@}}%
   \@csv at scanline%
-  }
+}
 
 {
   \catcode`\"=12%
@@ -155,7 +152,7 @@
   \immediate\openout\csv at out=\csv at csvsorter@token%
   \immediate\write\csv at out{\string\makeatletter\string\csv at error{Call of CSV-Sorter failed! Use '-shell-escape' option or check log file '\csv at csvsorter@log'.}{}}%
   \immediate\closeout\csv at out%
-  \immediate\write18{\csv at csvsorter@command\space
+  \ShellEscape{\csv at csvsorter@command\space
     -c \csv at passivquotes#1\csv at passivquotes\space
     -l \csv at passivquotes\csv at csvsorter@log\csv at passivquotes\space
     -t \csv at passivquotes\csv at csvsorter@token\csv at passivquotes\space
@@ -178,24 +175,23 @@
 
 %---- the loop
 
-\def\csv at AtEndLoop{\csv at addto@macro\@endloophook}
+\def\csv at AtEndLoop{\gappto\@endloophook}
 \let\@endloophook\csv at empty
 
-\def\csv at current@col{\csname csvcol\roman{csvcol}\endcsname}
+\def\csv at current@col{\csname csvcol\romannumeral\c at csvcol\endcsname}
 
 % auto head names
 \def\set at csv@autohead{%
   \toks0=\expandafter{\csname\csv at current@col\endcsname}%
-  \toks1=\expandafter{\csname csvcol\roman{csvcol}\endcsname}%
+  \toks1=\expandafter{\csname csvcol\romannumeral\c at csvcol\endcsname}%
   \edef\csv at temp{\noexpand\gdef\the\toks0{\the\toks1}\noexpand\csv at AtEndLoop{\noexpand\gdef\the\toks0{}}}%
   \csv at temp%
 }
 
-
 % head names and numbers
 \def\set at csv@head{%
   \toks0={\gdef##1}%
-  \toks1=\expandafter{\csname csvcol\roman{csvcol}\endcsname}%
+  \toks1=\expandafter{\csname csvcol\romannumeral\c at csvcol\endcsname}%
   \edef\csv at temp{\noexpand\pgfkeysdef{/csv head/\csv at current@col}{\the\toks0{\the\toks1}\noexpand\csv at AtEndLoop{\the\toks0{}}}}%
   \csv at temp%
   \edef\csv at temp{\noexpand\pgfkeysdef{/csv head/\thecsvcol}{\the\toks0{\the\toks1}\noexpand\csv at AtEndLoop{\the\toks0{}}}}%
@@ -210,12 +206,12 @@
     \else\csv at escanline{\csvline}%
   \fi%
   \xdef\csv at columncount{\thecsvcol}%
-  \setcounter{csvcol}{0}%
+  \global\c at csvcol 0\relax%
   \loop%
-    \stepcounter{csvcol}%
+    \global\advance\c at csvcol 1\relax%
     \csv at opt@headtocolumnames%
     \set at csv@head%
-  \ifnum\thecsvcol<\csv at columncount\repeat%
+  \ifnum\c at csvcol<\csv at columncount\repeat%
   \toks@=\expandafter{\csv at columnnames}%
   \edef\csv at processkeys{\noexpand\pgfkeys{/csv head/.cd,\the\toks@}}%
   \csv at processkeys%
@@ -225,7 +221,7 @@
 % head numbers for no head
 \def\set at csv@nohead{%
   \toks0={\gdef##1}%
-  \toks1=\expandafter{\csname csvcol\roman{csvcol}\endcsname}%
+  \toks1=\expandafter{\csname csvcol\romannumeral\c at csvcol\endcsname}%
   \edef\csv at temp{\noexpand\pgfkeysdef{/csv head/\thecsvcol}{\the\toks0{\the\toks1}\noexpand\csv at AtEndLoop{\the\toks0{}}}}%
   \csv at temp%
 }
@@ -232,11 +228,11 @@
 
 % no head line
 \def\csv at noheadline{%
-  \setcounter{csvcol}{0}%
+  \global\c at csvcol 0\relax%
   \loop%
-    \stepcounter{csvcol}%
+    \global\advance\c at csvcol 1\relax%
     \set at csv@nohead%
-  \ifnum\thecsvcol<\csv at columncount\repeat%
+  \ifnum\c at csvcol<\csv at columncount\repeat%
   \toks@=\expandafter{\csv at columnnames}%
   \edef\csv at processkeys{\noexpand\pgfkeys{/csv head/.cd,\the\toks@}}%
   \csv at processkeys%
@@ -261,9 +257,9 @@
 
 % check columns
 \def\csv at checkcolumncount{%
-  \ifnum\thecsvcol=\csv at columncount%
+  \ifnum\c at csvcol=\csv at columncount\relax%
     \csv at checkfilter%
-  \else
+  \else%
     \csv at columncounterror%
   \fi%
 }
@@ -288,9 +284,10 @@
 \let\csv at par=\par
 
 % reads and processes a CSV file
-\def\csvloop#1{%
+\long\def\csvloop#1{%
   % reset
   \global\let\@endloophook\csv at empty%
+  \global\let\csvlinetotablerow\csv at assemble@csvlinetotablerow%
   % options
   \csvset{default,every csv,#1}%
   \csv at preprocss%
@@ -403,13 +400,15 @@
   head to column names/true/.code={\global\let\csv at opt@headtocolumnames=\set at csv@autohead},%
   head to column names/false/.code={\global\let\csv at opt@headtocolumnames=\csv at empty},%
   column count/.gstore in=\csv at columncount,%
-  filter/.code={%
-    \def\temp{#1}\toks@=\expandafter{\temp}%
-    \xdef\csv at iffilter{\noexpand\ifthenelse{\the\toks@}}},
+  filter/.code={\gdef\csv at iffilter{\ifthenelse{#1}}},
+  filter ifthen/.code={\gdef\csv at iffilter{\ifthenelse{#1}}},
+  filter test/.code={\gdef\csv at iffilter{#1}},
+  filter expr/.code={\gdef\csv at iffilter{\ifboolexpr{#1}}},
   no filter/.code={\csvfilteraccept},
   filter reject all/.code={\csvfilterreject},
   filter accept all/.code={\csvfilteraccept},
   before filter/.gstore in=\csv at prefiltercommand,
+  full filter/.gstore in=\csv at prefiltercommand,
   before first line/.gstore in=\csv at prefirstline,
   before line/.code={\gdef\csv at preline{#1}\pgfkeysalso{before first line=#1}},
   after first line/.gstore in=\csv at postfirstline,
@@ -483,8 +482,10 @@
   no head/.style={head=false},
   no check column count/.style={check column count=false},
   warn on column count error/.style={on column count error={\csv at warning{>\thecsvcol< instead of >\csv at columncount< columns for input line >\thecsvinputline< of file >\csv at ppfilename<}}},
-  filter equal/.style 2 args={filter=\equal{#1}{#2}},
-  filter not equal/.style 2 args={filter=\not\equal{#1}{#2}},
+  filter equal/.style 2 args={filter ifthen=\equal{#1}{#2}},
+  filter not equal/.style 2 args={filter ifthen=\not\equal{#1}{#2}},
+  filter strcmp/.style 2 args={filter test=\ifcsvstrcmp{#1}{#2}},
+  filter not strcmp/.style 2 args={filter test=\ifcsvnotstrcmp{#1}{#2}},
   tabular/.style={
     @table={\csv at pretable\begin{tabular}{#1}\csv at tablehead}{\csv at tablefoot\end{tabular}\csv at posttable},
     late after line=\\},
@@ -727,3 +728,51 @@
 
 \def\csvnames#1#2{\csvset{#1/.style={column names={#2}}}}
 
+% string comparison
+
+\newrobustcmd{\ifcsvstrequal}[2]{%
+  \begingroup%
+    \protected at edef\csv at tempa{#1}%
+    \protected at edef\csv at tempb{#2}%
+    \edef\csv at tempa{#1}%
+    \edef\csv at tempb{#2}%
+    \ifx\csv at tempa\csv at tempb%
+      \aftergroup\@firstoftwo%
+    \else%
+      \aftergroup\@secondoftwo%
+    \fi%
+  \endgroup%
+}%
+
+\newrobustcmd{\ifcsvprostrequal}[2]{%
+  \begingroup%
+    \protected at edef\csv at tempa{#1}%
+    \protected at edef\csv at tempb{#2}%
+    \ifx\csv at tempa\csv at tempb%
+      \aftergroup\@firstoftwo%
+    \else%
+      \aftergroup\@secondoftwo%
+    \fi%
+  \endgroup%
+}%
+
+\AtBeginDocument{%
+  \ifdefined\pdfstrcmp%
+    \let\csv at strcmp\pdfstrcmp%
+  \else\ifdefined\pdf at strcmp%
+    \let\csv at strcmp\pdf at strcmp%
+  \fi\fi%
+  \ifdefined\csv at strcmp%
+    \newrobustcmd{\ifcsvstrcmp}[2]{%
+      \ifnum\csv at strcmp{#1}{#2}=\z@\relax%
+        \expandafter\@firstoftwo%
+      \else%
+        \expandafter\@secondoftwo%
+      \fi%
+    }%
+  \else%
+    \let\ifcsvstrcmp\ifcsvstrequal%
+  \fi%
+}
+
+\newrobustcmd{\ifcsvnotstrcmp}[4]{\ifcsvstrcmp{#1}{#2}{#4}{#3}}



More information about the tex-live-commits mailing list