| 1 |
# datatool — Tools to load and manipulate data |
| 2 |
|
| 3 |
Version 3.4.3 (2025-12-04) |
| 4 |
|
| 5 |
Author: Nicola L. C. Talbot ([dickimaw-books.com](https://www.dickimaw-books.com/)) |
| 6 |
|
| 7 |
# LICENCE |
| 8 |
|
| 9 |
This material is subject to the LaTeX Project Public License. |
| 10 |
See http://www.ctan.org/license/lppl1.3 |
| 11 |
for the details of that license. |
| 12 |
|
| 13 |
Copyright 2007-2025 Nicola Talbot |
| 14 |
|
| 15 |
## DESCRIPTION |
| 16 |
|
| 17 |
This bundle consists of the packages: `datatool.sty`, |
| 18 |
`datatool-base.sty`, `databar.sty`, `databib.sty`, `datapie.sty`, |
| 19 |
`dataplot.sty`, `datagidx.sty` and `person.sty`. |
| 20 |
|
| 21 |
Localisation support is supplied separately. See |
| 22 |
[`datatool-regions`](https://ctan.org/pkg/datatool-regions) |
| 23 |
(currency and number group and decimal characters) and |
| 24 |
[`datatool-english`](https://ctan.org/pkg/datatool-english) |
| 25 |
(fixed text translations and orthography). |
| 26 |
|
| 27 |
### `datatool.sty` (databases) |
| 28 |
|
| 29 |
Databases can be created using LaTeX commands or loaded |
| 30 |
from comma or tab separated variable files. |
| 31 |
|
| 32 |
Databases can be sorted numerically or alphabetically |
| 33 |
(descending or ascending). Ensure you have localisation |
| 34 |
support installed for alphabetical sorting that follows |
| 35 |
the language's orthography rules (alphabet order). |
| 36 |
|
| 37 |
Repetitive operations can be performed on each row of |
| 38 |
data in a database (such as mail merging.) Conditions |
| 39 |
can be imposed to exclude rows. |
| 40 |
|
| 41 |
### `datatool-base.sty` (base package) |
| 42 |
|
| 43 |
The underlying base package used by all the other packages |
| 44 |
in this bundle. |
| 45 |
|
| 46 |
Commands are provided to determine if an argument is an integer, a |
| 47 |
decimal number (scientific notation supported), currency or a |
| 48 |
string. To parse ISO dates and times, the date/time parsing needs |
| 49 |
to be enabled with `\DTLsetup{datetime={parse}}`. Parsing of |
| 50 |
regional dates requires support from the applicable region file (see |
| 51 |
[`datatool-regions`](https://ctan.org/pkg/datatool-regions)). |
| 52 |
|
| 53 |
Locale dependent number settings are supported |
| 54 |
(such as a comma as a decimal character and full stop as |
| 55 |
a number group character). This can be done via |
| 56 |
the captions hook, if supported, but the appropriate |
| 57 |
region file needs to be installed |
| 58 |
(see [`datatool-regions`](https://ctan.org/pkg/datatool-regions)). |
| 59 |
|
| 60 |
Commands are provided to convert between locale dependent |
| 61 |
numbers/currency and the plain decimal format required |
| 62 |
for arithmetical computations to be |
| 63 |
performed on elements of the database. |
| 64 |
|
| 65 |
Strings can be tested to determine if they are all upper |
| 66 |
or all lower case. |
| 67 |
|
| 68 |
Names can be converted to initials using `\DTLinitials`. |
| 69 |
|
| 70 |
Comma-separated lists can be sorted numerically or alphabetically |
| 71 |
(descending or ascending). Ensure you have localisation |
| 72 |
support installed for alphabetical sorting that follows |
| 73 |
the language's orthography rules (alphabet order). |
| 74 |
|
| 75 |
### `datapie.sty` (Pie Charts) |
| 76 |
|
| 77 |
A database defined by `datatool.sty` can be converted into a |
| 78 |
pie chart. This is best done with `\DTLsetup{store-datum}` |
| 79 |
to avoid repeated re-parsing of formatted numbers. |
| 80 |
|
| 81 |
Segments can be separated from the rest of the chart to make |
| 82 |
them stand out. |
| 83 |
|
| 84 |
Colour/grey scale options. |
| 85 |
|
| 86 |
Predefined segment colours can be changed. |
| 87 |
|
| 88 |
Hooks provided to annotate chart. |
| 89 |
|
| 90 |
### `dataplot.sty` (Line and Scatter Plots) |
| 91 |
|
| 92 |
A database defined by `datatool.sty` may be plotted as a 2D |
| 93 |
scatter or line plot. This is best done with `\DTLsetup{store-datum}` |
| 94 |
to avoid repeated re-parsing of formatted numbers. |
| 95 |
|
| 96 |
Settings provided to govern the appearance of the chart. |
| 97 |
(e.g. show/hide axes, legend, grid, major/minor tick marks). |
| 98 |
|
| 99 |
Hooks provided to add extra information to the plot. |
| 100 |
|
| 101 |
### `databar.sty` (Bar Charts) |
| 102 |
|
| 103 |
A database defined by `datatool.sty` can be converted into a |
| 104 |
bar chart. This is best done with `\DTLsetup{store-datum}` |
| 105 |
to avoid repeated re-parsing of formatted numbers. |
| 106 |
|
| 107 |
Colour/grey scale options. |
| 108 |
|
| 109 |
Predefined bar colours can be changed. |
| 110 |
|
| 111 |
Horizontal or vertical formats provided. |
| 112 |
|
| 113 |
Hooks provided to annotate chart. |
| 114 |
|
| 115 |
### `databib.sty` (Bibliographies) |
| 116 |
|
| 117 |
Provides commands to convert a BibTeX database into a datatool |
| 118 |
database. |
| 119 |
|
| 120 |
### `datagidx.sty` (Indexes and Glossaries) |
| 121 |
|
| 122 |
Provides a way of indexing or creating glossaries/lists of |
| 123 |
abbreviations that uses TeX to do the sorting and collating instead |
| 124 |
of using an external indexing application, such as Xindy or |
| 125 |
MakeIndex. Ensure you have localisation support installed for |
| 126 |
alphabetical sorting that follows the language's orthography rules |
| 127 |
(alphabet order). |
| 128 |
|
| 129 |
### `person.sty` (Referencing People) |
| 130 |
|
| 131 |
Provides commands to display a person's name and pronoun in an |
| 132 |
order of service style document to provide consistency, or in mail |
| 133 |
merging to eliminate the cumbersome use of ``he/she'' etc. |
| 134 |
|
| 135 |
## NOTES |
| 136 |
|
| 137 |
**The `datatool` bundle replaced the `csvtools` bundle which is now obsolete (2007).** |
| 138 |
|
| 139 |
This material is subject to the LaTeX Project Public License. |
| 140 |
See http://www.ctan.org/license/lppl1.3 for the details of that license. |
| 141 |
|
| 142 |
Package FAQ: [`dickimaw-books.com/faq.php?category=datatool`](https://www.dickimaw-books.com/faq.php?category=datatool) |
| 143 |
|
| 144 |
http://www.dickimaw-books.com/ |