Questions tagged [datatool]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
23 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
17 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
39 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
65 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
25 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
29 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
39 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
12 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
106 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
36 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
24 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
17 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
32 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
82 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
34 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
41 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
81 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
47 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 ...
0
votes
0answers
27 views

DataTools: dtliflastrow doesn't work as expected

At least one article from a long time ago seems to indicate that \dtliflastrow doesn't work as expected - it gets the second last row: Equivalent of \DTLiflastrow I'm trying to use it in a very ...
2
votes
2answers
41 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. \...
0
votes
0answers
29 views

Select certain rows from database using datatool

Please see the example below. I want to select certain rows from the database based on values of Tag. \documentclass{article} \usepackage{filecontents} \usepackage{datatool} \begin{document} \...
2
votes
0answers
44 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
136 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
40 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*...
0
votes
0answers
28 views

Fetching data from a particular cell of spreadsheet using datatool into LaTeX

I have been learning about using datatool and datatooltx to import csv/spreadsheet into texdb and use it for LaTeX and I found how to fetch a particular row of the spreadsheet, but I need to fetch a ...
1
vote
1answer
46 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
70 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
52 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
31 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
58 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
79 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
23 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
76 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
27 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
221 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
106 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
50 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
125 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
84 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
61 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
43 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 ...
4
votes
1answer
149 views

Overhanging vertical bars in tabular

My question stems from an adaptation of the solution shown here : Generating lists and tables of items from commands in the document The idea is to sum up the reviews of a given document in a table. ...
2
votes
0answers
50 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
60 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
82 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
35 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 ...
2
votes
1answer
182 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
2 3 4 5
7