Discussion:
how do i get the table not to be centered vertically on the page?
Kristof Möller
2009-01-05 07:14:22 UTC
Permalink
Hi,

I would recommend You two additional packages:

booktabs - professional table layout for publication
dcolumn - decimal number aligning in tables

Your floating-problem results from only one (!) position option
in the \begin {table}[t] - command - if you add a second possible
float-position-option like I do in the following example, everything
works fine:

\documentclass [12pt] {article}

\usepackage{booktabs}

\usepackage{dcolumn}

% new columntype for dcolumn: d{#} - # = number of decimal-places
\newcolumntype{d}[1]{D{.}{.}{#1}}

% ================================================================

\begin{document}

\begin{table}[th] % <- second position option solves the top-of-page-problem

\textbf{\normalsize Panel C. Descriptive statistics for variables}\\
\begin{footnotesize}
\vskip 0.1in
Only variables employed in our analyses are shown
below. The variables are obtained from sources listed in Table 1.
\\
\\
\begin{tabular} {lcd{3}d{3}d{3}d{3}}

\toprule

Variable description & Variable & \multicolumn{1}{c}{Mean} & \multicolumn{1}{c}{Std.Dev.} &
\multicolumn{1}{c}{Min} & \multicolumn{1}{c}{Max} \\

\midrule

S\&P Sovereign Credit Ratings & spscore & 14.159 & 4.493
& 1.000 & 18.000 \\
(numerical transformation)\\

Log(Gross National Income - PPP) & lngni & 9.689 &
0.710 & 7.730 & 10.629 \\

Inflation (\% change in CPI) & infcpi & 3.290 & 3.298
& -0.915 & 20.239 \\

Corruption Index & corruptti & 6.810 & 2.230 & 1.500
& 10.000 \\

Central Government Debt (\% of GDP) & jpgdebt & 55.454 &
30.768 & 3.900 & 150.160 \\

Current Account Balance & cabg2 & 1.478 & 6.231 & -10.313 & 29.178 \\

Real Effective Exchange Rate & reer & 101.827 & 9.605
& 71.089 & 132.461 \\

Trade in Services (\% of GDP) & tradeservg & 19.062 & 15.309
& 3.921 & 127.742 \\

Concentration in Banking System & dklconc & 0.635 &
0.180 & 0.210 & 0.972 \\

Bank Liquid Reserves & bankliqra & 4.705 & 6.357 &
0.075 & 39.685 \\

\bottomrule

\end{tabular}
\end{footnotesize}
\end{table}
\end{document}

Best wishes for the new Years

Kris
-----Ursprüngliche Nachricht-----
Gesendet: 26.12.08 03:14:53
Betreff: [TXC-Users] Re: how do i get the table not to be centered vertically on the page?
% =============================================================
\documentclass [12pt] {article}
\begin{document}
\begin {table}[!t]
\textbf{\normalsize Panel C. Descriptive statistics for variables}\\
\begin {footnotesize}
\vskip 0.1in
\footnotesize {Only variables employed in our analyses are shown
below. The variables are obtained from sources listed in Table 1.}
\\
\\
\begin{tabular} {lccccc}
\hline
\\
Variable description & Variable & Mean & Std. Dev. &
Min & Max \\
\\
\hline
\\
S\&P Sovereign Credit Ratings & spscore & 14.159 & 4.493
& 1.000 & 18.000 \\
(numerical transformation)\\
Log(Gross National Income - PPP) & lngni & 9.689 &
0.710 & 7.730 & 10.629 \\
Inflation (\% change in CPI) & infcpi & 3.290 & 3.298
& -0.915 & 20.239 \\
Corruption Index & corruptti & 6.810 & 2.230 & 1.500
& 10.000 \\
Central Government Debt (\% of GDP) & jpgdebt & 55.454 &
30.768 & 3.900 & 150.160 \\
Current Account Balance & cabg2 & 1.478 & 6.231 & -
10.313 & 29.178 \\
Real Effective Exchange Rate & reer & 101.827 & 9.605
& 71.089 & 132.461 \\
Trade in Services (\% of GDP) & tradeservg & 19.062 & 15.309
& 3.921 & 127.742 \\
Concentration in Banking System & dklconc & 0.635 &
0.180 & 0.210 & 0.972 \\
Bank Liquid Reserves & bankliqra & 4.705 & 6.357 &
0.075 & 39.685 \\
\hline
\end{tabular}
\end {footnotesize}
\end {table}
\end {document}
_______________________________________________________________________
Sensationsangebot verlängert: WEB.DE FreeDSL - Telefonanschluss + DSL
für nur 16,37 Euro/mtl.!* http://dsl.web.de/?ac=OM.AD.AD008K15039B7069a


------------------------------------
Alain Delmotte
2009-01-05 08:31:35 UTC
Permalink
Hello,

First Best wishes for 2009.

Apart from the solution of Kristof, if you just put {\ } on a line on
its own after an empty line after the table it also works.
Your example only provides a table to be put on the page, so it is centered.

Alain Delmotte
Post by Kristof Möller
Hi,
booktabs - professional table layout for publication
dcolumn - decimal number aligning in tables
Your floating-problem results from only one (!) position option
in the \begin {table}[t] - command - if you add a second possible
float-position-option like I do in the following example, everything
\documentclass [12pt] {article}
\usepackage{booktabs}
\usepackage{dcolumn}
% new columntype for dcolumn: d{#} - # = number of decimal-places
\newcolumntype{d}[1]{D{.}{.}{#1}}
% ================================================================
\begin{document}
\begin{table}[th] % <- second position option solves the top-of-page-problem
\textbf{\normalsize Panel C. Descriptive statistics for variables}\\
\begin{footnotesize}
\vskip 0.1in
Only variables employed in our analyses are shown
below. The variables are obtained from sources listed in Table 1.
\\
\\
\begin{tabular} {lcd{3}d{3}d{3}d{3}}
\toprule
Variable description & Variable & \multicolumn{1}{c}{Mean} & \multicolumn{1}{c}{Std.Dev.} &
\multicolumn{1}{c}{Min} & \multicolumn{1}{c}{Max} \\
\midrule
S\&P Sovereign Credit Ratings & spscore & 14.159 & 4.493
& 1.000 & 18.000 \\
(numerical transformation)\\
Log(Gross National Income - PPP) & lngni & 9.689 &
0.710 & 7.730 & 10.629 \\
Inflation (\% change in CPI) & infcpi & 3.290 & 3.298
& -0.915 & 20.239 \\
Corruption Index & corruptti & 6.810 & 2.230 & 1.500
& 10.000 \\
Central Government Debt (\% of GDP) & jpgdebt & 55.454 &
30.768 & 3.900 & 150.160 \\
Current Account Balance & cabg2 & 1.478 & 6.231 & -10.313 & 29.178 \\
Real Effective Exchange Rate & reer & 101.827 & 9.605
& 71.089 & 132.461 \\
Trade in Services (\% of GDP) & tradeservg & 19.062 & 15.309
& 3.921 & 127.742 \\
Concentration in Banking System & dklconc & 0.635 &
0.180 & 0.210 & 0.972 \\
Bank Liquid Reserves & bankliqra & 4.705 & 6.357 &
0.075 & 39.685 \\
\bottomrule
\end{tabular}
\end{footnotesize}
\end{table}
\end{document}
Best wishes for the new Years
Kris
-----Ursprüngliche Nachricht-----
Gesendet: 26.12.08 03:14:53
Betreff: [TXC-Users] Re: how do i get the table not to be centered vertically on the page?
% =============================================================
\documentclass [12pt] {article}
\begin{document}
\begin {table}[!t]
\textbf{\normalsize Panel C. Descriptive statistics for variables}\\
\begin {footnotesize}
\vskip 0.1in
\footnotesize {Only variables employed in our analyses are shown
below. The variables are obtained from sources listed in Table 1.}
\\
\\
\begin{tabular} {lccccc}
\hline
\\
Variable description & Variable & Mean & Std. Dev. &
Min & Max \\
\\
\hline
\\
S\&P Sovereign Credit Ratings & spscore & 14.159 & 4.493
& 1.000 & 18.000 \\
(numerical transformation)\\
Log(Gross National Income - PPP) & lngni & 9.689 &
0.710 & 7.730 & 10.629 \\
Inflation (\% change in CPI) & infcpi & 3.290 & 3.298
& -0.915 & 20.239 \\
Corruption Index & corruptti & 6.810 & 2.230 & 1.500
& 10.000 \\
Central Government Debt (\% of GDP) & jpgdebt & 55.454 &
30.768 & 3.900 & 150.160 \\
Current Account Balance & cabg2 & 1.478 & 6.231 & -
10.313 & 29.178 \\
Real Effective Exchange Rate & reer & 101.827 & 9.605
& 71.089 & 132.461 \\
Trade in Services (\% of GDP) & tradeservg & 19.062 & 15.309
& 3.921 & 127.742 \\
Concentration in Banking System & dklconc & 0.635 &
0.180 & 0.210 & 0.972 \\
Bank Liquid Reserves & bankliqra & 4.705 & 6.357 &
0.075 & 39.685 \\
\hline
\end{tabular}
\end {footnotesize}
\end {table}
\end {document}
_______________________________________________________________________
Sensationsangebot verlängert: WEB.DE FreeDSL - Telefonanschluss + DSL
für nur 16,37 Euro/mtl.!* http://dsl.web.de/?ac=OM.AD.AD008K15039B7069a
------------------------------------
Yahoo! Groups Links
------------------------------------

Loading...