TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hi I'm wondering how can I reference to current node name in execute at begin node property.

\node[execute at begin node = \command_which_uses_node_name_to_to_do_soething_draw_uml_component_symbol] (){Node-name};
share|improve this question
Could you give a MWE. – polyfunc Dec 27 '12 at 19:56
@Meter: That's not an MWE. An MWE is a complete minimal example document, which saves people the work of having to come up with a test document themselves (because that part of answering questions is pretty boring). – Jake Dec 27 '12 at 20:17
@Meter: Is anything missing from my answer? – Jake Jan 2 '13 at 14:51

The node name is stored in \tikz@fig@name at the time the code in execute at begin node is executed.

Here's an MWE, which prints > \tikz@fig@name=macro: ->myname. into the .log file:



        execute at begin node=\show\tikz@fig@name   

\node (myname) [teststyle] {Text};

share|improve this answer
Note: even if we know its future name, the node does not yet exist at that time (execute at begin node). – Paul Gaborit Dec 28 '12 at 8:32

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.