你好,我想知道如何在execute at begin node
属性中引用当前节点名称。
\node[execute at begin node = \command_which_uses_node_name_to_to_do_soething_draw_uml_component_symbol] (){Node-name};
答案1
节点名称在执行\tikz@fig@name
代码时存储在。execute at begin node
这是一个 MWE,它打印> \tikz@fig@name=macro: ->myname.
到文件中.log
:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\makeatletter
\tikzset{
teststyle/.style={
execute at begin node=\show\tikz@fig@name
}
}
\makeatother
\begin{tikzpicture}
\node (myname) [teststyle] {Text};
\end{tikzpicture}
\end{document}