# Caption of a table in an array-environment

I used the array-environment to construct a table of data:

\documentclass[12pt,landscape]{article}

\usepackage{amsmath,amssymb}
\usepackage{array}
\usepackage{booktabs}% for top-,mid- & bottomrule

\begin{document}

$\begin{array}{lcc} \toprule &\text{1\textsuperscript{st} growth period} & \text{2\textsuperscript{nd} growth period} \\ \midrule \text{Estonia} & 1.28 & 1.72 \\ \text{Slovenia} & 1.26 & 0.21 \\ \text{Czech Republic} & 1.16 & 0.46 \\ \text{...} & \text{...} & \text{...} \\ \text{...} & \text{...} & \text{...} \\ \hline \text{Mean} & 0.69 & 0.53 \\ \text{Lower-Quantile} & 0.37 & 0.21 \\ \text{Upper-Quantile} & 0.99 & 0.80\\ \bottomrule \end{array}$


Now I would like to add a caption to my table. Has anyone an idea?

-

I'm not entirely sure why you're not using a tabular for this, but if you want to add a caption, you can use \captionof from the caption package. Note that \captionof stands for 'caption outside float'

\documentclass[12pt,landscape]{article}

\usepackage{amsmath,amssymb}
\usepackage{array}
\usepackage{booktabs}% for top-,mid- & bottomrule
\usepackage{caption}

\begin{document}

\begin{center}
$\begin{array}{lcc} \toprule &\text{1\textsuperscript{st} growth period} & \text{2\textsuperscript{nd} growth period} \\ \midrule \text{Estonia} & 1.28 & 1.72 \\ \text{Slovenia} & 1.26 & 0.21 \\ \text{Czech Republic} & 1.16 & 0.46 \\ \text{...} & \text{...} & \text{...} \\ \text{...} & \text{...} & \text{...} \\ \hline \text{Mean} & 0.69 & 0.53 \\ \text{Lower-Quantile} & 0.37 & 0.21 \\ \text{Upper-Quantile} & 0.99 & 0.80\\ \bottomrule \end{array}$
\captionof{table}{My caption}
\end{center}

\end{document}

-
Sorry for the late answer: I work with Mathematica, which exports tables only in the array-environment. That's why I did not use tabular. Thank you for your answer! I think it will do it. –  John Mar 6 '12 at 14:51