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.

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

Is it possible to create a key handler with the pgfkeys package that removes a key from a style?

Here's a minimal working example:

\pgfkeys{/my style/.style = {/a=1, /b=2, /c=3}}
\pgfkeys{/my style}\par
%\pgfkeys{/my style/.remove from style = {b}}
\pgfkeys{/my style}

The output is


The desired output, if the commented line were to be uncommented, would be


Here are a couple of closely related questions. They are not duplicates of this one, but the answers to the second one might be useful in devising an answer to this question.

Unsetting a PGF/TikZ key

How to extract the value from a pgfkeys style element

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.