Take the 2-minute tour ×
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.

I need to align the bottom of these two tables, and I need to add a brace to each side of the second table.. how can I do that?

\begin{figure}[]
 \centering
  \subfloat[]{ 
  \begin{tabular}{cc}
  \hline
  0 & 1\\
  \hline
  2 & 1\\
  3 & 1\\
  4 & 2\\
  5 & 3\\
  4 & 8\\
  \hline
  \end{tabular}
  }  
  \subfloat[]{
  \begin{tabular}{cc}
  \hline
  1 & 2\\
  \hline
  3 & 7\\
  4 & 5\\
  \hline
  \end{tabular}
  }
\end{figure}

Any help appreciated,

Ted.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

I don't know, what kind of braces do you mean. Here is an example with round braces, can also be changed to something else.

enter image description here

\documentclass{scrartcl}
\usepackage{subfig}
\begin{document}

\begin{figure}
 \centering
  \subfloat[]{% 
  \begin{tabular}[b]{cc}
  \hline
  0 & 1\\
  \hline
  2 & 1\\
  3 & 1\\
  4 & 2\\
  5 & 3\\
  4 & 8\\
  \hline
  \end{tabular}%
  }  \qquad
  \raisebox{1.2\normalbaselineskip}{$\left\{\rule{0pt}{2.1\normalbaselineskip}\right.$}
  \subfloat[]{%
  \begin{tabular}[b]{cc} \hline
  1 & 2\\ \hline
  3 & 7\\
  4 & 5\\\hline
  \end{tabular}%
  }~
  \raisebox{1.2\normalbaselineskip}{$\left\}\rule{0pt}{2.1\normalbaselineskip}\right.$}
\end{figure}

\end{document} 
share|improve this answer
    
I mean the regular braces ... this ones { { { –  Flethuseo Jan 31 '11 at 20:40
    
@Flethuseo: no problem, replace the \left( with \left\{ and the \left) with \left\}. I did it also in my answer –  Herbert Jan 31 '11 at 21:07
    
It is somewhat difficult to use. I added an alternative solution using delarray. –  Leo Liu Feb 1 '11 at 8:08

For aliging, use

\begin{tabular}[b]{cc}
...

instead of

\begin{tabular}{cc}

For braces, use delarray package.

enter image description here

Complete code:

\documentclass{article}
\usepackage{subfig}
\usepackage{delarray}

\begin{document}

\begin{figure}
 \centering
  \subfloat[]{%
  \begin{tabular}[b]{cc}
  \hline
  0 & 1\\
  \hline
  2 & 1\\
  3 & 1\\
  4 & 2\\
  5 & 3\\
  4 & 8\\
  \hline
  \end{tabular}}\qquad
  \subfloat[]{%
  \begin{tabular}[b]\{{cc}\}
  \hline
  1 & 2\\
  \hline
  3 & 7\\
  4 & 5\\
  \hline
  \end{tabular}}
\end{figure}

\end{document}
share|improve this answer

Your Answer

 
discard

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.