1

I'm in the process of migrating a class I wrote from xkeyval to kvoptions, mainly because I'd like to provide class options whose values could be list of comma separated values:

\documentclass[myoption={val1,val2}]{myclass}

and, for this, xkeyval needs xkvltxp which is currently buggy.

I'd like to know if there is any tutorial that explains how perform this migration, especially how to deal with xkeyval's \define@choicekey macro. Another questions are about:

  • + extension of xkeyval's macros that allow to deal with unexpected values passed by the user,
  • \ExecuteOptionsX and \ProcessOptionsX equivalents.
6
  • 1
    As things stand this is too broad. xkeyval does 'general' key-value input whereas kvoptions is rather more focussed on a smaller number of common entry types. The net result is that replacing xkeyval by kvoptions will also require hand-coded keys using just keyval, and thus an answer here would have to be an entire guide to creating keyval input! – Joseph Wright Mar 8 '15 at 14:46
  • Could you argue, why you want to migrate? There seem to be other packages available, such as l3keys2e, ltxkeys, and skeyval. All possible alternatives seem to be listed at ctan.org/recommendations/kvoptions. – koppor Jan 28 '18 at 15:16
  • 1
    All possible alternatives seem to be listed at ctan.org/recommendations/kvoptions. There is also a "A guide to key-value methods" by Joseph Wright, second draft for TUGBoat, 2009-03-17. texdev.net/wp-content/uploads/2009/03/keyval.pdf. OK, I recommends kvoptions or pgfkeys, where pgfkeyx is an extended version of. – koppor Jan 28 '18 at 15:24
  • 1
    @koppor At the time of asking, the reason was I to provide class options whose values could be list of comma separated values (I didn't succeed to do so with xkeyval). Meanwhile, I switched to l3keys2e for new classes (but couldn't find time to switch the concerned class). – Denis Bitouzé Jan 28 '18 at 17:30
  • @denis-bitouzé Is "Programming key–value in expl3 by Joseph Wright" the documentation one should go for or do you recommend something else? – koppor Mar 7 '18 at 19:06