Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [pgfkeys]

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

1
vote
0answers
36 views

pgfkeys: set default value to boolean “.is if”, and values are changed globally

I'm quite new with pgfkeys, and I'm having troubles to set default values to boolean keys defined with .is if (let me know if there is another way to define boolean keys), and I don't know why, but ...
0
votes
0answers
8 views

Problem with passsing options through customized class interface \myclsset using pgfkeys

My intention is to create a class with a interface setup command \myclsset \documentclass{myclass} \myclsset{key1=val1, key2=val2, ..} % key-value list \begin{document} ... \end{document} where \...
4
votes
2answers
123 views

How does TikZ extract the pgf-keys in LaTeX

In any TikZ command, for example \draw, how does TikZ extract the keys, as they can be in any order. For example, the following \draw statements, give the same output (in different locations in the ...
2
votes
2answers
31 views

Using macros in \pgfkeys command

Is there a general way to pass a <key list> contained inside a macro to the \pgfkeys command, in order to process it in the usual way? In simple examples, \expandafter helps but I do not really ...
1
vote
0answers
43 views

How to build a saved anchor in pgf-tikz without repeating calculations

I've made a new shape in PGF-TikZ with an anchor (b anchor) which depends on some options. The following code works, but I need to repeat calculations to make the line in the shape and to place the ...
0
votes
0answers
22 views

Retrieving the value of pgfkey which has a mandatory value

The question in short is: Is there a handler to achieve what the low-level \pgfkeysvalueof macro does or should I implement it myself? If so, is the following a reasonable implementation? \pgfkeysdef{...
2
votes
1answer
62 views

Tikzset with with more than one defaults

\documentclass[tikz,border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{decorations.markings} \usetikzlibrary{arrows.meta} \begin{document} \tikzset{% parallelone/.style={% decoration={...
3
votes
2answers
53 views

Problems with anchors and pgfkeys

In How to properly use new options into \pgfdeclareshape of makeshape package I had a problem with including \ifx in \pgfdeclareshape which was solved by @marmot. At this moment, I'm trying to ...
2
votes
1answer
45 views

How to detect fill color option with pgfkeys

I have the following code section: \pgfkeys{ /tikz/.cd, color izquierda/.initial=\tikz@fillcolor, color derecha/.initial=\tikz@fillcolor, } It works, but if I don't have activated both options,...
2
votes
2answers
44 views

Problems with new options in new shapes using \pgfkeys

I have a problem with new options in new shapes using \pgfkeys: when I compile the following code: \documentclass[border=2mm]{standalone} \usepackage{tikz,makeshape,filecontents} % Require ...
1
vote
0answers
75 views

Creating a custom node shape with a variable number of anchors

For the sake of training my self on PGF, I want to create such node shape having multiply ports with a selecting switch as shown below This is my attempt to create this node for a particular number ...
5
votes
1answer
66 views

How to give multiple axis the same style/options

I would like to pick your brains again on a small issue. I want to use tikzstyle to describe the style of multiple plots but when I copy and paste the style I use on my plot, I get a compilation ...
2
votes
2answers
55 views

macro in node option

I use \pgfkeys of tikz to define something(please see the following MWE), but the simple code can not compile.I guess wrong way of using the macro \ifthenelse in \pgfkeys is the cause. But why and how ...
16
votes
1answer
438 views

Why is pgf 3.1 not compatible with tex?

The release of pgf 3.1 on Jan the 6th broke a nightly build I'm running. Updating the package locally allowed me to reproduce the error, so I'm certain that's what caused it. Here is a broken MWE: \...
1
vote
2answers
138 views

variant of scientific notation on pgf

I use scientific notation on pgf to display numbers. My present code as follows: \documentclass{article} \usepackage{pgf} \begin{document} \pgfkeys{ /pgf/number format/.cd, sci, sci generic={...
3
votes
1answer
63 views

Using pgfopts to set up a tcolorbox style

Consider a package file eqbox.sty: % Preamble \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesPackage{eqbox}[2018/01/01 Boxed Equations] % Packages \RequirePackage{xcolor} \RequirePackage{pgfopts} \...
4
votes
1answer
117 views

TikZ: Transitioning from snakes to decorations

I'm trying to change a tikz-picture so it does not show a warning upon compilation. Minimal working example: \documentclass[tikz,border=10pt]{standalone} \usetikzlibrary{snakes} %\usetikzlibrary{...
3
votes
1answer
64 views

Selectively ignoring some pgfkeys based on the existence of a tikz style

I want to be able to modify the style of some parts of a complex picture depending on a tag on nodes or pathes (precisely, I have a complex architecture schematic and I want to selectively highlight ...
3
votes
0answers
53 views

Is it possible to build a pgf key?

Wondering if it is possible to do something like the below, ie. build the keypath using arguments or similar: \def\mymacro#1#2{% \pgfkeysvalueof{/someprefix/#1/#2}% } \pgfkeyssetvalue{/someprefix/...
3
votes
1answer
43 views

How to use equal sign inside class option with pgfopts [duplicate]

I've created a custom class with key-value options using pgfopts. So far this is working fine. Now I would like to create a key which can take a random string including equal sign and comma. The ...
1
vote
2answers
51 views

Storing options for pgfkeys inside macro

I want to define some options as a list of key-value pairs inside a macro and use that macro inside a command that takes pgfkeys-style options. Here is a MWE: \documentclass{standalone} \usepackage{...
2
votes
1answer
37 views

Create checklist with pgfkeys -> multiple /.is if needed

I want to create a checklist with "static" content, but with every instance of this list I want to be able to check or uncheck some items of the list. As I want to learn PGFKeys, I tried to do it ...
0
votes
0answers
29 views

Define and use own PGF style

I have declared my own PGF shape. In the \foregroundpath I draw several items, and I would like to specify a certain style for them, e.g. \tikzset{ border style = {red, thick, dashed} } and then in ...
8
votes
1answer
78 views

Dealing with pgf keys in multiple namespaces

I have macros which take a list of keys as argument and pass this list on to \tikzsets which each use a specific namespace. In the example below macros of this type would be \marmot and \koala. This ...
3
votes
1answer
62 views

How to expand pgfkeys value when the key path contains macros?

This question represents a second, more simplified, attempt at a problem I asked about some time ago but for which I received no answer. In short, I need to put the fully expanded result of a call to ...
3
votes
1answer
73 views

custom color multinode shape with inherited default color

I would like to create a multinode shape doublecirc with two node parts, say text and lower, consisting of two circles with text in each. (There are obviously ways to do this more simply -- but this ...
2
votes
2answers
162 views

Beamer theme pass options to inner/outer theme with pgfkeys

I want to design my own beamer theme and I have split the theme into inner and outer theme. The outer theme can take some options. So basically, I want to be able to write \usetheme[some options]{...
4
votes
0answers
70 views

Pgfkeys: obtaining a list of defined (sub)keys

I would like to understand if pgfkeys already offers a way (although undocumented, as far as I could see) to obtain a list of defined keys in a path, that is \pgfkeys{ /my/path/a = 1, /my/...
5
votes
3answers
111 views

How to compute the *key* of a pgfkeyssetvalue command?

I have a list of (angles/value) pairs. I'd like to use TikZ to draw nodes with those values at these angles (easy), then draw an edge from node i to i+1, with the value of node i as a label (not ...
5
votes
2answers
83 views

How to transform pgf commands in a pgfkeys “.code” macro

I have a pgf shape, and I want the possibility of building it with certain keys which add optional parts to the shape. These keys are drawing the optional parts using the .code pgfkeys parameter. The ...
1
vote
1answer
31 views

pgfkeys: Forward params to other command

In the following MWE I would like to forward a list of key-value-pairs to the \node command. I tried to store the list in \nodeparam, but this seems to not work: \documentclass{article} \usepackage{...
2
votes
1answer
55 views

Store coordinate tuple in pgfkeys

I would like to store a coordinate tuple as used by tikz in a pgfkeys variable. In the following MWE, I would like to pass the tuple (0.5,0.5) to the command and store it in the variable \position: \...
1
vote
1answer
39 views

How can I change the size of all pgfplots at once (or more general, how to set global settings)?

How can I change all pgfplots at once but keep the lable sizes and so on the same? Another question would be how to set global settings? I set the following e.g. in every plot every x tick label/....
4
votes
1answer
77 views

Using a macro to supply pgfkey parameters

I would like to supply the pgf argument of a particular macro call in advance. However I get the error: Package pgfkeys Error: I do not know the key '/test/name=test, active=false' and I am going ...
2
votes
1answer
91 views

change “output format” of pgfkeys sci or fixed

I have defined an environment that is used for calculation as shown below \newcounter{Precision} \newenvironment{calc}[1][1]{\setcounter{Precision}{#1} $\pgfkeys{/pgf/fpu,/pgf/fpu/output format=sci} }...
2
votes
1answer
74 views

How to set the same exponent of 10 in in scientific notation for column in pgfplotstable?

I need all the numbers in the first column to have the same exponent of ten, say 10^{-2}. It would be nice if the multiplier was placed not near the number, but in the header of the table. \...
1
vote
0answers
102 views

Circuitikz - pgfkeys error with the 'invert' command: How do I invert my Voltage source?

The Latex CircuiTikZ documentation [v0.8.3] says: "Bipole paths can also mirrored and inverted (or reverted) to change the drawing direction." Example: \begin{circuitikz} \draw (0,0) to[pD, ...
1
vote
1answer
47 views

Using first char syntax with pgfkeys

I am learning how to use first char syntax with pdfkeys. I want to make macros options more human, but then turn them into numbers for easier if-then analysis. But right now I am having some troubles: ...
1
vote
0answers
141 views

Package pgfkeys Error

With example \begin{tikzpicture} \node[\@photoshape, draw=\@photoborder, line width=0.3mm, inner sep=\photodim, fill overzoom image = \@photo ] () {}; \end{tikzpicture} I get the error Package ...
1
vote
2answers
93 views

Why does pgfkeys' value not be able to use directly

The following code describes my questions about the use of pgfkeys's value which puzzles me long. Anybody can give me a hand? \documentclass{article} \usepackage{pgfkeys,xcolor} \begin{document} \...
0
votes
0answers
43 views

Keys get default values when they are not listed in the macro \pgfkeys

Keys can be set a default value by the handler /.default in pgfkeys. However, when this is used, the name of the key has to be in the list of \pgfkeys(e.g. \pgfkeys{mykey}). My question is: how to ...
5
votes
2answers
32 views

pgfkeys fails with initial blank line?

I am trying to learn pgfkeys based on the example code shown in How to create a command with key values?. Everything seems to be working as expected except that the code is sensitive to a blank line ...
4
votes
1answer
85 views

How to define a style of undefined key choice? [duplicate]

I would like to implement something like default in a switch statement, but for .is choice pgf key. I know that there is an error key handler /errors/unknown choice value but I don't know how to use ...
1
vote
1answer
403 views

How to globally define styles for pgfplots

I have to draw a lot of graphs in a similar way. I used to code them using TikZ like this example: % first the axis \draw[axis, ->] (0,0) -- (3.5,0) node[below] {$\text{Menge}\ x$}; \draw[axis, -&...
2
votes
1answer
82 views

Building up and joining “internal” lists

How can I append to a pgfkeys-style comma-separated list? Or, alternatively, how can I define a macro to join an etoolbox list with a delimiter? For an environment I'm designing, I want to accumulate ...
1
vote
1answer
365 views

I do not know the key /tikz/none

I used matplotlib2tikz and now get the Package pgfkeys error: I do not know the key /tikz/none when I compile. I have \RequirePackage{pgfplots} and \RequirePackage[utf8]{inputenc} specified but it ...
1
vote
0answers
24 views

Can't set a default nor initial nor first value to a pgfkey

\documentclass{article} \usepackage{tikz} %\pgfkeys{/tikz/scale/.show code} \pgfkeys{tikz/.cd, scale/.append code={\pgfgettransformentries\scale\ab\ba\bb\xhsift\yshift}, %scale/.initial=1, %...
2
votes
1answer
31 views

How to find the .store macro of a pgfkey if exists? or whatever other method

How to know if a pgfkey defined in some package is accessible by pgfkeysvalueof or by a .store macro, and how find this macro without digging the package code ? Or whatever other method to find the ...
1
vote
0answers
28 views

Combine code for synonym-keys in pgfkeys

I use pgfkeys to define package options, one of them regulates the color of some items. I have multiple keys, defining the same code, e.g. colors=1 or colors=b&w. Do I have to repeat the code ...
2
votes
1answer
44 views

But where is my scale pgfkeys? [duplicate]

I'd like to access to the /tilz/scale, the pgfkeysvalueof returns an empty string. Is there a .store macro dedicated to ? \documentclass{article} \usepackage{tikz} \begin{document} \begin{...