Graphics, Figures & TablesTable with Notes, Links and Title

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
salehin
Posts: 34
Joined: Wed Jun 10, 2009 1:29 am

Table with Notes, Links and Title

Post by salehin »

Hello everyone

I'm trying to put
  1. the table title on top
  2. some notes at the bottom of the table (like in the attached pdf). However I'm not sure how to do it. So far getting lots of error.
  3. I'd also like the table number to be automatically generated and with label, so that I can link it later in the article.
MWE as follows (I've attached the notes and table title here as well so that you have to less).

Code: Select all

\documentclass[12pt, a4paper]{article}
\usepackage[margin=2.54cm,top=2.54cm]{geometry}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{hyperref}

\begin{document}
Table $1$: Standard Deviations, Autocorrelations, and Correlations with Output,$\gamma = 2$
\begin{center}
\begin{tabular}
[c]{lccccccccc}\hline
&  & \textbf{GHH} &  &  & \textbf{LQA} &  &
\multicolumn{3}{c}{\textbf{Discrepancy between }}\\
\textbf{Variables} &  &  &  &  &  &  & \multicolumn{3}{c}{\textbf{GHH and LQA}}\\
                                & 1     &   2   &   3     &     1       & 2     & 3     &   1   &   2       &   3       \\ \hline \hline
Output, $y$                     & 3.5   &   66  &   100   &     3.5     & 66    & 100   &   -   &   -       &   -       \\
Consumption, $c$                & 2.2   &   94  &   79    &     2.2     & 94    & 100   &   -   &   -       &   -       \\
Investment, $i$                 & 11.6  &   50  &   90    &     12.3    & 49    & 89    &   6\% &   -2\%    &   -1\%    \\
Labour hours, $l$               & 2.2   &   66  &   100   &     2.2     & 66    & 100   &   -   &   -       &     -     \\
Productivity, $\frac{y}{l}$     & 1.3   &   66  &   100   &     1.3     & 66    & 100   &   -   &   -       &     -     \\
Capital stock, $k$              & 5.6   &   99  &   52    &     5.8     & 99    & 53    &   4\% &   -       &   2\%     \\
Utilisation rate, $h$           & 6.0   &   52  &   61    &     6.2     & 52    & 61    &   3\% &   -       &   -       \\  \hline

\end{tabular}


\end{center}

\emph{Notes:} 1: standard deviations, \%; 2: first order autocorrelations, \%; 3: correlations with output, \%. Discrepancy is calculated as LQA /\ GHH - 1. Productivity is calculated as Output \/ Hours.

\end{document} 
I'd be grateful if you could help me.

Regards,

Saleh
Attachments
Table 1.pdf
(113.9 KiB) Downloaded 264 times

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

5gon12eder
Posts: 126
Joined: Sun Feb 13, 2011 8:36 pm

Table with Notes, Links and Title

Post by 5gon12eder »

I think you'll get that solved after reading http://en.wikibooks.org/wiki/LaTeX/Tables.

The macro for adding a caption to a table (introduced by "Table 1:" or n, in general) is, yes, \caption. You'll probably find the booktabs and the tabularx package useful in constructing a table as in your attachment. You'll find almost identical examples in the Wikibooks article cited above.
I'm using pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian).
salehin
Posts: 34
Joined: Wed Jun 10, 2009 1:29 am

Table with Notes, Links and Title

Post by salehin »

Thanks 5gon12eder. :)

Here is the code so far. If anyone can improve this code I'd be grateful if you could please share it - especially, those numbers as they are not justified around the decimal point.

Code: Select all

\documentclass[12pt, a4paper]{article}
\usepackage[margin=2.54cm,top=2.54cm]{geometry}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{hyperref}

\begin{document}
Let's try creating a Table.

\begin{table}[htbp]
\caption{Standard Deviation, Autocorrelations, and Correlations with Output, $\gamma = 2$}
\label{tab:Monte_Carlo_1}
\begin{tabular}
{l|ccc|ccc|ccc}\hline
&  & \textbf{GHH} &  &  & \textbf{LQA} &  &
\multicolumn{3}{c}{\textbf{Discrepancy between }}\\
\textbf{Variables} &  &  &  &  &  &  & \multicolumn{2}{c}{\textbf{GHH and LQA}}\\ \hline
                                & 1     &   2   &   3     &     1       & 2     & 3     &   1   &   2       &   3       \\ \hline \hline
Output, $y$                     & 3.5   &   66  &   100   &     3.5     & 66    & 100   &   -   &   -       &   -       \\
Consumption, $c$                & 2.2   &   94  &   79    &     2.2     & 94    & 100   &   -   &   -       &   -       \\
Investment, $i$                 & 11.6  &   50  &   90    &     12.3    & 49    & 89    &   6\% &   -2\%    &   -1\%    \\
Labour hours, $l$               & 2.2   &   66  &   100   &     2.2     & 66    & 100   &   -   &   -       &     -     \\
Productivity, $\frac{y}{l}$     & 1.3   &   66  &   100   &     1.3     & 66    & 100   &   -   &   -       &     -     \\
Capital stock, $k$              & 5.6   &   99  &   52    &     5.8     & 99    & 53    &   4\% &   -       &   2\%     \\
Utilisation rate, $h$           & 6.0   &   52  &   61    &     6.2     & 52    & 61    &   3\% &   -       &   -       \\  \hline

\end{tabular}

\small{\textbf{Notes:} 1: standard deviations, \%; 2: first order autocorrelations, \%;
3: correlations with output, \%. Discrepancy is calculated as LQA/GHH - 1.
Productivity is calculated as output/hours.}

\end{table}

See Table (\ref{tab:Monte_Carlo_1}) for the comparison. 

\begin{thebibliography}{9}%

\bibitem {}\label{AitchisonBrown1957}Aitchison, J. and Brown, J. A. C. (1957):
The Log-normal Distribution, Cambridge (UK), Cambridge University Press.
\end{thebibliography}

\end{document} 
salehin
Posts: 34
Joined: Wed Jun 10, 2009 1:29 am

Table with Notes, Links and Title

Post by salehin »

Hello everyone,

I was wondering if anyone can post my last example with ctable package. I like the the way it puts the table notes. But I cannot seem to be able to do it. :(

Thanks you for reading. :)
Post Reply