Questions tagged [pgfkeys]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
32 views

Storing comma separated entries in a list and print them using pgfkeys, pgffor, etoolbox

Problem Statement I want to store several keywords in a list, then print all items inside the list separated by commas, but the last item should also be separated by ", and ...". For example,...
Rezha Adrian Tanuharja's user avatar
3 votes
4 answers
93 views

pgfkeys: Is it possible to achieve a "dictionary-like" input method for subkeys (without much parsing effort)?

Problem Description Currently I am working on a template for scientific theses. The goal is to automate a lot of tedious settings (like pdf metadata, styling/accent colors, title page etc.) by giving ...
dsacre's user avatar
  • 175
1 vote
1 answer
66 views

Package pgfkeys Error on TeXstudio, but no error on Overleaf

I've tried to use the code from this post by @AlainMatthes in TeXstudio, but I've got this error: Package pgfkeys Error: I do not know the key '/tkzcircle/radius' and I am going to ignore it. Perhaps ...
Robertas Vilkas's user avatar
0 votes
0 answers
40 views

Modify the optional argument of sectioning commands to pass key val lists

Standard classes have sectioning commands with an optional first argument, that can contain an alt title to be used in the table of contents and running heads. If one needs to use a keyval interface ...
Yiannis Lazarides's user avatar
0 votes
0 answers
47 views

Conflict between babel package and tcolorbox package

This code: \documentclass[a4papaer, 12pt, landscape]{article} %%% Format margines ... \usepackage[margin = 15mm]{geometry} %%% Get more control over colors \usepackage[tabel]{xcolor} %%% Add ...
Emad's user avatar
  • 33
9 votes
2 answers
164 views

l3keys equivalent of pgfkeys' .code 2 args

What is the recommended way to emulate pgfkeys' /.code 2 args (or more generally /.code n args) handler with l3keys? For example, with pgfkeys one can do \documentclass{article} \usepackage{pgfkeys} ...
mbert's user avatar
  • 3,388
1 vote
1 answer
39 views

pgfkeys + hyperxmp + utf8 problem

I am trying define a command where I use pgfkeys to process multiple options. Some of these are used to set meta-information in the pdf using hyperxmp. Example: \documentclass{article} \usepackage{...
jwbos's user avatar
  • 55
2 votes
0 answers
53 views

pgf key style with no argument, or how to avoid escaping hashes

I expect a user to write something like: \pgfkeys{ latex/.append style={ add to preamble={ \def\sayhello#1{Hello #1.} } }, } but this does not work, as #1 is understood as the first ...
tobiasBora's user avatar
  • 7,803
1 vote
3 answers
49 views

pgfkeys with length and .is choice

I want to define a key to handle a length, but also have custom settings. The usage I intend: my length = auto will set a boolean to false and ignore the length my length = half will set a boolean to ...
Jander's user avatar
  • 1,028
0 votes
0 answers
36 views

Formatting ticklabel number error

For some reason i cant format the ticknumber and restrain it at the same time, what is wrong? It repeatedly renders the errors [{ "owner": "LaTeX", "severity": 8, ...
Felipe9's user avatar
  • 145
1 vote
1 answer
50 views

How to find out available key-value pair for CircuiTikZ

I'm using CircuiTikZ and I came across this issue frequently: every time I want to tweak some options using tikzset, there is no documentation for the available key-value pairs. For example, if I want ...
Yiyang Yan's user avatar
2 votes
2 answers
158 views

Package pgfkeys: I do not know the key '/tcb/O' and I am going to ignore it

When I am compiling this code: \documentclass{article} \usepackage[margin=2cm]{geometry} \usepackage[T1]{fontenc} \usepackage{tcolorbox,tikz} \usepackage{lipsum,lmodern} \usetikzlibrary{calc} \...
Kaniky's user avatar
  • 69
4 votes
1 answer
100 views

Custom edge in TikZ graph

Goal I'm trying to connect the nodes of my graph using a horizontal-vertical-horizontal line. MWE Consider the following example: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{graphs, ...
Jux's user avatar
  • 43
0 votes
1 answer
42 views

Pgfkeys choice keys nested within another key

I'm trying to create a key which has two choice keys nested within it, like so: engagement={target designation=hostile target, stage=engage} Here's the MWE I have so far: \documentclass{standalone} \...
Crazymoomin's user avatar
0 votes
2 answers
101 views

Mechanical wagon parameterized with pgfkeys

I want to draw a mechanical wagoon for a physics book with a parameterized approach. These should be the parameters: #0 name, the name of the object, e.g. mywagon #1 position of the wagon as ...
Michael.H's user avatar
  • 107
0 votes
1 answer
48 views

Name collision when defining a macro using pgfkeys

(Please suggest a better title!) The following LaTeX document defines a macro called /PrintStuff. This macro uses pgfkeys to define one optional argument, rowidstring. The macro \rowidstring@tables is ...
Faheem Mitha's user avatar
  • 7,728
0 votes
0 answers
25 views

Calculations involving pgfkeys?

I've begun using pgfkeys to set a bunch of custom variables. I'm also using pgfmath to do some calculations. I understand how to set and call the variables, but the manual is mind boggling to me, ...
user182238's user avatar
0 votes
1 answer
40 views

Using \pgfkeys for Macros

I am having an issue implementing the \pgfkeys command for a marco I want to compile. Here is the code. Please let me know what went wrong: \documentclass{article} \usepackage{graphicx} \...
BirdboyBolu's user avatar
0 votes
1 answer
41 views

Comparing pgfkey variable against a string

I want to check a mutable variable against many possible values, so that a macro will behave differently based on that value. Since there are many variables, they are stored using pgfkeys. Testing ...
eduardofischermath's user avatar
1 vote
1 answer
55 views

Package pgfkeys Error: I do not know the key '/tikz/10mm)'

When try to shift vertically a Tikz node that use pgfkeys coordinates it shows an error message: Package pgfkeys Error: I do not know the key '/tikz/10mm)' The basic code is as follow: \documentclass[...
ABV's user avatar
  • 547
1 vote
1 answer
69 views

Can you not pass argments to commands using keys?

I use my own LaTeX preamble for university, so I am fairly used to creating macros using tools such as xparse. However, I am unsure why I cannot do something that will choose between two images on my ...
TimeTravelPenguin's user avatar
0 votes
0 answers
29 views

Tikz/pgfkeys: automatically execute code at the end of option processing

How can I automatically execute a code in a tikz/pgf option when all options are processed? I want to execute a command a single time, say updateValueShouldBeCalledOnce (that reads some variable sets ...
tobiasBora's user avatar
  • 7,803
0 votes
1 answer
85 views

Add properties instead replacing them in tikzset

I am working on a project involving several files and i would like to have the possibility to add properties to styles using tikzset and pgfplotsset. I reduced my code to a MWE : \documentclass[border=...
LMT-PhD's user avatar
  • 1,214
1 vote
2 answers
81 views

pgfkeys and passing argument with math-ish format

It seems that pgfkeys is attempting to do math on one of my arguments, and failing because it's not actually math. How do I prevent this, and ensure that the argument is passed correctly? Compiling ...
Tetragramm's user avatar
2 votes
2 answers
61 views

pgfkeys : print values in the order they were called

I would like to create an environment that prints the parameters in the order they were called using pgfkeys. \documentclass{article} \usepackage{pgfkeys} \pgfkeys{ /info/.is family, /info, default/....
h3t1's user avatar
  • 123
1 vote
1 answer
70 views

Bracing a list within a list

I have this set up: %%% some keys \pgfkeys{/mystuff/first color/.code=\gdef\myfirstcolor{#1}} \pgfkeys{/mystuff/first color/.default=black} \pgfkeys{/mystuff/last color/.code=\gdef\mylastcolor{#1}} \...
Raoul Kessels's user avatar
1 vote
0 answers
60 views

Condition in Writing New Environment with pgfkeys

I'm writing a new environment in LaTeX where pgfkeys package is used to give the key interface. Source Code: \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{noteframe}[2023/01/01 Version 1.0] \...
Future Liang's user avatar
0 votes
1 answer
68 views

How to use \pgfkeys properly in \newenvironment based on xcolor and tcolorbox?

I'm trying to create a new environment called noteframe that is based on tcolorbox. Supposedly, the noteframe environment should allow the user to change the theme color of the box using the name of ...
Future Liang's user avatar
0 votes
1 answer
50 views

Bizzarre behavior of pgfkeys' first char syntax detection

I saved the following code in the file ~/Test.tex. \documentclass{article} \usepackage{pgfkeys} \pgfkeys{ precision/.code={precision=#1}, unit/.code={unit=#1}, /handlers/first char syntax=...
Evan Aad's user avatar
  • 10.9k
0 votes
2 answers
36 views

pgfkeys' first char syntax detection failure

I saved the following code in the file ~/Test.tex. \documentclass{article} \usepackage{pgfkeys} \pgfkeys{ /handlers/first char syntax=true, /handlers/first char syntax/the character a/.initial=\...
Evan Aad's user avatar
  • 10.9k
1 vote
3 answers
82 views

Conditionally set "number within" in tcolorbox

I've defined a tcolorbox listing as follows: \newtcblisting[auto counter, number within=chapter, crefname={Lis.}{Lis.}, ... It works fine in books, but I ...
Michel Charpentier's user avatar
1 vote
2 answers
41 views

How to remove optional quotes from argument to pgfkeys

I am trying to define a pgf key handler name/.unquote and store in=\command so that {name="quoted string"} or {name=unquotedstring} both work. That is, the net effect of .unquote and store ...
Koji's user avatar
  • 1,476
4 votes
2 answers
70 views

How to robustly test if a macro has not been set yet via pgfkeys?

I am trying to define a newcommand \ifempty that takes three parameters: A macro that has been tied to a pgfkey via /.store in OR /.estore in What to do in case this macro has not been set yet (is ...
Vincent's user avatar
  • 4,703
2 votes
2 answers
97 views

Convert a macro name to pgfkey name

Let's consider a macro name of the form \first@second. I would like to write a command that would convert the name of the macro to pgfkey name of the form /first/second so that the following ...
Vincent's user avatar
  • 4,703
1 vote
1 answer
61 views

Pgfkeys associated with macros lead to unexpected results

Consider the following class: % CLASS % Preamble \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesClass{myclass}[2022/10/11] \LoadClass[varwidth]{standalone} \makeatletter % Pgfoptions \RequirePackage{...
Vincent's user avatar
  • 4,703
0 votes
1 answer
27 views

Branch on a pgfopts boolean choice inside a newcommand?

Consider the following code for a class that relies on pgfopts for option management: % CLASS \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesClass{myclass}[2022/10/11] \LoadClass{standalone} \...
Vincent's user avatar
  • 4,703
0 votes
0 answers
24 views

Test if a package option defined through pgf is empty

I would like to branch on package/class options defined through the pgfopts package. Here is an example : % CLASS % Preamble \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesClass{myclass}[2022/10/01] \...
Vincent's user avatar
  • 4,703
1 vote
2 answers
68 views

Mixing traditional class options and pgfoptions?

I am trying to mix pgfopts with more classical options to make a custom class. The idea is that classical options would be here to provide predefined behavior, while pgfopts options would be here to ...
Vincent's user avatar
  • 4,703
3 votes
2 answers
153 views

tikz: how to set one style to values of another style?

I have a pixel grid consisting of dashed lines, and I want to set a pixel using minimum size. As can be seen, I set the minimum size manually, which works. However, I would like to set it to another, ...
lemzwerg's user avatar
  • 599
0 votes
0 answers
74 views

TikZ get value of passed option/key inside pic

Is it possible to access the options that are passed to a pic inside the definition of a pic? And if yes, how? I know I can do this with self-defined custom keys. But is it possible to also get the ...
Denysos's user avatar
2 votes
1 answer
47 views

How can I change the case of a pgfkeys option dynamically within the name of a macro invoked on the fly?

I hope I am describing this correctly. In a larger project, I am trying to make my document level commands CamelCase and this is proving difficult when using keys and values, intended to be used ...
LaTeXereXeTaL's user avatar
1 vote
3 answers
130 views

How to make a macro that can fill in rows of a table with data from its parameters

I'm trying to make a class for a cv document. As part of that document, there will be a table that contains all the education information. What I'm trying to achieve is to have some sort of template ...
Jordi Vermeulen's user avatar
3 votes
1 answer
72 views

Comma separated values list in pgfkey is not a list

The question might be dumb but I can't find an adequate solution. If I put a comma separated value list as parameter using pgfkeys, then the result of pgfkeysvalueof is an atomic value and not a list. ...
Fernando Carpani's user avatar
0 votes
1 answer
100 views

Undefined control sequence when macro defined using pgfkeys contains an ampersand

I'm currently figuring out how to use pgfkeys, and I'm running into the following problem. I'm trying to define a command that prints part of a table, filled with arguments provided through pgfkeys. A ...
Jordi Vermeulen's user avatar
1 vote
1 answer
51 views

Include Hyperref Text Field in a UML State Diagram

As you can see in my minimal example, I have a state machine diagram where students can write the name of the transition line in a text box. Can you give me some advice on how to place a text field ...
Z.J's user avatar
  • 389
4 votes
4 answers
180 views

An element in the middle of a line

Please consider my minimal example. I would like to place an additional element -in this case a text field- in the middle of the line between nodes A and B. How does this work? Which of the following ...
Z.J's user avatar
  • 389
1 vote
1 answer
69 views

Extend a given shape from the UML-TikZ package with the path picture property

I call the style definition mystyle in line 20. As you can see, I pass a \filldraw command as an argument to the style definition mystyle. That way I want to achieve a gray circle to be displayed in ...
Z.J's user avatar
  • 389
1 vote
2 answers
133 views

Access pgfkeys outside environment

I find that the value of a key defined by \pgfkeys inside an environment can not be invoked outside this environment. In the following example, I want to typeset the value of the key aaa outside the ...
lyl's user avatar
  • 2,677
2 votes
2 answers
134 views

How to access a TikZ node's path after it have been created

I explored multiple solution to represent a graph cycle in TikZ with arbitrary nodes distributed around a circle and joined by arrows like the example below. What worked for me was to place nodes on ...
ChrisAga's user avatar
  • 185
3 votes
2 answers
155 views

How to transfer options to /tikz

In the following code, I want to typeset by the macro \pageband a band with color red on the middle of page. Three texts located at the left hand/middle/right hand of the band. The format of these ...
lyl's user avatar
  • 2,677

1
2 3 4 5
12