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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Questions tagged [datatool]

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

2
votes
1answer
25 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
34 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
304 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
26 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
79 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
71 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
16 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
36 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
41 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
55 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
57 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
35 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
32 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
49 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
80 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
18 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
54 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
59 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
69 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
98 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
115 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
42 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
360 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
45 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
136 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
123 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
231 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
163 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
94 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
49 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 \\ ...
2
votes
1answer
68 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
39 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
102 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
80 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
86 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
37 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
46 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 ...
1
vote
1answer
121 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 ...
0
votes
1answer
45 views

How to make \ifdefempty on datatool entries work in \longtabu?

I have a .csv-file, which I want to make into a table using the datatool-package. The .csv-file ist structured like foo&bar&foobar where several lines are grouped together and only the first ...
3
votes
2answers
121 views

How to find the position of a word in a jumbled sentence?

I have an initial sentence: The quick brown fox jumps over the lazy dog. I have a new sentence (which is always a jumble of the original sentence): The lazy dog jumps over the quick brown fox. In ...
0
votes
1answer
378 views

display a csv file in LaTeX [closed]

How can I link a csv file, and display the data in separate columns ? \documentclass{article} \usepackage{makeidx} \usepackage{datatool} \DTUoaddb[keys=c1,c2,c3]{ctext}{csvtext.csv} \begin{document} \...
5
votes
3answers
167 views

How to generate key value macro from csv file?

I have a CSV file with key-value pairs, and I want to be able to read the file into latex, and generate macros to access the values. Here is my current attempt with datatool: \documentclass{article} ...
1
vote
1answer
102 views

Datatool \DTLnewdbentry does not take value for key column

I am quite frustrated about the following: Iam writing a document with requirements which have requirement IDs as a beginning of a line (I'm using these in an enumerate environment). I want to collect ...
1
vote
1answer
79 views

Custom Alphabetic CSV Sorting (Turkish Characters)

I have a CSV list with Turkish names and ages. I want to sort it in ascending alphabetical order. However, Turkish characters seem to break the sorting. Another question would how to insert line ...
1
vote
1answer
47 views

How to make uppercase letter from data reads from .csv file using datatool?

I want to make the data from \g to be converted to uppercase letter then I want to use that data for comparison commands like \IfStrEq{\g}{F}{}{} because in \g it may contain f or F; if it contains f ...
0
votes
0answers
44 views

datatool choose specific data

I have a .cvs file that looks something like this a,b,c,d,e,f,...,aa,bb,cc,dd,ee,ff,...,aaa,bbb,.... A,B,C,D,E,F,...,AA,BB,CC,DD,EE,FF,...,AAA,BBB,.... I would like to make tables of the form <...
1
vote
1answer
69 views

Unable to truncate total sum of a row in longtable

I was able to truncate the last row using \DTLtrunc command but this command is not working for last column to truncate the number, here is my MWE. \documentclass[10pt,a4paper,landscape]{article} \...
0
votes
0answers
65 views

How do I remove extra row generated in longtable? [duplicate]

I don't know why this happen in longtable its generated extra row at the bottom of the table which is unwanted row, Please somebody help me to solved this problem here is my MWE \documentclass[10pt,...
7
votes
2answers
485 views

How to count the occurence of M and F in a particular column , No. of male and female deaths?

how to command LaTeX to count occurence of M and F in a particular column of a table from first row to last row of a particular column? And also the number of Male Deaths and Number of Female Deaths, ...
4
votes
1answer
96 views

datatool package: wishing for keys / column names with special characters, can't get it to work

I wish to read a CSV file that has special characters in the headers. While I got what the documentation says about special characters in the body of the file, I couldn't get it to work for the column ...