Tagged Questions

{pgfkeys} concerns a flexible key management system in TikZ/PGF.

learn more… | top users | synonyms

7
votes
2answers
248 views

Filtering options with pgfkeys

I am looking for an example of how to get pgfkeys to split a list of options so that: (1) some of the options are processed now, and (2) the rest of the options are passed to a second macro for ...
6
votes
2answers
197 views

Save choice and execute later in pgfkeys?

Using pgfkeys, I would like to have a choice key which, rather than immediately executing some code when a value is selected, stores the selection somewhere and then later on demand I can execute the ...
2
votes
0answers
333 views

Problem with tikz-dependency [closed]

I've download the tikz-dependency package and tried the basic example as in the package docs. \documentclass{article} \usepackage{tikz} \usepackage{tikz-dependency} \begin{document} ...
10
votes
2answers
1k views

pgfplotstable: How to access column name?

I have used \pgfplotstableset to assign column names in the preamble. However, I don't know how to access them. \documentclass{article} \usepackage{amsmath} \usepackage{pgfplots, pgfplotstable, ...
6
votes
1answer
578 views

pgfdeclareshape with variable dimensions using pgfkeys

I am trying to define some shapes for TikZ using \pgfdeclareshape. I would like to use options to make their size adjustable, however I do not get it to work. This example compiles, but the size of ...
5
votes
2answers
943 views

creating a fifo symbol with pgfdeclareshape

I'm compiling with: pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2011.7.8) pgf 2008/01/15 v2.10 (rcs-revision 1.12) tikz 2010/10/13 v2.10 (rcs-revision 1.76) ...
4
votes
1answer
482 views

How can I append switches to the existing value of the TikZ font key?

Is it possible to append switches to the existing settings for the TikZ font key? For example, suppose that I want all nodes to be in the \sffamily typeface. This can be done by setting every ...
4
votes
2answers
459 views

pgfopts error when installing ytableau

I am trying to install ytableau.sty, following the directions here and here, and in the ytableau README. I am running TexShop 2.47 on OS X 10.6. Here's a walkthrough of what I've done, although I ...
17
votes
4answers
1k views

Multiple TikZ keys with foreach

Playing around with pgffor, I'm trying to slightly modify an example from the TikZ/pgf manual: \path \foreach \x/\content/\style in {% 0/a/draw, 1/b/{draw,red}, 2/c/{circle,blue}, 3/d/draw% } ...
4
votes
1answer
2k views

Problem with “Package pgfkeys Error”

I am trying to create a color box using tcolorbox package. source code is like this- \documentclass[11pt]{article} \usepackage[top=.5in, bottom=.5in, left=1in, right=1in]{geometry} ...
5
votes
1answer
1k views

Package pgfkeys Error: I do not know the key '/tikz/ '

I have an error when I want to compile the LaTeX code below when I set \var to 1. Otherwise I have no problem. The error I got is: Package pgfkeys Error: I do not know the key '/tikz/ ' Could you ...
4
votes
1answer
149 views

Back-linking of pgfkeys

Please is there a way to avoid inadvertent cyclic linking of keys in \pgfkeys? A minimal example follows. Here I have keyb<->keya, which took its toll on TeX's capacity. \documentclass{article} ...
11
votes
1answer
321 views

How can I put “=” in a TikZ node label specified as an option

When I try to put an = symbol into a TikZ node label specified as an option (using label=), I get an error: Extra }, or forgotten $. Is there a way to specify = in such cases that I'm missing? ...
7
votes
2answers
296 views

Restoring previous value of PGF/TikZ key?

How does one restore the previous value of a PGF/TikZ key? For example, I would like to set the inner sep of a matrix to 0em but set the inner sep of nodes within the matrix to be the value that ...
6
votes
1answer
180 views

pgfkeys - .is family handler

This might seem a trivial question, but not for someone wanting to understand pgfkeys very well. In the following definition from pgfkeys package, why can't the \edef be replaced by \def? I have asked ...
5
votes
1answer
89 views

Spaces in pfgopts options

Is there a simple way to allow spaces in the options of a package using pgfopts to process them, which is local to that package i.e. I don't have to include some package in the main document before ...
5
votes
1answer
364 views

Problem with default values with pgfkeys

I try to make a fine macro to display the dimensions of lines inside a technical figure. This problem appears in several questions and answers but I would like to add some refinements. The next code ...
5
votes
1answer
252 views

pgfkey containing a foreach statement with a variable number of values

I would like to use pgfkeys in a macro. One key contains a foreach statement which handles a variable number of values. I have some problems concerning the right order of the output. Here a simplified ...
2
votes
2answers
127 views

pgfkeys 'filtering state'

Please does anyone know the 'filtering state' referred to in the following code from the pgfkeys-core file? \def\pgfkeys@install@filter@and@invoke#1{% \ifpgfkeysfilteringisactive ...
75
votes
2answers
14k views

Should \tikzset or \tikzstyle be used to define TikZ styles?

The PGF/TikZ manual states in section 12.4 Using Graphic Options, page 120 (v2.10), that TikZ styles can be set using: \tikzset{my style/.style={<tikz options>},...} However, in several ...
5
votes
2answers
371 views

Some questions about pgfkeys code

(1) In the expression \def\pgfkeysgetvalue#1#2{\expandafter\let\expandafter#2\csname pgfk@#1\endcsname} #2 will be let to \relax whenever pgfk@#1 is undefined. Is this harmless in pgf? Even if it ...
14
votes
3answers
454 views

The '.is if' handler of pgfkeys

Let us start with an example from the pgf manual, version 2.10, page 495: \pgfkeys{/flat world/.is if=theworldisflat} \pgfkeys{/flat world=false} \def\x#1{% code-A \iftheworldisflat Flat ...
4
votes
1answer
739 views

Style to make axis tick label opaque using “extra y tick” feature

This is a follow up to Style to make axis tick label opaque, where a suggestion was made to use the extra y ticks to specify special tick marks and use extra y tick style to apply a style to only ...
9
votes
2answers
434 views

Can pgfkeys deal with active comma?

When I tried to compile \begingroup \def\iden#1{#1} \catcode`\,=13 \catcode`\==13 \iden{\endgroup \pgfkeys{/my family/.is family} \pgfkeys{/my family/my keys/.cd, ...
10
votes
2answers
283 views

What is the best way to alias a key using PGF Keys

I would like to be able to alias a PGF key to another name, is this possible and if it is, how do I do this? For example if I have defined a key as: \pgfkeys{path/ color/.store in=\color@cx ...
14
votes
2answers
387 views

PGF Keys differences between .initial and .default

I am not too sure just by reading the manual as to the subtle differences between the .initial and .default PGF key types. Can someone explain and demonstrate the differences with a minimal example?
9
votes
2answers
216 views

Problem with loop-generated pkgkeys containing a space

I'm trying to use \pgfkeys in the following setting: \documentclass{article} \usepackage{tikz} \usepackage{pgfkeys} \begin{document} \begin{tikzpicture}[% m1 color/.initial=red, m2 ...
8
votes
2answers
560 views

Accessing a style property in TikZ? [duplicate]

Possible Duplicate: How to extract the value from a pgfkeys style element Let us assume I have defined the following TikZ style: \tikzset{ mystyle/.style={draw, fill=green, node ...
9
votes
1answer
934 views

Style to make axis tick label opaque

I would like to make a specific tick label have a white opaque fill around it, so that the a line does not cross over it. Ideally I would like to be able to specify exactly which tick, but do not ...
3
votes
1answer
359 views

Unsetting a PGF/TikZ key

Is there any possibility of “unsetting” a PGF/TikZ key? By “unsetting” I mean to remove the key from the list of keys and make PGF/TikZ behave as if it was never specified. To clarify, consider this ...
8
votes
3answers
319 views

How to know the status of a style? defined? empty?

mystyle/.style= {...} is perhaps used ? I would like to know how to verify if the style is really defined and in this case, I would like to know if the style is empty ? Is it possible to use ...
3
votes
1answer
437 views

PgfplotsTable: How to merge cell contents of two tables to one table?

I have two tables (sorry, inline tables are not working with pgfplotstable 2011/12/19 on my system, even with the option format=inline): Data table (data.csv): X,A,B U,1.1,1.2 V,2.1,2.2 ...
5
votes
1answer
142 views

pgfkeys: allowing one key to activate another key

I have two custom keys: key1, which is boolean; and key2, which accepts a value. The idea is that key1 activates a feature, and key2 customizes the feature. However, if key2 is used, I want key1 set ...
7
votes
1answer
473 views

How to use pgfkeys with “to path”

I'm not sure if the title is correct but I'll try to explain my problem correctly. I always work on the pgfvectorian package and I try to add some useful macros. One of these macros is to place an ...
32
votes
1answer
3k views

optional arguments to tikzpicture to set style globally

I can't get my head around how to get tikz and pgfkeys to do what I want. I would like to define a command which draws a little tikz picture. I'd like this command that would take optional keyval ...
16
votes
2answers
780 views

How to extract the value from a pgfkeys style element

Lets say I have defined some style: \tikzset{mystyle/.style={inner xsep=2pt, outer xsep=10pt}} Given the name of the style: How can I later get the (possibly overriden) value of one of its element, ...
4
votes
1answer
241 views

How to get the tikz/font pgfkey value and pass is to \pgfnode command

Let's say that I'm writing a decoration where I use the \pgfnode command in it. It works well but if I change the pgfkey TikZ/font to any dimension, it is not passed to the nodes in the decoration. ...
9
votes
3answers
758 views

Optional arguments in pgfkeys?

I need an optional argument in a pgfkey? Something like the following: \pgfkeys{example/.code = (Argument: #2, optional argument: #1)} \pgfkeys{example=[other]{some}} should result in (Argument: ...
3
votes
1answer
222 views

Font size as a key-value pair using pgfkeys does not work

I want to define a new environment whose contents can be typeset using a specific font family and size optionally specified as key-value pairs. For handling the key-value pairs I am using pgfkeys. Why ...
11
votes
0answers
2k views

MacTeX pgfkeys/tikz package fails [closed]

the document listed below, (taken from here: texample.net) fails on my system (running MacTeX 2011) with the error: Package pgfkeys Error: I do not know the key '/tikz/drop shadow' and I am going to ...
26
votes
2answers
711 views

How do I debug pgfkeys?

I'm sure if you're reading this question you are already familiar with my love for pgfkeys. However, it is absolutely impossible to debug: \tracingmacros is a total mess, with every key expanding to ...
6
votes
1answer
172 views

How to make a pgf default action create a different key

I know very little pgf, but I'm trying to learn...so bear with me (please). I would like to have a default action on a pgf path so that if I try to access any unknown key, without giving it a value, ...
7
votes
1answer
367 views

How does \pgfkeysvalueof work?

With this minimal example \documentclass{report} \usepackage{tikz} \begin{document} \tikzset{ line width = 5cm, CC/.initial = 7cm } It doesn't works :\pgfkeysvalueof{/tikz/line width} It works : ...
4
votes
3answers
304 views

PGFkeys problem. Meta arrow tips with parameters works only when I use different line width. Why?

The solution given here has a problem. Let re-write a minimum example \documentclass{standalone} \usepackage{tikz} \makeatletter \tikzset{arrow length/.initial = 6pt, arrow angle/.initial ...
5
votes
1answer
399 views

How do you pass unknown keys as options to a TikZ picture?

I try to write a command that accepts options, using pgfkeys. Unknown keys are collected in a style, that I try to use as global options for a tikzpicture environement. A minimal example would be: ...
5
votes
1answer
291 views

Nested macro envocation - syntax error?

I get a Argument of \\drs has an extra }. when I try to process the following: \documentclass{article} \usepackage{tikz} \newcommand{\drs}[2][lambda/.initial={}]{% \{% {\pgfkeys{/drs/.cd, #1, ...
10
votes
2answers
890 views

Using pgfkeys as an argument to a macro

I would like to use pgfkeys in a macro but find the documentation a bit hard to get started with. The following code should illustrate the problem I am trying to solve: \documentclass{article} ...
4
votes
1answer
844 views

Line with transparence changing with TikZ

I'd like to have a colored line that starts with transparent 100 and ends with trasparent, let's say, 30. I tried this code: \documentclass{standalone} \usepackage{tikz} ...
5
votes
1answer
420 views

TikZ. Access node's name within a .code handler.

I'd like to place variable number of additional nodes on the border of the rectangle. I suggest it to look in a somewhat following way: \node[name=R, my rectangle=top:3 bottom:1 left:2 right:1] {Node ...
14
votes
2answers
611 views

Is there a way to set a *global* key value using `pgfkeys`?

The simple answer to this question appears to be "No"; quoting from the pgf manual: The setting of a key is always local to the current TeX group. However, this is very annoying because it means ...