1

I want to spruce up my department's thesis document class with better / less idiosyncratic class options support. So, I've noticed this community wiki question:

A big list of every keyval package

... but that's just a list. Also, there's not much of a description of what distinguishes the different packages from each other, plus some of the posts are over 6 years old.

So, my questions are:

  • What criteria would I apply to choose between the different options/key-value packages?
  • What are the significant features unique to the more popular options/key-value packages?

... if by this time this is a "settled" problem and the packages have all converged, that would answer my question too I suppose.

einpoklum
  • 12,311
  • The packages are all still alive and kicking. The criteria for you to choose are your requirements - what do you need an options package for? If you just need to pass along some boolean values or strings, I recommend the kvoptions package - it is very straightforward to use. For more advanced uses - set options and implicitly run some code - pgfkeys would get my vote. – Michael Palmer Sep 21 '17 at 21:45
  • @MichaelPalmer: I think you could make that an answer actually. Frankly, it seems really strange there are so many of these packages. – einpoklum Sep 21 '17 at 21:48
  • I would avoid kvoptions and xkvoptions (or whatever the other one is) like the plague. They are the least intelligible and most difficult to use, in my experience. I never did get the hang of them - even for simple tasks. pgfkeys is better, but the expl3 key-value support is far and away the most straightforward, most clearly documented and easiest to use. That is my experience. Others really find pgfkeys easiest. Some people, like @MichaelPalmer, even understand the kvoptions stuff. I'd take my hat off to them were I wearing one. – cfr Sep 21 '17 at 21:58
  • All this answer can elicit is opinions. You have to try the packages and see which you like and which works best for your usage. I use pgfkeys for some things; the expl3 stuff for others. I still have kvoptions code, although I don't understand it - if I have to modify it, I replace it with something intelligible. Again - to me. There is no answer here except the answer which you find out for yourself. It is like asking which editor you should use. We all recommend you use one, but which is not answerable. Similarly here. Similarly for, say, fancyref vs. clveref or whatever. – cfr Sep 21 '17 at 22:01
  • @cfr: Could you make that into an answer, referring to the criteria of "legibility", "quality of documentation", "perceived popular preference"? ... Also, I've started reading through the kvoptions documentation, and man that thing is cryptic. – einpoklum Sep 21 '17 at 22:02
  • 1
    @cfr - how about taking off your wig then? – Michael Palmer Sep 21 '17 at 22:08
  • @einpoklum It isn't an answer. It is just my experience and my opinion. If we are going to have a list of +s and -s for these packages, they should be added to the big list question where they are easy to find. – cfr Sep 21 '17 at 22:10
  • @MichaelPalmer Would be happy to. I've never taken a wig off, but some of my hair (probably) became a wig and that is off, as it has never been on. Hope that counts. – cfr Sep 21 '17 at 22:11
  • 1
    @cfr - sure, that'll do ;) – Michael Palmer Sep 21 '17 at 22:20
  • A few criteria (which really set them apart) might include: 1) Features. Do you really need all those features, or on the other extreme, does this really provide you with all the features you need without you reinventing the wheel over and over again? 2) Speed. While most key=value solutions are reasonably fast, there are some which are on the turtle end of the spectrum, and others closer to rabbits. 3) Predictable behaviour. Some packages strip braces they shouldn't have stripped, or interpret undefined keys in strange ways. 4) Robustness. Some packages don't work with non-standard catcodes. – Skillmon Nov 30 '20 at 22:11

0 Answers0