1

From TikZ Adding Text

I try \node[draw,align=left] at (0.5,-6.5) {text}; But I have defined previously that every node/.style = {draw, circle, minimum size = 7mm}. I do not want the circle around the text. I just want plain text without any border.

Ka Wa Yip
  • 823
  • 1
    In this case you can use draw=none. And probably you should change the title of your question to something like "How to unset the draw style for a node". – Kpym Nov 30 '15 at 09:28
  • You can also use \path (0.5,-6.5) \pgfextra{\pgftext{text}}}; – John Kormylo Nov 30 '15 at 18:54
  • Please show us, what you trying so far. Example in given link has not any style definition nor circles. Your question is unclear. – Zarko Oct 23 '22 at 23:39
  • Why you define common style for all nodes if than you not like that they have common style? Isn't better to define two different style? – Zarko Oct 24 '22 at 00:36

1 Answers1

2

If you don't want your node to use the settings of the every node style you either need to redeclare them, in this case, this will be

\node[rectangle, draw=none, minimum size=1pt] at (0.5, -6.5) {text};

since those are the default values for nodes:

  • the rectangle shape,
  • no drawing of the border
  • and a minimum size of 1pt.

You can also reset the every node style only for that node by using

\scoped[every node/.style=]\node at (0.5, -6.5) {text};
% or
\path[every node/.style=]node at (0.5, -6.5) {text};

If you find yourself using that often it might by worthwhile to add

\tikzset{reset node/.style={every node/.style=}}

where reset node is easier to type on my Qwertz keyboard than every node/.style=.

This won't reset any other settings that are not set through every node, of course. (Simple things like minimum size and the inner seps don't need to be set as an option to the node but can be changed anyway.

Qrrbrbirlbel
  • 119,821