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.

2
votes
1answer
44 views

Making a custom circuit element in circuitikz

I am writing intro physics exams in LaTeX, using the circuitikz package to make circuits. A lot of the circuits use simple light bulbs, which we represent as a circle with a curly-cue inside. ...
3
votes
1answer
34 views

Retrieve the name of the key in a pgfkeys .code macro

Just to focus the problem, I am thinking of reducing the numbers of parameters of the circuitikz package into a reasonable ballpark; now for example each one of the 30+ generators have a different key ...
0
votes
0answers
20 views

How are pgf-keys stored and is it possible to print a list of them

I was wondering how pgf-keys are handled internally. For example: If I define: \pgfkeys{/A/.code={My Key}} and I call the key with Hello this is \pgfkeys{/A}. How does the \pgfkeys-command expand? ...
3
votes
1answer
29 views

list of numbers as command option, numbers will be used to define colors

What I'm trying to do is to pass a list of numbers as an option to a command. The numbers will be used later to define colors inside a tikz picture. The first part I can do, here's an example \...
2
votes
1answer
32 views

Detect empty key in pgfkeys without `.get` code

I am trying to use pgfkeys to define an API for some macros, and I am having trouble detecting when a key is "empty". Based on this answer, I have come up with the following code: \documentclass[12pt]...
0
votes
1answer
18 views

How to set a value of a key of a user-defined (not global or default) style through /utils/exec (or similar means that allow for code execution)?

I need to change the value of the color key of changeStyleColor style through that style's /utils/exec. I can set a value of a global key through /utils/exec by \tikzset{/tikz/myKey=myValue}, or can ...
1
vote
1answer
49 views

error after an upgrade of MikTex (interfaces and pgfkeys)

I have a compilation problem with an old document, wich i cannot recompile today with an up to date MiKTex 2.9 installation on Windows. It seems that it is a problem with latest version of pgfkeys. ...
1
vote
0answers
26 views

Using pgfkeys to make a custom tikzpicture command with multiple use of addplot

Consider this MWE: \documentclass{article} \usepackage{tikz,pgfplots} \usepackage{pgfkeys} \usepackage{xparse} \usepackage{filecontents} % DATA 1 \begin{filecontents*}{data1.txt} 1 1 2 4 3 9 4 16 5 ...
3
votes
1answer
74 views

interval (or pgfkeys) package: Undefined control sequence

With \documentclass{article} \usepackage{interval} \begin{document} $\interval{0}{5}$ \end{document} I get the following in the log file ... (c:/texlive/2019/texmf-dist/tex/latex/interval/interval....
1
vote
2answers
30 views

pgfkeys: expand inside a command containing style

I need to define a style contained in a macro without expanding this macro. The problem is that if the macro contains several keys like or sets a value to a key like here: \def\myconfiguration{text={...
1
vote
0answers
44 views

Set the database in a genealogytree

Like in this question, I'm trying to fill a genealogytree with datas from an external source, thanks to the datatool package. But I can't figure how to tell genealogytree how to correctly recognize ...
1
vote
0answers
42 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
11 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 \...
3
votes
2answers
129 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
36 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
50 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
70 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
58 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
46 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
45 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
107 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
72 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
57 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
477 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
203 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
67 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
133 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
1answer
47 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
52 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
38 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
32 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
82 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
66 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
83 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
216 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
78 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
114 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
94 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
32 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
61 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
78 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
102 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
86 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
129 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
155 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
94 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} \...