{datatool} is a tool to create and manipulate databases.

learn more… | top users | synonyms

31
votes
1answer
990 views

Helping cardinals elect the new Pope

Yes, we are talking about TeX and friends! Edit: I decided to move the background motivation to the end of the question, since it seems to be kind of off-topic in the TeX context. The following code ...
17
votes
2answers
3k views

How typeset a numeric table from a CSV file

I have a CSV file (db.txt)like this: 30.0, 0.0, 0.0 60.0, 1.9098, 5.8779 90.0, 6.9098, 9.5106 120.0, 13.09, 9.5106 150.0, 18.09, 5.8779 180.0, 20.0, 0.0 I need to typeset it. My ...
12
votes
4answers
2k views

Is there a pure LaTeX or TeX package for chart drawing?

We are creating an easy-to-use LaTeX template for our institution. I'd like to have a pure LaTeX way to create simple bar graphs and pie charts. Does anything exist? I can certainly throw the students ...
11
votes
5answers
2k views

What is the proper way to create a horizontal table?

I want to have a horizontal table, like this: However, when using the usual method of creating a table, it quickly becomes a pain having to pre-define the number of columns (especially since I ...
11
votes
3answers
475 views

No room for a new \count with datatool

This question led to a new feature in a package: datatool Update: 2013-1-19 The MWE worked fines with the new (v2.13) version of the datatool package using \DTLnewdbonloadfalse. But in my ...
10
votes
2answers
779 views

pgfplotstable or datatool?

What are differences, which to use for including .csv, .tsv files ? Datatool ? pgfplotstable ? I've seen at question : How typeset a numeric table from a CSV file how person asked about fixing ...
9
votes
1answer
3k views

How to use datatool package to read a CSV files so that they can be used in tables?

I am new in latex and I have some issues. I want to read a .csv file in latex to create a table, but I don't know how. I heard that datatool package can do this, but I don't know how to use it. My ...
9
votes
1answer
309 views

LaTeX's datatool package together with siunitx

I want to use the datatool package to read csv files and parse them to LaTeX tables. Furthermore I want to use siunitx to format the numbers from the csv file. Have a look at the following example: ...
8
votes
1answer
308 views

Datatool and currency-type data

The package datatool gives me some headaches with the currency-type fields. My data is a test.csv file exported from Excel, without header: a,"$100,090.06 ","$107,578.03 ",0.129565278 ...
8
votes
1answer
122 views

Datatool control precision

How can I bring down the number of decimal points in following code to only 2: \documentclass{article} \usepackage{datatool} \begin{filecontents*}{test2.csv} Name, Age, stDev Adam, 17.2344, ...
8
votes
1answer
153 views

Apparent hyperref conflict with datatool and longtabu col vertical alignment?

Only when I turn on hyperref do I get a weird vertical alignment problem in the first column of a datatool-driven longtabu. Without hyperref, the rows of the first column are vertically aligned to ...
8
votes
1answer
378 views

Difficulty with datatool

I want to use the command \DTLstoreinitials from package \usepackage{datatool} in the following way : \newcommand{\extractInitials}[1]{% \DTLstoreinitials{#1}{\userInitials}% ...
7
votes
4answers
394 views

How to check if a datatool db has an existing member

I would like to suppress duplicated entries in a list. The lists are comma separated lists defined in a macro as in my earlier question on Sorting Comma Separated Lists defined with, or without ...
7
votes
3answers
928 views

datatool with longtable

I have a CSV file that has many rows. I want to typeset these rows into a table using longtable and datatool package. However just before before the "lastfoot" (which says concluded) I am getting ...
7
votes
1answer
74 views

Multiple instances of xelatex in parallel without overwriting generated PDF's

I've one TeX file abc.tex which is executed using xelatex abc.tex to generate the PDF file abc.pdf Inside abc.tex I'm using the datatool package to read data from an external CSV file (say pqr.csv). ...
7
votes
1answer
98 views

Define macro based on Datatool contents

I can define a macro of the form \csname../dirX Color\endcsname manually and use it as desired. However, I am unable to do the same thing based on the contents as read by the datatool package. The ...
7
votes
1answer
303 views

Storing unexpanded macro definitions (including #1, #2, …) for later use (now includes full usecase)

Preliminary Info I'm working on a new LaTeX package to make scoping more flexible. To do this I'll be capturing and reintroducing user defined commands behind the scenes. (For a comprehensive ...
7
votes
1answer
640 views

How can I convert structured LaTeX file *to* CSV data

I am using a structured format to print patient's documenatation using LaTeX. The structure is like this: Demography Name Surname Age/Sex Address Clinical Details History, Past History, Personal ...
6
votes
2answers
595 views

skipping the first line of a data file for pgfplotstable

I need to skip the first row of a csv file, which is auto-generated by some magic measurement apparatus. It contains its own filename as the first line. The second line contains the column names (no ...
6
votes
4answers
113 views

Sending Same Letter to multiple addresses

I'm sending the same letter to multiple addresses. The addresses are stored in a csv document. I've so far created a loop to create multiple letters, but I have not been successful in finding a ...
6
votes
2answers
186 views

How to put content from multiple databases in one table using datatool?

Almost too easy: I have two databases "First" and "Second", both get their data from tab-delineated files "First.txt" and "Second.txt" Both contain two columns ('year' and 'number') and an equal ...
6
votes
1answer
1k views

Command \AtBeginEnvironment already defined

I am pretty new to LaTeX. With windows, Miktex/Texmaker pretty-much takes care of package installation whenever needed, but on Ubuntu I have been downloading needed packages from CTAN and installing ...
6
votes
1answer
349 views

File ended while scanning use of \@dtl@trim

I am trying to compile latex code that imports CSV into a longtable (ltxtable). The code has been compiled successfully in windows while it makes error in Mac OS X. \documentclass{article} ...
5
votes
1answer
436 views

How to mark up different entry types (index/glossary/acronym/notation) at the same time in datagidx package?

I came across datagidx package, which is part of the datatool bundle, the killing feature of this package is that you can use it independently, not relying on external indexing applications, e.g., ...
5
votes
2answers
3k views

Formatting complex table from CSV using datatool

I have this csv file, formatted like this one: Store,Product 1,Product 2,Product 3,Product 4,Product 5,Sub Total Store 1,15,99,299,75,292,780 Store 2,33,353,429,283,561,1659 Store ...
5
votes
1answer
158 views

Conflicts with Datatool and babel (french)

I am having trouble compiling a latex document using an external CSV file with datatool and using the french language from the babel package. The content of my latex file is: ...
5
votes
2answers
306 views

Datatool, Two DB rows per table row, vertically ordered

So after searching for some hours I'm surprised that there wasn't any useful solution to find. I import a CSV table using datatool. That table only consists of 3 narrow columns, but I got a lot of ...
5
votes
1answer
77 views

datatool: How to reliably store database in \AtEndDocument (or similar hook)

In a big report with many subfiles and authors, I am using the datatool package to write out some data collected across the document. At the end of the document, the data should be stored in a CSV ...
5
votes
1answer
128 views

How to cherry pick from datatool DB and calculate totals

I have a CSV file with current prices/item. These prices are updated regularly. I have loaded a DB with datatool. I would like to use these prices to calculate totals according to quantities I have ...
5
votes
2answers
355 views

Can't use utf8 encoding with datatool

I am using datatool to manage tables and I am getting errors when the data.csv file (encoded either as UTF-8 or ANSI) has characters like 'á'. I can get it around by having data.csv encoded as ANSI ...
5
votes
1answer
231 views

How do I get the number of rows of a datatool table?

I create a table as follows: \usepackage{datatool} \begin{document} \DTLnewdb{MaTable} \end{document} This table may be filled with several occurrences of \DTLnewrow{MaTable} ...
5
votes
1answer
777 views

Datatool error: undefined control sequence \begin

I'm using datatool to make a mail merge. I have my .csv file. I've defined my \DTLloaddb{indirizzi}{/home/kde/Dropbox/edile_150/consulenti_arezzo.csv} and if I use \DTLdisplaydb{indirizzi} I have my ...
5
votes
3answers
169 views

Use datatool to read a row from a CSV file, then use the variables in the document?

I'm confused about how to use "datatool" to read variables from a row in my database, and pass them on to be formatted in my text. I don't want to make a table, but that's about all there seems to be ...
5
votes
1answer
140 views

Using `ifthenelse` to combine two related functions into one

This question is based on Peter Grill's answer to "Table including rows of a master table".. The function PrintDTLTable was in Peter's original answer. I wanted a version that would run over all ...
5
votes
1answer
93 views

Using counter within database

I try to add a countervalue into a database. But if the database content will be printed, the value is allways the maximum value. I have a simple code example ...
5
votes
1answer
99 views

Obtain all different values of a specific column in a datatool database

how can I get all different values of a specific column in a datatool database? Example is the following table read into a datatool database: Name,Town,Age Adam,Xcity,20 Berta,Ytown,30 ...
5
votes
1answer
106 views

Datatool DTLifnull not working

Considering the following database: Name,ID,Gender,Years in Service ,382473856,M,15 Francesca Joestar,461276432,F,10 Chan Ker Mei,463724631,F,5 Hikaru Yagami,154954739,M,10 The fist line has the ...
5
votes
1answer
240 views

datatool: getting a specific value given the value of another column

I am certain this is patently obvious, but the solution is eluding me... Given a dataset stored in CSV: ID, col1, col2, col3 KEY-1, foo bar, baz KEY-2, alice, bob, chuck I would like to ...
5
votes
1answer
287 views

Is it possible to use commands defined in DTLforeach as conditions in a tikz environment?

I have been tearing out my hair with this one all afternoon and was hoping someone could help me. Essentially the problem I have is that I'm using a DTLforeach loop to iterate over values in a .csv ...
5
votes
1answer
149 views

accessing data using datatool when headers aren't available

I have a series of csv files I'm expecting to receive on a regular basis, and there are two problems with these files. I am not guaranteed to have headers. I cannot rely on how many data entries ...
5
votes
0answers
98 views

What kind of data can be gleaned from a PDF created in LaTeX?

As I use LaTeX for the creation of many of my business instruments, and since I send these all over the world to different clients I just wanted to know if there are any data embedded in a PDF that ...
4
votes
2answers
348 views

Automatically formatting a table from a file with a list of words

I have a list of ~1000 words in a text file. The words are listed in a text file "my_words.txt" with no breaklines as follows: word1, word2, word3, etc. I would like to display these words in a ...
4
votes
2answers
526 views

Datatool, UTF8 and Export to a file

The title contains the problem: I have a datatool table, which contain accented characters (öäü) and I want to export the table into a CSV file : \documentclass{article} \usepackage[utf8]{inputenc} ...
4
votes
2answers
270 views

How do I solve “Undefined color `\dtlpie@segcolix '”?

I have the following LaTeX file: \documentclass{article} \usepackage[pdftex,active,tightpage]{preview} \setlength\PreviewBorder{2mm} \usepackage{datapie} %\usepackage{xcolor} ...
4
votes
1answer
209 views

Datatool : How to pick manually some rows in a specific order

I've got a large multi-purpose database and i would like to pick several items in it (using labels) and print them in the given order, not the database order or any entry-related order. For example, ...
4
votes
1answer
172 views

Rotating a pie chart

How can I rotate a pie chart with 50,50 distribution so that it is divided vertically rather than horizontally? \documentclass{beamer} \usepackage{multicol} \usepackage{datapie} \usetheme{Warsaw} ...
4
votes
1answer
102 views

Eso-pic and data-tool

Csv files can be easier to prepare for the person who is not used to LaTeX syntax. I would like to use a csv file containing Id, myauthor, mydate, myaddress Sebastian, 12.12.2012, XYZ road, ...
4
votes
2answers
150 views

How to select specfic row for \DTLnewdbentry to apply to

After a pair of \DTLnewrow/\DTLnewdbentry which creates two rows with the key1 data, I want to add the key2 data to the earlier row. I thought that \dtlgetrow{myDB}{1} would make the current row the ...
4
votes
2answers
56 views

Is there a way to store information in something like an array

I'd like to store some basic information on people in a file, and want to be able for LaTeX to process this information. More specifically, I'd like to store something like: id:john1; fname: John; ...
4
votes
1answer
88 views

datatool group by?

I try to display the results of a survey where students of 2 different classes could choose their favorite subject. In the result table I find Surname, Name, ClassID, Subject. The data in the file ...