I am trying to create a sidewaystable table in my appendix. The table (hardly) fits on the page and but is located on the next page. Does someone have a hint for me?
Here is my minimal preamble and the lines for the table.
\documentclass[review,preprint,11pt,authoryear]{elsarticle}
\usepackage{graphicx}
\usepackage{booktabs,tabularx,ctable,array,multirow,hyperref,lineno}
\usepackage{textcomp,amssymb,amsmath,textcomp}
\usepackage{longtable,caption,rotating,geometry}
\usepackage{lmodern,makecell,tablefootnote}
\setlength{\tabcolsep}{3.5pt}
\geometry{
a4paper,
total={160mm,257mm},
left=20mm,
top=18mm,
}
\captionsetup[longtable]{%
labelfont={small,it} ,
textfont={small,it} ,
position=top ,
belowskip=0pt ,
aboveskip=4pt
}
\newcommand{\tab}{\hspace{5mm}}
\begin{document}
\appendix
\newpage
\section{} \label{s:wrapping}
\begin{sidewaystable}[h]
\begin{small}
\caption{Mathematical descriptions of the geometrical forms of the wrapping surfaces}
\label{t:geometry}
\begin{tabular}{lc|cccc|ccc|ccc|ccc|ccc|ccc|ccc}
\toprule[0.035cm]
muscle &form &r &rx &ry &rz &\multicolumn{3}{c}{ps} &\multicolumn{3}{c}{pe} &\multicolumn{3}{c}{pc} &\multicolumn{3}{c}{nx} &\multicolumn{3}{c}{ny} &\multicolumn{3}{c}{nz} \\
& & & & & & x &y &z & x &y &z & x &y &z & x &y &z & x &y &z & x &y &z \\
\midrule[0.035cm]
serratus anterior &ellipsoid & &0.137 &0.11 &0.22 & & & & & & &0 &-0.132&0.897 &0.9945 &0 &-0.1045 &0 &1 &0 &0.1045 &0 &0.9945 \\
serratus posterior superior &cylinder &0.04 & & & &-0.0300 &-0.0800 &1.0300 & 0.0166 &-0.1732 &1.1077 & & & & & & & & & & & & \\
trapezius &cylinder &0.012 & & & &-0.0850 &-0.0370 &1.0400 &-0.0486 &-0.1179 &1.1209 & & & & & & & & & & & & \\
\bottomrule[0.035cm]
\end{tabular}
\end{small}
\end{sidewaystable}
\end{document}
sidewaystables are always placed on a separate page, you'll need to use some other technique if you want to avoid that. See if Ulrike's answer at http://tex.stackexchange.com/a/69287/586 helps. – Torbjørn T. Nov 01 '16 at 16:15\toprule/\midrule/\bottomrulefrombooktabs.) – Torbjørn T. Nov 01 '16 at 18:53\cmidrule(lr){3-6}and similar to distinguish the groups, as in e.g. http://tex.stackexchange.com/questions/238503/tip-on-how-to-make-a-visually-good-table/238516#238516 and http://tex.stackexchange.com/questions/18092/vertical-lines-are-being-broken-up-disrupted-by-the-horizontal-booktabs-lines/18114#18114. To fit that in the same page as the\sectionyou need to reduce the size somehow. Restructure, reduce\tabcolsepand fontsize, or (worst case) use\scalebox/\resizebox(see http://tex.stackexchange.com/questions/332902/my-table-doesnt-fit-what-are-my-options). – Torbjørn T. Nov 01 '16 at 19:44