[Tex/LaTex] Nice table with TikZ

tablestikz-pgf

I am trying to produce a simple (nice looking) table. The tabular environment is unable to introduce padding in cells so I have tried it with TikZ. However I can't manage to get the cells align correctly.

How can I, using a matrix of nodes (or anything else), get a 3×3 table with rounded corners and centered elements in each cell?

How do I make the following look regular?

\begin{tikzpicture}
\matrix (mat) [matrix of nodes, row sep=-\pgflinewidth, nodes={draw=black, minimum width=3cm, minimum height=1cm}]
{
    \emph{I tried} & Something
    & ...  \\
    $X$ & $X_{X_{X_X}}$
    & $f : x \to y \to z \to \tau \to \omega$ \\
    $X$ & ${{X^X}^X}^X$
    & $f : x \to y$ \\
};
\end{tikzpicture}

Best Answer

Like this?

enter image description here

\documentclass[tikz,border=2mm]{standalone}

\usetikzlibrary{matrix}

\begin{document}

\begin{tikzpicture}
\matrix (mat) [matrix of nodes, row sep=-\pgflinewidth, draw, rounded corners, nodes={minimum width=3cm, minimum height=1cm}]
{
    \emph{I tried} & Something
    & ...  \\
    $X$ & $X_{X_{X_X}}$
    & $f : x \to y \to z \to \tau \to \omega$ \\
    $X$ & ${{X^X}^X}^X$
    & $f : x \to y$ \\
};
\end{tikzpicture}

\end{document}

or this?

enter image description here

\documentclass[tikz,border=2mm]{standalone}

\usetikzlibrary{matrix}

\begin{document}
\begin{tikzpicture}
\matrix (mat) [matrix of nodes, 
row sep=0pt, 
column sep=0pt,
%draw, 
rounded corners, 
nodes={minimum width=3cm, minimum height=1cm, anchor=center}]
{
    \emph{I tried} & Something
    & ...  \\
    $X$ & $X_{X_{X_X}}$
    & $f : x \to y \to z \to \tau \to \omega$ \\
    $X$ & ${{X^X}^X}^X$
    & $f : x \to y$ \\
};

%%As not all nodes fit in `minimum width|height`
%%We need to manually draw the boxes
\foreach \i in {1,2,3}{
    \foreach \j in {1,2,3}
        \draw[rounded corners] (mat-2-\i.west|-mat-\j-\i.north) rectangle (mat-2-\i.east|-mat-\j-\i.south);
    }
\end{tikzpicture}

\end{document}