I want to make new macros that support key=value style. But, there are many such packages for doing this.

What is the best choice, given these priorities:

  1. Highly developed, complete, or actively developed, lots of attention
  2. Works well with other packages, fewest conflicts.
  3. Available with texlive or Fedora repo
  4. Native or core extension preferred over third party package, by which I mean the 'latex' basic/standard compiler.
  • 3
    Welcome! As it stands, this question is really asking for opinions and that's interesting but not suitable for this format. Could you edit your question to be a bit more specific? Because the truth is, the best choice depends on what you are using it for. I've used all of the ones you mention except keyreader and I use another option as well. Horses for courses - asking which horse you'd suggest entering into an arbitrary race isn't a useful question. Which race? A minimal example document which shows what you are trying to do would greatly improve your question and the quality of answers.
    – cfr
    Apr 23, 2016 at 20:48
  • 3
    expl3 and its l3keys seems also plausible; and it's going to be the “main future” of LaTeX. In a general case, I would personally choose that, and pgfkeys in second place because I like the easiness and flexibility to define new keys.
    – Manuel
    Apr 23, 2016 at 21:01
  • 4
    @ChristianHupfer I found keyval and xkeyval a nightmare to use in comparison with both pgfkeys and, expecially, l3keys. I never did get to grips with them and am greatly relieved that l3keys and pgfkeys have come along so I may never have to. I find l3keys by far the easiest for complex stuff and pgfkeys by far the easiest for simple stuff. But I would mainly use pgfkeys or l3keys based on what I was doing - if it is TikZ or something similar, l3keys becomes at least a bad dream, and pgfkeys makes much more sense. But my kilometres have evidently differed from yours ;).
    – cfr
    Apr 24, 2016 at 0:21
  • @cfr: Yes, we had gone different ways ;-)
    – user31729
    Apr 24, 2016 at 5:15
  • @cfr: I've deleted my comment, since it was apparently not useful, regarding the votes...
    – user31729
    Apr 25, 2016 at 3:59

1 Answer 1


There is no concept of best in the TeX world.

As mentioned in the comments, most active key-value handling packages are pgfkeys and the l3keys. The latter is also inspired by pgfkeys however it requires a minimum level of LaTeX3 knowledge which might be a bit baffling for newcomers since it doesn't have a comprehensive introduction and manual (yet!).

pgfkeys on the other hand is pretty straightforward and has a very very comprehensive description placed within the graphics package TikZ/PGF manual (hence the name pgfkeys which TikZ uses extensively).

Both packages are pretty matured and can handle pretty complicated tasks.

Personally I would suggest starting with pgfkeys if compared the two. However, if a minimal L3 knowledge is present they are more or less equivalent in terms learning curve.

Even I use pgfkeys mostly and extensively, my personal favorite is yax which is from one of my favorite manual writers Paul Isambert. Yax gives a more Pythonic dictionary-based attribute parameter syntax which is not very common in TeX universe but once you get a hold of it, it really pays off. Though it might not be the most general or the most up-to-date it still gets the job done.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .