Questions tagged [l3keys]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
102 views

How to set a key in “module” and pass the rest of the keys to “module/subgroup” in l3keys?

I'm trying to create a key to pass the rest of the keys to /subgroup based on a boolean condition. That is to say that something like this works: [key in <module>, rest of keys pass to <...
0
votes
1answer
134 views

Problem passing a key=color (separated by commas) from l3keys to tikz

After a good time searching the forum I gave up (I thought I could do it by myself), I have a problem passing a key from l3keys (separated by commas) to tikz. I've created a command that accepts ...
0
votes
0answers
61 views

key={v,a,l} argument separated by commas in xparse [duplicate]

I'm trying to create a command to show the distributive property of multiplication (for school effects) using tikzmarks and xparse. So far so good, the code is a bit long and I would like to know if I ...
2
votes
1answer
41 views

Problem with font commands as `l3keys2e` values

I'm setting some fonts and font-related commands using l3keys, and that works just fine—but it seems there's an issue when setting the same keys via l3keys2e. Is this expected behavior? Is there a way ...
4
votes
2answers
71 views

Strange behaviour in l3keys

Consider the following code which uses \keys_set_known:nnN: \documentclass{article} \usepackage{expl3} \ExplSyntaxOn \keys_define:nn {empty_module} {} \keys_define:nn {module1} {key1 .code:n = {\...
0
votes
2answers
126 views

l3keys2e's option with accent: \UseTextAccent… \@curr@enc error

The following expl3 class, that provides an option (mykeyword) thanks to l3keys2e, works like a charm: \begin{filecontents*}{myclass.cls} \RequirePackage{l3keys2e} \RequirePackage{expl3} \...
0
votes
0answers
58 views

l3keys2e: best practices to pass options from class to package

I moved part of the code in a class to a new package. This package can handle a couple of options defined using l3keys and processed with l3keys2e (one option being multichoice). My problem is that I ...
7
votes
2answers
120 views

Code hook after variable setting actions in l3keys

I am trying out l3keys for the first time and I am encountering the following issue. I have some boolean keys (true/false). For them it looks nice to use .bool_set:N so that I can get automatic ...
2
votes
1answer
55 views

Extend book class with options of multiple values

I am writing a class based on book.cls, to which I want to have an option that is a list, so I can do \documentclass[languages={french, english}]{testops} I have define the key using l3key2e. But it ...
5
votes
2answers
178 views

Store unknown key in l3keys

Is there a good way to store the key of an unknown key-val in expl3? I can get \l_keys_key_tl, but it gets overwritten before it's expanded. I suppose I need to expand it when I store it, but I'm ...
1
vote
0answers
101 views

Pass a list of package-options to a self-written documentclass using l3keys2e

I am writing a documentclass which loads several packages as default. I want to give the user the possibility to pass options to these packages using an documentclass option. Because most packages ...
7
votes
2answers
90 views

How can I recover option values with the current l3keys2e?

Minimal-Compiling-But-Not-Working Example: \begin{filecontents}{\jobname.cls} \ProvidesClass{\jobname} \RequirePackage{l3keys2e} \ExplSyntaxOn \keys_define:nn { job / doc } { doc~name .tl_set:N =...
3
votes
1answer
133 views

How to use choice keys in l3?

I want to create some shortcuts for constants and I want to use these shortcuts for calculations (without units) for example with \fpeval with one or two different units I tried the following code, ...
0
votes
0answers
74 views

LaTeX3 choice keys that set other choice keys

I'm trying to set up choice keys that can implicitly set other choice keys. In both the "parent" and "dependent" keys, the set of choices have the same values. The code below does more-or-less what I ...
4
votes
1answer
107 views

Setting default values for LaTeX3 keys

I've written the following code for setting values of a key as part of a package I'm working on, and for some odd reason the default doesn't seem to work. When the package this is part of is specified ...
3
votes
1answer
70 views

Use value of token list at time of \keys_set:nn

I'm trying to set up a macro \MyCommand{#1}{#2} which takes two inputs, one being a key-val list and then creates a token list which is named based on the input and the key name, having the value ...
4
votes
2answers
976 views

Key property is unknown

i just updated my Linux distro (Linux Mint 17.3 -> Linux Mint 18) and from TeX Live 2014 to 2016. I have a (large) selfmade documentclass writte in LaTeX3. Now I tried to compile a document using my ...
2
votes
0answers
330 views

Reason not to use a specific key val package [closed]

According to the very nice list of packages concerning this topic (A big list of every keyval package) I am confused which package I should use now to be prepared for the future. Any ideas which ...
4
votes
1answer
184 views

How can I use a tl variable in TikZ options

Im setting up a command with some options via l3keys. One of the options is tikz-options and it should take a list of TikZ options and pass them to a {tikzpicture}. \documentclass{article} \...
10
votes
1answer
156 views

Does expl3 key-setting syntax have an equivalent of TikZ/PGF's .cd?

This question has the following form: 'I know how to do X using Y. I can also do X using Z but not so elegantly as using Y. Can I do X using Z in the same way that I can do X using Y, for a more ...
2
votes
1answer
106 views

How to properly parse […]{…} with expl3?

What would be the more efficient way of parsing [...]{...} with expl3, that is to get the content inside the brackets in one variable and the content inside the braces in another one? This question ...
4
votes
0answers
67 views

Is it possible to label (tag) a value of a (l3keys) key-value in order to reuse it elsewhere easily?

I have a command (\people[⟨options⟩]{⟨name⟩}) for entering people. Its optional argument lets the user specify possible people's (possibly multiple) attribute(s) with a (l3keys) key–value system: ...
10
votes
2answers
405 views

Misunderstanding from l3keys documentation

Based on the interface3 documentation and a nice article in TUGboat, Volume 31 (2010), No. 1 called Programming key–value in expl3 by Joseph Wright, I have been trying to put together a MWE that will ...
5
votes
1answer
66 views

creating an alias for existing key

In there an easy way to define an alias for an existing key which does exactly the same, but without the need to duplicate the code of the existing key? That is, something like: \keys_define:nn { ...
1
vote
1answer
78 views

How to \clist_set in \msg_new?

Is it possible to process a comma separated list within a LaTeX3 error message? For example I want to define a message for unknown values to a .choice key like in the following example. I use \test ...
4
votes
0answers
165 views

problem with \ProcessKeysOptions / l3keys2e in texlive 2015 [closed]

In my example the keys seems not to be processed ... here is file test.cls : \NeedsTeXFormat{LaTeX2e}[2001/06/01] \RequirePackage{l3keys2e} \ProvidesExplClass {test} {2013/12/23} {1.0} {Ceci est ma ...
8
votes
1answer
124 views

expl3: \keys_set_groups:nnn and unknown keys

I'm using \keys_set_groups:nnn to process only subsets of key lists. The problem is that unknown keys doesn't raise an error in this case and so typos can be overlooked easily. I can get around it ...
11
votes
2answers
302 views

What is the preferred way of expanding twice in expl3?

expl3 includes the o, f, and x argument specifiers for one-level and the two kinds of full expansion, respectively, before passing the argument to the base function. What is the preferred way of ...
4
votes
1answer
141 views

l3keys: how to store the value of a choice key more effectively?

I want to define with l3keys a choice key which also stores the value given to the key. That's easy enough: \documentclass{article} \usepackage{expl3} \ExplSyntaxOn \tl_new:N \curmykey \keys_define:...
4
votes
1answer
232 views

Accessing sub/keys with l3keys

I'm not sure if I'm taking it too far, but I think I've seen something like this around. This gives an error: \documentclass{scrartcl} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand \RULE {} ...
8
votes
2answers
300 views

How can I define a greedy macro?

I have a feeling this is a duplicate somewhere, but how can I ensure that TeX will keep scanning until \relax or something similar? \documentclass{article} \usepackage{xparse} \pagestyle{empty} \...
6
votes
1answer
314 views

Use choice key with choices setting booleans

When defining choice keys with l3keys2e there are two possible ways and I use the one with sub-keys in a new package. When defining watch each value should do interface3.pdf says that I can use .code ...
8
votes
1answer
297 views

Clash between fontspec and l3keys2e with multichoice keys

Consider the minimal example: \begin{filecontents}{test.cls} \NeedsTeXFormat{LaTeX2e}[1994/06/01] \RequirePackage{expl3,l3keys2e} \ProvidesExplClass {test} {2013/12/23} {1.0} {A test class} \...
11
votes
1answer
334 views

Processing document class options with l3keys

How can I parse (that is, access) the entire option list given to the current document class with l3keys? This would obviously need some sort of \keys_define:nn { document-class-?? } { default ....
10
votes
1answer
188 views

How to dynamically give key names with expl3?

I have a property list which associate names with values name 1 -> value 1 name 2 -> value 2 ... I want to use names from the property list to dynamically create keys. The following code \...
6
votes
1answer
129 views

Scanning l3key with document catcodes?

Similar to the way TikZ attempts to use unknown keys as values for the color key, I would like to interpret an unknown key as the value for one of my own keys, decoration (not to be confused with the ...
5
votes
1answer
180 views

LaTeX3: l3keys Multiple-Choices Keys and Startup Value for Predefined Choice Integer Variable

In the interface3 documentation it can be read (what follows is not a literal quotation) that the variable \l_keys_choice_int is available to be used as an index register for a multiple-choices key ...
11
votes
1answer
105 views

Log all keys in a module

Using l3keys, is there any way to inspect the keys currently in a (sub)module? I'm looking for something like \clist_show, but for keys. \keys_show sounded promising, but requires that you already ...
5
votes
1answer
134 views

Is there any way to add a key to a sub/module in l3keys?

I need to loop through a comma-separated list, creating them all as keys for a data structure. I can't think of a way to loop through the keys inside \keys_define:nn, so the only other option I see is ...
8
votes
2answers
426 views

Generate l3keys meta key from subkey

I’ve created a simple package with options settable via l3keys2e. I was able to figure out how to make the syntax \usepackage[format = international]{phone} work, but I’d like to make the syntax \...
4
votes
1answer
166 views

key-value is not being read as expected

I'm trying to write some code that allows me to reveal in stages the content of a pre-existing file (a pspicture showing a geometric construction). I'm trying to write this using LaTeX3. I've got ...