[Tex/LaTex] Combining Tables and TikZ

tablestikz-pgf

There are a few accounting figures which I am making, and I need to add curly braces and arrows with boxes of text inside near table environments. Here is an example figure:
example

I want to use TikZ for this, in combination with a tabular enviroment maybe? This just looks so difficult that I'm not even sure what to start with to give you a sample code of my attempt. Also, I'm not sure how to use a 'rule' style command which just underlines a certain column as in the figure, not the entire row.

Best Answer

How about this:

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing,decorations.pathreplacing,calc}

\begin{document}

\begin{minipage}{.48\textwidth}
\tikzstyle{block} = [rectangle, draw, fill=blue!20, text width=6.5em, text centered, rounded corners, minimum height=3.25em]
\begin{tikzpicture}[overlay]
\def \n {3}
\coordinate (a0) at (\n,-0.5);
\coordinate (a1) at (\n,-1);
\coordinate (a2) at (\n,-1.5);
\draw[decoration={brace,amplitude=0.6em,mirror},decorate,ultra thick,gray]($(a1)!(a0.north)!($(a1)-(0,1)$)$) --  ($(a1)!(a2.south)!($(a1)-(0,1)$)$);
\node[block] at ($(a1)-(1.85,0)$) {text 1};

\coordinate (b1) at (\n,-2.5);
\draw[->,ultra thick,gray](b1) --  ($(b1)+(1,0)$);
\node[block] at ($(b1)-(1.85,0)$) {text 2};
\end{tikzpicture}
\end{minipage}
\begin{minipage}[t]{.48\textwidth}
Bla, bla\ldots\\[2mm]

\begin{tabular}{lll}
A & B & C\\
1 & 3 & 3\\
2 & 4 & 6
\end{tabular}

text \ldots
\end{minipage}
\end{document}

The rest is fine tuning of the coordinates.

Related Question