Ravby/eswa-template

How to put the title of a table above the table

Rorywh opened this issue · 1 comments

Thanks for your excellent work.
I have encounter one problem when using this template. The table title is always at the bottom of the table, which is very troubling.
Here is the latex code for the generation of table:
\begin{table}[]
\caption{I am a table}
\label{tab:my-table}
\begin{tabular}{@{}cllllll@{}}
\toprule
\multicolumn{7}{c}{} \ \midrule
\multicolumn{7}{c}{} \
\multicolumn{7}{c}{} \ \bottomrule
\end{tabular}
\end{table}

Here are the packages used in my work.
\documentclass[review]{elsarticle}
% \documentclass[sn-mathphys]{sn-jnl}% Math and Physical Sciences Reference Style
\graphicspath{ {./figures/} }
\usepackage{hyperref}
\usepackage{float}
\usepackage{verbatim} %comments
\usepackage{apalike}
\restylefloat{figure}
\restylefloat{table}
\usepackage{amsmath}
\usepackage{booktabs}

Ravby commented

Try adding \floatstyle{plaintop} before \restylefloat{table}