2

I'm writing a paper to submit to Statistics and computing, I use the svjour3 class and the twocolumn environment. I want to set a table between the text occupying two columns and I am not getting, does anyone know how to proceed? Here is an example code:

\documentclass[twocolumn]{svjour3}
\usepackage{lipsum,array}
\begin{document}
\title{foo}
\author{I}
\maketitle
\lipsum[1-10]
\begin{table*}
\centering
\caption{Empirical mean of the maximum likelihood} 
%\resizebox{\columnwidth}{!}{%
\begin{tabular*}{0.85\textwidth}{rccccccccccc}
\hline 
\hline
\multicolumn{12}{c}{Presence and Absence}\\
\hline \hline
&\multicolumn{2}{c}{A1}     &&\multicolumn{2}{c}{A2}&&\multicolumn{2}{c}{A3}&&\multicolumn{2}{c}{A4} \\
\cline{2-3} \cline{5-6} \cline{8-9}\cline{11-12} 
             Parameters&Mean      &RMSE&&Mean&RMSE&&Mean&RMSE&&Mean&RMSE \\ \hline
$\alpha_{1}=2.5$& 2.248     & 0.315 &  & 1.441 & 1.067 &  & 1.717 & 0.797 &  & 1.682 & 0.836 \\ 
$\alpha_{2}=1.0$& 0.831     & 0.210 &  & 0.742 & 0.273 &  & 0.681 & 0.336 &  & 0.852 & 0.179 \\ 
$\alpha_{3}=2.5$& 2.098     & 0.465 &  & 1.870 & 0.648 &  & 1.716 & 0.807 &  & 2.149 & 0.398 \\ 
$\alpha_{4}=2.0$& 1.642     & 0.410 &  & 1.480 & 0.536 &  & 1.358 & 0.663 &  & 1.709 & 0.334 \\ 
    $\beta_{1}=-0.5$&$-$0.545& 0.060 &  & $-$0.772 & 0.275 &  & 0.132 & 0.650 &  & $-$0.716 & 0.222 \\ 
     $\beta_{2}=1.5$& 1.506     & 0.041 &  & 1.500 & 0.031 &  & 1.499 & 0.040 &  & 1.496 & 0.031 \\ 
     $\beta_{3}=2.0$& 2.016     & 0.052 &  & 2.000 & 0.038 &  & 2.003 & 0.048 &  & 1.989 & 0.040 \\ 
   $\theta_{1}=2.0$& 2.547     & 0.622 &  & 0.789 & 1.211 &  & 1.235 & 0.783 &  & 0.703 & 1.297 \\ 
             $\rho=0.4$& 0.431     & 0.113 &  & 0.346 & 0.134 &  & 0.531 & 0.212 &  & 0.284 & 0.186 \\ 
\hline \hline
\multicolumn{12}{c}{Absence and presence}\\
\hline \hline
Parameters&Mean  &RMSE&&Mean&RMSE&&Mean&RMSE&&Mean&RMSE \\ \hline
$\alpha_{1}=2.5$      & 2.260 & 0.294 &  & 1.444 & 1.064 &  & 1.641 & 0.880 &  & 1.676 & 0.839 \\ 
$\alpha_{2}=1.0$      & 0.803 & 0.231 &  & 0.729 & 0.284 &  & 0.685 & 0.327 &  & 0.842 & 0.188 \\ 
$\alpha_{3}=2.5$      & 2.055 & 0.497 &  & 1.846 & 0.670 &  & 1.736 & 0.782 &  & 2.121 & 0.422 \\ 
    $\beta_{1}=-0.5$     & $-$0.550 & 0.071 &  & $-$0.766 & 0.271 &  & $-$0.070 & 0.591 &  & $-$0.688 & 0.200 \\ 
     $\beta_{2}=1.5$      & 1.508 & 0.044 &  & 1.498 & 0.031 &  & 1.502 & 0.029 &  & 1.488 & 0.035 \\ 
     $\beta_{3}=2.0$      & 2.024 & 0.063 &  & 1.994 & 0.046 &  & 2.003 & 0.039 &  & 1.964 & 0.068 \\ 
   $\alpha_{1}=2.0$      & 2.534 & 0.609 &  & 0.787 & 1.213 &  & 1.131 & 0.890 &  & 0.698 & 1.302 \\ 
    $\rho=0.4$                & 0.431 & 0.140 &  & 0.314 & 0.174 &  & 0.472 & 0.192 &  & 0.169 & 0.330 \\ 
\hline \hline
\end{tabular*}
%}
\label{a:test}
\end{table*}

\lipsum[3-5]

\end{document}

I want, like the example below:

enter image description here

5
  • 1
    What you're trying to achieve is not clear to me. Do you want a table which spreads over both columns?
    – Bernard
    Commented Jul 22, 2018 at 14:47
  • 1
    Yes. But I want it to be between the text. In the middle of the first page for example! She's going to the end of the text!
    – fsbmat
    Commented Jul 22, 2018 at 14:53
  • 2
    this is possible with use of the package cute, however it also change a text flow. see @Bernard answer on tex.stackexchange.com/questions/368080
    – Zarko
    Commented Jul 22, 2018 at 15:10
  • 1
    Sorry, looks like it does not work with tables! At least I could not make it work!
    – fsbmat
    Commented Jul 22, 2018 at 15:16
  • 2
    @fsbmat: As it is no more a float, you cannot use the table environment. You simply have to use the tabular environment, and \captionof{table}{mycaption}\label{some label}
    – Bernard
    Commented Jul 22, 2018 at 15:38

1 Answer 1

3

You must know that, in two column mode, a table*, spreading over two columns, goes to the top of the page which follows the insertion point, so you have to insert it in the code at a point which will appear in the previous page.

Another possibility is to use the stfloats package (from the sttools bundle), which gives the possibility to use the [b] placement specifier, or the strip environmentfromcuted(also fromsttools`), which makes your table or figure non-float and places it at the insertion point.

Here is an example of the first solution. I took the opportunity to improve your table with the S column type from siunitx (numbers aligned on the decimal tot), and the rules from booktabs, which have some vertical padding. A simple tabular is enough:

\documentclass[twocolumn]{svjour3}
\usepackage{lipsum,array}
\usepackage{siunitx, booktabs}

\begin{document}
\title{foo}
\author{I}
\maketitle
\lipsum[1-5]
\begin{table*}
\centering
\caption{Empirical mean of the maximum likelihood}
\sisetup{table-format=-1.3, table-number-alignment=center}
\begin{tabular}{r*{3}{SSc}SS}%{0.85\textwidth}
\toprule
\midrule
\multicolumn{12}{c}{Presence and Absence}\\
\midrule \midrule
&\multicolumn{2}{c}{A1} &&\multicolumn{2}{c}{A2}&&\multicolumn{2}{c}{A3}&&\multicolumn{2}{c}{A4} \\
\cmidrule(l){2-3} \cmidrule(l){5-6} \cmidrule(l){8-9}\cmidrule(l){11-12}
             Parameters & {Mean} & {RMSE} & & {Mean} & {RMSE} & & {Mean} & {RMSE} & &{Mean}& {RMSE} \\
             \midrule
$\alpha_{1}=2.5$& 2.248 & 0.315 & & 1.441 & 1.067 & & 1.717 & 0.797 & & 1.682 & 0.836 \\
$\alpha_{2}=1.0$& 0.831 & 0.210 & & 0.742 & 0.273 & & 0.681 & 0.336 & & 0.852 & 0.179 \\
$\alpha_{3}=2.5$& 2.098 & 0.465 & & 1.870 & 0.648 & & 1.716 & 0.807 & & 2.149 & 0.398 \\
$\alpha_{4}=2.0$& 1.642 & 0.410 & & 1.480 & 0.536 & & 1.358 & 0.663 & & 1.709 & 0.334 \\
    $\beta_{1}=-0.5$& -0.545& 0.060 & & -0.772 & 0.275 & & 0.132 & 0.650 & & -0.716 & 0.222 \\
     $\beta_{2}=1.5$& 1.506 & 0.041 & & 1.500 & 0.031 & & 1.499 & 0.040 & & 1.496 & 0.031 \\
     $\beta_{3}=2.0$& 2.016 & 0.052 & & 2.000 & 0.038 & & 2.003 & 0.048 & & 1.989 & 0.040 \\
   $\theta_{1}=2.0$& 2.547 & 0.622 & & 0.789 & 1.211 & & 1.235 & 0.783 & & 0.703 & 1.297 \\
             $\rho=0.4$& 0.431 & 0.113 & & 0.346 & 0.134 & & 0.531 & 0.212 & & 0.284 & 0.186 \\
\midrule \midrule
\multicolumn{12}{c}{Absence and presence}\\
\midrule \midrule
             Parameters & {Mean} & {RMSE} & & {Mean} & {RMSE} & & {Mean} & {RMSE} & &{Mean}& {RMSE} \\
             \midrule
$\alpha_{1}=2.5$ & 2.260 & 0.294 & & 1.444 & 1.064 & & 1.641 & 0.880 & & 1.676 & 0.839 \\
$\alpha_{2}=1.0$ & 0.803 & 0.231 & & 0.729 & 0.284 & & 0.685 & 0.327 & & 0.842 & 0.188 \\
$\alpha_{3}=2.5$ & 2.055 & 0.497 & & 1.846 & 0.670 & & 1.736 & 0.782 & & 2.121 & 0.422 \\
    $\beta_{1}=-0.5$ & -0.550 & 0.071 & &-0.766 & 0.271 & & -0.070 & 0.591 & & -0.688 & 0.200 \\
     $\beta_{2}=1.5$ & 1.508 & 0.044 & & 1.498 & 0.031 & & 1.502 & 0.029 & & 1.488 & 0.035 \\
     $\beta_{3}=2.0$ & 2.024 & 0.063 & & 1.994 & 0.046 & & 2.003 & 0.039 & & 1.964 & 0.068 \\
   $\alpha_{1}=2.0$ & 2.534 & 0.609 & & 0.787 & 1.213 & & 1.131 & 0.890 & & 0.698 & 1.302 \\
    $\rho=0.4$ & 0.431 & 0.140 & & 0.314 & 0.174 & & 0.472 & 0.192 & & 0.169 & 0.330 \\
\midrule \bottomrule
\end{tabular}
\label{a:test}
\end{table*}

\lipsum[3-10]

\end{document} 

enter image description here

0

You must log in to answer this question.

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