| 1 |
% This file is embedded in datatool-user.pdf version 3.4.3 2025-12-04 |
| 2 |
% Example 108 Loading Data With No Parsing and Columns Identified as Decimal |
| 3 |
% Label: "ex:loadxynoparsedecimal" |
| 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 |
\usepackage{datatool} |
| 20 |
\DTLsetup{store-datum} |
| 21 |
\DTLread[ |
| 22 |
name=xydata, |
| 23 |
format=csv, |
| 24 |
csv-content=no-parse, |
| 25 |
data-types=decimal |
| 26 |
]{xydata.csv} |
| 27 |
\begin{document} |
| 28 |
\DTLsortdata{xydata}{Y} |
| 29 |
\DTLdisplaydb{xydata} |
| 30 |
\end{document} |