Open tingerrr opened 3 months ago
I would prefer it that way as well and it's also how I originally had it. The reason for splitting it into two arguments is that you can do this:
#let pseudocode-list = pseudocode-list.with(booktabs-stroke: 1pt + black)
#pseudocode-list[
- a
- b
]
#pseudocode-list(booktabs: true)[
- a
- b
]
If there is a better way to decouple config and usage, I'd love to know it!
Well, it would be inverted (see below), or require two distinct aliases. But I wonder how often one chose to use both versions in the same document. It's more likely that a user will use one or the other, which makes it the prime use case to optimize for, I think.
#let pseudocode-list = pseudocode-list.with(booktabs: 1pt + black)
#pseudocode-list(booktabs: none)[
- a
- b
]
#pseudocode-list[
- a
- b
]
Okay yes, that's a convincing argument.
I suggest removing
booktabs-stroke
in favor of a singlebooktabs
argument which either takes astroke
(or something convertible to it) ornone
to disable them, because currently not passingbooktabs: true
means thatbooktabs-stroke
is simply ignored.Having this extra boolean argument and the much longer argument the user actually cares about is not very idiomatic.
booktabs: 1pt + black
should enable them andbooktabs: none
should disable them.