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

learn more… | top users | synonyms

2
votes
1answer
220 views

Alternate colback and colbacklower in tcblisting

I have written a new environment based on tcblisting from package tcolorbox. I want the background color for code always in "gray" and the background color of the text compiled in "white". He held ...
2
votes
1answer
293 views

! Package pgfkeys Error | compiling a standalone picture as \includestandalone{fig}

I have two tikz pictures in external files (fig1.tex and fig2.tex): fig1.tex \documentclass[a4paper,class=minimal,border=0pt]{standalone} \usepackage{tikz} \usetikzlibrary{plotmarks} ...
4
votes
1answer
69 views

Using pgfkeys to switch between “enumerate” and “enumerate*” when using the enumitem package with the package option “inline”"

No matter what I seem to do, I'm just getting this wrong. I would like to be able to set a key to determine how my list is arranged. \documentclass{article} \usepackage[inline]{enumitem} ...
7
votes
1answer
810 views

Creating a Gantt chart error

Comes up with error pgfkeys:I do not know the key /pgfgantt/group peaks. I for the life of me cant seem to find what is wrong. Can anybody help me with this please? Thanks % Out line proposal ...
1
vote
1answer
156 views

Using a macro inside the axis options for pgfplots

I want to create an macro to replace the string '{a,b,c}' in my code: xticklabels={a,b,c} so I set \newcommand\inputnames{a,b,c} xticklabels=\inputnames but this gives me the same result as ...
26
votes
2answers
969 views

Arguments for TikZ style

Motivation To put arrows inside of a TikZ path I have defined myself a TikZ style arrow inside. To make it even more portable I want it to take arguments like this \draw[arrow inside={pos = 0.1, end ...
1
vote
1answer
181 views

set tikz options through pgfkeys

I'm using tcolorbox and using pgfkeys to set some of the tikz options. But they do not seem to be working. Consider the MWE given below. If I set draw color using \pgfkeys{/tikz/.cd, fill=red, ...
2
votes
1answer
127 views

TeX capacity exceeded with \pgfkeys

I'm trying to create a code listing and set custom options using pgfkeys. The below provided code works fine. The style handler for title option (currently commented out) is breaking TeX compilation ...
12
votes
5answers
388 views

What do the pgfkeys key handlers .get and .store in do?

When I need to retrieve the value of a key in a macro, I use the key handlers .get and .store in. Here is what is written in the pgfkeys documentation: Key handler key /.get= macro Executes a ...
5
votes
3answers
180 views

How can I remove outer brackets without expanding content?

I'm trying to use pgfkeys to collect information that will be passed to a clist. But, I'm not able to get this to work correctly. It seems that I'm getting brackets around the list and is prevent ...
3
votes
1answer
66 views

How can I use `pgffor` to iterate through a database of keys and properly retrieve them

I would like to create a command that stores a database. I then want to iterate over the database and print out the results to the document. This MWE shows two different approaches I've taken. But ...
3
votes
0answers
81 views

pgfkey `/.store in` handler not functioning as expected

I'm still working on learning how to use pgfkeys. Here's a snippet of code that I'm working on. It compiles fine: \documentclass{article} \RequirePackage{xparse} \RequirePackage{pgfkeys,pgffor} ...
1
vote
1answer
84 views

Problem with referencing plots

I want to reference some plots (done with pgfplots) in my text but somehow it's not possible. If i copypaste the examples from the pgfplot- documentation it works but if I move one of the labels to ...
12
votes
2answers
451 views

Key that takes a list of other keys as argument and sets them

I would like to define a key, let's call it mystyle, which has several subkeys, like mystyle/A and mystyle/B, and I'd like to be able to choose which of these subkeys to set by calling mystyle=A, ...
4
votes
0answers
78 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
294 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
296 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
121 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
114 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
140 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
247 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
84 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
138 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, ...
9
votes
1answer
350 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
368 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
125 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
241 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
279 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
366 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
202 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
533 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
208 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
121 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. ...
6
votes
1answer
897 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
227 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
218 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
181 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
184 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
245 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
174 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
357 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
467 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
509 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 ...
8
votes
1answer
272 views

Shorten both ends of a line with one 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
244 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
175 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
200 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
280 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 ...