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

learn more… | top users | synonyms

1
vote
1answer
30 views

TikZ/PGF error when using forest

I am trying to make a linguistics tree using the forest package, as in the second example in this thread. I was able to generate the tree for the most part, but I cannot draw the triangle for some ...
3
votes
3answers
87 views

Make a PGFkeys path take precedence over another path for a whole scope

I've been writing a package for LaTeX lately called TikZ-Feynman. It is an extension to TikZ and just like PGFplots, it defines a new environment within {tikzpicture} called {feynman} and makes ...
0
votes
1answer
40 views

PGFPlots: How to add a legend entry from a macro into a foreach loop?

I'm doing a stacked bar plot where each plot is taken from a different column of the same file, and I have the list of column names I want to use in a macro: \newcommand\tools{tool1, tool2, tool3, ...
8
votes
1answer
60 views

Does expl3 key-setting syntax have an equivalent of TikZ/PGF's .cd?

This question has the following form: 'I know how to do X using Y. I can also do X using Z but not so elegantly as using Y. Can I do X using Z in the same way that I can do X using Y, for a more ...
3
votes
0answers
51 views

How to list all known pgfkeys?

Is there a way to list all known pgfkeys (i.e., those that are currently set)? Concretely, I'm looking for a way to get the value of the tikz scale option. I was hoping there would be a pgfkey for ...
4
votes
1answer
62 views

\pgfmathprintnumber and pre-defined styles

In text mode I would like to use \pgfmathprintnumber to print numbers in an uniform style. The style used shall be defined in the preamble of the document. See the following MWE: ...
4
votes
3answers
77 views

Saving a PGFKey to the aux file

I want to save the value of a particular key (from pgfkeys) into the aux file for my LaTeX document. If it matters, I'm using LuaLaTeX, but the same problem is exhibited by XeLaTeX, pdfLaTeX, and the ...
3
votes
1answer
36 views

Print text conditionally if argument is not empty

I would like to define a command with arguments managed using pgf-key that prints some text conditionally on the the fact that a value was indeed passed. Here is my current code ...
2
votes
0answers
40 views

Tizkit: Package pgfkeys Error: I do not know the key '/tikz/shape1' [duplicate]

I'm trying to use tikzit, and I created a shape (basically a new kind of node). The shape is located into /home/user/.config/tikzit/shapes/shape1 but tikzit (and pdflatex as well, obviously) doesn't ...
2
votes
1answer
49 views

Processing complex label-like expressions with pgfkeys

I would like to use pgfkeys to process expressions like label={[scale=.8,pos=.9]above right:$-2\pi i$} (which typically appear as labels in nodes), and extract from them three parameters according ...
3
votes
1answer
55 views

What does fontenc do and when is it applied? Based on an example of creating my own package

After quite a time of using LaTeX, I am now trying to understand how it works. The following example concerns the functionality of fontenc. In order to not have to write down the inclusions of all ...
3
votes
1answer
130 views

How to make a line style for drawing the ground line?

I'd like to draw a piece of "ground line" (picture below), but I don't know, how to make a line style and how to ensure proper localizations of the picture boundary. The solution of achieving an ...
3
votes
0answers
29 views

How to do math on overlay arguments using pgfkeys (handle numbers and ranges)

Context I'm trying to do some basic operations on arguments on pgfkeys, and got stuck while trying to do simple arithmetic on them. Thankfully, egreg gave a nice solution for handling the arithmetic ...
4
votes
1answer
29 views

How to do math on pgfkeys arguments and asign them to other keys

I'm trying to reduce the work load of applying some overlays over and over with different numbers. However, I need to compute for a given frame the next or previous one, thus needing to do simple ...
0
votes
1answer
23 views

Initialize a pgfkey with style and defaults (as in object constructors)

Using pgfkeys, I'd like to initialize keys as in setting attributes with an object constructor. Such that I can create keys /Photo/May, /Photo/June etc. based on some initial properties of /Photo, ...
3
votes
2answers
32 views

How to interpret the contents of a macro as key=value assignment for pgfkeys

Based on this pgfkeys method, I tried to collect options in a macro for later re-use: % Set options for a photo % #1 = options, #2 = photo name, i.e. June \newcommand\SetPhoto[2][]{% ...
1
vote
0answers
44 views

Using pgfkeys inside overlay specification

I would like to use labels to assign overlay specifications. Below is the code I have so far. My main question is why does not the following terminate to compile. \documentclass[11pt]{beamer} ...
4
votes
1answer
40 views

pgfkeys pass font command

I am defining options using the pgfkeys command. \newcommand{\subtitlefont}{} \pgfkeys{ /titleblock/.is family, /titleblock, default/.style = {titlesize = 48, titlelineskip = 52, ...
4
votes
0answers
59 views

How can I reliably and consistently save PGF keys filtered by path to a macro for later use?

I am trying to use PGF keys in TikZ with a relatively complex key tree. (Complex by my standards, that is - I'm sure it isn't that complicated in the scheme of things.) What I hoped to do is to ...
1
vote
0answers
41 views

Overriding a TikZ key branch and misdirecting `every node`

I would like to have a branch, say \foo\, containing exactly the same keys as another one, say \tikz\, except for some redefined ones. That's easily done with the following \pgfkeys: \input tikz ...
3
votes
1answer
117 views

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

I'm trying some features of tcolorbox package and I'm facing some problem with the option $tikznode$. Here my code: \documentclass{article} \usepackage{tcolorbox} \listfiles ...
2
votes
2answers
84 views

PGF keys passing arguments to multiple environments

I'd like to combine both tcolorbox and textpos to place boxes to a specific position in a page. Here is a MWE: \documentclass[]{article} \usepackage{pgfkeys} \usepackage{tcolorbox} ...
5
votes
2answers
100 views

tikz shapes, not quite getting things right (anchors and keys)

So, I'm having a go at defining a tikz/pgf shape. Basically these nodes will not contain any text, and it is just a method of not copying a lot of code to draw a few of these boxes. I have a few ...
5
votes
1answer
69 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
36 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
63 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 ...
3
votes
1answer
95 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 ...
0
votes
1answer
123 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 ...
6
votes
1answer
411 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
53 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
87 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
126 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
77 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
54 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
280 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
133 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 ...
5
votes
1answer
78 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
135 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
207 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
197 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
157 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
284 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
83 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
181 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
151 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
195 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
142 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 ...
4
votes
1answer
296 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
217 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
141 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 ...