Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [data-structures]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
64 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 ...
0
votes
2answers
87 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.
5
votes
3answers
972 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 ...
2
votes
0answers
136 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}[...
3
votes
3answers
86 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 ...
1
vote
0answers
124 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 | | ...
3
votes
2answers
163 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} \...
1
vote
1answer
70 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 ...
4
votes
2answers
2k 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. ...
0
votes
0answers
33 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 ...
1
vote
1answer
599 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 ...
2
votes
1answer
134 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{...
0
votes
2answers
290 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 : \...
5
votes
3answers
202 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 ...
8
votes
7answers
2k 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 ...
1
vote
0answers
114 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 ...
5
votes
1answer
346 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. ...
6
votes
1answer
169 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 ...
1
vote
1answer
947 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.
9
votes
3answers
211 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 ...
4
votes
1answer
2k 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.
4
votes
1answer
173 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 ...
5
votes
1answer
2k 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 ...
4
votes
2answers
537 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 ...
11
votes
1answer
2k views

How to use booktab or type this Table in REVTex4 / REVTex4-1

I wish to type this table in REVTex, however, the code below does not work for \documentclass{revtex4} but only for \documentclass{article}: \documentclass{revtex4} \usepackage{array,mathtools,...
2
votes
1answer
827 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 ...
3
votes
1answer
78 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 ...
5
votes
1answer
285 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 ...
5
votes
1answer
162 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",...
42
votes
2answers
1k 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 ...
13
votes
2answers
461 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 ...
21
votes
1answer
464 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 ...
11
votes
1answer
6k 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/...
7
votes
1answer
1k 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 ...
3
votes
2answers
1k 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 ...
2
votes
1answer
135 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 ...
9
votes
4answers
950 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|...
2
votes
1answer
144 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....
5
votes
3answers
2k views

Drawing a collaboration graph or tree with TikZ

I'm trying to draw a collaboration graph for C data structures. originally I got dot files from Doxygen which I tried to convert using dot2tex with varying degrees of success, though none produced ...
7
votes
2answers
846 views

Emulate a “tuple” data structure (when you are free to choose the syntax)

How can a "tuple" data structure be implemented in LaTeX? The idea is to store several elements (possibly a predefined number) in one macro and then be able to extract each of these elements by index (...
6
votes
3answers
293 views

Emulate a “tuple” data structure when the syntax for creating a tuple is predefined and cannot be altered

Imagine I have a macro \createcontact that accepts three parameters. Now, instead of using these during the expansion, I would like to save them separately for later use and retrieval. The above macro ...
13
votes
2answers
1k views

Global key-value dictionary

Is there any package that implements a data structure that provides a key-value mapping (akin to Python's dict)? The keys will be user input and may contain spaces and non-ASCII characters. I would ...