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 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 ...
user avatar
1 vote
1 answer
27 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 ...
user avatar
  • 23.5k
0 votes
1 answer
43 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 ...
user avatar
2 votes
1 answer
49 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 ...
user avatar
0 votes
0 answers
44 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, ...
user avatar
0 votes
0 answers
29 views

Using datatool and xkeyval for calculating sums in tables

I want to build a nice and easy to use interface for users to fill a table with information. Therefor I use xkevval and pass its values to datatool for a proper processing. Now I have a table for ...
user avatar
1 vote
0 answers
105 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 ...
user avatar
  • 6,227
1 vote
0 answers
20 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.
user avatar
0 votes
0 answers
54 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{\...
user avatar
5 votes
2 answers
121 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 ...
user avatar
  • 77
1 vote
0 answers
48 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,.....
user avatar
1 vote
1 answer
33 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 ...
user avatar
  • 1,921
0 votes
0 answers
34 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 ...
user avatar
  • 1,921
0 votes
1 answer
31 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 ...
user avatar
  • 3
1 vote
2 answers
126 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/...
user avatar
0 votes
2 answers
33 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: \...
user avatar
  • 57
1 vote
1 answer
42 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 ...
user avatar
  • 57
1 vote
2 answers
27 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,...
user avatar
  • 57
1 vote
1 answer
100 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} \...
user avatar
  • 11
1 vote
3 answers
81 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 (! ...
user avatar
0 votes
1 answer
48 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 ...
user avatar
  • 1
3 votes
1 answer
54 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} \...
user avatar
3 votes
2 answers
174 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 ...
user avatar
2 votes
3 answers
108 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 (...
user avatar
0 votes
0 answers
41 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 ...
user avatar
1 vote
1 answer
59 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 "...
user avatar
  • 443
5 votes
1 answer
176 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 ...
user avatar
0 votes
1 answer
90 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 '...
user avatar
2 votes
2 answers
97 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 ...
user avatar
0 votes
1 answer
41 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 ...
user avatar
1 vote
1 answer
39 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} \...
user avatar
0 votes
0 answers
31 views

sorting with more than one criteria using datatooltk command line

In the section "Sorting Data" found in https://www.dickimaw-books.com/latex/admin/html/sortdata.shtml (from datatool package by Nicola L. C. Talbot), it was explained that we can have more ...
user avatar
1 vote
0 answers
16 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 ...
user avatar
  • 23.5k
1 vote
1 answer
43 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 ...
user avatar
1 vote
0 answers
42 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 ...
user avatar
1 vote
1 answer
77 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 ...
user avatar
  • 13
2 votes
2 answers
215 views

Multiple conditions in \DTLforeach

I start using database in Latex. Therefore on one hand, I have my .tex database where elements are classified by columns separated by comma. On the other hand I have my document calling elements from ...
user avatar
  • 77
3 votes
1 answer
67 views

Future variable reference

For a document I am working on I would like to achieve something along the following lines: In the beginning of the document, a summary of the most important parts mentioned in the document are given. ...
user avatar
  • 344
0 votes
1 answer
46 views

How (if at all) can one use datatool's \DTLforeachkeyinrow in an siunitx table?

\documentclass{article} \usepackage{etoolbox} \usepackage{siunitx} \usepackage{datatool} \DTLnewdb{data} \DTLnewrow{data} \DTLnewdbentry{data}{x}{1} \DTLnewdbentry{data}{y}{2} \DTLnewdbentry{data}{z}...
user avatar
1 vote
1 answer
36 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 ...
user avatar
1 vote
1 answer
27 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 ...
user avatar
  • 57
1 vote
1 answer
91 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 (...
user avatar
  • 57
1 vote
1 answer
47 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 ...
user avatar
  • 105
1 vote
1 answer
47 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 ...
user avatar
2 votes
2 answers
143 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 ...
user avatar
0 votes
1 answer
75 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 ...
user avatar
2 votes
1 answer
63 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 ...
user avatar
  • 1,015
2 votes
1 answer
73 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 ...
user avatar
  • 77
4 votes
1 answer
89 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]{...
user avatar
2 votes
1 answer
72 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,...
user avatar
  • 31

1
2 3 4 5
7