TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

I'm working on an interaction diagram for a programming design course. For sets of objects, I am required to draw overlapping rectangles, roughly as such:

Example 1

There was a post on overlapping fills that seems pretty close to what I want, but I couldn't figure out how to use the style of my other rectangles.

Here's a minimal version of what I have:



\title{Interaction Diagram - Add Book}


  block/.style = {
    minimum width = 9em,
    rounded corners
\node[block, below = 2cm of start]      (controller) {\underline{: SystemController}};
\node[block, below = 2cm of controller] (system)     {\underline{: System}}; 

% the following line should be the doubled up rectangles.
\node[block, below = 2cm of system] (books) {Books};

share|improve this question
up vote 3 down vote accepted

I assume, that actually you like to have something like this:

enter image description here


enter image description here


enter image description here

For the last picture I use the following code:

               border= 3mm]{standalone}

book/.style = {rectangle, draw, rounded corners, fill= white, 
               text width=9em, align= center,
               copy shadow={draw, fill=gray, 
                            shadow xshift=0.5mm, shadow yshift=-0.5mm}
\node[book] (books) {Books};

In code I use TikZ library shadows.

share|improve this answer

Here is one way without tikz. The \rule dimensions and the first argument of \stackengine will allow different box sizes and offsets.

In this case, the boxes are 30pt x 30pt, with a 4pt horizontal offset and 3pt vertical offset. The box rule thickness is the default \fboxrule.


enter image description here

share|improve this answer

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.