Manual for the csvsimple package
Manual for the csvsimple package
Manual for the csvsimple package
- No tags were found...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Ano<strong>the</strong>r way to address columns is to use <strong>the</strong>ir roman numbers. The direct addressing is doneby \csvcoli, \csvcolii, \csvcoliii, . . . :\csvreader[tabular=|r|l|c|,table head=\hline & Person & Matr.~No.\\\hline\hline,late after line=\\\hline]%{grade.csv}{}%{\<strong>the</strong>csvrow & \csvcolii~\csvcoli & \csvcoliii}%PersonMatr. No.1 Hans Maier 123452 Anna Huber 234563 Werner Weißbäck 34567And yet ano<strong>the</strong>r method to assign macros to columns is to use arabic numbers <strong>for</strong> <strong>the</strong> assignment:\csvreader[tabular=|r|l|c|,table head=\hline & Person & Matr.~No.\\\hline\hline,late after line=\\\hline]%{grade.csv}{1=\name,2=\firstname,3=\matnumber}%{\<strong>the</strong>csvrow & \firstname~\name & \matnumber}%PersonMatr. No.1 Hans Maier 123452 Anna Huber 234563 Werner Weißbäck 34567For recurring applications, <strong>the</strong> pgfkeys syntax allows to create own styles <strong>for</strong> a consistentand centralized design. The following example is easily modified to obtain more or less optionsettings.\csvset{myStudentList/.style={%tabular=|r|l|c|,table head=\hline & Person & #1\\\hline\hline,late after line=\\\hline,column names={name=\name,givenname=\firstname}}}\csvreader[myStudentList={Matr.~No.}]{grade.csv}{matriculation=\matnumber}%{\<strong>the</strong>csvrow & \firstname~\name & \matnumber}%\hfill%\csvreader[myStudentList={Grade}]{grade.csv}{grade=\grade}%{\<strong>the</strong>csvrow & \firstname~\name & \grade}%PersonMatr. No.1 Hans Maier 123452 Anna Huber 234563 Werner Weißbäck 34567PersonGrade1 Hans Maier 1.02 Anna Huber 2.33 Werner Weißbäck 5.04