I am trying to draw a 3x2 rectangle. I am not sure if multipart rectangle can do it, but it seems that multipart can only do one-dimensional arrays. I tried matrix, but then I cannot get the lines in between cells or around the rectangle. I need to put text in each cell. What I want to get is a rectangle with the following with the box around and horizontal and vertical lines in between cells:
Aid Value
1 R1
2 R2
This needs to be inside a tikz environment. Here is what I have as a minimal code and it is fine except for the matrix part on the right:
\documentclass{scrartcl}
\usepackage{tikz}
\usetikzlibrary{shapes,fit,positioning,arrows,matrix}
\begin{document}
\begin{tikzpicture}
\tikzstyle{bigbigbox} = [minimum width=3.5cm, draw, thick, rounded corners, rectangle]
\tikzstyle{bigbox} = [draw, thick, rounded corners, rectangle]
\tikzstyle{box} = [minimum width=2.7cm, rounded corners,rectangle, fill=blue!20]
\node[align=center,draw,shape=rectangle split,
rectangle split parts=3, text width=1.0cm,text centered] (A)
{Value \nodepart{two}R1\nodepart{three}R2};
\node[rectangle, draw,right of=A,xshift=1cm,rotate=90] (A1) {map};
\matrix (A2) [matrix of nodes,row sep=0em,column sep=0em, right of=A1,xshift=1cm]
{
Aid & Value \\
1 & R1 \\
2 & R2 \\};
\node[align=center,shape=rectangle split,
rectangle split parts=2, text width=2cm,text centered,above of=A,yshift=0.3cm] (A3)
{Mapper 1 \nodepart{two}R};
\draw[-triangle 90, line width=1mm, blue!50,postaction={draw=blue!50, line width=3mm, shorten >=0.2cm, -}] (A.east) -- (A1.north);
\node[bigbox] [fit = (A3) (A2)] (box1){};
\end{tikzpicture}
\end{document}

\draw[help lines,thin,black] (0,0) grid[step=1cm] (2cm,3cm);– percusse Feb 17 '13 at 00:53tabular? – Feb 17 '13 at 01:16tabularsolution that seems to cover your example, Horizontal row separation line in tikz matrix (like\hlinein tabular) may be informative for others. Also, on the matter of\tikzstylevs\tikzset, see Should\tikzsetor\tikzstylebe used to define TikZ styles?. – Qrrbrbirlbel Feb 17 '13 at 02:08