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

I'd like to apply the following shading effect

enter image description here

proposed in " Fake sheet effect " as a background for a mdframed environment. How can this be achieved?

share|improve this question
Is the gray filled rectangle the text area or where should be the text? – Marco Daniel Sep 8 '12 at 10:54
up vote 15 down vote accepted

Here is a suggestion whereby I only modified the first frame:

enter image description here



  \fill[gray!60,rounded corners,] 
  ($(P)+(0,-2.05)$) .. controls  ($(P)+(0.14,-0.55)$) ..  ($(P)+(0.16,-0.45)$) --  ($(P)+(-0.2,-0.4)$) -- cycle;
   \draw[gray!15,line width=0.20cm]  ($(P)+(-.1,-2.15)$)  --  ($(P)+(-.1,-.4)$) ;
\path let \p1=(P), \p2=(O) in ({(\x1-\x2)/2},\y2) coordinate (M);
\shade[left color=gray!50,right color=gray!50,middle color=black!55,rounded corners] 
  ($(M)+(-5.4,-0.135)$) .. controls ($(M)+(0,-0.015)$) .. ($(M)+(5.4,-0.135)$) -- ($(M)+(5.4,0.135)$) .. controls ($(M)+(0,0.135)$) .. ($(M)+(-5.4,0.135)$)-- cycle;
   \draw[gray!15,line width=0.20cm]  ($(M)+(-5.4,0.10)$)  --  ($(M)+(5.4,0.1)$) ;





Extra material can be added by the options singleextra firstextra etc. See forexample here:

mdframed-Put something on the start of one vertical left rule

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.