Questions tagged [datatool]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
32 views

How to expand from DLTforeach prior to function call

Apologies if this is a trivial problem, I've seen a lot of similar posts, but i have not been able to solve this. Setup: I have created a table based on this answer. I have created a function for ...
Malle's user avatar
  • 3
1 vote
0 answers
51 views

How can I use DTL data to configure a pgfplots axis?

I am importing key-value pairs from a dat file using the package datatool like this: \DTLloaddb[noheader, keys={k,v}]{data}{data/data.dat} \newcommand{\var}[1]{\DTLfetch{data}{k}{#1}{v}} After that, ...
Ferb300's user avatar
  • 11
0 votes
0 answers
27 views

Building an author list using datatool in scrartcl

I am basically trying to rebuild the revtex4-1 author environment using the datatool package in a scrartcl document. The point of this is to be able to eventually read in a large list of authors from ...
aon2113's user avatar
1 vote
0 answers
39 views

Overlaying different text boxes onto tiled images

I have used this solution from How to make postage stamp sheet?, I can scale my image, produce any type of image tiling pattern and define exact cutting guides, I would like to have some other ...
CPF's user avatar
  • 11
2 votes
1 answer
32 views

Appending an empty row every chunk of five rows using the datatool package

Do you know a way to insert an empty row every multiple of 5 using the \DTLforeach command? Please test this minimal code: \documentclass{minimal} \usepackage[utf8]{inputenc} \usepackage{datatool} \...
JJ Henry's user avatar
  • 403
0 votes
1 answer
32 views

Package hyperref Warning: Token not allowed in a PDF string. Using value from CSV in TOC

I am using datatool to read csv file and get values from it. I also want to use these values in a chapter names. I have no problems with TOC and pages. I can see values from my csv file. But bookmarks ...
Sergei Zinovyev's user avatar
2 votes
1 answer
40 views

Macro Inspected with \show Command Isn't Properly Evaluated

I'm building a class which can read a CSV file and output an invoice document using datatool and tabularx. % file "invoice.cls" ... \newcommand \invoice{ % load invoice table database \...
Isaiah Rondeau's user avatar
0 votes
0 answers
40 views

Fill a database using datatool with index in first column, twice the index in second column, and incrementing the index in each iteration of a loop

I would like to fill a database using datatool with an index in the first column, twice the index in the second column, and incrementing the index in the first column in each iteration of a loop. The ...
Marco Moldenhauer's user avatar
0 votes
0 answers
45 views

Datatool and Tabularray: "Misplaced alignment tab character &." [duplicate]

I'd like to use datatool to populate a longtblr table (defined by tabularray) with data. I expected this: \documentclass{article} \begin{filecontents*}[overwrite]{data.csv} Key,Value a1,a2 b1,b2 \end{...
seanakabry's user avatar
0 votes
0 answers
44 views

Is there a way to make \DTLloaddb load not from external files? [duplicate]

The journal has a rule that forbids loading external files and the entire tex file must be self-contained in a single .tex file. Therefore all \DTLloaddb{aaa.csv} must be replaced. Is there a way to ...
he wei's user avatar
  • 23
2 votes
1 answer
49 views

Data from file when variable number of data

I am using the datatool package in order to get data from a csv to LaTeX pdf pages: \documentclass{article} \usepackage{datatool} \begin{document} \DTLloaddb{data}{students.csv} \DTLforeach{data} {\...
user1583209's user avatar
0 votes
0 answers
20 views

Contents imported from csv file goes beyond the page below

I want to create a one-word Q&A document. I imported the contents from a .csv file which has 104 rows, the contents go below the page and not to the next page. How do I rectify it? \documentclass[...
Srini Vasan's user avatar
1 vote
1 answer
76 views

Read .txt database (with datatool package) and format numbers with siunitx package

I have a variables.txt file with the following content: comp,232.429342 iva,1.9584000000000001 These are variables imported from a main.py file. Using the datatool package, I have made a macro to ...
justinpiconb's user avatar
0 votes
0 answers
48 views

How to apply a dynamic name for a key in DTLforeach*?

I want to create a new command to quickly get the amount of values of a filtered column. My MWE is: \documentclass{scrbook} \usepackage{datatool,xstring,siunitx} \begin{filecontents*}[overwrite]{PI....
lukascbossert's user avatar
1 vote
0 answers
22 views

Is it possible to change cell color conditionaly in datatool?

I have a .csv which is something like this: N,A,B 64,50,64 128,128,120 Reading it with: \begin{table}[ht] \footnotesize \DTLloaddb{mytable}{mytable.csv}% Load CSV data \centering \...
aripod's user avatar
  • 97
2 votes
1 answer
55 views

issue with DTLpiechart in last version (3.1.9b)

I have an issue with last version and same code works in version 3.1.5b. Package: tikz 2021/05/15 v3.1.9a (3.1.9a) datatools version : 2.32 $ cat /tmp/fruits.csv Name,Quantity "Apples",...
flav's user avatar
  • 4,644
1 vote
1 answer
57 views

Use datatool to create circuitikz IC documentation from external file

I'm hoping to store data for N number of integrated circuits in simple CSV files and have the corresponding file drive the LaTeX document upon compile. See my MWE below and you see what I like to ...
Jimmy Westberg's user avatar
1 vote
1 answer
62 views

When displaying a datatool-database with \DTLdisplaylongdb - how to obtain a horizontal rule atop of the table-heads?

When displaying a datatool-database with \DTLdisplaylongdb - how to obtain a horizontal rule atop of the table-heads? Whatever I try yields error-messages about ! Misplaced \noalign. (Besides this I'd ...
Ulrich Diez's user avatar
  • 27.5k
0 votes
1 answer
87 views

How to change the delimiter for last item using datatool?

This is a follow up question on two other questions I am struggeling with: How to change the delimiter for a final item in a clist? Looping through values from other database using the ID (primary ...
lukascbossert's user avatar
4 votes
2 answers
262 views

How to use DTLforeach (datatool) within a tabularray table?

After having populated a datatool database (EarlyCareerPhD) I would like to sort it and print its content within a tabularray-table. I am aware of expanding macros within tabularray but expanding ...
lukascbossert's user avatar
0 votes
0 answers
64 views

Looping through values from other database using the ID (primary key) with datatool (using expl3?)

I have set up a database structure for projects and people. The aim is to have the IDs of the people as a value stored in a column of the project database. Now I would like to refer to the people, ...
lukascbossert's user avatar
1 vote
0 answers
191 views

Template to write cheque

I would like to use latex to write cheques as perfect word placement is only possible with it. For this, I would require to do following things Set page size to cheque size Write current date in ...
Vaibhav's user avatar
  • 6,545
1 vote
0 answers
25 views

where should my .csv file be for the package datatool to read it?

I apologize for the newbie question. I just started using LaTeX. Where should my .csv be located if I want the package datatool to read it? I am so sorry for posting such as question.
monstermash's user avatar
0 votes
1 answer
116 views

How to extract year from date in iso 8601 format?

I want to extract the year (or day or month) of a date which is stored as ISO 8601 in a database. My MWE looks like: \documentclass{article} \usepackage{xstring} \usepackage{datatool} \newcommand{\...
lukascbossert's user avatar
5 votes
2 answers
189 views

Merge comma separated lists from Datatool

I have tried solving this for some time now but can´t seem to find the solution. I have a document that loads data from a CSV-file using Datatool and I have been trying to combine comma separated ...
Softest's user avatar
  • 77
1 vote
0 answers
150 views

Storing file paths and names in an array or list for use as arguments for \catchfilebetweentags or \insertgraphics [closed]

EDITED SOLVED---Thanks @Skillmon I have a multitude of compartmentalized tex files each with three tags (all built from the same template with the same tag names). The files are 20001.tex, 20002.tex,.....
TheBeeTee's user avatar
1 vote
1 answer
35 views

Add name and number from data file to each icon

Thank you for this solution of Jasper Habicht - in related topic: Simplify code for repeating same image How can I add No and Name (from my data.tex file) under each image (and maybe use the datatool ...
latexforti's user avatar
  • 2,021
0 votes
0 answers
43 views

create multi column (icon and text) from database

i create pdf file from my data file (see image) Now i want to create multi column with icon and number (get from data file) logo | logo | logo number 1 | number 2 | number 3 logo | logo | logo number ...
latexforti's user avatar
  • 2,021
0 votes
1 answer
46 views

Checking if tikzmark exists on page inside datatool dtlforeach

I would like to check that a list of nodes loaded in a DTL database exist on the current page, where each node has a tikzmark. Including a \iftikzmarkoncurrentpage inside a \DTLforeach returns a ...
Legba's user avatar
  • 3
1 vote
2 answers
421 views

How to make a table from text file?

I have a text file, where every line is a question. I want to take this file and make a questionnaire with it, so I need a loop that takes each line and makes a table line with it, along with a True/...
Mauro F.'s user avatar
  • 113
0 votes
2 answers
56 views

Get all values in one column associated with the unique values in another column in a Datatool database

I want to get for each of the unique values of one column (eg, country) all the corresponding values of another column (eg, town). I need to use Datatool for this, as the db changes. For instance in: \...
augusto's user avatar
  • 57
1 vote
1 answer
97 views

Obtain unique values of multiple specific columns from a datatool database

How can I get all the different values of a specific column in a datatool database and the corresponding value in another column? In the following example, I want to get as output: A city of Xland in ...
augusto's user avatar
  • 57
1 vote
2 answers
38 views

Obtain all values of a specific column matching a criteria in a datatool database

How can I get all the names matching a particular value in another column (eg, all names with age 20 are Adam, Dora, Franz)? Name,Town,Age Adam,Xcity,20 Berta,Ytown,30 Cesar,Ztington,40 Dora,Ztington,...
augusto's user avatar
  • 57
1 vote
1 answer
282 views

Generating a caption for the figure automatically

I have hundreds of pictures included in latex file. Is there any way, how to create a caption for each automatically? e.g. file picture1 would have generated a caption picture1. \begin{document} \...
Luctex's user avatar
  • 21
1 vote
3 answers
127 views

Reading stored table lines with @starttoc: Problems with superfluous spaces

I want to store table lines with \addtocontents and generate a table afterwards from this entries with \@starttoc. Because \@starttoc uses \begingroup and \endgroup it makes problems with tables (! ...
Cryptkeeper's user avatar
0 votes
1 answer
52 views

Using Data to drive Player (Name, Shirt#) and Position( e.g. Goalkeeper, Center Forward) etc. variables to set up Soccer Lineup

I have a soccer field template and then I have a hardcoded listing of parameters I use to set up their position on the soccer field. I am using 3 parameters :: Jersey Number, Player Name, (First ...
Saupa's user avatar
  • 1
3 votes
1 answer
93 views

Misplaced noalign with datatool and booktabs

I experience a (I’m afraid not so original) “Misplaced noalign” with the following example. \documentclass{article} \usepackage{booktabs} \usepackage{datatool} \begin{document} \DTLnewdb{mydb} \...
Olivier Cailloux's user avatar
3 votes
2 answers
263 views

datatool creating a matrix with 3x3 data \ DTLforeach

I am using datatool package. Several csv files with data are generated in my project and I create index.csv to use Nested \ DTLforeach. I do not understand how I can assemble a 3x3 / 3x4 or 3x5 matrix ...
Forest Selton's user avatar
2 votes
3 answers
153 views

Join databases with datatool

I'm trying to get a function that can take a variable amount of csv files as an argument, and then join them into a single database for Latex's datatool. The databases are all in a uniform format (...
Sharky Bamboozle's user avatar
0 votes
0 answers
53 views

Appending Text to Each Line of an External File Using expl3 Syntax

Let us suppose I have an external questionfileone.tex file where each line of this external file represents a particular question text. It is something that I can use, for example, as a test database ...
beethovengg14's user avatar
1 vote
1 answer
75 views

datatool writes renewcommand instead of updating it

In my MWE I want to update a command via \renewcommand, but instead datatool writes my updated command to the output. In addition my \ifthenelse seems to be always true and therefore execute the "...
Lukas's user avatar
  • 609
5 votes
1 answer
248 views

How can this complex command be broken down and explained for someone starting with Tex?

I got this Tex command, as a solution to a different problem and it works. But I have trouble understanding the details of how it works since I'm not that proficient in Latex coding and I want to ...
Sharky Bamboozle's user avatar
0 votes
1 answer
133 views

Is there an equivalent of datatool's \DTLifhaskey for value?

I'm looking for a way to test if a (non-key) value in a column does exist. I basically want to check if \DTLfetch{db name}{col1 name}{col1 value}{col2 name} is giving me a value from the db or an '...
Sharky Bamboozle's user avatar
2 votes
2 answers
174 views

datatool's \DTLfetch returns last found value instead 'Undefined Value' if entry is not found

I want to have some condition of what to do if the key that was provided is not in the db. But \DTLfetch does return a value in case it had found one before. How can I catch all the 'x' in this ...
Sharky Bamboozle's user avatar
0 votes
1 answer
54 views

Return type for \newcommand probably doesn't fit \DTLfetch?

I want to fetch from the csv file with a boolean condition (either give me the fruit or give me the count). The first command (CMDone) works and says "count" and the fetch also works and ...
Sharky Bamboozle's user avatar
1 vote
1 answer
49 views

DTLgetvalueforkey produces the unnecessary spaces

It seems to me that the instruction below produces some extra space. \documentclass[12pt,a4paper,russian]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[russian]{babel} \...
Ulrich Von Rekkenin's user avatar
1 vote
0 answers
19 views

datatool - Precautions for lines not becoming too long when writing .csv-file/text-file from database?

This question refers to the LaTeX 2ε-package datatool: You can save a database to .csv-file, which is a text-file, via \DTLsavedb{⟨db name⟩}{⟨filename⟩} You can load a database from .csv-file, which ...
Ulrich Diez's user avatar
  • 27.5k
1 vote
1 answer
153 views

datatool - How can you load database from .csv-file with values tokenized with same catcode-settings as are used by \verb|...|?

I plan to use the package datatool for loading a .csv-file as database: \DTLloaddb[<options>]{<db name>}{<filename>} How to achieve tokenizing values of that database under the same ...
Mrs. Marsupial Wallaby's user avatar
1 vote
0 answers
53 views

datatool sorting problem - wrong data type?

I created a very small DB with datatool to store two values at each line of the table. First a running ID and second a generated dimension (converted to mm) which I calculated of the width of each ...
susis strolch's user avatar
1 vote
1 answer
190 views

Importing value from txt-file to tikz

I want to import a value form an txt-File and use it in tikz. But for some reason this is not working (line 25). I was not able to find a workaround like the \protect-command which works for \caption ...
dino's user avatar
  • 13

1
2 3 4 5
8