As I stated in some other questions and on my profile page, I am writing a problem-solution package (I know, there are some of them already)

I have used xkeyval package and my keys, but now, I want to write a wrapper command for some other environment or command from a different package (not developped by by me) which itself uses xkeyval keys as well, belonging to a different key family.

   % Some stuff not relevant here, e.g. configuration etc.
   \theothercommand[#1]{other content} % Not written by me...

However, this fails of course, since the wrapper command argument should contain key values specific for \theothercommand.

Is mixing possible? Stated alternatively: How to distinguish inside which key value should go to \theothercommand and which key is connected to my own package code?

To make it clearer: There is no problem with keys having the some name in both families, because I use a specific naming scheme for my command and/or package keys, so key names from different packages do not collide.


One possibility I have in mind is to use a two or even three argument wrapper command, where the first argument contains keys belonging to key family FamilyA and the second argument holds keys from FamilyB, but this ist not really appropiate, since I would have to change some other commands on top level and to introduce additional optional arguments as well.

1 Answer 1


Well, I have found the solution of mixing keys -- it's stated in the manual of the xkeyval package, but rather hidden.

 % Other operations
 }% End of \providecommand

This requires, that one knows how the key family of the other package is named.

Now the bad news: Since the other package uses pgf keys (which do not know of 'families'), this way of mixing keys is rotten.

You must log in to answer this question.