diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/csvsimple/csvsimple.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/csvsimple/csvsimple.tex | 73 |
1 files changed, 61 insertions, 12 deletions
diff --git a/Master/texmf-dist/doc/latex/csvsimple/csvsimple.tex b/Master/texmf-dist/doc/latex/csvsimple/csvsimple.tex index 96ac0ffeb56..6d9ea7e7b6c 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.05 (2012/03/12) +%% The LaTeX package csvsimple - version 1.06 (2012/11/08) %% csvsimple.sty: Simple LaTeX CSV file processing %% %% ------------------------------------------------------------------------------------------- @@ -72,8 +72,8 @@ pdfkeywords={csv file, comma separated values, key value syntax} } -\def\version{1.05}% -\def\datum{2012/03/12}% +\def\version{1.06}% +\def\datum{2012/11/08}% \makeindex @@ -109,7 +109,7 @@ This processing is controlled by key value assignments according to the syntax of |pgfkeys| \cite{tantau:2010c}. Sample applications of the package are tabular lists, serial letters, and charts. -An alternative to |csvsimple| is the |datatool| package \cite{talbot:2009a} +An alternative to |csvsimple| is the |datatool| package \cite{talbot:2012a} which provides considerably more functions like exchange of separator and delimiter symbols or sorting of data. |csvsimple| has a different approach for the user interface and @@ -356,27 +356,36 @@ is useless for |\csvreader|. \end{docCommand} \clearpage -\begin{docCommand}{csvautotabular}{\marg{file name}} +\begin{docCommand}{csvautotabular}{\oarg{options}\marg{file name}} |\csvautotabular| is an abbreviation for the application of the option key - \refKey{/csv/autotabular}. + \refKey{/csv/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. \begin{dispExample} \csvautotabular{grade.csv} \end{dispExample} +\begin{dispExample} +\csvautotabular[filter equal={\csvcoliv}{f}]{grade.csv} +\end{dispExample} \end{docCommand} -\begin{docCommand}{csvautolongtable}{\marg{file name}} +\begin{docCommand}{csvautolongtable}{\oarg{options}\marg{file name}} |csvautolongtable| is an abbreviation for the application of the option key - \refKey{/csv/autolongtable}. + \refKey{/csv/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. +\begin{dispListing} +\csvautolongtable{grade.csv} +\end{dispListing} +\csvautolongtable{grade.csv} \end{docCommand} +\clearpage + \begin{docCommand}{csvset}{\marg{options}} Sets \meta{options} for every following \refCom{csvreader} and \refCom{csvloop}. For example, this command may @@ -929,7 +938,8 @@ introduced. \csvreader[head to column names]{address.csv}{}{% \begin{tcolorbox}[colframe=DarkGray,colback=White,arc=0mm,width=(\linewidth-2pt)/2, - before=,after=\hfill,title={Letter to \name},fonttitle=\bfseries] + equal height group=letter,before=,after=\hfill,fonttitle=\bfseries, + adjusted title={Letter to \name}] \ifthenelse{\equal{\degree}{}}{\ifmale{Mr.}{Ms.}}{\degree}~\givenname~\name\\ \street\\\zip~\location \tcblower @@ -1050,6 +1060,45 @@ Every item is piled upon the appropriate stack. \end{dispExample} +\clearpage +\subsection{Macro code inside the data}% + +If needed, the data file may contain macro code. Note that the first character +of a data line is not allowed to be the backslash '|\|'. + +%-- file embedded for simplicity -- +\begin{tcbverbatimwrite}{macrodata.csv} +type,description,content +M,A nice \textbf{formula}, $\displaystyle \int\frac{1}{x} = \ln|x|+c$ +G,A \textcolor{red}{colored} ball, {\tikz \shadedraw [shading=ball] (0,0) circle (.5cm);} +M,\textbf{Another} formula, $\displaystyle \lim\limits_{n\to\infty} \frac{1}{n}=0$ +\end{tcbverbatimwrite} +%-- end embedded file -- + +\csvlisting{macrodata} + +Firstly, we survey the file content using +|\csvautotabular|. + +\begin{dispExample} +\csvautotabular{macrodata.csv} +\end{dispExample} + + +\begin{dispExample} +\csvstyle{my enumerate}{head to column names, + before reading=\begin{enumerate},after reading=\end{enumerate}} + +\csvreader[my enumerate]{macrodata.csv}{}{% + \item \description:\par\content} + +\bigskip +Now, formulas only: +\csvreader[my enumerate,filter equal={\type}{M}]{macrodata.csv}{}{% + \item \description:\qquad\content} +\end{dispExample} + + % Actually, it is not a good idea to include the references like this! % Do not follow this bad example ... \begin{tcbverbatimwrite}{\jobname.bib} @@ -1072,11 +1121,11 @@ Every item is piled upon the appropriate stack. language = {english} } -@manual{talbot:2009a, +@manual{talbot:2012a, author = {Nicola L. C. Talbot}, - title = {datatool v 2.03: Databases and data manipulation}, + title = {datatool v 2.11: Databases and data manipulation}, url = {http://mirror.ctan.org/macros/latex/contrib/datatool/datatool.pdf}, - date = {2009-11-15}, + date = {2012-09-25}, } \end{tcbverbatimwrite} |