Graphics, Figures & TablesTabular Underbrace?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
alx
Posts: 1
Joined: Thu Mar 17, 2011 6:38 am

Tabular Underbrace?

Post by alx »

Hi All,

Wonder if it is possible to do the following in Latex?
Please see attached.

Thanks very much!
Attachments
Tabular Underbrace.JPG
Tabular Underbrace.JPG (6.76 KiB) Viewed 2735 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Tabular Underbrace?

Post by localghost »

See code below for an example. It may serve as a basic structure.

Code: Select all

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc,matrix,positioning}
\usetikzlibrary{decorations.pathreplacing}

\begin{document}
  \begin{tikzpicture}[decoration={brace,amplitude=6pt}]
    \matrix (table) [%
      matrix of nodes,
      nodes in empty cells,
      nodes={%
        anchor=center,
        draw,
        minimum width=6em,
        minimum height=2em
      }
    ] {
        & \$68 & Discount A \\
        & Discount B & \\
      };
    \node (V) [node distance=1em,left=of table-1-1.west] {V};
    \node (W) [node distance=1em,left=of table-2-1.west] {W};
    \draw[decorate] ($(table-1-1.north west)+(0,3pt)$) -- ($(table-1-3.north east)+(0,3pt)$) node[above=6pt,midway] {585};
    \draw[decorate] ($(table-2-2.south east)-(0,3pt)$) -- ($(table-2-1.south west)-(0,3pt)$) node[below=6pt,midway] {500};
    \draw[decorate] ($(table-2-3.south east)-(0,3pt)$) -- ($(table-2-3.south west)-(0,3pt)$) node[below=6pt,midway] {85};
  \end{tikzpicture}
\end{document}

Best regards and welcome to the board
Thorsten
Attachments
The rendered output produced by the given example.
The rendered output produced by the given example.
tmp.png (5.42 KiB) Viewed 2521 times
Post Reply