Linked Questions

109
votes
5answers
15k views

How to create a command with key values?

I am trying to create a command that the user can enter keys for values. How can I create one, for example: \myparbox[width=50,height=10,color=blue, align=left -10px]{}
29
votes
2answers
4k 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 ...
19
votes
5answers
1k views

What do the pgfkeys key handlers .get and .store in do?

When I need to retrieve the value of a key in a macro, I use the key handlers .get and .store in. Here is what is written in the pgfkeys documentation: Key handler key /.get= macro Executes a \...
17
votes
1answer
7k views

Computing value using pgfmath for use in coordinates?

Why can't I use the outcome of using pgfmath in a TikZ coordinate? Here is a (minimal) example that does not work: \documentclass[11pt]{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}...
8
votes
2answers
3k 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
1k views

Reading - and effect - of (default) tikz/pgf keys?

Consider the following MWE: \documentclass[varwidth,tightpage,border=1bp]{standalone} \usepackage{tikz} \pagecolor{yellow!15} % ignored with preview, but not w/ varwidth \begin{document} \begin{...
4
votes
1answer
524 views

Constructing dag-like diagrams

I want to draw diagrams that look a bit like this. Mathematically, you could describe them as directed acyclic graphs with dangling arcs. They're somewhat reminiscent of route diagrams. Desired ...
4
votes
1answer
98 views

Bad interaction between keycommand and environ?

I suspect the keycommand and environ packages are not playing nicely together, because the following code gives an error. Can anybody explain what's going on? \documentclass{article} \usepackage{...
1
vote
1answer
326 views

\input inside \newcommand and macro parameters

I would like to divide a list of parameters for a series of tikz graphics into a bunch of separate, named tex files. Specifically: each parameter file should be loaded by an \input command which in ...
0
votes
0answers
29 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{...