Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{standalone}
- RequirePackage{luatex85}
- usepackage{fontspec}
- usepackage{siunitx}
- usepackage{datatool}
- usepackage{filecontents}
- begin{filecontents*}{myfile.csv}
- filename,date,pressure
- blabla,2018-03-12,66
- end{filecontents*}
- newcommand{getfirstrowfromcol}[2]{%
- DTLsetseparator{,}%
- DTLifdbexists{mydb}{DTLdeletedb{mydb}}{}%
- DTLloadrawdb{mydb}{#1}%
- DTLgetvalue{myname}{mydb}{1}{dtlcolumnindex{mydb}{#2}}%
- myname%
- }
- begin{document}
- SI{getfirstrowfromcol{myfile.csv}{pressure}}{bar}
- end{document}
- ! Undefined control sequence.
- GenericError ...
- #4 errhelp @err@ ...
- l.18 DeclareSIUnit
- A { ampere }
- documentclass{article}
- usepackage{siunitx}
- usepackage{datatool}
- usepackage{filecontents}
- begin{filecontents*}{myfile.csv}
- filename,date,pressure
- blabla,2018-03-12,66
- end{filecontents*}
- newcommand{getfirstrowfromcol}[2]{%
- DTLsetseparator{,}%
- DTLifdbexists{mydb}{DTLdeletedb{mydb}}{}%
- DTLloadrawdb{mydb}{#1}%
- DTLgetvalue{myname}{mydb}{1}{dtlcolumnindex{mydb}{#2}}%
- myname%
- }
- begin{document}
- SI[parse-numbers=false]{getfirstrowfromcol{myfile.csv}{pressure}}{bar}
- getfirstrowfromcol{myfile.csv}{pressure}
- end{document}
Add Comment
Please, Sign In to add comment