2

I have the following table:

   \documentclass[a4paper,  % Seitenformat
            12pt,                               
            bibliography=totoc,     
            index=totoc,    
            abstracton,     
            headsepline,    
            %footnosepline, 
            ]{scrreprt}

\usepackage{booktabs}
\begin{document}
\begin{table}[h]
\centering 
\begin{tabular}{llllllll}
\toprule
Test& test &test&test tes t&test test &test test &tes tes t&test test \\
\midrule
test& -0,0000615 & 0,0145 &  0,02783&&\\
&(0.000895) &(0.000633) &&& \\
test& -0,0004447 & 0,0152  & 0,0294&&\\
 &(0.00094)&(0.000664) & &&\\
test&-0,000107 & 0,0234  &  0.04584&&\\
&(0.001445) &(0.00102)&&&\\
test& -0.00075 & 0,01285 &  0.0244&&\\
&(0.000792) &(0.00056)&&&\\
\bottomrule
\begin{footnotesize}std. errors in parentheses\end{footnotesize}
\end{tabular}
\caption{VaR$_{0,975}$ values using formula \ref{variancenormal}}
\label{vartvalues}
\end{table}

\end{document}  

Which gives the following picture

enter image description here

  1. The first column is clearly too big, why? How can I change this?
  2. How can I make the table to fit in? So it is too wide now, it is in the right margin, what I don't want, so how can I make the table fit?
1
  • Use \multicolumn{8}{l}{\footnotesize std. ...}
    – egreg
    Commented Mar 26, 2013 at 13:10

2 Answers 2

2

You want that the last row spans all the columns, so

\multicolumn{8}{l}{\footnotesize Standard errors in parentheses}

will fix the issue.

3
  • Thanks, but the table is still too big, so it is still in the right margin? @egreg Commented Mar 26, 2013 at 13:41
  • ok, I found a solution: \hspace*{-1cm}, but this needs manual adjustment, isn't there something like \centerline for tables? Commented Mar 26, 2013 at 13:46
  • @StatTistician Put the entire table in \makebox[\textwidth]{\begin{tabular}...\end{tabular}}. But I'd try fixing it before resorting to these tricks. Can you add a small sample of the real table?
    – egreg
    Commented Mar 26, 2013 at 14:01
1

In addition to encasing the string std. errors in parentheses in a \multicolumn{8}{l}{...} directive -- as already suggested by @egreg -- I'd recommend you load the siunitx package to pretty-print the numerical columns. The following example might work for you:

enter image description here

\documentclass[a4paper]{scrreprt}
\usepackage{booktabs}
\usepackage{siunitx}
\sisetup{table-format = 2.7,
         group-digits = false,
         input-symbols = {()-+},
         input-open-uncertainty  = ,
         input-close-uncertainty = ,
         input-decimal-markers = {,.},
         output-decimal-marker = {,}}
\begin{document}
\begin{table}[h]
\centering 
\begin{tabular}{l *{7}{S} }
\toprule
Test& {test} &{test} &{test}&{test}&{test}&{test}&{test}\\
\midrule
test& -0,0000615 & 0,0145 &  0,02783&&\\
&(0.000895) &(0.000633) &&& \\
test& -0,0004447 & 0,0152  & 0,0294&&\\
 &(0.00094)&(0.000664) & &&\\
test&-0,000107 & 0,0234  &  0.04584&&\\
&(0.001445) &(0.00102)&&&\\
test& -0.00075 & 0,01285 &  0.0244&&\\
&(0.000792) &(0.00056)&&&\\
\bottomrule
\multicolumn{8}{l}{\footnotesize std.\ errors in parentheses}
\end{tabular}
\caption{VaR$_{0,975}$ values using formula \ref{variancenormal}}
\label{vartvalues}
\end{table}
\end{document}  

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .