Skip to main content

Questions tagged [datatool]

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

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

Use datatool variable for including a pdf

I'd like to generate a bulk letter with datatool and include a different pdf for each row. Can this be done with pdfpages? \documentclass[paper=a4]{scrlttr2} \usepackage{fontspec} \usepackage{...
tobidope's user avatar
  • 111
1 vote
1 answer
68 views

Why does `datatool` fail when used in a Tikz figure

Consider the following example \documentclass[varwidth=true, border=2pt]{standalone} \usepackage{tikz} \usepackage{pgfplots} \usepackage{datatool} \begin{filecontents*}[overwrite]{test.csv} Actual,...
Rubem Pacelli's user avatar
0 votes
1 answer
54 views

PGFplot - Find duplicates within \pgfplotstablecreatecol

Based on this question, I try to find duplicates in my generated hash list. These could be there, because I accidentally used the same X & Y values or because the first three digits of the hash's ...
PascalS's user avatar
  • 750
1 vote
1 answer
30 views

How to use a value from datatool as a parameter inside latex doc

\documentclass[a4paper,12pt]{article} % Format de page \usepackage{pst-bar,pst-plot,pstricks-add} \usepackage{datatool, filecontents} \DTLsetseparator{ = }% Set the separator between the columns. ...
wind waver's user avatar
0 votes
1 answer
58 views

Filter datatool database for duplicates

I just want to filter a given database for duplicates and remove them. In my specific case the database is loaded from an external .csv data and has only one single column. But to keep it simple in ...
PascalS's user avatar
  • 750
1 vote
0 answers
44 views

How can I combine datatool and tikz for creating a mindmap?

I’d like to bild a mindmap using a csv and with items based on the column branch. LaTeX is throwing this error message at me: ! Package tikz Error: Giving up on this path. Did you forget a semicolon?....
lukascbossert's user avatar
0 votes
0 answers
67 views

How to expand a macro so that it can be used as an input to another macro

I use datatool to get key-value pairs from a data file into a database. I then retrieve values using a custom command, \varConfig{}. One of these values is the number 1, saved as a string in the data ...
Andy Clifton's user avatar
  • 3,709
6 votes
1 answer
157 views

How to adjust size of text in a wheelchart and applying a proper filtering using datatool?

I am very happy with the package wheelchart in combination with datatool, but I am troubled with three issues: I would like to increase the font size of the text in the outer ring (Plan, Production ...
lukascbossert's user avatar
1 vote
1 answer
43 views

datatool and siunitx have different understanding of decimals and its conversion

This is a follow up question on Convert decimal to locale fails using datatool in combination with tabularray. Or let’s say it this way: I could boil done the problem a lot. The core problem is the ...
lukascbossert's user avatar
1 vote
0 answers
60 views

Convert decimal to locale fails using datatool in combination with tabularray

I have this rather complex code which produces several tables at the end. The problem currently is the locale setting of the last table. This uses commands from datatool to calculate the sum of ...
lukascbossert's user avatar
2 votes
4 answers
77 views

How to turn string read from (CSV) file into counter

I have a csv file with tags and (page) nrs, as follows: tag,nr t1,1 t2,5 t3,9 The nr-column refers to page numbers in a pdf file. Each page has a corresponding tag. Given a tag, I want to show the ...
avandeursen's user avatar
1 vote
0 answers
24 views

Sorting datatool alphabetic first

I'd like to sort may data first alphabetic and then by upper and lowercase. Is that possible? Code: \documentclass{article} \usepackage{datatool} \begin{document} \DTLnewdb{teste} \newcommand{\...
Leonidas's user avatar
4 votes
1 answer
106 views

Using datatool with tabularray

This is a followup to or restatement of a previous question, because I had a great deal of difficulty in understanding both the question and the answer. The example file had a lot going on, and I ...
Canyon's user avatar
  • 309
0 votes
1 answer
50 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
63 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
36 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
51 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
36 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
  • 473
0 votes
1 answer
55 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
53 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
48 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
82 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
21 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
131 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
61 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
23 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
  • 107
3 votes
1 answer
69 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,782
1 vote
1 answer
59 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
77 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
  • 29.7k
0 votes
1 answer
104 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
436 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
69 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
240 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,685
1 vote
0 answers
27 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
149 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
217 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
169 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
37 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,111
0 votes
0 answers
51 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,111
0 votes
1 answer
49 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
543 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
62 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
  • 67
1 vote
1 answer
113 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
  • 67
1 vote
2 answers
47 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
  • 67
1 vote
1 answer
376 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
159 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
56 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
100 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
284 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

1
2 3 4 5
8