Questions tagged [l3keys]
The l3keys tag has no summary.
32 questions
5
votes
4
answers
437
views
Passing macro parameters with \DeclareKeys/\SetKeys
Just as an exercise I'm trying to make a keyval interface to amsthm's \newtheoremstyle in the manner of thmtools, but using the kernel's \DeclareKeys instead of keyval and kvsetkeys. Every argument of ...
2
votes
1
answer
275
views
keyval_parse for dummies
This example compiles forever. I must be misusing keyval_parse
\documentclass{report}
\usepackage{xparse}
% Relevant doc:
% http://www.texdoc.net/texmf-dist/doc/latex/l3kernel/interface3.pdf#part.21
...
7
votes
1
answer
384
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}
\...
6
votes
1
answer
662
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 ...
4
votes
1
answer
239
views
How to use `unknown .code` in `expl3` to achieve the effect of the key `color` in `tikz`?
Just like the title described, we know in tikz, the name of the key color could be omitted, that is
\tikz \draw [color = red] (0,0) -- (1,0);
equals to
\tikz \draw [red] (0,0) -- (1,0);
I'd like to ...
3
votes
1
answer
110
views
keytheorems + tcolorbox: accessing tcbkeys in the optional argument of an already declared theorem
Desired Outcome
Taking inspiration from muzimuchi Z's answer to my question on making tcolorbox's 'connect', I want to define \newkeytheorem's (e.g. theorem) with the resultant syntax
\begin{theorem}(&...
13
votes
3
answers
671
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 ...
11
votes
1
answer
187
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 ...
10
votes
2
answers
294
views
l3keys equivalent of pgfkeys' .code 2 args
What is the recommended way to emulate pgfkeys' /.code 2 args (or more generally /.code n args) handler with l3keys? For example, with pgfkeys one can do
\documentclass{article}
\usepackage{pgfkeys}
...
8
votes
2
answers
705
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
\...
6
votes
1
answer
746
views
As of 2022, how should one build class/package options without l3keys2e? [duplicate]
In a comment of this question,David Carlisle wrote:
[l3keys2e] should be considerd legacy now, the new built in option code is based on the same core expl3 code but extended and improved so hopefully ...
6
votes
2
answers
352
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 ...
6
votes
1
answer
362
views
Variable naming inside l3keys
I have a question about naming variables. In expl3, the variable naming convention is the following: \<scope>_<module>_<description>_<type>. The <scope> can be l, g, or c,...
6
votes
1
answer
164
views
What is the correct use of .choices when using keys?
I try to create a key normanius in the following way: Each key is mapped to an own variable \l__normanius_*_tl so that I can use those variables in some subsequent code.
\documentclass{article}
\...
5
votes
2
answers
449
views
Is there a way to reset all l3keys keys to their initial value?
This is a general and documented feature of latex3, but I shall still provide an MWE in order to illustrate the problem, see below.
Suppose I have a function which uses the l3keys key-value interface, ...