Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{article}
- usepackage{datatool}
- usepackage{colortbl}
- begin{filecontents*}{bogus.csv}
- FirstName,Surname,StudentNo,Score
- John,"Smith, Jr",102689,68
- Jane,Brown,102647,75
- Andy,Brown,103569,42
- Z"oe,Adams,105987,52
- Clare,Verdon,104356,45
- John,"Smith, Jr",102683,68
- Roger,Brady,106872,58
- Clare,Verdon,104356,45
- end{filecontents*}
- begin{document}
- DTLloaddb{dat}{bogus.csv}
- begin{table}[htbp]
- caption{Conditionally colored rows}label{tab:colored_row}
- centering
- begin{tabular}{llc}
- bfseries First Name &
- bfseries Surname &
- bfseries Grade (%)%
- DTLforeach{dat}
- {firstname=FirstName, surname=Surname,score=Score} %
- {\ % skip line
- %DTLifoddrow{ rowcolor{blue} }{ rowcolor{green} } % stripy conditional. works fine.
- DTLifnumlt{score}{60}{rowcolors{geen}}{rowcolors{blue}} % my conditional. no go.
- firstname & surname & score} %
- end{tabular}
- end{table}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement