Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- begin{filecontents*}{students.csv}
- name,grade
- Joe Bloggs,2.7
- Jane Doe,1.0
- John Smith,3.0
- end{filecontents*}
- documentclass{article}
- usepackage{datatool,fp}
- % From egreg at https://tex.stackexchange.com/questions/335483/retrieving-substring-of-dtlfetch
- newcommand{DTLfetchsave}[5]{%
- edtlgetrowforvalue{#2}{dtlcolumnindex{#2}{#3}}{#4}%
- dtlgetentryfromcurrentrow{dtlcurrentvalue}{dtlcolumnindex{#2}{#5}}%
- let#1dtlcurrentvalue
- }
- begin{document}
- DTLloaddb{students}{students.csv}
- DTLfetchsavegrade{students}{name}{Jane Doe}{grade}
- FPevaldoublegrade{2*grade}
- doublegrade
- end{document}
Add Comment
Please, Sign In to add comment