Comprehensive TeX Archive Network

Direc­tory macros/latex/contrib/datatool

LaTeX Bundle : datatool v2.27 

Last Modified : 2016-07-28

Author        : Nicola Talbot

Package FAQ   : http://www.dickimaw-books.com/faqs/datatoolfaq.html

This bundle consists of the packages: datatool.sty, 
datatool-base.sty, datatool-fp.sty, datatool-pgfmath.sty,
databar.sty, databib.sty, datapie.sty dataplot.sty, datagidx.sty


 Databases can be created using LaTeX commands or loaded
 from external ASCII files, such as comma or tab separated
 variable files.

 Databases can be sorted numerically or alphabetically
 (descending or ascending.)

 Repetitive operations can be performed on each row of
 data in a database (such as mail merging.) Conditions
 can be imposed to exclude rows.


 Commands are provided to determine if an argument is
 an integer, a real number, currency or a string.
 (Scientific notation is currently not supported.)

 Locale dependent number settings are supported 
 (such as a comma as a decimal character and full stop as 
 a number group character.)

 Commands are provided to convert between locale dependent
 numbers/currency and the standard decimal format required 
 by the fp or pgfmath packages enabling fixed point arithmetic to be 
 performed on elements of the database.

 Strings can be tested to determine if they are all upper
 or all lower case.

 Names can be converted to initials using \DTLinitials.

 Provides an interface with fp.sty

 Provides an interface with pgfmath.sty


 A database defined by datatool.sty can be converted into a 
 pie chart.

 Segments can be separated from the rest of the chart to make
 them stand out.

 Colour/grey scale options.

 Predefined segment colours can be changed.

 Hooks provided to annotate chart.


 A database defined by datatool.sty may be plotted as a 2D
 scatter or line plot

 Settings provided to govern the appearance of the chart.
 (e.g. show/hide axes, legend, grid, major/minor tick marks.)

 Hooks provided to add extra information to the plot


 A database defined by datatool.sty can be converted into a 
 bar chart.

 Colour/grey scale options.

 Predefined bar colours can be changed.

 Horizontal or vertical formats provided.

 Hooks provided to annotate chart.


 Provides commands to convert a BibTeX database into a datatool


 Provides a way of indexing or creating glossaries/lists of acronyms
 that uses TeX to do the sorting and collating instead of using an
 external indexing application, such as xindy or makeindex.


 Provides commands to display a person's name and pronoun in an
 order of service style document to provide consistency, or in mail
 merging to eliminate the cumbersome use of ``he/she'' etc.

*The datatool bundle replaces the csvtools bundle which is now obsolete.*

This material is subject to the LaTeX Project Public License. 
See http://www.ctan.org/license/lppl1.3 for the details of that license.


Down­load the con­tents of this pack­age in one zip archive (2.7M).

data­tool – Tools to load and ma­nip­u­late data

The tools com­prise six pack­ages:

  • data­tool.sty: databases may be cre­ated us­ing com­mands or by im­port­ing ex­ter­nal files; they may be sorted nu­mer­i­cally or al­pha­bet­i­cally; repet­i­tive op­er­a­tions (such as mail merg­ing) may be per­formed on each row of a database, sub­ject to con­di­tions to ex­clude par­tic­u­lar rows; com­mands are pro­vided to ex­am­ine database el­e­ments, and to con­vert for­mats (for ex­am­ple, to con­vert a nu­meric el­e­ment to a for­mat com­pat­i­ble with the fp pack­age;
  • dat­apie.sty: a database may be rep­re­sented as a pie chart; flex­i­ble op­tions al­low colour­ing of the chart, and an­no­ta­tion hooks are avail­able;
  • dat­a­plot.sty: a database may be rep­re­sented as a 2-di­men­sional scat­ter or line plot; flex­i­ble op­tions con­trol of the plot's over­all ap­pear­ance, and of leg­ends and other ex­tra in­for­ma­tion;
  • databar.sty: a database may be rep­re­sented as a bar chart; over­all ap­pear­ance, colour­ing and an­no­ta­tion are con­trol­lable;
  • datagidx.sty: pro­vides a way of in­dex­ing or cre­at­ing glos­saries/lists of acronyms that uses to do the sort­ing and col­lat­ing in­stead of us­ing an ex­ter­nal in­dex­ing ap­pli­ca­tion, such as xindy or makein­dex;
  • databib.sty: a bib­li­og­ra­phy may be loaded into a data­tool database, and ma­nip­u­lated there be­fore be­ing printed (this per­mits a -based route to print­ing bib­li­ogra­phies in for­mats for which no BibTeX style is avail­able); and
  • per­son.sty: pro­vides sup­port for dis­play­ing a per­son’s name and pro­noun in a doc­u­ment, thus avoid­ing cum­ber­some use of “he/she”, etc.

The draw­ing pack­ages make use of PGF/TikZ for their out­put.

The bun­dle su­per­sedes and re­places the au­thor’s csv­tools bun­dle.

Ver­sion2.27 2016-07-28
Li­cense The Project Public Li­cense 1.3
Copy­right2009,2013–2016 Ni­cola Tal­bot
Main­tainerNi­cola Tal­bot
TDS archivedatatool.tds.zip
Con­tained inTeX Live as data­tool
MiKTeX as data­tool
Topics vi­su­al­i­sa­tion of data sets
im­port­ing data into doc­u­ments
ma­nip­u­late data within
Guest Book Sitemap Contact Contact Author