Debian Codegraph @

texmf-dist/doc/latex/datatool/datatool-user-examples/datatool-user-example110.tex

raw
1 % This file is embedded in datatool-user.pdf version 3.4.3 2025-12-04
2 % Example 110 Loading Data With No Parsing and Columns Identified as Decimal and Currency with Reformatting
3 % Label: "ex:loadxynoparsedecimalcurrconvert"
4 % arara: pdflatex
5 % arara: pdfcrop
6 \documentclass[12pt]{article}
7 \pagestyle{empty}
8 \begin{filecontents}[noheader,overwrite]{xydata.csv}
9 X,Y
10 -3.5,-2.75
11 -3,3
12 -2.5,-1
13 -1,1.5
14 1,-4.2
15 2.6,1.8
16 3.2,-0.4
17 \end{filecontents}
18
19 % requires datatool-english and datatool-regions to also be installed:
20 \usepackage[locales={en-BE}]{datatool}
21 \DTLsetup{store-datum}
22 \DTLread[
23 name=xydata,
24 format=csv,
25 csv-content=no-parse,
26 data-types={decimal,currency},
27 convert-numbers
28 ]{xydata.csv}
29 \begin{document}
30 \DTLsortdata{xydata}{Y}
31 \DTLdisplaydb{xydata}
32 \end{document}