Questions tagged [datatool]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
13 views

Retrieve specific values from csv using Datatool and divide them by each other

So I am loading a csv file that looks something like this: est;dens;mwp ols11;0.1;. ols12;0.09;0.001 I want to use the following code to divide two numbers. I use the .csv in a table, but I also ...
1
vote
1answer
18 views

DTLminforcolumn not working with empty rows

I use datatool to parse a CSV file. I want to use the makro \DTLminforcolumn to calculate the minimum value of a column. This works fine if every row has a value, but not so much, if there are empty ...
1
vote
1answer
40 views

Create a sorted, three-column table from a single column in a CSV file

I have a CSV file that has various columns. One of the columns is called summits. This column contains multiple summits in the following form: Summit name (elevation m) For example Mount Everest (...
1
vote
1answer
27 views

\ifnum for datatool package

I'm trying to write quotes and depending on "males" selected, it needs to change the output. Unfortunately, in the example below it gives me 2skip although it should give me 2males. What am ...
0
votes
0answers
22 views

Access specific db rows with datatool

tl;dr: I am looking for the datatool equivalent of what, in pure SQL, would be SELECT MembershipType FROM members WHERE ID = 1. I have a problem with datatool. I can load and loop through my db with ...
0
votes
1answer
34 views

Attempt to add a select command to datatool running into Runaway error

In connection with a side project, I would like to add a SQL-like select and where to the datatool package. The \DTselect command would allow me to specify a list of columns and an existing table ...
2
votes
2answers
57 views

Using \DTLfetch inside a \href

I'm trying to create a new command in LaTeX that creates a Google Map URL pointing to the coordinates associated with the place specified as a parameter in the called command (a sort of "table ...
0
votes
0answers
21 views

A bubble-plot graph and labels from time series with repeating series data

I have a time-series and multiple lines for the same dimension (each for a diferente year). How can I get yticklabels from CSV data to have the right label at Y axis? I tried to set the labels using \...
0
votes
1answer
30 views

How to do custom ordering with Datatool

So I have some data for a rock climbing guide I'm writing. In the last page I want to list all the routes, sorted by grade. The thing is that the conventional sorting doesn't apply here. Quick ...
2
votes
1answer
27 views

Reading `xticklabels` from file: comma's do not split

The following is a MWE of a plot reading the xticklabels from a file. It works, but the comma's inside the string that is fetched from the file, don't split the string into multiple parts. How do we ...
0
votes
0answers
18 views

Displaying author names with initials of the first name with databib

I'm using the databib package to load a bib file but I can't find how to display the author's first name with initials (i.e. instead of John Doe display Doe, J.). \usepackage{databib} \begin{document}...
2
votes
1answer
45 views

Macro to apply a custom command to a conditional datatool definition

This is somewhat of an expansion of the previous question:Macro to apply a custom command across a comma-separated list I'm working on creating a garden journal in LaTex. I have a .csv database file ...
4
votes
1answer
69 views

Build glossaries from csv with datatool using with longnewglossaryentry

I'm trying to build a glossary from a csv using datatool and \longnewglossaryentry. I haven't been able to get this to work. Let's start with something that does compile: \documentclass[10pt, a4paper]{...
2
votes
1answer
38 views

Spreadtab and datatool

I would like to use the spreadtab package in combination with datatool to make calculations within a table. The data is coming from an external file; here is an example (scores.csv): FirstName,...
0
votes
1answer
44 views

Assign a variable for the key-assign-list of \DTLforeach

Please consider the following MWE-1: \documentclass{article} \usepackage{longtable} \usepackage{datatool} \newcommand*{\myKeyOne}{ID} \newcommand*{\myKeyTwo}{First-Name} \newcommand*{\myKeyThree}{...
0
votes
1answer
64 views

A database for a Psalter

I would like to create a book (to be exact a psalter). Basically it is a database issue. I have on one hand a tex document (to be exact currently it's still a word document) with all the psalms and on ...
0
votes
0answers
13 views

Code with “exam” and “datatools” to generate questions with random wrong choices + correct choice from database?

I have to make several questions with 3 wrong definitions and 1 right definition, that are inside a database. Supposing I have a file like this: color|object red|blood white|horse blue|sky I should ...
4
votes
3answers
111 views

How can I remove all rows with larger DTLrowi than 10?

I constantly receive an updated file (year.csv) which should be sorted as shown below. But only the first 10 rows (after sorting) should be shown. The MWE works and I can omit all rows with DTLrowi ...
1
vote
2answers
49 views

datatool DTLgetvalue using foreachitem

The following code is supposed to get values from the first row of mydata.csv and then copy values to a new empty row. I am using foreachitem to pass the key to the DTLgetvalue function. It compiles, ...
0
votes
0answers
34 views

sorting using multiple criteria using datatooltk

in LaTeX, using the datatool package, we can sort databases using \dtlsort and using multiple criteria. for small databases, this is fine -- the compilation time is minimal. for large databases, it ...
1
vote
0answers
19 views

error in \xdef and cedilla accent [duplicate]

Consider the following MWE1: \documentclass{article} \newcommand*{\myOwnCommand}{\c{C}engel} \begin{document} This is my surname: \myOwnCommand. \end{document} MWE1 works just fine. The cedilla is ...
2
votes
2answers
36 views

definition variables inserted as datatool arguments

I'd like to create tikzpicture (animated in fact) that would read numbers from text file and use them either as coordinates or nodes or for further calculations. It seems that datatool package would ...
0
votes
1answer
110 views

Use datatool to process input and pass it further to pgfplots to plot the data

to this question (pgfplots(table) spreadsheet like formulas) I got the comment that it could be done with the package datatool. But actually I have problems passing the data from datatool to pgfplots. ...
0
votes
1answer
37 views

Is it possible to tell datatool to ignore certain characters when sorting?

I am making a index as a ";" separated csv file. The index is sorted with the datatool package. The column which is sorted contains utf8 encoded names, including apostrophes, eg. "'Tis" and "ev'ry". ...
2
votes
2answers
47 views

I want to load data from a file and use it in a figure caption. I have a solution that works in some environments

I want to load data from a file and use it in a figure caption. Found this code (that I've modified slightly to demonstrate it's limitations) which does exactly what I want it to do when it works, for ...
1
vote
1answer
121 views

Serial letter from csv with table with multiple lines in one cell

I'm struggeling with creating a "serial letter" (not really a letter, but a document wich I will need different versions of for different people). I have all the data I need to insert in a csv file. ...
3
votes
1answer
51 views

datatool: separate data by class

I'm trying to classify laws by level (federal, state and local) and by theme (waste, sanitary sewage) and show it on a table. I wrote the follow MWE: \documentclass{article} \usepackage{datatool} \...
12
votes
4answers
2k views

What's the best way of typing the following 58 equations into LaTeX?

For an applied math setting, I need to write multiple inequality constraints into a LaTeX report which are all in the form x_{i} + x_{j} \ge 1. I've typed up what "i" and "j" are in an excel sheet ...
2
votes
2answers
45 views

Dynamically defined macros for each row in csv file using datatool produces erroneous results

Please see the following example. I thought that this would be pretty straightforward. But the processing seems to be delayed (or done in chunks) where erroneous results are being produced. \...
2
votes
0answers
47 views

Check if a datatool DB has an existing member

Using the code from How to check if a datatool db has an existing member with the same problem (build a datatool DB with unique strings) it works well as long if there is not an additional level (here ...
2
votes
1answer
140 views

Specify some region and align text in that space

I want to use package datatool for putting different names in one specified space of one image. Here for everyone's convenience I've formed a tikzpicture instead of image. Please see this minimal code....
1
vote
0answers
46 views

\rowcolor and nested loops with datatool package

I can't explain why using \rowcolor into a nested datatool loop gives this strange behavior: The code: \documentclass{article} \usepackage[table]{xcolor} \usepackage{datatool} \begin{filecontents*...
1
vote
1answer
51 views

if odd even number from datatool

follow topic tcolorbox: specific width and height settings for odd and even pages minimal code: \documentclass{article} \usepackage{datatool} \usepackage{filecontents} \usepackage[strict]{...
1
vote
1answer
105 views

algorithm Logic: Make Loop for each 3 rows in datatools

i want to make loop with process: Current: (with below code) each row create one page Box A, B, C: Same data from one row of datatool Need update: Create one page only \Break=break or each 3 ...
3
votes
1answer
71 views

Can DTLinitials access \fnames?

Question UPDATED with MWE Using datatool to read a CSV file into LaTeX, I am able to obtain first names using {\fnames=fnames}, and then print using \fnames. Sometimes, though, I would like to show ...
4
votes
1answer
54 views

Print range of many group rows in datatools

I use this code from this answer: \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{product.tex} %Type =1,2...10 No,Type,Name,Description 1,1,A1,D1 2,1,A1,D2 3,1,A1,D3 30,1,A1,...
1
vote
0answers
32 views

Where should the datatool package be loaded?

Trying to build the following MWE fails (at least here: TL2019, lualatex) \documentclass{article} \usepackage{fontspec} \usepackage{unicode-math} %\usepackage{datatool}%<-- loading the package ...
2
votes
0answers
59 views

Is there a way to create a database and extract data from it through a command?

I have looked up packages such as datatool, but I am not quite sure if they would be able to perform this function. The basic idea is that I would like to have a database similar to a bibtex file, ...
3
votes
1answer
92 views

update values in datatool

i try to update single values within a datatool DB. unfortunately, it only works for the first time. when i update the second values the first one will be also set to the value of the second one. when ...
1
vote
0answers
25 views

datatool: How to read out values, if *.table-format is given

I have an external file, named jobname.word.table (*.table-format!), with its content # aaa # bbb # x y type 3.1415927e+000 5.0000000e+000 i 2.0000000e+000 3.0000000e+000 i (BTW: I can not change ...
3
votes
1answer
83 views

How display next row before current row when use datatool?

i use datatool, and want display next data before current data, is possible? I need help in code "diplay here data of (AAACoding+1), CCCCoding+1...)" My Minimal Coding: \documentclass[a5paper,...
0
votes
1answer
30 views

Null/blank in last column when use datatools

i use datatools to create pdf But last column display Null or blank My minimal coding: \documentclass[a5paper,oneside,8pt]{article} \usepackage[a5paper,landscape,left=1.0cm,right=0.3cm,top=0.5cm,...
0
votes
1answer
262 views

Color rows with \rowcolor and datatool \DTLforeach loop

I try to obtain alternate colored rows (just like the table is shown in the figure) using the datatool package and the \rowcolor command. I am following the datatool user manual example for striped ...
1
vote
2answers
112 views

How to treat with dcolumn tabular format and colored values?

I found here this trick for formated text coloring for use with dcolumn package. However, it seems roughly redefine the \DC@endright statement and gives two wrong behaviours with values which have ...
2
votes
1answer
61 views

Replace zero with blank in datatool

I have merge 3 tables from code in link: merge 3 csv file and create new file Table E = Merge of 3 Tables (A,B &D) But how i can change cell in Table E = 0 with blank? If cell in Table A, B, D ...
3
votes
1answer
156 views

Display Box A or Box B if then condition

I am using datatool and want to display \posterbox A, hide box B if \TextA = value, if \TextA = blank display \posterbox B and hide box A. Box A & Box B are different: Image, item, color, ...
1
vote
1answer
94 views

merge 3 csv file and create new file

i read topic: Merge two .csv files and add missing rows? And i want change some things when i merge 3 different files This minimal working example: \documentclass{article} \usepackage{filecontents} ...
3
votes
1answer
62 views

Text instead of dotted line if text is not blank

I use datatool. And I have this flow: if text A or text B is blank, a dotted line is displayed if text A or text B is not blank, a dotted line is removed and text A/text B is displayed My ...
0
votes
1answer
50 views

How to replace last comma by dot after last encountered word?

My question is related but with some complication. How to replace last comma by dot after last encountered word? % !TeX program = pdflatex % !TeX encoding = utf8 \...
1
vote
1answer
31 views

How to replace last comma by dot in comma-separated words from datatool's database?

How to replace last comma by dot in comma-separated words from datatool's database? Can it be done without calculating the number of entries in the database? % !TeX program = pdflatex ...

1
2 3 4 5
7