Tag Info

New answers tagged

2

You're not doing anything wrong. What you've done is use \presetkeys which is the cause of your apparent problem. The following is mentioned about \presetkeys in the xkeyval documentation (section 6 Presetting keys, p 15): \presetkeys[<prefix>]{<family>}{<head keys>}{<tail keys>} \gpresetkeys[<prefix>]{<family>}{<head ...


6

I'd say that this is the right way for augmenting the set of options, even for changing the behavior of already existing keys (not in the example, but I think you get the idea). I made some changes to the code, using the proper way of defining keys, as .code:n should be the last resort. \documentclass{article} \usepackage{xparse} \ExplSyntaxOn ...


2

Not sure how this fits into your bigger scheme, but you could do: \documentclass{book} \usepackage{xkeyval} \usepackage{etoolbox} \usepackage{ifthen} \makeatletter \define@key{MEMacros}{wide}[true]{\def\ME@wide{#1}} \define@key{MEMacros}{width}[3cm]{\def\ME@width{#1}} \presetkeys{MEMacros}{wide=false}{}% \presetkeys{MEMacros}{width=3cm}{}% ...



Top 50 recent answers are included