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

learn more… | top users | synonyms

31
votes
1answer
934 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
2k 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
1k 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
389 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 ...
9
votes
2answers
728 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 ...
8
votes
1answer
276 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
89 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
204 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
142 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
359 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
354 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
2answers
812 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
2k 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 ...
7
votes
1answer
52 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
94 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
257 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 ...
6
votes
2answers
148 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
486 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
1answer
273 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
2answers
2k 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
135 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
287 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
2answers
477 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 ...
5
votes
1answer
67 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
105 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
289 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
937 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 ...
5
votes
1answer
209 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
712 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
1answer
87 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
72 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
96 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
208 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
178 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
125 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 ...
4
votes
2answers
484 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
202 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
181 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
2answers
250 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
1answer
87 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
71 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
1answer
278 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., ...
4
votes
2answers
119 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
1answer
121 views

Expansion Issue with omit list provided to \DTLdisplaydb

In my DB the number of columns is rather large. Hence, I am trying to eliminate any columns which contain only 0 entries. The number of columns, nor the column keys, are know upfront. So, I step ...
4
votes
2answers
502 views

Tab separated files with datatool package?

The documentation of the package datatool says that the \DTLsettabseparator command changes the separator in .csv-Files from the default comma to the tab character. What it really does for me is ...
4
votes
1answer
242 views

How to draw and scale for large data values as a sparklines-like diagram with datatool & TikZ?

I want to draw rectangles by the measure of ++(1pt, 4pt) at (x, y) where x and y are based on external data, but I am unsure on how I can proceed to get a proper graph for this. The obvious ideal ...
4
votes
1answer
81 views

Spurious blank space when adding a member to a database within \foreach

The MWE adds blank space proportional to the maximum value of the \foreach iteration: Why is this and how do I eliminate this additional space? Note: This problem seems similar to an earlier ...
4
votes
1answer
265 views

One cell too many with datatool and longtable

I am aware of the previous post datatool with longtable, but it didn't solve my problem. I've a document with 10 tables or so, for each table I use this piece of code: \DTLsetseparator{;} ...
4
votes
1answer
130 views

Sort database with datatool

I use the datatool package to read CSV files and print them as tables. Before printing I want to sort the rows. The problem is that the file was written with R and some rows contain normal numbers ...