Take the 2-minute tour ×
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.

I don't know how to word this, but I want that 1..n effect where you can tell that there are boxes behind the top one and it is assumed that they are all the same. Perhaps this picture will help (I'm sorry but I couldn't find a better picture online, just pretend the DVDs are tikz boxes).

enter image description here

Just to clarify, what I what is that top right hand corner effect where you can tell there are, in this case, DVDs behind the current DVD

Can someone provide a minimal tikz code to achieve this affect?

share|improve this question
2  
For two or three copies you can use copy shadow and double copy shadow options otherwise you just put filled rectangles inside a \foreach loop. –  percusse Jan 19 '13 at 22:09
    
The question should maybe be rephrased. I thought of TeX boxes containing tikzpictures that should be stacked … –  Qrrbrbirlbel Jan 20 '13 at 0:17
    
A similar question: Overlapping fills. –  Claudio Fiandrino Jan 20 '13 at 9:45
add comment

1 Answer 1

Less than four copies

As mentioned in comment, for fewer than four copies you can use the copy shadow or double copy shadow options available in the shadows library.

Code

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shadows}

\begin{document}
\begin{tikzpicture}
\fill [draw, ultra thick, fill=white,rounded corners, double copy shadow={ultra thick, shadow xshift=0.5cm, shadow yshift=0.5cm}] (0,0) rectangle +(-4,6);
\end{tikzpicture}
\end{document}

Output

enter image description here

For at least four copies

You can use a \foreach loop. Improve this.

\documentclass[tikz]{standalone}
%\documentclass{article}
%\usepackage{tikz}
\usetikzlibrary{shadows}

\begin{document}
\begin{tikzpicture}
\foreach \x in {0,...,3}% 
    \fill [draw, ultra thick, fill=white,rounded corners] (-\x/2,-\x/2) rectangle +(-4,6);
\end{tikzpicture}

\end{document}

Output

enter image description here

Edit

I replaced 1,2,3,4 in the \foreach loop as suggested by Peter Grill.

share|improve this answer
    
I'd replace the 1,2,3,4 with 1,...,4 as then it is easier to modify. –  Peter Grill Jan 20 '13 at 0:48
    
@PeterGrill Done. Thanks! –  hpesoj626 Jan 20 '13 at 1:13
add comment

Your Answer

 
discard

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.