12.07.2015 Views

Manual for the csvsimple package

Manual for the csvsimple package

Manual for the csvsimple package

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4.3 Macro code inside <strong>the</strong> dataIf needed, <strong>the</strong> data file may contain macro code. Note that <strong>the</strong> first character of a data line isnot allowed to be <strong>the</strong> backslash ’\’.CSV file macrodata.csvtype,description,contentM,A nice \textbf{<strong>for</strong>mula}, $\displaystyle \int\frac{1}{x} = \ln|x|+c$G,A \textcolor{red}{colored} ball, {\tikz \shadedraw [shading=ball] (0,0) circle (.5cm);}M,\textbf{Ano<strong>the</strong>r} <strong>for</strong>mula, $\displaystyle \lim\limits_{n\to\infty} \frac{1}{n}=0$Firstly, we survey <strong>the</strong> file content using \csvautotabular.\csvautotabular{macrodata.csv}type description contentMA nice <strong>for</strong>mula∫ 1x = ln x + cG A colored ballM Ano<strong>the</strong>r <strong>for</strong>mula1limn→∞ n = 0\csvstyle{my enumerate}{head to column names,be<strong>for</strong>e reading=\begin{enumerate},after reading=\end{enumerate}}\csvreader[my enumerate]{macrodata.csv}{}{%\item \description:\par\content}\bigskipNow, <strong>for</strong>mulas only:\csvreader[my enumerate,filter equal={\type}{M}]{macrodata.csv}{}{%\item \description:\qquad\content}1. A nice <strong>for</strong>mula:∫ 1x = ln x + c2. A colored ball:3. Ano<strong>the</strong>r <strong>for</strong>mula:1limn→∞ n = 0Now, <strong>for</strong>mulas only:1. A nice <strong>for</strong>mula:∫ 1x = ln x + c2. Ano<strong>the</strong>r <strong>for</strong>mula: limn→∞1n = 0 22

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!