Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is there some easy trick to make \node[place,tokens=3]{} place 3 tokens in a row (and not in a triangle)?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

In the file tikzlibrarypetri.code.tex you would find the needed macros. There are commands \tikz@def@grow@tokens{number of tokens}{number of the token}{x shift}{y shift} as in Grigorys comment) that can be analyzed and modified.

Here's the modification for number of tokens= 3 and number of the token= 1, 2, 3 - just place this code in your preamble:


Sample output of the modified manual Petri-net example:

alt text

Note the three tokens in a row in the middle of the image.

share|improve this answer
We could probably do with an explanation of how you came up with that! –  Joseph Wright Aug 24 '10 at 19:55
great, thanks! general syntax is something like "\tikz@def@grow@tokens{number of tokens}{number of the token}{x shift}{y shift}", I guess –  Grigory M Aug 24 '10 at 20:04
@Joseph: I've just read the file tikzlibrarypetri.code.tex, Grigory put a link in his comment. –  Stefan Kottwitz Aug 24 '10 at 20:14
@Joseph: I`ve added some explanation. –  Stefan Kottwitz Aug 24 '10 at 21:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.