Possible Duplicate:
Adding a large brace next to a body of text

I'm trying to create a brace or bracket around two or more nodes within a TikZ picture. Since there are more elements in the picture which are not to be encompassed by the bracket or brace, I can't use the "insert the picture into LaTeX math mode" approach.

How do I get that bracket there in TikZ?

Here's the example code, for easy copy-pasting:




\begin{tikzpicture}[box/.style={rectangle, fill=black, minimum size=1cm}]
  \node [box] (a) {};
  \node [box, below=of a] (b) {};
  \node [box, below=of b] (c) {};
  \node [box, below=of c] (d) {};

  • Why is only after I've asked a question that I stumble upon the answer, but never when having looked around for half an hour before asking? Anyway, I found how to do this in tex.stackexchange.com/questions/1559/… Don't know if this should be closed or I should put it as answer... – gablin Sep 29 '11 at 13:03
  • Often how it goes. I think that for this one, I'd go for "close as duplicate". – Andrew Stacey Sep 29 '11 at 13:27
  • (Closing as duplicate makes it easier for later searchers to find the right question.) – Andrew Stacey Sep 29 '11 at 13:28
  • Sorry, I have to disagree that it's an exact duplicate, as the referenced question doesn't involve Tikz... – Brent.Longborough Sep 29 '11 at 21:18
  • @Brent.Longborough: Well, at least whoever is looking for exactly this will find it if he or she reads the comments. – gablin Sep 29 '11 at 22:08