TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

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.

share|improve this question
I think you want \cmidrule{a-b} which will draw a midrule between column a and column b. \midrule draws one the whole width of the table. Or, without booktabs (not recommended), use \cline{a-b}. – cfr Jun 1 '14 at 19:13
up vote 1 down vote accepted

How about this:




\tikzstyle{block} = [rectangle, draw, fill=blue!20, text width=6.5em, text centered, rounded corners, minimum height=3.25em]
\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};
Bla, bla\ldots\\[2mm]

A & B & C\\
1 & 3 & 3\\
2 & 4 & 6

text \ldots

The rest is fine tuning of the coordinates.

share|improve this answer
Thank you! I was able to figure out how all of this works from your answer. – Samuel Reid Jun 1 '14 at 21:34

I personally would recommend using the infamous \tikzmark. With this you:

  • complete the table as you normally would
  • mark specfic points with a \tikzmark{<name>}
  • access these \tikzmarks in a \tikzpicture with the [overlay,remember picture] options and draw as desired.

This allows one to separate the tabular date form the drawings that needs to be added.

enter image description here





\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node[baseline] (#1) {};}

\tikzset{My Node Style/.style={midway, right, xshift=3.0ex, align=left, font=\small, draw=blue, thin, fill=cyan!25, text=black}}

    % #1 = draw options
    % #2 = top mark
    % #2 = bottom mark
    % #4 = label
  \draw[decorate,decoration={brace, amplitude=1.5ex}, #1] 
    ([yshift=1ex]#2.north east)  -- ([yshift=-1ex]#3.south east)
        node[My Node Style] {#4};

    % #1 = draw options
    % #2 = mark
    % #3 = label
  \draw[<-, shorten >=0.1cm, #1] 
    ([shift={(0.0cm,0.5ex)}]#2.east)  -- ([shift={(1.0cm,0.5ex)}]#2.east)
        node[My Node Style] {#3};

\multicolumn{4}{c}{Big Dog Carworks Corp.}\tikzmark{Heading Top} \\
\multicolumn{4}{c}{Income Statement} \\
\multicolumn{4}{c}{For the month eded Jan. 31, 2015}\tikzmark{Heading Bottom} \\
\multicolumn{2}{l}{Revenues} \\[0.5ex]
    & Repair Revenues && \$ \num{15000} \\
\multicolumn{2}{l}{Expenses} \\
    & Rent Expense & \$ \num{1500} \\
    & Salaries Expense & \$ \num{3500} \\
    & Supplies Expense & \$ \num{3500} \\
    & Fuel Expense & \$ \num{3500} \\
    & Total Expenses && \$ \num{12000} \\
    & Net Income     && \$ \num{03000} \tikzmark{Net Income Mark}\\
\begin{tikzpicture}[overlay,remember picture]
    \VerticalBrace[ultra thick, blue]{Heading Top}{Heading Bottom}{%
        The heading shows the name \\
        of the entity, the type of \\
        financial statement, and the \\
        \textit{period-in-time} date.%
    \DrawArrow[ultra thick, blue]{Net Income Mark}{%
        The net income is transferred \\
        to the statement of changes \\
        in equity.%

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.