2022 Developer Survey is open! Take survey.

Questions tagged [data-structures]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
61 views

How to create 1D array structure using TikZ?

I'm trying to replicate the attached image. However, I'm not really sure what type of command or environment to use.
user avatar
1 vote
0 answers
41 views

Can it make sense to use LaTeX as common (canonical) data format?

Some folk I know are looking for a common (canonical) format for sharing some structured data between different systems & databases. One sub-group, who publish this data in magazines using LaTeX ...
user avatar
  • 111
2 votes
1 answer
120 views

Draw an empty Data Structure Array

My question is pretty similar to this one with the main difference that I need to create an empty array that has multiple columns merged together as in the following picture How can I merge the ...
user avatar
6 votes
2 answers
92 views

Cells with text are slighlty raised in TikZ

As you can see from the following figure, only the cells with the text are raised slightly than the empty cells. I want all the cells in the same level. How can I do that? Below is my working code: \...
user avatar
  • 167
0 votes
2 answers
67 views

How to draw adjacency cells with arrows in TikZ?

I want to draw the following diagram. How can I draw this diagram? I did not find any examples to recreate the above image.
user avatar
  • 167
5 votes
1 answer
571 views

How to plot data from json

Given a json file in the following format: "name":"list_of_xy_values", "data":[[1,2],[2,4],[3,6],[4,3],[5,0]] I'd like to import data to my document to plot it with tikz/...
user avatar
  • 259
0 votes
1 answer
171 views

Translate TOC data to a Lua data-structure, and create custom table of content style

Given nested loops & data-structures are more elegant in Lua (than in TeX), I think plurality of table of contents style would be easier to write in Lua. For that to work, two things would be ...
user avatar
  • 1,228
1 vote
1 answer
33 views

How to reuse the output of an environment

I have created an environment with \NewEnviron that processes some input. For the sake of the discussion, it is something like \NewEnviron{myworkingenvironment}[1] { \BODY % BODY is expected to ...
user avatar
0 votes
1 answer
87 views

extract different parts of a document

I'm doing my phd right now and I want to prepare a dummy folder for new research projects. I have one problem where I don't know how to start: For a journal submission I need several slightly ...
user avatar
  • 101
0 votes
0 answers
30 views

Properly layering/structuring a document

I'm creating a kind of convoluted document. The idea is that I begin with a certain concept, say section 1 Food Food can then be then divided into many categories section 1 subsection 1 Meat ...
user avatar
1 vote
0 answers
58 views

Is there a LaTeX editor which supports two-way data binding with external data sources?

Context: We produce reports by using scripts to pull data from files and spreadsheets and render them into LaTeX. Problem: Editing the content requires editing the underlying files and re-running the ...
user avatar
1 vote
1 answer
103 views

Plot multi-column file row-wise as one long column with pgfplots

I have a data file of the form date 1 2 3 4 2019-10-28 120 40 55 100 2019-10-29 100 45 30 80 2019-10-30 90 65 100 70 i.e. with four consecutive values per date. ...
user avatar
1 vote
1 answer
194 views

Modeling a mapping from strings to lists of strings in LaTeX3

I'd like to work on a data structure using expl3. This data structure would be read from and written to the .aux file in the following format (this is my proposal—I'm open to better suggestions, of ...
user avatar
  • 21.4k
0 votes
2 answers
168 views

How to draw this picture?

Hello. How can I get a picture like this? It's a part of a bubble sort algorithm. Thanks in advance.
user avatar
7 votes
3 answers
2k views

Heatmaps, matrix plots, imagesc and data structure

If one has a matrix, say: 16 2 3 13 5 11 10 8 9 7 6 12 4 14 15 1 This is possibly stored in a .dat file as shown above, and possible to have thousands of ...
user avatar
2 votes
0 answers
639 views

writing a data structure in an algorithm [closed]

I am trying to write up a data structure in my algorithm. \documentclass[]{IEEEtran} \usepackage{algorithm,algpseudocode} \begin{document} \begin{algorithm} \caption{Algorithm1} \begin{algorithmic}[...
user avatar
  • 21
3 votes
3 answers
132 views

How to make compact data structure without parsing in Latex

Say I have 100 nodes that I want to draw with slight varations 100 times. I don't want to copy/paste all the code each time, that would be a lot of duplication and a lot of boilerplate. So instead I ...
user avatar
  • 1,687
1 vote
0 answers
238 views

Subfiles not working when different folder levels exist between main and component parts

I have the following folder structure Project | 00Main | | | | Main.tex | 01Components | | IntroFolder | | | Introduction.tex | | DataChapterFolder | | | Data.tex | | ...
user avatar
  • 167
3 votes
2 answers
270 views

Record-like data structure?

I would need something like this: \setfield{record1}{field1}{alpha} \setfield{record1}{field2}{beta} \setfield{record2}{field1}{gamma} \setfield{record2}{field2}{delta} \assign{record3}{record2} \...
user avatar
1 vote
1 answer
123 views

Roll my own footnote command for new environment based minipage/tabular/etc

I thought I'd solved the footnotes-in-tables problem with \makesavenoteenv but it interacts badly with the minted package so I thought, since my problem is really "make footnotes work in my box ...
user avatar
  • 1,491
5 votes
2 answers
3k views

How to generate a 2D array data structure in tikz?

I need to illustrate a 2D array data structure in my document. This is a picture I found on the internet. I want something similar. I also want to show the memory layout in the illustration. ...
user avatar
  • 413
0 votes
0 answers
36 views

how to make the architecture for the auto-generated doc? [duplicate]

I need to generate LaTeX automatically. The user can consider to paste an element to any place of the document and then the TeX version is generated. Now I considered to describe a document as a ...
user avatar
  • 121
1 vote
1 answer
1k views

Drawing a diagram of a data structure (`std::vector` from C++)

I'm looking for a way to show data structures in my slides (Beamer). My first task is to show something that looks like a C++ vector. Something like this: Note that the final arrow points "one ...
user avatar
2 votes
1 answer
202 views

use of \noexpand in tikz/math associative arrays

The following does not work in tikz/math : \documentclass[tikz]{standalone} \usetikzlibrary{math} \begin{document} \tikzmath { let \a = my black string ; let \b = my red string ; let \c{1} = \a{...
user avatar
  • 6,201
0 votes
2 answers
470 views

escape backslashes from tikz/math string variable

Using tikz/math, I'm trying to define a string variable containing LaTeX commands, and thus backslashes. The goal is to be able to concatenate such strings. The following doesn't work : \...
user avatar
  • 6,201
5 votes
3 answers
281 views

How to apply a do function to two lists?

Suppose that two lists of identical length have been defined with e.g., etoolbox. Is it possible to have a function \do taking two parameters that will process both lists simultaneously, taking one ...
user avatar
8 votes
7 answers
3k views

How to read a file line by line and store each line into an array?

As said in the title, I am looking for a way to read a file line by line (done!) and store each line, each string, in an array. I have searched the web and stackexchange for a while but I cannot find ...
user avatar
  • 151
1 vote
0 answers
119 views

PgfPlots - Data in one column to be plotted into separate graphs [duplicate]

I have a large amount of measured data, that I would like to plot. Data are organized into three columns where the first column provides a frequency, the second and third column are values measured at ...
user avatar
  • 495
5 votes
1 answer
506 views

Recommended database to handle large amounts of text for LaTeX automation [closed]

I am automating the production of LaTeX files but am noticing that depending on the selected database and scripting language there can be length limitations on the character strings being retrieved. ...
user avatar
  • 3,955
6 votes
1 answer
236 views

Does expl3 have arrays?

There is \seq_item:Nn to get an arbitrary item from a sequence. As far as I understand, this works by iterating the sequence items, discarding until the requested item is found, which seems not very ...
user avatar
  • 2,903
1 vote
1 answer
1k views

Visualization of data structures and indexes

How can I make a similar visualization of data structures and indexes? I went through the documentation of TikZ and could not find a way.
user avatar
  • 137
9 votes
3 answers
251 views

Store several values in an array-like way and then access them

I am building a kind of dictionary that consists of two parts: in the first one there are words, and in the second, roots. I would like to automatically keep track of which words are related to which ...
user avatar
  • 660
4 votes
1 answer
3k views

How to draw adjacency array with TikZ?

I will draw a graph representation as adjacency array, also something like that: How to make it? I didn't found any examples like the picture above.
user avatar
  • 588
4 votes
1 answer
301 views

Action lists sorted by person

I am creating a class for meeting minutes as I have some quite specific demands —minutes.sty doesn't seem to meet all of my requirements. There's some good progress, but I'm completely stuck on ...
user avatar
  • 143
5 votes
1 answer
3k views

How to typeset data structures with algorithm2e?

The question How to typeset data structures? gives create answers for how to type set simple data structures with the lstlistings package. In particular, I like the following look (taken from Mico's ...
user avatar
  • 1,651
4 votes
2 answers
558 views

Is it a convenient way to write longer program codes in LaTeX?

Before I only used ifthenelse and for loops, but not complicated data structures. I don't know what is the convenient way to write longer codes. As an example I would like to generate a random ...
user avatar
15 votes
2 answers
3k views

How to use booktabs in REVTex4 / REVTex4-1

I wish to type this table in REVTeX; however, the code below does not work for \documentclass{revtex4}. (It does work for the article document class, though.) \documentclass{revtex4} \usepackage{...
user avatar
  • 2,159
2 votes
1 answer
1k views

Extending a line in the Table

I wish to have a Table setting like the following graph with an extra line inserted between a and b. Namely, I wish to extend the line separating 1, 4 and 2, 5 to the line separating a and b. The ...
user avatar
  • 2,159
3 votes
1 answer
107 views

How do you define a command to select nested groups?

Assuming a pair structure (2-tuple) is defined using groups {{<tokens1>}{<tokens2>}} is it possible to define a command \first#1{...} (and \last#1{...}) taking the surrounding group as ...
user avatar
  • 663
5 votes
1 answer
378 views

What conventions or packages are appropriate for formatting records, algebraic data types in LaTeX?

LaTeX formatting practice is well-established and well-supported by existing packages for three common cases relevant in computer science: Source code listings Established, conventional mathematical ...
user avatar
  • 515
5 votes
1 answer
187 views

naive dictionary datastructure using \csname ... \endcsname; problem with nesting

With the following I tried to implement a naive dictionary data structure. All works fine, except when trying to nest two such dictionaries. In the last line in the following code the result is "key2",...
user avatar
45 votes
2 answers
2k views

How to implement (low-level) arrays in TeX

Update: I have revised my question based on the comment by Bruno Le Floch and some further research. As some may know, I'm implementing a huge TeX macro package which has to do a lot of internal ...
user avatar
13 votes
2 answers
617 views

Can I store sequences in sequences with expl3

The documentation for l3seq states LaTeX3 implements a “sequence” data type, which contain an ordered list of entries which may contain any balanced text . but for many programming tasks it ...
user avatar
21 votes
1 answer
526 views

Using \fontdimen as an array to store data

Reading through pi.tex, I discovered the trick of using \fontdimen as an array of dimensions (which is equivalent to storing integers between ±(2^31-1)sp). Namely, \font\x=cmr10 at 1sp % or whatever ...
user avatar
14 votes
1 answer
9k views

Designing packet structure of a protocol

I'm writing a small manual for our self-developed protocol. To show the packet structure we like to include a table like it's shown on this Wikipedia page: http://en.wikipedia.org/wiki/...
user avatar
7 votes
1 answer
2k views

Typesetting classical data structures in tikz

During this discussion an example image generated with TikZ was given by Christian R. but no code was provided: It would be great to have the code snippet that implements it, because I think it has ...
user avatar
  • 173
3 votes
2 answers
2k views

Using LaTeX to create a resume in PDF [duplicate]

Possible Duplicate: LaTeX template for resume/curriculum vitae What are the benefits of writing resumes in TeX/LaTeX? I am a LaTeX noob and I am considering it for revamping my resume. I ...
user avatar
2 votes
1 answer
139 views

Comprehensive list of possible fields in APA6

I'm coming into a situation where users have uploaded thousands of documents (all non-published). There are only basic elments stored currently, including Title, Author, Year. Some fields contain ...
user avatar
  • 311
9 votes
4 answers
1k views

Make ar­ray data struc­tures in LaTeX

Is there a way to make an array in LaTeX. I want to write a function that does this (here the array has only 2 elements but I want to be able to have many as I want). \foo{\MakeArray{foo,bar}} foo|...
user avatar
2 votes
1 answer
150 views

How to produce structure as in attached image

I remember seeing similar question (image wise) here on this forum but did not bookmark it :( If anyone knows and can point me to the example or give me some ideas to get started would be great help....
user avatar
  • 10.4k