Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [l3prop]

The basic layer of expl3 for property lists.

Filter by
Sorted by
Tagged with
3 votes
1 answer
61 views

Using genealogytree database entries as keys in l3prop property lists

I'm trying to look up some of the data in a genealogy tree in an l3prop property list and do special stuff depending on what's in it. In this MWE it is pared down to something not really useful, but ...
pst's user avatar
  • 4,684
0 votes
1 answer
24 views

prop with clist : prop_get returns clist, prop_map_inline does not?

I am sure I am missing something trivial (still learning about LaTeX3), but this seems odd: prop_map_inline does not return values as clist, even though they are? \documentclass{article} \begin{...
Holger Karl's user avatar
0 votes
0 answers
68 views

Sort a property list (`l3prop`) by keys

How to sort a property list by keys? There is a \clist_sort but no \prop_sort function. My workaround is to create a clist with the keys of the property list, sort the clist, and then create a new ...
wolfrevo's user avatar
  • 523
0 votes
1 answer
71 views

Expand a clist from l3prop keys

I have a key that takes a comma-separated list as its value, with entries coming from the keys of a property list. I would like the "default" (no-value-given) to apply the key to every key ...
mbert's user avatar
  • 4,216
0 votes
0 answers
49 views

Latex3 Getting values of multiple keys from a property list

The following code works correctly. \ExplSyntaxOn \prop_const_from_keyval:Nn \argsDic{r=\vec{r}, e=E, t=t} \NewDocumentCommand{\args}{m} { \prop_get:NnN \argsDic {#1} \tl_var (\tl_var) } \...
Masa's user avatar
  • 101
2 votes
1 answer
81 views

Why does my expl3 \prop_item increment my \stepcounter?

What I'm trying to do I want to create a custom cross-referencing tag which a reader can click on and view the line of text I am referencing. However, I want the numbering of the tags to be automated ...
WesH's user avatar
  • 427
2 votes
1 answer
95 views

trying to understand a code snip from l3prop

Looking the implementation code of the l3prop, I got confused by the following part (in the definition of \prop_remove:Nn ) : \cs_new_protected:Npn \__prop_split:NnTF #1#2 { \exp_args:NNo \...
Frigeri's user avatar
  • 156
3 votes
2 answers
39 views

property list value as \url argument

I want to feed \url with the value of a property list \documentclass{article} \usepackage{hyperref} \begin{document} \ExplSyntaxOn \prop_set_from_keyval:Nn \l_tmpa_prop { mail=user@domain, } \...
Jérôme LAURENS's user avatar
0 votes
1 answer
58 views

Store l3prop in l3seq

In a .sty file, I defined the following: \seq_new:N \g__test_seq \NewDocumentCommand \TestAdd {m} { \prop_clear_new:N \l__test_prop \prop_set_from_keyval:Nn \l__test_prop { ...
Vary's user avatar
  • 23
0 votes
0 answers
59 views

LaTeX equivalent of \str_if_eq:nnTF for property list keys?

Here is a pure l3 code: I create a property list with 2 entries for keys a and b. Then I loop over the entries and break for key a typesetting 'YES'. \documentclass{article} \begin{document} \...
Jérôme LAURENS's user avatar
2 votes
1 answer
137 views

Get item with key as a variable

I am trying to retrieve a value of a specified key which is stored in a variable. Normally we would use Nx to expand the variable but \prop_item:Nxthrows an error. How do I retrieve the value if the ...
Nyanyan's user avatar
  • 91
2 votes
2 answers
75 views

Keepin key-value pairs in `l3prop` in a way that preserves catcode

This is a follow up to this post. Initially the problem was to store some function's options in some container. Examples of such functions: \includepdf, or \newwatermark. This can be useful if the ...
Erwann's user avatar
  • 2,120
2 votes
1 answer
61 views

Two seemingly identical l3seq cause different behavior passed to function

I have two seq's, one constructed from a clist, another from a prop, whose expansion (with , between items) look the same. They are supposed to contain options to \newwatermark. The use of a prop is ...
Erwann's user avatar
  • 2,120
2 votes
1 answer
87 views

Is it possible to have a sequence (l3seq) as value in a property list (l3prop)?

This is quite related to expl3: Is it possible to have a property list (l3prop) as value in a property list? Instead I want to have something like \pushmetadata{author}{author1} \pushmetadata{author}{...
jiewuza's user avatar
  • 275
3 votes
1 answer
154 views

expl3 sequence of property lists with parameterized names: spurious space

Edit (context) For a class myclass I'm working on, I want the user be able to specify (the characteristics of) the institute, subinstitute, subsubinstitute, etc. he is affiliated to. Because the ...
Denis Bitouzé's user avatar
2 votes
1 answer
50 views

Controlled expansion applied to l3prop

In the example below, Hook 1 and Hook 4 compile, not Hook 2 and Hook 3. Why? \documentclass{report} \usepackage{xparse} \ExplSyntaxOn \prop_set_from_keyval:Nn \__erw_foo_prop{key=a} \cs_set:Nn \...
Erwann's user avatar
  • 2,120
2 votes
1 answer
121 views

How to use the token list variable from \prop_get

Here is a MWE. I use a token list, and I can get 10 and October in the final pdf file. \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \tl_new:N \l_my_tl \prop_new:N \l_my_prop \...
jiewuza's user avatar
  • 275
2 votes
2 answers
88 views

Using control sequence as part of key names in property list

Adapting Joseph's answer in Extract the numerical and non-numerical portion from text to count a non-numerical portion from a text. The idea behind my method is to use regex to seperate the numerical ...
Simon's user avatar
  • 883
8 votes
1 answer
834 views

Spaces in l3prop

How can one store verbatim code in a LaTeX3 property list? My goal is to store person names in a property inside a property list. This means that both accents and spaces must be stored in the key ...
Jaeya's user avatar
  • 423
2 votes
2 answers
277 views

expl3, incrementing a value in a prop-list

I read a clist and create a prop-list which should behave as a hash in which the value for a given key is the number of occurences of this value in the clist. Below my code which, so far, does work as ...
TeXnicien de surface's user avatar
3 votes
1 answer
78 views

Why is \tl_if_in:VnTF giving a different answer depending on where it is?

I'm trying to build a simple replacements dictionary using a prop structure of replacements old=new. When I'm mapping through the prop, I don't find any replacements. When I'm not (i.e., hardcoding),...
Sean Allred's user avatar
  • 27.4k
1 vote
1 answer
173 views

expl3: Is it possible to have a property list (l3prop) as value in a property list?

I am thinking in creating a package to manage some metadata of books (like author, title, ...). This metadata will be defined in an external file and retrieved in the document. (This has nothing to do ...
TeXtnik's user avatar
  • 5,873
10 votes
2 answers
351 views

Reading in a conf file as a property list

I'm not worried about supporting sections, although a bounty would be given for doing so :) Here's what I have so far, but it produces strange output for #2: \begin{filecontents}{test} \Property ...
Sean Allred's user avatar
  • 27.4k
3 votes
1 answer
234 views

Getting the current value of a global variable into a prop list

This is a more or less direct follow up to this question. The problem there was to get the current value of a global variable into a LaTeX3 prop list. The trick was to use the V variant to get the ...
Seamus's user avatar
  • 73.4k
3 votes
1 answer
107 views

Expl3 prop doesn't seem to work when the key is a macro value

I'd expect this example code to give two identical lines, however \usevalue{\xyz} doesn't result in XYZ as the other. Can I force the key to be expanded to make \usevalue{\xyz} and \usevalue{0} refer ...
masu's user avatar
  • 6,581
6 votes
2 answers
121 views

l3prop - getting an entry inside a macro fails

I the following example I defined two new macros \UseLength and \xUseLength. Both macros shall put back the stored value of the key in the input stream. The macro \UseLength works as expected. The ...
Marco Daniel's user avatar
  • 95.9k
4 votes
1 answer
186 views

key values getting improperly passed through a property list getter function

I'm creating rather complicated diagram and would like to put all the controls all in one easy to find location and not scattered throughout the document. To do this, I've created setter and getter ...
A.Ellett's user avatar
  • 50.6k
4 votes
2 answers
374 views

l3prop property stores and etoolbox loops: weird results

I'm writing a class for handling multi-language jargon formulas. My idea is to use l3prop to store, for each formula, its language variations -- i.e., a sort of hash table. Building on one of the ...
sphakka's user avatar
  • 213
5 votes
1 answer
149 views

Error using a defined function with expl3 inside the command \color

In the following MWE my personal definition of \marco_prop_get:nn works unless it isn't inside the macro \color. The snippet is: \ExplSyntaxOn \cs_new_protected:Npn \marco_prop_get:nn #1 #2 { \...
Marco Daniel's user avatar
  • 95.9k