TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In the following example, the key formatting has the initial default value apmep.

    /test/.is family, /test,
    formatting/.initial = apmep

I would also like that the value of the key formatting can only belong to the set of values {apmep, basic, design}. Is it possible ?

share|improve this question
up vote 3 down vote accepted

You seem to want to create a multiple-choice key. That is done using the .is choice handler:


    /test/.is family,
      formatting/.is choice,
        apmep/.code  = \showtokens{apmep},
        basic/.code  = \showtokens{basic},
        design/.code = \showtokens{design}
\pgfkeys{/test/formatting = basic}
\pgfkeys{/test/formatting = oops}

(I've just added some arbitrary code on here so something happens.)

share|improve this answer

Your Answer


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.