Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [datatool]

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

12
votes
3answers
408 views

Populate information from a csv file into a LaTeX document (specifically into the fields/arguments of commands therein)

I have some personal information stored in a plain CSV file personal_info.csv in the following format: personal_info.csv 83 Fancy Avenue,Nowheresville,Gotham City 24061 123 456 7890 someone@xyz.com ...
1
vote
0answers
19 views

Package Data Tool Error Latex DTL foreach cant assign [closed]

I'm trying to read data from a CVS file. I tested if the DTLloaddb command is working. It is working. The problem is now, that i want to read the lines from the data. It has also created a header. ...
5
votes
4answers
81 views

use foreach to read columns from a csv file?

How can I read columns from a external csv file using a foreach statement? e.g. if the content of the csv file is as follows: {0,0,0},black, {1,1,0},yellow, {1,0,1},pink And I would like to use it ...
1
vote
1answer
45 views

pgfplots/datatool: automatic standard error ellipse calculation and plotting

I am looking for a way to automate the process of calculating the standard error ellipse from tabular data in pgfplots. In some sense, this is a generalization of this question and this one I assume ...
2
votes
1answer
34 views

Use datatool input to enable beamer frame

I want to use the value of a flag imported from a datatool database (stored in an external .csv file) to enable (or disable) a beamer frame. The .csv file is of the form: \begin{filecontents*}{test....
0
votes
1answer
26 views

Creating invoice iterating over a database with datatool

I'm trying use datatool to iterate over a CSV file in order to create an invoice. This is what I have: \documentclass[12pt]{letter} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{...
2
votes
1answer
91 views

Create invoice retrieving data from a CSV file

I'm trying to assemble invoices based on CSV data. I found this example: Combining invoice and datatool to create serial invoices This is the code: \documentclass{letter} \usepackage{invoice} \...
0
votes
0answers
28 views

How to fill in a tex template using csv file (datatool and subfile packages?) [duplicate]

I would like to create several index cards from information stored in a csv file, such that for a csv file such CSV.csv{ name,letter,LETTER,number Name1,a,A,1 Name2,b,B,1 Name3,c,C,1} I get single ...
1
vote
1answer
55 views

LaTeX is not working fine with Datatool

I created Database of questions in LaTeX using datatool (named nayi17n-ii) as shown below \DTLnewdb{CS2} \long\def\newproblem#1#2#3#4#5#6#7#8#9{% \DTLnewrow{CS2}% \DTLnewdbentry{CS2}{seq}{#1}% ...
3
votes
1answer
33 views

Datatool: File ended while scanning use of \@dtl@next

I am trying to operator on a CSV file on a row-by-row basis with the following dummy code. \documentclass{article} \usepackage{datatool} \usepackage{filecontents} \begin{filecontents*}{data.csv} x,...
3
votes
1answer
99 views

Modifying A Specific Example of Interlinear Text and Running it on Tex Live 2018

I am trying to modify this specific solution to interlinear texts, which I found here. % !TEX TS-program = XeLaTeX \documentclass[11pt]{book} \usepackage[margin=1in]{geometry} \usepackage{titlesec} \...
0
votes
1answer
32 views

\DTLfetch not working with Variable

I have csv database loaded in data variable. I am trying to fetch value from particular column given an another column name and its value. I am using following code \forloop{i}{1}{\value{i} < 30} {...
1
vote
0answers
18 views

How to load a non-separating comma with datatool/DTLloadrawdb

I would like to load in a key,value type list using \DTLloadrawdb: \DTLloadrawdb{vars}{"variables.txt"} variables.txt: key,value customerName,Acme Corp customerAddress1,1600 Pennsylvania Ave NE ...
3
votes
2answers
122 views

How to align the last element on the right when using \hfill?

I am making a wine list from a CSV file (see my first question here: How to import data from excel and format it as text in LaTeX?) and I need to align the prices on the right. To do this, I used ...
2
votes
1answer
106 views

How to calculate a contingency table?

I am trying to calculate a contingency table of two discrete variables name and location. Missing levels should be 0, while each cell should be the count of each name-location combination. My initial ...
2
votes
1answer
26 views

How to count discrete variables in a dataset?

I am trying to count how many times each gender occurs in the table. The I would like to print those values inline with the rest of the text (I don't need any tables, but I am \documentclass{article}...
0
votes
0answers
23 views

How to count the number of occurences using datatools?

I have a db create using datatools, and I would like to print the count of all the occurences of "value" in the column "ColumnName". How do I to it? I can filter and print all the values that match ...
1
vote
1answer
33 views

Package datatool Error: \DTLforeach nested too deeply

I'm using datatool, and I have tried to nest the \DTLforeach function four times, to create multiple tables from various csv files. Naturally the title error comes up. How come the \DTLforeach ...
1
vote
1answer
106 views

Highlight maximum values for each row in large csv

I am loading a rather large .csv file (>100 rows) that I need to print in longtable format and highlight the maximum value in each row. I found this thread Highlighting Extremal Values in Table which ...
1
vote
0answers
30 views

Conditional execution based on existence of key/value pair in datatool

This question is a confirmation and a follow-up using the code from this question I'm preparing a template, which relies on some texts which will be provided in a CSV file (ex, disclaimer text, large ...
2
votes
1answer
41 views

Case insensitive data fetch (DTLfetch) with package datatool

In one of my setup, I'm making simple setup for my users, meaning that most of the strings are saved in a data tool DB, and they can retrieve it by activating a command. So I've created simple ...
1
vote
2answers
44 views

\DTLifinlist crashes when used with \dtlexpandnewvalue & the character 'é'

The following code gives the error ! You can't use `macro parameter character #' in horizontal mode. \DTLifinlist ...4->\def \@dtl@doifinlist ##1,#1,## ...
4
votes
2answers
322 views

How to extract the currency symbol?

Within the Datatool package, we find the currency data type. A currency data type is a currency symbol followed by an integer or real number. How can I extract the currency symbol out of a currency ...
2
votes
3answers
37 views

Vertical spacing with \cmidrule with datatool table

I would like to insert a cmidrule when I have an empty line in a table produced by the datatool package and also use \bottomrule. Both of these yield excess vertical space above the line: How do I ...
4
votes
1answer
87 views

Creating nice form letters for nontechnical users

I am trying to create a more complicated template but created this short example to document what I really want to do. I want to create a form letter where the user will not see any complicated stuff ...
3
votes
4answers
83 views

Pass value from newcommand to siunitx

I have the following MWE \documentclass{standalone} \RequirePackage{luatex85} \usepackage{fontspec} \usepackage{siunitx} \usepackage{datatool} \usepackage{filecontents} \begin{filecontents*}{myfile....
2
votes
0answers
27 views

Search paths for DTLloaddb from datatool

I have a couple of CSV files I read via DTLloaddb. And these files are scattered over multiple folders. So far, DTLloaddb seems to require a direct (absolute or relative) path to the filename. Is ...
2
votes
1answer
37 views

\MakeUppercase fails to capitalize macro retrieved via \DTLfetch from datatool package

Problem statement When I try to apply the \MakeUppercase command to a macro whose value is retrieved from a .csv table via \DTLfetch from the datatool package, I get a compilation error. I am ...
2
votes
1answer
72 views

Expansion of siunitx glossary entrys using a csv file

I'm try to create a custom latex class based on scrbook. I make heavy use of glossaries for my math symbols, for which pdftool tips are created showing the description and units when a mouse pointer ...
1
vote
2answers
59 views

Bad view of a long table

I dont know why this works bad on the last line. main.tex \documentclass[11pt]{article} \usepackage{ifthen} \usepackage{longtable} \usepackage{ragged2e} \usepackage{datatool} \DTLsetseparator{;} \...
0
votes
1answer
71 views

How to automatically generate a Glossary without explicit references in the text?

Question How is possible to automatically create a glossary with name, definition and each page in which the current word is present in a set of tex files (more than one), without explicit references ...
1
vote
0answers
38 views

Dynamic datatool group by

I found this code in datatool group by? \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{ff14.txt} ClassID; Schueler_Name; Schueler_Vorname; Subject 5a; Stiner; Markus; Big ...
1
vote
1answer
36 views

datatool loses the first space in a row [duplicate]

Here my code: As you can see on the image, the first space is squeezed; I don't understand why. \documentclass{article} \usepackage{datatool} \usepackage{colortbl} \begin{filecontents*}{...
4
votes
0answers
58 views

tcolorbox longtabu breakable don't repeat the header

I make a long table using tabu in tcolorboxenvironment but I do not manage to get the headline repeat on the second page : I try with and without endfirsthead \documentclass{article} \usepackage[...
3
votes
2answers
96 views

CSV file and QR codes

I have a .csv file with some URLs. First I want to store each URL in a variable. Second I want to print the variables in QR codes. What's the easiest way to do this? MWE \documentclass{article} \...
1
vote
1answer
22 views

Glossaries always gives last entry of csv-list when processed with datatool

Ok, I am clearly missing something but I cannot figure out what is wrong. All is fine concerning the \gls{}-entries, but in \printglossary I only get the last entry of the .csv-list. \documentclass{...
1
vote
1answer
69 views

Merging different dbtex database files

I want to merge 2 database files in one file . I tried loading files 11g.dbtex and 2005it.dbtex as shown below \documentclass[a4paper,9pt]{article} \usepackage{amssymb,amsthm} \usepackage{amsmath} \...
1
vote
1answer
71 views

Importing database (created using datatool) to datatooltk

I have created database (very large database) of questions using datatool as \DTLnewdb{finitemath} \long\def\newproblem#1#2#3#4#5#6#7#8#9{% \DTLnewrow{finitemath}% \DTLnewdbentry{finitemath}{seq}...
2
votes
1answer
103 views

datatool: How to load a table from file, rotate or not, then impose predefined headers

This is a follow-up question to my previous one. In this one, I would like to tackle two cases: First, load the table as it is while just imposing my own column and row headers. Second, load the ...
6
votes
1answer
121 views

How to load a table from file, then transpose it and replace its headers if any?

If I have two types of databases; the first one has raw data with row and column headers, while the second one has only raw data. I would like to get the desired output shown below through: 1- (in ...
4
votes
1answer
155 views

Checkboxes and TextFields within Datatool csv tables

I've got a sample csv table with three columns - Pet, Names and Number. It's a list of Cats and Dogs, their respective names and the occurrence of each name. i.e. The order of Cats or Dogs in the ...
1
vote
1answer
45 views

How to get related information from a database?

Hello friends I am not able to get or link the content of Core-1 to look up table content of Core-1 is ENGL when i used \coreOne i am getting output as ENGL, so what will happen if i use \coreOne (i....
3
votes
2answers
365 views

How to find the smallest number from a given set of numbers?

Is there any package or macro that implements getting the smallest number from a given row of numbers? using ifthen package. I was not able to get it. Here is my MWE. \documentclass[a4paper]{...
0
votes
0answers
58 views

datatool, import from same file or subfile

is it possible to import a database from a normal tabular in the same file or subfile? im thinking about something like this: \documentclass{article} \begin{document} \begin{tabular}{ccc} C1 & C2 ...
1
vote
1answer
183 views

Import CSV file generated from Excel To LaTeX with Datatool with accent

I'm trying to import a .CSV file generated with excel that contais special characters as á, é, í, ó, ú. I'm using \DTLloadrawdb, but these characters still don't show. What is the magic trick to do ...
1
vote
0answers
192 views

Package datatool Error: Can't assign \company : there is no key `*' in data base `*'

Hy, i'm having problem with the \DTLforeach in my table. LaTeX returns the following error: Package datatool Error: Can't assign \company : there is no key Company' in data baseprodutosAloe'. ...\...
0
votes
1answer
419 views

datatool error ! Missing number, treated as zero. <to be read again>

My sample.tex is - \documentclass{article} \usepackage{datatool} \DTLloaddb{coefficient}{coefficient.csv} \begin{document} \DTLfetch{coefficient}{academicYear}{Estimate} \end{document} and ...
5
votes
2answers
198 views

Error with latest version of datatool package

With the latest version of the datatool package, if I compile this file \begin{filecontents*}{\jobname.csv} x,y 11,12 \end{filecontents*} \documentclass{article} \usepackage{datatool} \DTLloaddb{...
3
votes
1answer
133 views

Alignment in first row, first column of table generated by DTLforeach

I have a simple table: \documentclass{article} \pagestyle{empty} \begin{document} \begin{table}[ht] \centering \begin{tabular}{c c} \hline\hline x & y \\ [0.5ex] \hline 1 &...
1
vote
2answers
53 views

How to retain certain LaTeX commands in a datatool database?

I'd like to create the following table using datatool: \documentclass{article} \begin{document} \begin{tabular}{ *{3}{r} } \bfseries FieldA & \bfseries FieldB & \bfseries FieldC \\ ...