17 questions linked to/from Storing an array of strings in a command
2k views

### Removing a backslash from a character sequence

For indexing I wanted to write a macro \macroname that removes leading backslashes from macro names but leaves the names of environments untouched. That is \macroname{\relax} --> relax \...
507 views

### Count number of entries with specific value

Assume I have a list with quite a few entries (all integer values, in case it's relevant), e.g., 1 2 4 0 3 1 0 0 2 1 7 1 4 2 3 0 0 6 5 2 1 2 3 0 Can LaTeX somehow count the number of 0's, 1's, ..., ...
465 views

### Can one avoid typing double quotes in this TikZ-involving macro?

I need to draw many similar complicated colored shapes; I made a macro for them, and it works, but to call it I seemingly have to place several color names in double quotes. Can I avoid this? The ...
740 views

### How are parameter tokens (#1,#2,…,#9) processed?

I wonder how the TeX token muncher processes parameter arguments. It seems that parameter arguments are sent token by token. Is this true? Consider the following code based on wipet's answer used to ...
474 views

### What is the limit number of \label in a document?

With a group of teachers friends we are compiling the national and international tests applied in my country from 1980. These are "multiple choice" tests, with most of the tests already ...
362 views

### Split input at hyphen or space

I need to treat input differently, depending on whether it contains a space or a hyphen. That is, the following \foo{foobar} \foo{foo bar baz} \foo{foo bar-baz} \foo{foo-bar baz} \foo{foo-bar-baz} ...
745 views

### Storing data in a two-dimensional array

I'm trying to draw diagrams for the board game Go in TikZ. To reuse board positions in subsequent variations I need a way to store the current board position. I learned from this question that two of ...
182 views

### How to automatically invoke all defined macros?

First of all, make sure you have installed Kanji Stroke Order font before trying to compile the following MWE. The font can be downloaded here (click). I want to create a note about my study in ...
141 views

### In TeX how can I define a list of data such that I can use a numerical argument to call for one entry out of the list

I would like to be able to have a defined macro something like this: \def\testmacro[1]{[54.7],[74.1],[98.5]} Such that when I call \testmacro{2}, in a document, 74.1 is printed. Is this ...
472 views

### Create a fake “\meaning” (verbatimized) for content stored in seq?

I'm trying to create a command that represents the code that is stored in a sequence without executing it (something like \meaning) . When using \cs_log:N \l_scontents_macro_tmp_tl I get in the .log ...
197 views

### How do use {<setup>} in \tl_set_rescan:Nnn to replace \scantokens?

This question is related to (Changing escape character in \tl_set_rescan:Nnn) and (https://tex.stackexchange.com/a/496258/7832) but is not the same. I've tried to change this: \exp_args:NNx \...
229 views

### Create a fake label ref using list

Hello everyone once again, after having resolved my doubt regarding the use of \label and \ref. Reading the comments, I have noticed that in many occasions do not need to use the referencing system, ...
175 views

### Counting the number of strings stored in array

I stored a list of strings (command strings) in an array following the answer here: https://tex.stackexchange.com/a/215571/61517 . Now I wanted to access them randomly, and therefore I added a random ...