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

learn more… | top users | synonyms

0
votes
0answers
11 views

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

I have the following error: ! Package pgfkeys Error: I do not know the key '/tikz/discard if not', to which you passed '{T}{400}', and I am going to ignore it. Perhaps you misspelled it. the code ...
5
votes
1answer
40 views

How do you define a default choice in pgfkeys

I've found the question Default value for a key defined with pgfkeys which works fine. But I would like to define an .is choice key with a default value, and I can't seem to get things to work. I've ...
0
votes
1answer
16 views

Pgfplots, Gnuplot: Put all *.gnuplot and *.table in subfolder - Global setting

MWE: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.12} \pgfmathsetmacro\z{0.403713} \pgfmathsetmacro\w{343.386319715305} \begin{document} \begin{tikzpicture}[ gnuplot ...
4
votes
1answer
45 views

Evaluate pgfkey before reading and writing to file with newfile

I want to define a custom aux file that contains some data, stored in a pgfkey. This data has to be stored from the keys and then written to the keys. However, when I take a look at the aux file, it ...
2
votes
1answer
85 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 ...
4
votes
1answer
209 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 ...
3
votes
1answer
62 views

How can we define a custom variant of addplot, including new keys and default values?

I frequently create plots with \addplot using a lot of optional arguments, making it difficult to keep the code consistent. I have a few repeating plotstyles so I tried to implement a new macro that ...
4
votes
1answer
251 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} ...
0
votes
1answer
59 views

Error in Tikz text

I am facing this error when I am using a tikz text Can you please tell me what is wrong ? Package pgfkeys Error: The key '/tikz/text' requires a value. I am going to ignore this key. See the pgfkeys ...
4
votes
1answer
187 views

Tikz: adjusting pin anchor

Old title: Pgf .style args: optional named arguments with defaults I was looking for a possibility to adjust the anchor of the text of a pin. Tikz does not allow this out of the box. This question ...
0
votes
0answers
39 views

Number format as optional key value argument for LaTeX function

I followed the answer as given in http://tex.stackexchange.com/a/34318/28093 in constructing a function which uses key values. It works fine, but I also want to be able to give the number format as ...
5
votes
1answer
67 views

Key names of the axis limits when not set explicitly

In the minimum working example below I use the keys xmin, xmax, ymin and ymax for calculations of coordinates for annotations. However, this only works when the axis limits are set explicitly in the ...
9
votes
2answers
108 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} ...
9
votes
1answer
1k 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} ...
3
votes
1answer
64 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
45 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
101 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
92 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 ...
104
votes
2answers
22k 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 ...
4
votes
1answer
143 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 ...
5
votes
1answer
58 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
83 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
138 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
126 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
174 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
57 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
104 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
125 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
151 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] ...
4
votes
1answer
118 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 ...
28
votes
2answers
811 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 ...
4
votes
4answers
173 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 ...
8
votes
1answer
541 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] ...
8
votes
1answer
117 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 ...
1
vote
1answer
370 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, ...
4
votes
1answer
105 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
189 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, ...
5
votes
1answer
147 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} ...
2
votes
1answer
460 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
65 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
263 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
753 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
46 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
156 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
120 views

pgfkeys error in ytableau package [closed]

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 ...
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} ...
12
votes
3answers
232 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}, ...
10
votes
2answers
2k 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 ...
5
votes
1answer
96 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 ...
17
votes
2answers
478 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?