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

learn more… | top users | synonyms

8
votes
2answers
76 views

Setting a length with a key to a TikZ node

I would like to create some split rectangles whose widths are defined by the length of a designated line. I would like to do this through a key such as in: \documentclass[border=4pt]{standalone} ...
3
votes
1answer
52 views

Dynamically open and close environments for foreach construction

I am trying to iterate through a list of data. The data has sections mixed between the items. When a section appears, I need to typeset it with \section, then I need to create a itemize environment ...
4
votes
1answer
28 views

pgfkeyvalue string is not parsed by xkeyvalue

I'm trying to create a database using pgfkeys. It is working rather well, until I needed to execute some parameters stored in a key and pass it to some command that uses xkeyvalue to parse the ...
2
votes
1answer
39 views

How to get line width and inner sep values?

I try to get the values of line widths and node inner sep. How to read such a value form own style (if it will be specified during modifications of the picture) or if it is not specified in this ...
3
votes
1answer
68 views

How to create a variable number of arguments as PGF key?

Many interfaces use a variable number of arguments, for example in CSS margin:1pt 1pt 1pt 1pt The clip functions of the graphics package also have similar examples. Is this possible with PGF ...
0
votes
0answers
40 views

I do not know the key /tiks/graphs/grow down

LaTeX file: \documentclass[letterpaper]{article} \usepackage{tikz} \usetikzlibrary{graphs} \begin{document} \tikz [every node/.style = draw] \graph [grow down] { foo -> bar -> baz }; ...
5
votes
1answer
53 views

How to .append to a value and retrieve it using .store in macro

I'm learning pgfkeys and trying to use it for key-value argument handling. I'm trying to set a style using it. For it, I defined a macro \mystyle to handle it, and use the same technique as in here ...
4
votes
1answer
59 views

How to handle a color key in pgfkeys

I'm trying to use pgfkeys to parse the arguments in a set of macros. I need to use some arguments for color. But, I get an error with the xcolor package saying that the key I defined is not a valid ...
4
votes
1answer
96 views

Filter in PGFPlots by x coordinate value

I've been trying to springboard off of the answer I got from percusse here, but I'm drowning in the PGFPlots manual. I wanted to plot a smooth region in the middle, given the x coordinate values ...
4
votes
1answer
102 views

Use pgfkeys to set a style variable

I'd like to use pgfkeys to define the scale for a number of tikz pictures. However, wenn I do the following: \documentclass{article} \usepackage{tikz} \begin{document} \pgfkeys{/my ...
4
votes
2answers
93 views

Defining styles that provide nested, parameterized styles with TikZ

I want to draw different kinds of graphs which I want to define using styles. One particular graph has labelled nodes, and I want to be able to attach these labels using a custom key (cn). The ...
1
vote
1answer
95 views

How to use optional arguments in newcommand with TikZ in the middle of a path?

I am trying to define a new command that will enable me to automatically format certain parts of my diagram. These parts consist of two nodes added above and below a path. I have a default value that ...
2
votes
1answer
44 views

Python-like keyword arguments via pgfkeys

I like to define commands to denote multi-parameter (mathematical) functions, e.g., \myf{x}{C} expands to f(x;C). During writing, however, it is sometimes hard to remember if I should use \myf{x}{C} ...
1
vote
0answers
58 views

Solved - Skins and pgfkeys problems using tcolorbox special features [closed]

I'm new to this forum where I have often found useful replies. I hope I'll be accurate enough here. I've been trying to create a new environment where there would be a left border line and my text ...
2
votes
1answer
104 views

How to show multi-choice answer key at the end of the document?

I want to show the answer keys at the end of the (multiple-choice) exam page. I have a bank of questions and answers (always the first answer in the bank is assumed to be the right choice), and some ...
1
vote
1answer
108 views

Parametric tikzset style with argument

I am working on a way to curtomize @percusse from Simulating hand-drawn lines to make it parametric. My idea is to have something like: \draw[penciline={jag ratio=2},decorate,thick] ...
3
votes
1answer
84 views

create new TikZ key with code and style tags

Assume I want to perform a complicated calculation within a TikZ key defintion. What is the recommended way to do this? Reading through the manual and digging around in other questions led me to ...
3
votes
0answers
134 views

Custom vertical lines with pgfgantt (pgf multiplier issues)

I'm having some issues drawing vertical lines in a ganttchart (using the pgfgantt package). The approach is to define the bars in the chart using a dd-mm-yyyy format but only showing the months. To ...
4
votes
4answers
151 views

How do I override a previously set value for `/tikz/rotate`?

I was writing my own style for a particular collection of nodes, most of which I wanted rotated in the same manner. So I defined the following style: my node style/.style={rotate=60,draw} Please ...
0
votes
0answers
123 views

In Ubuntu 14.04 — Package pgfkeys Error:

I borrowed the following code from here (answer by @Gonzalo). I switched from Windows 7 to Ubuntu 14.04. Given code was working fine on Windows 7 but now on Ubuntu 14.04, I'm getting the following ...
8
votes
1answer
98 views

Why is my /.is choice key not working correctly?

This example is much longer than it really needs to be, but I don't have the time to prune it down right now (apologies!). Everything in this example works as expected except the my fill key which is ...
4
votes
1answer
83 views

Expanding arguments to pgf/tikz styles

In an answer on this site is proposed a method to draw arrows on paths. For example, using the style [arrow inside={pos=0.2}] will put an arrow at position 0.2 on the path : \begin{tikzpicture} ...
2
votes
1answer
154 views

How to define a special tikz node?

I want to define a special tikz node, that I'll use that way: \specialNode[name=mynode, label=mylabel, otherTikzOptions...] (node_name) at (some_coordinate); And gets coverted to: \node[circle, ...
4
votes
0answers
181 views

Global definition of pgfplots axes style conflicts with colorbar

I am trying to plot an individual colorbar (with no axis), using the code below (MWE): \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.3} \begin{document} ...
5
votes
1answer
129 views

Extracting the value stored in the /tikz/x option

It is possible to change the x distance within TikZ internal coordinate system by passing the /tikz/x= key to the tikzpicture environment. \begin{tikzpicture}[x=14pt] % Picture code \end{tikzpicture} ...
4
votes
1answer
54 views

pgfkeys computed (i.e., dynamically defined) key

I would like to perform some simple simulation in latex/tikz (in order to produce dynamical graphs). Say something like cellular automata, Ising model, etc. I need to store somewhere the value of ...
5
votes
1answer
206 views

Package pgfkeys Error: The key '/tikz/opacity' requires a value

I'm drawing a diagram for a physical phenomenon, "motion in one dimension". I have this figure with a tikzpicture: \documentclass{article} \usepackage{tikz} \definecolor{particle}{rgb}{1.0,0.7,0.3} ...
7
votes
2answers
542 views

Using LaTeX commands inside pgfplotsset

Is there any way to use LaTeX commands inside \pgfplotsset? For instance, the following code produces an error indicated in the \pgfplotsset line, whereas if one replaced \contents in the ...
2
votes
0answers
39 views

Filtering key-value options

I want to define a new environment whose implementation depends on another environment. The first environment should accept a list of key-value options. Some of these options are for use only on this ...
3
votes
0answers
135 views

Getting a value, which has been given to a TikZ key

I'm trying to write a package based on TikZ, and this is the problem i'm currently stumbling upon. Let's assume, that I have a key, for example /tikz/circuit symbol unit, which executes some code. ...
3
votes
0answers
82 views

pgfkeys error in ytableau package

I'm running TeX Live 2013 Debian (on a Linux Mint 17 machine). I'm getting the following error when I try to load the ytableau package: ! LaTeX Error: File `pgfkeys.sty' not found. When I search ...
12
votes
3answers
224 views

Is there a compact way to set the same default for multiple pgfkeys?

I want to set the same default value for multiple PGF keys, like in this case where both a and b have a default of 1: \documentclass{article} \usepackage{pgfkeys} \pgfkeys{ a/.code={a:#1}, ...
1
vote
1answer
260 views

Custom separator for CSV import via csvsimple

I have successfully used csvsimple to import .csv files. But I would like to have commas as number separators, so I modified the .csv file to use semicolons as separators and as csvsimple manual says, ...
5
votes
1answer
88 views

How to store tcolorbox's (multiple) settings in a macro?

I'd like to store tcolorbox' (multiple) settings in a (single) macro (in fact, a xkeyval's \cmdKV@fam@key macro) and use them afterwards via this macro (I know I should use pgfkeys instead, but my ...
5
votes
1answer
134 views

Tikz fit library: fitting only one dimension and accumulating calls

The fit library is very useful for adjusting the size of a node to fit other nodes inside it. It is also useful in conjunction with shift to make a node span to the width/height of other nodes but ...
4
votes
2answers
300 views

Parsing and programming in TikZ

Background: I'be been reading the PGF manual (keys section) and today the TeX Book just arrived in the mail and just started reading chapter 7 (How TeX reads what you type) -- feeling like Mickey ...
4
votes
0answers
54 views

How can I decide whether a key has had .value forbidden applied?

Is there a way to decide whether a given key has had the .value forbidden handler applied? For example, I would like to write a handler .only that can be applied to keys to simulate Beamer's \only ...
2
votes
0answers
272 views

I do not know the keys /tcb/flush right upper — pgfkeys error [closed]

On compiling with PdfLaTeX, the below MWE generates me the following error I do not know the keys /tcb/flush right upper. To resolve this issue, I downloaded tcolorbox and pgfkeys package from CTAN ...
4
votes
1answer
220 views

Alternate lefthand/righthand width and check odd page in tcolorbox

I am creating a new environment using the tcolorbox package in the define options pos=t,b,r,l and lwidth and rwidth for margins, using the scheme key=value of pgfkeys. My idea is to create two new ...
2
votes
0answers
241 views

Problem with pgf library in TexLive [closed]

I am using TexLive, and I am writing a paper with someone else. He has sent me all of his files. He uses tikz to draw commutative diagrams. I am trying to compile his files, but I get an undefined ...
3
votes
1answer
160 views

pgfkey to set anchor for negative values in a bar chart

I have a ybar chart with positive and negative bars and "node near coords". I'd like to have the nodes of pos. bars at the top and nodes of neg. bars at the bottom/under the bar. With the following ...
5
votes
1answer
77 views

Passing (just) other options, when using pgfopts

I want to use pgfopts (and therefore pgfkeys) when customizing a class with new options, keeping the old ones, and using some of them. Here is a simplified example with a class "exa" which extends ...
2
votes
0answers
62 views

Using key-value interface for pgfkeys results in error

I've been reading a lot of posts lately on the difference between using the key-value interface and the handler interface of pgfkeys. To my understanding, the same values can be stored and retrieved ...
5
votes
0answers
28 views

The difference between \pgfkeysvalueof and /.store in [duplicate]

I thought using \pgfkeysvalueof on a key that does not have a /.store in and the variable of a key that does have a /.store in would give the same result. This seems not to be the case. This example, ...
2
votes
0answers
43 views

Remove key from style

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: \documentclass[preview,margin=10pt,convert]{standalone} ...
13
votes
1answer
149 views

Which arguments of `\includegraphics` cannot be set beforehand?

From the documentation of the graphicx package: Most of the keyval keys used in the graphicx package may also be set using the command \setkeys provided by the keyval package. For instance, ...
1
vote
1answer
112 views

Check the value of a pgfkey

I need to be able to check if the value of a pgfkey is empty or not. A solution I have tried (using package etoolbox): \edef\temp{\pgfkeysvalueof{/path/key}}% ...
4
votes
1answer
89 views

Changing the default value of a pgfkey

I want to create a command that can change the default value of my pgfkeys. I think the problem is that the value set as default is not expanded. Therefore the icondefaultsa below doesn't work. ...
5
votes
1answer
142 views

Reset pgfkey to default value in nested command call

I have created a new command whose argument can be a new call to the same command. How can I then reset the values of the pgfkeys in the nested call to their default values, so that they don't have ...
27
votes
2answers
769 views

What is the correct way to get a pgfkey value?

This is my first foray into the pgfkeys package and I found the following behavior really odd. The Tikz/pgfkeys manual mentions two ways for setting key values: \pgfkeys{key=value} and ...