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

Is there a way to draw an accolade ({-symbol) that groups things together in TikZ? I want the accolade to group let's say three rectangles. That means the top of the upper reactangle must be the top of the accolade, and the bottom of the lower triangle the bottom of the accolade. Of course I can draw an accolade using a node, but I haven't found a way yet to make sure the size meets this constraint. Is there a solution or a workaround for it?

share|improve this question
up vote 12 down vote accepted

A solution more simple ( for me ) and with the possibility of scaling. I add the solution with Andrew's idea The code is very clear but we can not make a scale and perhaps there is a better solution to create more space vertically. The brace is more pretty with the matrix's delimiter.

   \node [draw] (A) {A}; 
   \node [draw,yshift=1cm] (B) at (A) {B};
   \node [draw,yshift=1cm] (C) at (B) {C};
   \node [fit=(A) (B) (C)] (fit) {};              
  \draw [decorate,line width=1pt] (fit.south west) -- (fit.north west);
\matrix [matrix of nodes,left delimiter=\{,nodes={draw}] {
A  \\[12pt] B \\[12pt] C \\


enter image description here

share|improve this answer
An alternative is to use the matrix library and put left delimiter=\{ (I may be misremembering the syntax) on the "fitted" node. – Loop Space Apr 11 '11 at 20:21
I added your idea but you don't need to use the "fitted" node. The brace is more pretty but we can't scale the picture. It's not a big problem; this feature depends of the use of the picture – Alain Matthes Apr 11 '11 at 20:46
The accolade needs to span a length of approx. 45 cm. This makes the accolade look like a normal line (only if you look very close you see it's an accolade), are there any parameters to the brace? (I mean the first option)? – Willem Van Onsem Apr 11 '11 at 20:56
I've found it myself: decoration={brace,amplitude=10} did the trick. Thanks. – Willem Van Onsem Apr 11 '11 at 21:04

You can use the fit TikZ library to create a rectangular node which encompasses the nodes, e.g. your three rectangles. Then you can use the node anchors to draw your { either using a scaled { character (\resizebox{!}{<height of fit>}{\{}) or using drawing commands. Two bezier curves should do it.



   \node [draw] (A) {A};
   \node [draw,below of=A] (B) {B};
   \node [draw,below of=B] (C) {C};
   \node [fit=(A) (B) (C)] (fit) {};
   \path let \p1=(fit.north west), \p2 = (fit.south east) in
       node [left of=fit] {%
       \resizebox{!}{\heightoffit pt}{\{}%



share|improve this answer
Alternatively, you could use the brace decoration. – Caramdir Apr 11 '11 at 19:41
@Caramdir: Ah, I didn't know about that. Thanks. – Martin Scharrer Apr 11 '11 at 19:59
I think the line width of the brace is ... very great ! :) – Alain Matthes Apr 11 '11 at 20:01
@Altermundus: I noticed :-) Could be fixed by some horizontal-only down-scaling. But your solution seems to be preferable. – Martin Scharrer Apr 11 '11 at 20:06
Andrew's idea is very fine too ! – Alain Matthes Apr 11 '11 at 20:47

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.