[Tex/LaTex] Table in two column mode

elsarticletablestwo-column

I am writng a paper with the elsarticle class and I want to span a table in the two column mode over the whole textwidth (so to say interrupt the two column mode for the table, and afterwards continue with the one column mode).

I would like to wrap the text around, however the table always moves to the middle of the next page.

I scanned the internet, but I did not manage to solve my problem. I just want to include a table at a certain point, and when I type text before that table, it should be filled on both 2 columns before on that page and if I write text behind that table it should appear within the two columns afterwards.

I would be very thankful for any help.

\documentclass[a4paper,10pt,3p,twocolumn]{elsarticle}
\usepackage{lineno,hyperref}
\modulolinenumbers[5] %Show line numbers

% Added packages
\usepackage{romannum}
\usepackage{amsmath}
\usepackage{siunitx}
\usepackage{graphicx}
\graphicspath{{images/} }
\usepackage{tabu}
\usepackage{xltabular}
\usepackage{booktabs,tabularx}
\usepackage{pgfplots}
\usepackage{boldline}
\usepackage{epstopdf}
\usepackage{multirow}
\usepackage{bm}
\usepackage{enumitem}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{subfigure}
\usepackage{xcolor}
\usepackage{array}

\usepackage[utf8]{inputenc}
\usepackage{booktabs,tabularx}

\newcolumntype{Y}{>{\centering\arraybackslash}X}
% Added packages

\begin{document}

Some text, tables, figures etc.

\end{document}

Best Answer

table* is working fine, as you are not provided any MWE, I've taken my own, please refer the tags:

\documentclass[twocolumn]{elsarticle}
\usepackage[utf8]{inputenc}
\usepackage{booktabs,tabularx}

\newcolumntype{Y}{>{\centering\arraybackslash}X}
\usepackage{lipsum}
\begin{document}

\lipsum[1-10]

\begin{table*}
\caption{System variables dependencies}\label{tab2}
\begin{tabularx}{\linewidth}{@{} X *{5}{Y} @{}}
\toprule
System variables & $o_{v}$ & $s_{p}$ & $t_{m}$ & $l_{ft}$ & $l_{ot}$\\
\cmidrule(l){2-2} \cmidrule(l){3-3} \cmidrule(l){4-4} 
\cmidrule(l){5-5} \cmidrule(l){6-6}
\addlinespace
Subsystem associated & V & Pr & M & $\textrm{T}_\textrm{1}$ & 
$\textrm{T}_  \textrm{2}$ \\
\addlinespace
Mathematical dependencies & & & $t_{m}(t)=23-0.25
\times  o_{v}(t)+0.62\times s_{p}(t)$
& $l_{ft}(t)=l_{ft}(t-1) -0.001\times s_{p}(t)$
& $l_{ft}(t)=l_{ft}(t-1) -0.0005\times s_{p}(t)$ \\
\addlinespace
Operational dependencies & $o_{v}(t)=0$ if $s_{p}(t)=0$ & & 
& $l_{ft}(t)=l_{ft}(t-1)$ if $s_{p}(t)=0$
& $l_{ot}(t)=l_{ot}(t-1)$ if $s_{p}(t)=0$ \\
\addlinespace
Nominal value range 
& $0\rightarrow100$ (\%) 
& $0\rightarrow100$ (\%)
& $23\rightarrow83$ (°C)
& $2\rightarrow100$ (\%)
& $2\rightarrow100$ (\%)\\ 
\bottomrule
\end{tabularx}
\end{table*}

\lipsum[1-10]
\end{document}

EDIT

\documentclass[twocolumn]{elsarticle}
\usepackage[utf8]{inputenc}
\usepackage{booktabs,tabularx}
\usepackage{midfloat}
\usepackage{caption}

\newcolumntype{Y}{>{\centering\arraybackslash}X}
\usepackage{lipsum}

\begin{document}

\lipsum[1-8]

\begin{strip}%[]
\renewcommand\captionfont{\footnotesize}%
\begin{center}
\begin{tabularx}{\linewidth}{@{} X *{5}{Y} @{}}
\toprule
System variables & $o_{v}$ & $s_{p}$ & $t_{m}$ & $l_{ft}$ & $l_{ot}$\\
\cmidrule(l){2-2} \cmidrule(l){3-3} \cmidrule(l){4-4} 
\cmidrule(l){5-5} \cmidrule(l){6-6}
\addlinespace
Subsystem associated & V & Pr & M & $\textrm{T}_\textrm{1}$ & 
$\textrm{T}_  \textrm{2}$ \\
\addlinespace
Mathematical dependencies & & & $t_{m}(t)=23-0.25
\times  o_{v}(t)+0.62\times s_{p}(t)$
& $l_{ft}(t)=l_{ft}(t-1) -0.001\times s_{p}(t)$
& $l_{ft}(t)=l_{ft}(t-1) -0.0005\times s_{p}(t)$ \\
\addlinespace
Operational dependencies & $o_{v}(t)=0$ if $s_{p}(t)=0$ & & 
& $l_{ft}(t)=l_{ft}(t-1)$ if $s_{p}(t)=0$
& $l_{ot}(t)=l_{ot}(t-1)$ if $s_{p}(t)=0$ \\
\addlinespace
Nominal value range 
& $0\rightarrow100$ (\%) 
& $0\rightarrow100$ (\%)
& $23\rightarrow83$ (°C)
& $2\rightarrow100$ (\%)
& $2\rightarrow100$ (\%)\\ 
\bottomrule
\end{tabularx}
\end{center}
\captionof{table}{System variables dependencies\label{tab2}}
\end{strip}

\lipsum[1-10]
\end{document}
Related Question