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

learn more… | top users | synonyms

4
votes
0answers
70 views

Difficulty getting pgfkeys to set my fontsizes as I want

I apologize that this isn't particularly short. I'm going through old code and refactoring. In the process, I'm running into various bugs in how I've written things. In this particular example, the ...
17
votes
2answers
240 views

When to use a regular .initial key or a .store in key?

The excellent pgfkeys package provides, among others, two kinds of keys: regular "value-centric" keys that can be declared with /.initial, and "macro-centric" keys are declared with /.store in. Here ...
13
votes
4answers
250 views

How do you test whether a known key value has been set in pgfkeys

Using the .code handler to my keys and a private macro, I can easily test whether a key has been set when using pgfkeys. For example: \documentclass{article} \newcounter{mytestenvcounter} ...
8
votes
2answers
117 views

Is there a way to define starred variants for a keyvalue system?

I've created an environment for which various parameters are set through key values. Instead of creating a hornet's nest of various booleans, I would just like to have a slight variant form for some ...
8
votes
1answer
112 views

pgfkeys overeager in stripping away my braces

This is an extremely minimal example of what I'm trying to do. \documentclass{article} \usepackage{pgfkeys} \pgfkeys { /ae/example/set/parameters/.cd, keya/.code = { \def\mykeya{#1} }, ...
3
votes
1answer
104 views

pgfkeys “/handlers/first char syntax” generating error

I'm trying to follow the example from the tikz manual (2.10-CVS development version), but I'm not meeting success. Here's my MWE \documentclass{article} \usepackage{pgfkeys} \pgfkeys { ...
4
votes
1answer
185 views

What does “circle through” do with its argument?

The tikz library through can be used to draw a circle from a center coordinate A through another coordinate B like so: \node [draw] at (A) [circle through=(B)] {}; When attempting to specify the ...
4
votes
1answer
74 views

How retain (overridden) default values with pgfkeys?

I'm creating a package for drawing sequence charts and make use of pgfkeys to keep default values for various parameters that I need. However, sometimes I wish to provide to my macros one or more ...
6
votes
1answer
109 views

pgfkeys: Store unknown keys in a command

Does pgfkeys have some some predefined handler to store unknown keys and their values in a command as a list? E.g. in the following example I would like to get a command which contains blub=1, ...
8
votes
1answer
253 views

Is it possible to set a default value for an argument in a TikZ style?

In a command like: \tikset{qar/.style={draw,rectangle,fill=#1}} is it possible to add a default key value for the option fill so that if you have: \node [qar] {}; the node will be filled with ...
8
votes
1answer
240 views

pgfmathprintnumber in bold and/or sans serif

I've set some pgfkeys such as precision=2 and use comma. Now I wonder how do I get the results of \pgfmathprintnumber{123.567} to be bold and/or sans serif? I thought this is easy, but everything ...
12
votes
2answers
123 views

Forbidding/requiring certain pgfkeys?

I have some commands whose named arguments are processed by pgfkeys \dog[breed=Labrador, name=Fido] \human[name=John, car owned=Porsche] How can I arrange that \dog[breed=Labrador, car ...
7
votes
1answer
224 views

Using one key to set another key (in pgfkeys)

When I make a TikZ picture, I sometimes use absolute coordinates, and when I do, I find Martin Scharrer's showgrid TikZ library very handy. (It lays "graph paper" underneath my canvas, and puts ...
9
votes
2answers
243 views

Expansion problems with pgfkeys

I'm using pgfkeys, and a fairly adventurous syntax in which the values for some keys contain additional key/value pairs. (For instance, the value of the nodes key is a list of pairs, and the second ...
3
votes
2answers
293 views

Undefined control sequence \pgfmath@

Why does the following code give me this error message? Error ERROR: Undefined control sequence. --- TeX said --- \pgfmath@dimen@ ...men@@ #1=0.0pt\relax \pgfmath@ l.28 \draw ...
4
votes
1answer
163 views

A list of pairs in pgfkeys

Having learnt a lot about the pgfkeys package as a result of my last question, I'm now trying to do some more adventurous things. Let's say I have a command called \blob, whose value is the ...
9
votes
2answers
1k views

Simple example of pgfkeys

I'm struggling to get my head around the pgfkeys package. I currently use the keycommand package, which I find very easy to understand: it's just ordinary LaTeX commands with named rather than ...
1
vote
0answers
438 views

Why can I compile a tikzpicture perfectly in one chapter but not in another? [closed]

I am having trouble with including a tikz flow chart in my code. In my preamble I have included \usepackage{tikz} \usepackage{pgfplots} \usetikzlibrary{shapes,arrows} and this is the flow chart: ...
3
votes
1answer
169 views

How to use pgfkeys' /.style args handler without knowing the exact form of the input?

I would like to be able to create a command (using pgfkeys) that can take inputs that are of a limited set of forms, and for which certain pieces will come from a limited set of values. More ...
3
votes
1answer
111 views

How do I prevent the beamer class from removing my global options

I'm currently writing a latex package (or actually a beamer theme, but apparently that makes no difference) and I want to be able to specify a few things using key-value pairs in the global options. ...
5
votes
1answer
666 views

Equal (=) sign within TikZ label

I was trying to use an equal sign within a TikZ picture as a subcaption of an inner TikZ picture for comparing two images. Here is my code: \documentclass{report} \usepackage{amsmath} ...
1
vote
1answer
187 views

Pass key option inside a macro to a TikZ drawing command

I define a command with one optional key parameter. This command makes some calculations and them draws a tikzpicture. How can made my command to accept all the keys that a \draw command accept and ...
4
votes
1answer
191 views

Pass a 3d coordinate via pgfkeys

I'm using 3dplot to draw in 3D. Now I want to define my own environment, called pose, that is supposed to be used inside a tikzpicture-environment. It should perform a coordinate system tansformation ...
6
votes
1answer
159 views

Appending to a style that sets code with arguments in pgfkeys

I'm trying to create some templating infrastructure that heavily depends on pgfkeys' styles to easily customise the appearance of how some bits of text are typeset on my document. However, I've run ...
8
votes
2answers
178 views

How to make this pgfkeys code more compact and streamlined?

I have just managed to create my first command with pgfkeys. I defined a command \myset, whose purpose is to make (for example) \myset[big]{abc} correspond to \bigl\{abc\bigr\} Part of my goal ...
3
votes
1answer
206 views

How to add text in a link tikzset

How to change tikzset the text is automatically added to the link \documentclass{minimal} \usepackage{tikz} \usetikzlibrary{shapes,positioning,fit} \begin{document} ...
9
votes
1answer
154 views

Is it possible to store \pgfmathresult in a pgfkey?

I would like to perform a calculation using \pgfmathparse and then store \pgfmathresult as the value of a pgfkey. \documentclass{article} \usepackage{tikz} \begin{document} ...
4
votes
2answers
330 views

new command, pfgkeys within pfgplots axis environment

I am trying to setup an command to create technical drawing dimensions (inspiration from Dimensioning of a technical drawing in TikZ). I would like to use pgfkeys for that, in order to pass multiple ...
12
votes
2answers
400 views

How to detect if option provided via \tikzset

I would like to be able to detect if a particular option has been provided via a \tikzset and issue a message based on that. The MWE yields: But once the conditional works (just a comment for ...
1
vote
1answer
404 views

I am trying to use circuitikz, but this error pops up whenever I compile

I am currently trying to run some examples in the circuitikz library, and I keep getting the following error and the document will not compile: Package pgfkeys Error: I do not know the key ...
7
votes
1answer
161 views

Shorten both ends of a line with on key

Consider the following snippet: \begin{tikzpicture} \def\ptRad{2pt} \fill (0,0) circle (\ptRad); \fill (1,1) circle (\ptRad); \draw[<->, shorten <=\ptRad,shorten >=\ptRad] ...
3
votes
1answer
207 views

What does error bars/.cd do?

In pgfplots, if you want error bars, you have to write error bars/.cd into each addplot that should have error bars. What does it mean and what does it do and why do I need it?
6
votes
3answers
165 views

PGF keys error with key filter for keys containing \par

I am trying to use pgfkeys to store some text for use later. The end goal is to use a key filter to process options first and then apply them to text before it is stored. In the MWE below, if it try ...
6
votes
2answers
1k views

Complex objects in TikZ: pgfkeys scope and best practice

I try to define a reusable object in TikZ and run into some troubles. The following minimal working example shows the problem. \documentclass{article} \usepackage{tikz} %\usepackage{trace-pgfkeys} ...
4
votes
1answer
179 views

Compile error with MWE using pgfkeys, beamer, xparse and \includegraphics

First, please apologize the vague title, but I do not understand the problem enough to give a more exact title. The following MWE does not compile with a missing \endcsname inserted error around ...
9
votes
1answer
249 views

Creating tikz anchors based on pgfkey value

I'm trying to create several anchors equally spaced on the edge of my shape. The way I've tried to do this is to pass a key value in the node that would then define the anchors. The following code is ...
7
votes
1answer
229 views

pgfdeclareshape : how is a fill color recognized?

my custom made shape triangle does not recognize the fill color (or stroke color), if set as an option like fill=green, say. It does recognize the fill option though. I seem to miss some ...
5
votes
1answer
237 views

using \pgfkeys to set style parameters being passed to tkz-euclide

I've been using pstricks for a long time and feel very much at home there. But, recently I decided I want to learn tikz since that seems to integrate better with beamer. However, I keep running into ...
4
votes
1answer
279 views

Default value for a key defined with pgfkeys

Hereafter is a simple macro with keys nom and prenom defined with `pgfkeys. \documentclass[a4paper]{article} \usepackage{tikz} \pgfkeys{ /test/pgf/.cd, nom/.store in = \nom, ...
5
votes
3answers
421 views

How to submit a set of tikz command with pgfkeys?

I would like to send a serie of tikz keys to a tikz path with the pgfkeys interface. I succeeded with the following code but is there a simpler way to do that ? Can I do the same thing with something ...
1
vote
1answer
147 views

Difference between options and mandatory arguments with pgfkeys

I try to use the pgfkeys package. Hereafter there is a short example of a simple command which use pgfkeys. I would like to know why the containts of a variable is not considered in a same way in the ...
1
vote
0answers
47 views

How can I pass class/package options with spaces in values? [duplicate]

Possible Duplicate: Spaces in pfgopts options I have read Joseph Wright's excellent article on key-value systems, as well as questions on this site about how to pass arguments to class ...
7
votes
2answers
242 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
189 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
319 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
529 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
888 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
424 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
446 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 ...