summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-07-09 21:22:00 +0000
committerKarl Berry <karl@freefriends.org>2014-07-09 21:22:00 +0000
commit2947021b917eb9d6d2add9a432017a6569a80dd8 (patch)
treec3a0aa303e16239979360d84b1a74293a5cd1cbe
parentae53b1a98b3fa0ee5aaa7a183a680899ae537090 (diff)
csvsimple (8jul14)
git-svn-id: svn://tug.org/texlive/trunk@34559 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/csvsimple/CHANGES6
-rw-r--r--Master/texmf-dist/doc/latex/csvsimple/README3
-rw-r--r--Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.pdfbin72221 -> 72221 bytes
-rw-r--r--Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.tex2
-rw-r--r--Master/texmf-dist/doc/latex/csvsimple/csvsimple.pdfbin834507 -> 834750 bytes
-rw-r--r--Master/texmf-dist/doc/latex/csvsimple/csvsimple.tex6
-rw-r--r--Master/texmf-dist/tex/latex/csvsimple/csvsimple.sty34
7 files changed, 32 insertions, 19 deletions
diff --git a/Master/texmf-dist/doc/latex/csvsimple/CHANGES b/Master/texmf-dist/doc/latex/csvsimple/CHANGES
index 37a0a7b1fba..09616932ce4 100644
--- a/Master/texmf-dist/doc/latex/csvsimple/CHANGES
+++ b/Master/texmf-dist/doc/latex/csvsimple/CHANGES
@@ -1,4 +1,4 @@
-%% The LaTeX package csvsimple - version 1.10 (2014/07/07)
+%% The LaTeX package csvsimple - version 1.11 (2014/07/08)
%%
%% -------------------------------------------------------------------------------------------
%% Copyright (c) 2008-2014 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
@@ -78,3 +78,7 @@ version 1.10 (2014/07/07):
'respect all', 'respect none'
- new value 'tab' for the 'separator' option to use a tabulator signs
as separator.
+
+version 1.11 (2014/07/08):
+- bug fix (serious!): sorting preprocessor overwrites the input data in some combinations
+- changed: if a CSV file with an empty first line is found, csvsimple stops with an error message
diff --git a/Master/texmf-dist/doc/latex/csvsimple/README b/Master/texmf-dist/doc/latex/csvsimple/README
index b96a090f22d..f9cc49a7786 100644
--- a/Master/texmf-dist/doc/latex/csvsimple/README
+++ b/Master/texmf-dist/doc/latex/csvsimple/README
@@ -1,4 +1,4 @@
-%% The LaTeX package csvsimple - version 1.10 (2014/07/07)
+%% The LaTeX package csvsimple - version 1.11 (2014/07/08)
%%
%% -------------------------------------------------------------------------------------------
%% Copyright (c) 2008-2014 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
@@ -37,6 +37,7 @@ Contents of the package
'gradesort.xml' csvsorter configuration file (example)
'matriculationsort.xml' csvsorter configuration file (example)
'namesort.xml' csvsorter configuration file (example)
+ 'transform.xml' csvsorter configuration file (example)
Installation
============
diff --git a/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.pdf b/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.pdf
index 0fefb4f6003..02c9035c7e8 100644
--- a/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.pdf
+++ b/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.tex b/Master/texmf-dist/doc/latex/csvsimple/csvsimple-example.tex
index 4f2c263abad..a84946f42cd 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 1.10 (2014/07/07)
+%% The LaTeX package csvsimple - version 1.11 (2014/07/08)
%% csvsimple-example.tex: an example for csvsimple
%%
%% -------------------------------------------------------------------------------------------
diff --git a/Master/texmf-dist/doc/latex/csvsimple/csvsimple.pdf b/Master/texmf-dist/doc/latex/csvsimple/csvsimple.pdf
index 6745314a8e8..fdf46bb7eb7 100644
--- a/Master/texmf-dist/doc/latex/csvsimple/csvsimple.pdf
+++ b/Master/texmf-dist/doc/latex/csvsimple/csvsimple.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/csvsimple/csvsimple.tex b/Master/texmf-dist/doc/latex/csvsimple/csvsimple.tex
index 08dfd1f648f..f68ab25177d 100644
--- a/Master/texmf-dist/doc/latex/csvsimple/csvsimple.tex
+++ b/Master/texmf-dist/doc/latex/csvsimple/csvsimple.tex
@@ -1,5 +1,5 @@
% \LaTeX-Main\
-%% The LaTeX package csvsimple - version 1.10 (2014/07/07)
+%% The LaTeX package csvsimple - version 1.11 (2014/07/08)
%% csvsimple.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
@@ -111,8 +111,8 @@
pdfkeywords={csv file, comma separated values, key value syntax}
}
-\def\version{1.10}%
-\def\datum{2014/07/07}%
+\def\version{1.11}%
+\def\datum{2014/07/08}%
\makeindex
diff --git a/Master/texmf-dist/tex/latex/csvsimple/csvsimple.sty b/Master/texmf-dist/tex/latex/csvsimple/csvsimple.sty
index dae90fe51cd..4712481c85d 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 1.10 (2014/07/07)
+%% The LaTeX package csvsimple - version 1.11 (2014/07/08)
%% csvsimple.sty: Simple LaTeX CSV file processing
%%
%% -------------------------------------------------------------------------------------------
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{csvsimple}[2014/07/07 version 1.10 LaTeX CSV file processing]
+\ProvidesPackage{csvsimple}[2014/07/08 version 1.11 LaTeX CSV file processing]
\RequirePackage{pgfkeys,ifthen}
@@ -137,11 +137,6 @@
\@csv@scanline%
}
-
-% default preprocessor (no preprocessing)
-\def\csv@no@preprocessor#1#2{\let#2=#1\relax}
-
-
\def\csv@preprocessor@csvsorter#1#2#3#4{%
\begingroup%
\catcode`\"=13%
@@ -149,6 +144,16 @@
\endgroup%
}
+\def\csv@preprocss@none{%
+ \let\csv@input@filename=\csv@filename%
+}
+
+\def\csv@preprocss@procedure{%
+ \csv@preprocessor{\csv@filename}{\csv@ppfilename}%
+ \let\csv@input@filename=\csv@ppfilename%
+}
+
+
%---- the loop
\def\csv@AtEndLoop{\csv@addto@macro\@endloophook}
@@ -183,7 +188,10 @@
% head line
\def\csv@processheadline{%
\csvreadnext%
- \csv@escanline{\csvline}%
+ \if\csv@par\csvline\relax%
+ \csv@error{File '\csv@input@filename' starts with an empty line!}{}%
+ \else\csv@escanline{\csvline}%
+ \fi%
\xdef\csv@columncount{\thecsvcol}%
\setcounter{csvcol}{0}%
\loop%
@@ -269,15 +277,15 @@
\global\let\@endloophook\csv@empty%
% options
\csvset{default,every csv,#1}%
- \csv@preprocessor\csv@filename\csv@ppfilename%
+ \csv@preprocss%
\csv@set@catcodes%
\csv@prereading%
\csv@table@begin%
\setcounter{csvinputline}{0}%
% start reading
- \openin\csv@file=\csv@ppfilename\relax%
+ \openin\csv@file=\csv@input@filename\relax%
\ifeof\csv@file%
- \csv@error{File '\csv@ppfilename' not existent, not readable, or empty!}{}%
+ \csv@error{File '\csv@input@filename' not existent, not readable, or empty!}{}%
\else%
% the head line
\csv@opt@processheadline%
@@ -354,8 +362,8 @@
\csvset{%
file/.gstore in=\csv@filename,%
preprocessed file/.gstore in=\csv@ppfilename,%
- preprocessor/.gstore in=\csv@preprocessor,%
- no preprocessing/.style={preprocessor=\csv@no@preprocessor},
+ preprocessor/.code={\gdef\csv@preprocessor{#1}\let\csv@preprocss=\csv@preprocss@procedure},%
+ no preprocessing/.code={\let\csv@preprocss=\csv@preprocss@none},
column names reset/.code={\gdef\csv@columnnames{}},%
column names/.code={%
\toks0=\expandafter{\csv@columnnames}%