6
votes
2answers
147 views

expl3 switch for booleans: Is there a \bool_case:Nnn?

There's \int_case:Nnn, \tl_case:Nnn, \str_case:Nnn, but I can't find something like \bool_case:Nnn. I know I can write: \bool_if:NT \l__<mymodule>_<nameA>_bool { ... } \bool_if:NT ...
3
votes
1answer
60 views

How do I create an expandable conditional with a loop inside?

I need to create an expandable conditional that uses a loop (that is, a ..._map_function:). It should either return true from inside the loop, or return false otherwise. In a 'normal' programming ...
6
votes
1answer
106 views

Test if a given control sequence is an \outer macro

I'm in need of a macro which receives a control sequence as argument to test if this control sequence is actually an \outer macro. I can code it myself as below . \documentclass{minimal} ...
16
votes
4answers
663 views

Is this branching code I wrote a bit obfuscated?

I've been away for a while and I forget if this sort of question is appropriate, but here goes. Recently I wrote some code (in expl3 but I hope it's clear enough) and in hindsight I wonder on its ...
4
votes
1answer
442 views

LaTeX3: Defining key to set boolean variable

I want to define a key, which, if set, sets a boolean variable to false. The documentation is not clear on that point. It states (source3.pdf, sect. 87, p. 134): Defines <key> to set ...