Debian Codegraph @

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

raw
1 % This file is embedded in datatool-user.pdf version 3.4.3 2025-12-04
2 % Example 64 Trimming New Values
3 % Label: "ex:newvaluetrim"
4 % arara: pdflatex
5 % arara: pdfcrop
6 \documentclass[12pt]{article}
7 \pagestyle{empty}
8 \usepackage{datatool}
9 \DTLnewdb{mydata}
10 \DTLnewrow{mydata}
11 \DTLsetup{new-value-trim=true}
12 \DTLnewdbentry{mydata}{Column1}{ value1 }
13 \DTLnewrow{mydata}
14 \DTLsetup{new-value-trim=false}
15 \DTLnewdbentry{mydata}{Column1}{ value2 }
16 % compare with \DTLaction:
17 \DTLsetup{default-name=mydata}
18 \DTLaction{new row}
19 \DTLaction[column=1,value= value3 ]{new entry}
20 \DTLaction{new row}
21 \DTLaction[column=1,value={ value4 }]{new entry}
22 \begin{document}
23 % display the data with the values quoted:
24 \renewcommand{\dtlstringformat}[1]{``#1''}
25 \DTLdisplaydb{mydata}
26 \end{document}