4
votes
1answer
49 views

Extracting the value stored in the /tikz/x option

It is possible to change the x distance within TikZ internal coordinate system by passing the /tikz/x= key to the tikzpicture environment. \begin{tikzpicture}[x=14pt] % Picture code \end{tikzpicture} ...
4
votes
1answer
35 views

pgfkeys computed (i.e., dynamically defined) key

I would like to perform some simple simulation in latex/tikz (in order to produce dynamical graphs). Say something like cellular automata, Ising model, etc. I need to store somewhere the value of ...
5
votes
1answer
50 views

Package pgfkeys Error: The key '/tikz/opacity' requires a value

I'm drawing a diagram for a physical phenomenon, "motion in one dimension". I have this figure with a tikzpicture: \documentclass{article} \usepackage{tikz} \definecolor{particle}{rgb}{1.0,0.7,0.3} ...
3
votes
0answers
50 views

Getting a value, which has been given to a TikZ key

I'm trying to write a package based on TikZ, and this is the problem i'm currently stumbling upon. Let's assume, that I have a key, for example /tikz/circuit symbol unit, which executes some code. ...
5
votes
1answer
62 views

Tikz fit library: fitting only one dimension and accumulating calls

The fit library is very useful for adjusting the size of a node to fit other nodes inside it. It is also useful in conjunction with shift to make a node span to the width/height of other nodes but ...
4
votes
2answers
212 views

Parsing and programming in TikZ

Background: I'be been reading the PGF manual (keys section) and today the TeX Book just arrived in the mail and just started reading chapter 7 (How TeX reads what you type) -- feeling like Mickey ...
2
votes
0answers
83 views

Problem with pgf library in TexLive

I am using TexLive, and I am writing a paper with someone else. He has sent me all of his files. He uses tikz to draw commutative diagrams. I am trying to compile his files, but I get an undefined ...
24
votes
2answers
481 views

What is the correct way to get a pgfkey value?

This is my first foray into the pgfkeys package and I found the following behavior really odd. The Tikz/pgfkeys manual mentions two ways for setting key values: \pgfkeys{key=value} and ...
8
votes
2answers
171 views

How to create and use a new pgf key

In this example, I would like to have a new key NbGrad then I could write : \begin{tikzpicture}[>=stealth,x=6cm,font=\footnotesize,NbGrad=12] And use the key as I use \NbGrad or another way if ...
6
votes
1answer
79 views

Style key syntax problem

I tried both \documentclass{standalone} \usepackage{tikz,pgfplots} \tikzset{axeseul/.style={% /pgfplots/axis x line align=center, % rien en y /pgfplots/axis y line align=none, % sans axe ...
8
votes
2answers
368 views

Problems with pgfkeys

I'm trying to use pgfkeys to define commands with custom parameters, but I can't even get the example in pgfmanual to run: \documentclass{article} \usepackage{pgfkeys} \begin{document} ...
4
votes
1answer
97 views

\AfterGroup sorcery and choking tex/pgf

In the following code, the line \AfterGroup* (from theetextools package) causes the pdfLatex compiler to 'choke', i.e it produces only this output and the process is stuck forever, consuming 13% of ...
8
votes
2answers
216 views

Correct use of arguments pattern in pgfkeys/append after command in tikz?

I could not find many examples for the correct use of arguments patterns in pgfkes, but I was able to come up with the following: \documentclass{standalone} \usepackage{tikz} ...
6
votes
1answer
57 views

Using \pgfkeys in \section

I am using \pgfkeys to help organize custom symbols. However, I ran into a problem when trying to execute a key inside \section command. \documentclass{article} \usepackage{tikz} ...
8
votes
1answer
153 views

Avoiding `Dimension too large' and `ill-formatted floating point' errors in tikz

I am attempting to draw some pictures using tikz, with the decorations library, and am encountering a `Dimension too large' error. I have read the 20+ other questions/answers about this error, and ...
6
votes
0answers
125 views

how to add parameters to shape which internally use 'append after command'

years ago Mark Wibrow provided me the following code to adding text in inside border of a (rectangle) shape on this comp.text.tex thread: \documentclass[tikz,border=5mm]{standalone} %%% code from ...
7
votes
2answers
213 views

Creating anchors in a shape with a \foreach loop

I was playing around with this question, and in particular tried to modify and expand the linked example. It works fine, but there is an error when I try to use a \foreach loop to define the different ...
2
votes
1answer
213 views

! Package pgfkeys Error | compiling a standalone picture as \includestandalone{fig}

I have two tikz pictures in external files (fig1.tex and fig2.tex): fig1.tex \documentclass[a4paper,class=minimal,border=0pt]{standalone} \usepackage{tikz} \usetikzlibrary{plotmarks} ...
24
votes
2answers
746 views

Arguments for TikZ style

Motivation To put arrows inside of a TikZ path I have defined myself a TikZ style arrow inside. To make it even more portable I want it to take arguments like this \draw[arrow inside={pos = 0.1, end ...
1
vote
1answer
167 views

set tikz options through pgfkeys

I'm using tcolorbox and using pgfkeys to set some of the tikz options. But they do not seem to be working. Consider the MWE given below. If I set draw color using \pgfkeys{/tikz/.cd, fill=red, ...
1
vote
1answer
65 views

Problem with referencing plots

I want to reference some plots (done with pgfplots) in my text but somehow it's not possible. If i copypaste the examples from the pgfplot- documentation it works but if I move one of the labels to ...
11
votes
2answers
319 views

Key that takes a list of other keys as argument and sets them

I would like to define a key, let's call it mystyle, which has several subkeys, like mystyle/A and mystyle/B, and I'd like to be able to choose which of these subkeys to set by calling mystyle=A, ...
8
votes
1answer
113 views

pgfkeys overeager in stripping away my braces

This is an extremely minimal example of what I'm trying to do. \documentclass{article} \usepackage{pgfkeys} \pgfkeys { /ae/example/set/parameters/.cd, keya/.code = { \def\mykeya{#1} }, ...
3
votes
1answer
110 views

pgfkeys “/handlers/first char syntax” generating error

I'm trying to follow the example from the tikz manual (2.10-CVS development version), but I'm not meeting success. Here's my MWE \documentclass{article} \usepackage{pgfkeys} \pgfkeys { ...
4
votes
1answer
190 views

What does “circle through” do with its argument?

The tikz library through can be used to draw a circle from a center coordinate A through another coordinate B like so: \node [draw] at (A) [circle through=(B)] {}; When attempting to specify the ...
8
votes
1answer
265 views

Is it possible to set a default value for an argument in a TikZ style?

In a command like: \tikset{qar/.style={draw,rectangle,fill=#1}} is it possible to add a default key value for the option fill so that if you have: \node [qar] {}; the node will be filled with ...
7
votes
1answer
228 views

Using one key to set another key (in pgfkeys)

When I make a TikZ picture, I sometimes use absolute coordinates, and when I do, I find Martin Scharrer's showgrid TikZ library very handy. (It lays "graph paper" underneath my canvas, and puts ...
9
votes
2answers
249 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 ...
1
vote
0answers
454 views

Why can I compile a tikzpicture perfectly in one chapter but not in another? [closed]

I am having trouble with including a tikz flow chart in my code. In my preamble I have included \usepackage{tikz} \usepackage{pgfplots} \usetikzlibrary{shapes,arrows} and this is the flow chart: ...
6
votes
1answer
696 views

Equal (=) sign within TikZ label

I was trying to use an equal sign within a TikZ picture as a subcaption of an inner TikZ picture for comparing two images. Here is my code: \documentclass{report} \usepackage{amsmath} ...
4
votes
1answer
199 views

Pass a 3d coordinate via pgfkeys

I'm using 3dplot to draw in 3D. Now I want to define my own environment, called pose, that is supposed to be used inside a tikzpicture-environment. It should perform a coordinate system tansformation ...
8
votes
2answers
181 views

How to make this pgfkeys code more compact and streamlined?

I have just managed to create my first command with pgfkeys. I defined a command \myset, whose purpose is to make (for example) \myset[big]{abc} correspond to \bigl\{abc\bigr\} Part of my goal ...
3
votes
1answer
213 views

How to add text in a link tikzset

How to change tikzset the text is automatically added to the link \documentclass{minimal} \usepackage{tikz} \usetikzlibrary{shapes,positioning,fit} \begin{document} ...
4
votes
2answers
333 views

new command, pfgkeys within pfgplots axis environment

I am trying to setup an command to create technical drawing dimensions (inspiration from Dimensioning of a technical drawing in TikZ). I would like to use pgfkeys for that, in order to pass multiple ...
12
votes
2answers
410 views

How to detect if option provided via \tikzset

I would like to be able to detect if a particular option has been provided via a \tikzset and issue a message based on that. The MWE yields: But once the conditional works (just a comment for ...
7
votes
1answer
165 views

Shorten both ends of a line with on key

Consider the following snippet: \begin{tikzpicture} \def\ptRad{2pt} \fill (0,0) circle (\ptRad); \fill (1,1) circle (\ptRad); \draw[<->, shorten <=\ptRad,shorten >=\ptRad] ...
6
votes
2answers
1k views

Complex objects in TikZ: pgfkeys scope and best practice

I try to define a reusable object in TikZ and run into some troubles. The following minimal working example shows the problem. \documentclass{article} \usepackage{tikz} %\usepackage{trace-pgfkeys} ...
9
votes
1answer
256 views

Creating tikz anchors based on pgfkey value

I'm trying to create several anchors equally spaced on the edge of my shape. The way I've tried to do this is to pass a key value in the node that would then define the anchors. The following code is ...
7
votes
1answer
237 views

pgfdeclareshape : how is a fill color recognized?

my custom made shape triangle does not recognize the fill color (or stroke color), if set as an option like fill=green, say. It does recognize the fill option though. I seem to miss some ...
5
votes
1answer
242 views

using \pgfkeys to set style parameters being passed to tkz-euclide

I've been using pstricks for a long time and feel very much at home there. But, recently I decided I want to learn tikz since that seems to integrate better with beamer. However, I keep running into ...
5
votes
3answers
430 views

How to submit a set of tikz command with pgfkeys?

I would like to send a serie of tikz keys to a tikz path with the pgfkeys interface. I succeeded with the following code but is there a simpler way to do that ? Can I do the same thing with something ...
2
votes
0answers
323 views

Problem with tikz-dependency [closed]

I've download the tikz-dependency package and tried the basic example as in the package docs. \documentclass{article} \usepackage{tikz} \usepackage{tikz-dependency} \begin{document} ...
6
votes
1answer
545 views

pgfdeclareshape with variable dimensions using pgfkeys

I am trying to define some shapes for TikZ using \pgfdeclareshape. I would like to use options to make their size adjustable, however I do not get it to work. This example compiles, but the size of ...
5
votes
2answers
910 views

creating a fifo symbol with pgfdeclareshape

I'm compiling with: pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2011.7.8) pgf 2008/01/15 v2.10 (rcs-revision 1.12) tikz 2010/10/13 v2.10 (rcs-revision 1.76) ...
4
votes
1answer
432 views

How can I append switches to the existing value of the TikZ font key?

Is it possible to append switches to the existing settings for the TikZ font key? For example, suppose that I want all nodes to be in the \sffamily typeface. This can be done by setting every ...
17
votes
4answers
1k views

Multiple TikZ keys with foreach

Playing around with pgffor, I'm trying to slightly modify an example from the TikZ/pgf manual: \path \foreach \x/\content/\style in {% 0/a/draw, 1/b/{draw,red}, 2/c/{circle,blue}, 3/d/draw% } ...
4
votes
1answer
2k views

Problem with “Package pgfkeys Error”

I am trying to create a color box using tcolorbox package. source code is like this- \documentclass[11pt]{article} \usepackage[top=.5in, bottom=.5in, left=1in, right=1in]{geometry} ...
11
votes
1answer
302 views

How can I put “=” in a TikZ node label specified as an option

When I try to put an = symbol into a TikZ node label specified as an option (using label=), I get an error: Extra }, or forgotten $. Is there a way to specify = in such cases that I'm missing? ...
7
votes
2answers
291 views

Restoring previous value of PGF/TikZ key?

How does one restore the previous value of a PGF/TikZ key? For example, I would like to set the inner sep of a matrix to 0em but set the inner sep of nodes within the matrix to be the value that ...
5
votes
1answer
356 views

Problem with default values with pgfkeys

I try to make a fine macro to display the dimensions of lines inside a technical figure. This problem appears in several questions and answers but I would like to add some refinements. The next code ...