Stack Exchange Network

Stack Exchange network consists of 175 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.

2
votes
0answers
28 views

Using package datatool in standalone class

I wish to use package datatool in the standalone class (or with the standalone package, whichever works). I want datatool to print each row in the csv file on different page and standalone to crop ...
0
votes
1answer
40 views

Add created parameters in child file to main.tex

My code/idea from 2 topics: Input a parameter from another file filecontents: select rows of group to display File parameters.tex: \documentclass{article} \usepackage[utf8]{vietnam} \usepackage{...
3
votes
1answer
42 views

Possible Bug in passing variables from CSV

I think there's a bug in calling decimal numbers from CSV files. Have a look. Create a Folder. Add a CSV file called texDemo.CSV with the following in it. UniqueID,Name,DecimalPercentageComplete,...
2
votes
1answer
20 views

Macro for expanding macro arguments to gb4e's \gll

This is a followup question to Problem with gb4e's spacing when using datatool, where I was trying to loop over glosses stored in a CSV with datatool and print them with gb4e's \gll. The issue was ...
1
vote
1answer
39 views

When DTLforeach is used with a condition, DTLiflastrow does not work

In the following code, my dataset is {1,2,3,4}. With no filter, DTLiffirstrow will return true at "1" and DTLiflastrow will return true at "4". This is what I expect from these functions. When I ...
1
vote
1answer
31 views

How to make tikz macro work with two arguments in this MWE?

I want to generate a table from a csv file using the very helpful tool datatool and insert a round photo of each person surrounded by a circle, the color of which should be taken from the provided csv ...
2
votes
1answer
63 views

Plotting a smooth curve in 3D from external coordinate file

I want to create a 3D plot from previously calculated coordinates saved in a file, like "xz.dat". This contains the data as : x z 0.5 0 0.54 0.01 0.58 0.01 0.62 0.02 0.66 0.03 0.7 0.03 0.74 0.04 0....
12
votes
3answers
448 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 ...
5
votes
4answers
96 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
53 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
37 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
28 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
96 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
61 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
39 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
101 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
33 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
22 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
125 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
141 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
28 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
34 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
127 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
31 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
45 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
326 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
38 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
89 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
86 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
33 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
41 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
74 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
60 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
76 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
41 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
62 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
101 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
25 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
73 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
73 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
118 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
131 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
0answers
166 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
46 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
369 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
66 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 ...