summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/csvsimple
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-03-12 23:29:21 +0000
committerKarl Berry <karl@freefriends.org>2012-03-12 23:29:21 +0000
commiteed29dea1f461aeb4daf6e5b965b195444ff9a2e (patch)
tree1704540cb91a0dd148d5287b239561a780973636 /Master/texmf-dist/tex/latex/csvsimple
parent4ab144c06afa30ff0d2a903c008e24d6c2139b23 (diff)
csvsimple (12mar12)
git-svn-id: svn://tug.org/texlive/trunk@25618 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/csvsimple')
-rw-r--r--Master/texmf-dist/tex/latex/csvsimple/csvsimple.sty34
1 files changed, 25 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/csvsimple/csvsimple.sty b/Master/texmf-dist/tex/latex/csvsimple/csvsimple.sty
index d2945adf221..545e15e638f 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.04 (2011/11/11)
+%% The LaTeX package csvsimple - version 1.05 (2012/03/12)
%% csvsimple.sty: Simple LaTeX CSV file processing
%%
%% -------------------------------------------------------------------------------------------
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{csvsimple}[2011/11/11 version 1.04 LaTeX CSV file processing]
+\ProvidesPackage{csvsimple}[2012/03/12 version 1.05 LaTeX CSV file processing]
\RequirePackage{pgfkeys,ifthen}
@@ -108,6 +108,10 @@
}
+% default preprocessor (no preprocessing)
+\def\csv@no@preprocessor#1#2{\let#2=#1\relax}
+
+
%---- the loop
\def\csv@AtEndLoop{\csv@addto@macro\@endloophook}
@@ -222,13 +226,14 @@
\global\let\@endloophook\csv@empty%
% options
\csvset{default,every csv,#1}%
+ \csv@preprocessor\csv@filename\csv@ppfilename%
\csv@prereading%
\csv@table@begin%
\setcounter{csvinputline}{0}%
% start reading
- \openin\csv@file=\csv@filename\relax%
+ \openin\csv@file=\csv@ppfilename\relax%
\ifeof\csv@file%
- \csv@warning{File \csv@filename\ not existent, not readable, or empty!}%
+ \csv@warning{File \csv@ppfilename\ not existent, not readable, or empty!}%
\else%
% the head line
\csv@opt@processheadline%
@@ -303,6 +308,9 @@
\csvset{%
file/.gstore in=\csv@filename,%
+ preprocessed file/.gstore in=\csv@ppfilename,%
+ preprocessor/.gstore in=\csv@preprocessor,%
+ no preprocessing/.style={preprocessor=\csv@no@preprocessor},
column names reset/.code={\gdef\csv@columnnames{}},%
column names/.code={%
\toks0=\expandafter{\csv@columnnames}%
@@ -329,7 +337,7 @@
filter/.code={%
\def\temp{#1}\toks@=\expandafter{\temp}%
\xdef\csv@iffilter{\noexpand\ifthenelse{\the\toks@}}},
- nofilter/.code={\csvfilteraccept},
+ no filter/.code={\csvfilteraccept},
filter reject all/.code={\csvfilterreject},
filter accept all/.code={\csvfilteraccept},
before filter/.gstore in=\csv@prefiltercommand,
@@ -354,13 +362,14 @@
% default for reset
default/.style={
file=unknown.csv,
+ no preprocessing,
command=\csvline,
column names reset,
head,
head to column names=false,
column count=10,
on column count error=,
- nofilter,
+ no filter,
before filter=,
before line=,
after line=,
@@ -379,9 +388,9 @@
%
% styles
every csv/.style={},
- nohead/.style={head=false},
- nocheckcolumncount/.style={checkcolumncount=false},
- warn on column count error/.style={on column count error={\csv@warning{>\thecsvcol< instead of >\csv@columncount< columns for input line >\thecsvinputline< of file >\csv@filename<}}},
+ 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@warning{>\thecsvcol< instead of >\csv@columncount< columns for input line >\thecsvinputline< of file >\csv@ppfilename<}}},
filter equal/.style 2 args={filter=\equal{#1}{#2}},
filter not equal/.style 2 args={filter=\not\equal{#1}{#2}},
tabular/.style={
@@ -418,6 +427,13 @@
command=\csvlinetotablerow}
}
+% deprecated keys
+\csvset{
+ nofilter/.style=no filter,
+ nohead/.style=no head,
+}
+
+
\def\csvautotabular#1{\csvloop{autotabular={#1}}}
\def\csvautolongtable#1{\csvloop{autolongtable={#1}}}