Is there a single option to set both the draw and the fill color of a TikZ node?
Something like:
\node[rectangle,drawandfill=red]{test};
The actual problem is the following: I have many adiacent rectangles node with different filling colors. Each rectangle has a different filling color.
Now I need to remove the tiny white border around each rectangle and I want that each rectangle has a drawing color equal to its filling color.
Since it would be a pain to rewrite draw=<color name>
for every rectangle, I was hoping for a command like fillanddrawn=<color name>
so that I could use some search and replace feature to add all the drawing colors at once.
fill
? The only difference will be a0.4pt
(with default line widths) difference in each dimension of the rectangle.\tikzset{draw and fill/.style args={#1 and #2}{draw=#1,fill=#2}}
to be used asdraw and fill=blue and red
.(fill=)([a-zA-Z0-9]*)
and replace with\1\2, draw=\2
in Kile. The syntax will vary slightly depending on how your editor implements 'regular expressions' (complex search and replace patterns as opposed to plain words). If your editor can't do this, you are using the wrong editor ;).fill=
withfill, draw,
throughout if there is not text in the nodes, as you say later?