Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I lose track of all the different keyval packages. Can we maintain a list here? (Community wiki, one package per answer with a brief description of scope. I've started things off but need help completing it.)

share|improve this question
1  
This should be converted to a TUGboat article. –  Martin Schröder Aug 28 '11 at 20:24
5  
@Martin — as soon as we'd do that someone would write another one! :) –  Will Robertson Aug 29 '11 at 0:26
    
i'd second what @will says: i constructed a list, but in two months, two more (getoptk -- a slightly weird thing, and ltxkeys) have appeared. –  wasteofspace Aug 30 '11 at 21:14
    
Why are there (more than) 13 keyval packages anyway? –  You Dec 30 '11 at 8:43
2  
See also the survey article tug.org/TUGboat/tb30-1/tb94wright-keyval.pdf –  Christian Feuersänger Dec 30 '11 at 11:04

17 Answers 17

pgfkeys.sty, part of PGF/TikZ

Author: Till Tantau

share|improve this answer
    
I marked this entry up---it also counts for adding the other entries:-) –  Marc van Dongen Dec 30 '11 at 9:23

kvoptions.sty

Author: Heiko Oberdiek

Supports keyval processing of package/class options.

share|improve this answer

keyval.sty

Author: David Carlisle

The original and (probably) most widely used keyval package. Provides \define@key and \setkeys but all processing for special key-types must be done manually.

Removes one or two layers of braces around each "val".

Note: this package can have scope problems with nesting \setkeys. Nowadays I'd recommend a more modern alternative.

share|improve this answer
    
The keyval package strips off 2 levels of outer brace: one by using the space trimmer \KV@@sp@def and one in internal parsing. –  Ahmed Musa Dec 31 '11 at 1:54

l3keys.sty, part of expl3

Author: Joseph Wright (through the LaTeX3 Project)

Inspired by pgfkeys.

Use l3keys2e to use it in options of LaTeX2e packages and classes.

share|improve this answer

xkeyval.sty

Author: Hendri Adriaens

Cannot be loaded before \documentclass.

Note: in the past controversial because it overwrites keyval's \setkeys macro and in some cases caused (long-standing) incompatibilities. But I believe any problems resulting from this are now fixed.

share|improve this answer
    
The xkeyval package strips off precisely 3 levels of outer braces in key values: one by using keyval’s space trimmer \KV@@sp@def and two in internal parsing. The keyreader package addresses this problem. Another problem with the xkeyval package is that its \setkeys command doesn't accept unbalanced conditionals. For example, \setkeys[KV]{fam}{key=\iffalse} fails. The next release of keyreader addresses this problem in its \krdsetkeys command. The selective sanitization scheme of xkeyval also appears unduly expensive when there are active commas and equals sign in key-vals. –  Ahmed Musa Dec 31 '11 at 2:05
    
Much of the reported incompatibility issue with xkeyval's \setkeys seems to have disappeared, even for keys defined by David Carlisle's original \define@key. kvsetkeys package later replaced its \setkeys with \kvsetkeys. –  Ahmed Musa Dec 31 '11 at 2:14
    
Is there any particular reason why it can't be loaded before \documentclass? –  kahen Mar 5 '12 at 17:48
    
Yes, by design. xkeyval needs to know the documentclass options for inheritance purposes. Not sure from a technical standpoint, though, why it can't pick them up along the way; haven't looked into the details recently. –  Will Robertson Apr 8 '12 at 2:05
    
xkeyval.sty (not xkeyval.tex) needs the \@classoptionslist macro for (1) filtering =<value> from the class options list and (2) for class and package options processing with \ProcessOptionsX*. The keyreader packages delays the search for \@classoptionslist and the actions mentioned at (1) and (2) above until \documentclass was instantiated later by the document. –  Ahmed Musa Nov 8 '12 at 15:06

kvsetkeys.sty

Author: Heiko Oberdiek

share|improve this answer
2  
kvsetkeys only sets keys; it doesn't define them. It strips one level of outer curly braces in key values. –  Ahmed Musa Dec 31 '11 at 2:20

scrbase.sty

Author: Markus Kohm

It’s part of KOMA-Script and documented in scrguien.pdf (english) and scrguide.pdf (german).

I never used it my self so I can’t say more about it …

share|improve this answer

keyreader.sty

Author: Ahmed Musa

The package provides a robust interface to controlling keys in xkeyval, removing some of that package’s restrictions.

share|improve this answer
    
@AhmedMusa: done! –  Gonzalo Medina Jan 2 '12 at 17:33
    
@Ahmed — your comments should be additional answers on this page! –  Will Robertson Jan 29 '12 at 21:04
    
Also, this page is supposed to be comprehensive. It makes no sense to remove an entry! I've added skeyval below. –  Will Robertson Jan 29 '12 at 21:09

pgfopts.sty

Author: Joseph Wright

Allows pgfkeys processing to be performed on class or package options.

share|improve this answer
    
It's not really a keyval package :-) –  Joseph Wright Aug 28 '11 at 16:46
3  
Counts for me :) –  Will Robertson Aug 28 '11 at 16:50

keycommand.sty

Author: Florent Chervet

share|improve this answer

skeyval.sty

Author: Ahmed Musa

The skeyval package provides commands for compactly defining and initializing all types of key (ordinary, command, boolean, style, choice, etc). It attempts to combine the features of ltxkeys package (which has the syntax of the xkeyval package) and pgfkeys package. See Possibility to pass options to packages.

share|improve this answer

keyval2e.sty

Author: Ahmed Musa

This was meant to be lightweight, with no facility for options processing.

share|improve this answer

ltxkeys.sty

Author: Ahmed Musa

ltxkeys, unlike keyreader, is completely independent of xkeyval and provides many more features. It can be loaded before \documentclass.

share|improve this answer

skeycommand.sty

Author: Ahmed Musa

Superceded by ltxkeys.

share|improve this answer
    
Much of the functionality of skeycommand has been moved to ltxkeys, as indicated in the sub-title of skeycommand documentation. But my recent experience shows that it's nearly impossible to abandon a package, once it has been released to CTAN. It will resurface somewhere someday. –  Ahmed Musa Dec 30 '11 at 8:31

yax.tex

Author: Paul Isambert

Part of the author's collection of plain tex/generic packages.

Looks nice, but I've never used the macros. Syntax highly eccentric, as viewed by a latex user...

share|improve this answer

pgfkeyx.sty

Author: Ahmed Musa

From the package description:

The package extends and improves the robustness of the pgfkeys package. In particular, it can deal with active comma, equality sign, and slash in key parsing. The difficulty with active characters has long been a problem with the pgfkeys package.

With any luck, this facility can be merged into the main code of pdfkeys directly. Unless this robustifying is too resource intensive, I supposed.

share|improve this answer
    
The integration of pgfkeyx with pgfkeys was suggested by the author of pgfkeyx. pgfkeyx is not any significantly more resource-intensive than the original pgfkeys. –  Ahmed Musa Nov 8 '12 at 15:15

rkeyval.sty

Author: Michael Downes

Keyval syntax is restricted in a sense that options must always be surrounded by braces.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.