Some TeX Developments

Coding in the TeX world

A guide to key-value methods

with 4 comments

I have a second draft for TUGBoat on the go at the moment: an article on implementing key-value input. These are widely used in LaTeX packages, but are also usful in plain TeX. As well as the original keyval package, we have xkeyval, kvoptions and kvsetkeys for managing key–value input. However, actually getting started with these as a LaTeX programmer can be somewhat difficult. The aim of the article is to lower the barrier to getting going with key-value methods. As well as the keyval-based information, the pgfkeys package (part of the pgf bundle) is also covered (thanks to Christian Feuersänger).

Written by Joseph Wright

March 17th, 2009 at 8:30 pm

4 Responses to 'A guide to key-value methods'

Subscribe to comments with RSS or TrackBack to 'A guide to key-value methods'.

  1. This was a amazing article to read. It gives a good overview and makes starting easier.

    For me as an beginner in this toppic, the interface of the pgfkeys package looks much more cleaner to use.

    Finnally, if i may make a proposal for the final article: I really liked the \xmph example, it helped a lot to see all the commands »in live action«. Would it be possible to add the pgfopts package to the example, making it as functional as the first implementation? If i understand the documentation, one has to add basically the lines:

    \RequirePackage{pgfopts}
    […]
    \ProcessPgfOptions{/xmph}

    Ein Staunender

    18 Mar 09 at 2:50 pm

  2. Glad you liked it. I’d agree that pgfkeys is in many ways a better system: I’m planning to use pgfkeys for siunitx version 2.

    On the pgfopts part, this was added rather later than most of the text (which for pgfkeys was written by Christian). I’ll alter it a bit once I’ve had some comments back from TUG.

    Joseph Wright

    18 Mar 09 at 8:31 pm

  3. [...] Aufsatzes über den derzeitigen Entwicklungsstand von LaTeX3 soll in TUGboat erscheinen. Auch die Einführung in die „Key-Value-Methode“ ist lesenswert. Mit dieser Technik, Optionen für Dokumentenklassen [...]

  4. Thank you again for this great article, i just used it as blue print for a very simple just-for-fun package :) .

    Dennis Heidsiek

    22 Mar 10 at 11:34 am

Leave a Reply