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

Please consider MWE below:

\tikzstyle{abstract} =  [draw=gray, 
                        inner sep = 0.2cm,
                        rounded corners, 
                        rectangle split, 
                        rectangle split parts=3, 
                        % shade=rectangle, 
                        % left color=blue!10!white,
                        % rectangle split part fill={blue!30!white,blue!20!white,blue!10!white}, %This will fill them, but not shade! Moreover, I prefer not to do it this way
                        every text node part/.style={fill=blue!20!white}, %This is not working
                        every two node part/.style={text width=6cm},
                        every three node part/.style={text=blue}]
        \node (Item)[abstract]  

This creates tikz node with three parts but no filling (Fig. Left). Somehow the line below is doing nothing:

every text node part/.style={fill=blue!20!white}

Next line fills the rectangles (Fig. Center) but I prefer to do it with every command:

rectangle split part fill={blue!30!white,blue!20!white,blue!10!white}

What I eventually want, is to have different gradient shadings for each part, preferably using every XXX node part/.style (e.g. Fig. Right).

enter image description here

share|improve this question
Have you tried the tcolorbox package? It looks it is designed very well for this sort of shading tasks. – Malipivo Apr 10 '14 at 12:30
@Malipivo, I know about that package. What I want to do however, is out of the boundaries of tcolorbox. What you see above is just the tip of the iceberg ;) – Pouya Apr 10 '14 at 12:31
I see, I would start putting individual nodes on each other if your requirements are this high. – Malipivo Apr 10 '14 at 12:33

To my best knowledge TikZ is not offering such feature, yet. This is an example where I used several independent nodes to get that effect.

%! *latex mal-nodepart.tex
[m/.style={text width=5cm, anchor=north, draw},
  every node/.style={m},
  first/.style={shade, left color=white, right color=blue, align=center, font=\bfseries},
  second/.style={shade, right color=green, font=\small, text=yellow},
  third/.style={shade, left color=red, align=center, font=\bfseries},
\node[first] (first) {My heading};
\node[second] (second) at (first.south) {\kant[1]};
\node[third] (third) at (second.south) {My footing};


share|improve this answer
Thank you. But I'm afraid using multiple stacked nodes is my failsafe. This is what I'm doing right now but I need to do it more systematically. I will wait for some other answers if you don't mind. – Pouya Apr 11 '14 at 8:09
Of course, please have no worries! – Malipivo Apr 11 '14 at 8:16

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.