Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
4 votes
2 answers
104 views

Pgfkeys not finding key during key expansion through several macros

Summary I have a caller macro that should pass options to other nested macros within it. However, the key is not found when I pass it from the caller macro, yet it is correctly defined (I think) ...
adn's user avatar
  • 11.5k
2 votes
0 answers
70 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
  • 9,458
2 votes
1 answer
54 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
0 votes
1 answer
99 views

Generating pgfkeys paths using \foreach loop

I'm trying to generate a set of keys using a \foreach loop, but they don't appear to be created properly. I've tried debugging with a handler that shows the keys, but they look correct to me in the ...
meide's user avatar
  • 1,175
8 votes
3 answers
405 views

Is there a way to retrieve the “source code” and the argument pattern from a macro for reuse (i.e. what \show shows)?

I want to concatenate the “source code” of two macros which share the same argument signature. How do I grab (i.e. expand once) the macro without TeX searching for the arguments which the macro ...
Robert Siemer's user avatar
0 votes
1 answer
197 views

Passing arguments using pgfkeys to a macro for including PDF files, using pdfpages

This is a slightly simplified version of a macro I've been writing (using pgfkeys and pdfpages) to include PDF files. This seems to be working. I ran into one bump. includepdf does not like it when ...
Faheem Mitha's user avatar
  • 7,888
4 votes
2 answers
232 views

pgfkeys: .store in constructed macro

I'm trying to store a value in a macro that is constructed from the arguments of another macro, but I must be missing something because the macro is not created. MWE: \documentclass{article} \...
meide's user avatar
  • 1,175
1 vote
2 answers
172 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={...
tobiasBora's user avatar
  • 9,458
3 votes
2 answers
360 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 ...
Axel Krypton's user avatar
  • 1,093
2 votes
0 answers
317 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 ...
Muhammed Hashim's user avatar
1 vote
2 answers
133 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{...
Volker's user avatar
  • 347
3 votes
1 answer
231 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 ...
Karl Hagen's user avatar
  • 1,538
3 votes
1 answer
460 views

How do I expand \pgfkeys properly?

I am using pgfkeys to hold formatting parameters. The tree is set up with a set of default values, as well as customizations for various formats. Those formats each have a basic definition, which in ...
Karl Hagen's user avatar
  • 1,538
3 votes
1 answer
200 views

Loading pgfkeys key values from an external file without Expl3?

This is a followup of this question. Briefly, I want to load from an external file the argument to give to \pgfkeys, but this is not trivial. Here is an example of what I tried to do, which however ...
Nicola Gigante's user avatar
1 vote
0 answers
119 views

pgfkey as integer for ifnum

I'm sure this has something to do with expansion, and I am quite new to using the pgfkeys package so I'm possibly missing some sort of basic practice, but I cannot find anything that remotely looks ...
James's user avatar
  • 145
1 vote
0 answers
116 views

Modify `\funcdef` macro to use `pgfkeys` instead of `keyval` [closed]

I attempted to modify the \funcdef macro from egreg's solution from A macro adding or removing parenthesis automatically to use pgfkeys, but am running into some difficulty (probably related to some ...
Peter Grill's user avatar
1 vote
1 answer
287 views

How to perform macro expansion in an pgfkey

I'm trying to extend the example for multilanguage support shown in here: https://tex.stackexchange.com/a/42791/7561 The current solution As it is right now, one needs to define the macro using \...
adn's user avatar
  • 11.5k
6 votes
2 answers
472 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} \...
Georg Sievelson's user avatar
6 votes
1 answer
406 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 ...
Denis Bitouzé's user avatar
1 vote
1 answer
736 views

Check the value of a pgfkey

I need to be able to check if the value of a pgfkey is empty or not. A solution I have tried (using package etoolbox): \edef\temp{\pgfkeysvalueof{/path/key}}% \expandafter\ifstrequal\expandafter{\...
Magnar Myrtveit's user avatar
3 votes
1 answer
176 views

Changing the default value of a pgfkey

I want to create a command that can change the default value of my pgfkeys. I think the problem is that the value set as default is not expanded. Therefore the icondefaultsa below doesn't work. ...
Magnar Myrtveit's user avatar
3 votes
1 answer
526 views

Using a macro inside the axis options for pgfplots

I want to create an macro to replace the string '{a,b,c}' in my code: xticklabels={a,b,c} so I set \newcommand\inputnames{a,b,c} xticklabels=\inputnames but this gives me the same result as ...
Laurent Dudok de Wit's user avatar
6 votes
3 answers
292 views

How can I remove outer brackets without expanding content?

I'm trying to use pgfkeys to collect information that will be passed to a clist. But, I'm not able to get this to work correctly. It seems that I'm getting brackets around the list and is prevent \...
A.Ellett's user avatar
  • 51.1k
10 votes
2 answers
921 views

Expansion problems with pgfkeys

I'm using pgfkeys, and a fairly adventurous syntax in which the values for some keys contain additional key/value pairs. (For instance, the value of the nodes key is a list of pairs, and the second ...
John Wickerson's user avatar
3 votes
2 answers
2k views

Undefined control sequence \pgfmath@

Why does the following code give me this error message? Error ERROR: Undefined control sequence. --- TeX said --- \pgfmath@dimen@ ...men@@ #1=0.0pt\relax \pgfmath@ l.28 \draw (\...
John Wickerson's user avatar