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.

1
vote
1answer
45 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
24 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
91 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
25 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
15 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
113 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
81 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
24 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
29 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
82 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
26 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
37 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
40 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
316 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
35 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
82 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
78 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
21 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
70 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
56 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
69 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
36 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
35 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
54 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
88 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
63 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
68 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
91 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
116 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
140 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
44 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
363 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
49 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
160 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
165 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
372 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
186 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
112 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 \\ ...
3
votes
1answer
88 views

DTLgetvalueforkey works, but DTLfetch doesn't

In the following example \DTLgetvalueforkey retrieves the information without problem, while \DTLfetch fails: \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{data.csv} ...
1
vote
0answers
43 views

datatool & etoolbox - more expansion shenanigans

This is the code in question: \documentclass{article} \usepackage{etoolbox} \usepackage{datatool} \usepackage{longtable} \usepackage{fp} \def\initialValue{10} \DTLnewdb{thisEntryDBWarehouse} \...
3
votes
2answers
123 views

How do I get datatool to play nicely with utf8 inputenc and non-ASCII in the incoming CSV?

If I try to compile the following LaTeX file: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{datatool} \begin{document} \tableofcontents \appendix \section{Bill of Materials} \...
2
votes
1answer
87 views

TikZ: Using imported data to customize node and path styles

I would like to automatically adapt the features of a flow diagram depending on my data. Here the example is for line widths, but I would like to use the same principle also for node sizes. I have ...
1
vote
1answer
115 views

Sorting data in datatool depending on argument

I'm pretty new on latex programming (I used quite a lot for writing text). I'm trying to insert data on a datatool database and then sort the data according to one of the fields. However, if this ...
3
votes
1answer
44 views

Tables, Datatool: use “&” in true part of \DTLif

I am trying to create a table with two different types of rows using a csv file. The csv looks like this Data1,Data2,Data3 Caption1,, Value1,Value2,Value3 Value4,Value5,Value6 Caption2,, Value8,...
1
vote
1answer
47 views

Output of a tex file is sorted tex file after compilation?

I am using data tool to create the database of questions, where I provided Tag to every question. All database files(50 files) are included in one master file while compiling.After compilation output ...
2
votes
1answer
171 views

when loading a new database in datatool only the first key works

I try to load a .csv into my .tex using datatool, but it uses only the first given key and I just don't get why. first lines of my example foobar.csv: 1;a;ax 2;b;be 2;c;ck 3;d;do (at the end the ...