[Tex/LaTex] Table disappear when I use sideways command

rotatingtables

I want to rotate a table, When I use sideways table environment table disappears from the document and also disappear from list of tables. I tried a lot with different possible packages as below. I need the whole table environment(label, caption etc) to rotate.

\documentclass[12pt]{report}
   \renewcommand{\baselinestretch}{1.5}
   \usepackage[top=1in, bottom=1in, left=1.25in, right=0.75in]{geometry}
                 \usepackage[utf8]{inputenc}
                 \usepackage{amsmath}
                 \usepackage{csvsimple}
                 \usepackage{amssymb}
                 \usepackage{longtable}
                 \usepackage{booktabs}
                 \usepackage{adjustbox}
                 \usepackage{placeins}
                 \usepackage{float}
                 \usepackage{wrapfig}
                 \usepackage{array}
                 \usepackage{tabularx}
                 \usepackage{tabu}
                 \usepackage{setspace} 
                 \usepackage{multirow} 
                 \usepackage{rotating}
                 \usepackage{multirow}
                 \usepackage{longtable}

                 \usepackage{enumitem}
                 \usepackage{pifont}
                 \usepackage{natbib}
                 \usepackage{booktabs}
                 \usepackage{collcell}
                 \usepackage{datatool}
                 \usepackage{pdflscape}
                 \usepackage{graphics}
\begin{document}

\begin{sidewaystable}[H]
    \centering
    \caption{Set table like this}
    \vspace{2mm}
    \begin{tabular}{cccccccccc}\toprule
        &       & Data set 1 &       &       & Data set 2 &       &       & Data set 3 &  \\ \cmidrule(lr){2-4} \cmidrule(lr){5-7} \cmidrule(lr){8-10}
        Estimators & $ n=10 $  & $ n=15 $  & $ n=20 $  & n=10  & $ n=15 $  & $ n=20 $  & $ n=10 $  & $ n=15 $  & $ n=20 $\\ \midrule
        $ \hat{M}_{01} $   & 100.451 & 101.658 & 100.012 & 103.402 & 119.517 & 311.625 & 110.256 & 126.864 & 157.835 \\
        $ \hat{M}_{02} $   & 59.146 & 7407.001 & 1508.683 & 448.119 & 326.131 & 788.717 & 189.374 & 153.392 & 285.499 \\
        $ \hat{M}_{03} $   & 2896.694 & 2828.759 & 1154.403 & 974.536 & 1931.318 & 12350 & 1150.055 & 2778.052 & 1245.779 \\ \bottomrule
    \end{tabular}%
    \label{tex table}%
\end{sidewaystable}%

\end{document}

Best Answer

You don't show what you did so it is not possible to say what is wrong with that, but if you change \begin{table}[H] to \begin{sidewaystable} and change \end{table} to \end{sidewaystable} then you get

enter image description here


If you use [H] on sidewaystable without using the float package then you get an error

! LaTeX Error: Unknown float option `H'.

However when the float package is loaded H gets allowed in the optional argument but doesn't actually work for sidewaystable which causes the text to be silently dropped, which is not ideal.

One could argue whether this is a failing in the rotating or float package but since I only have write access to rotating I'll say it is an issue with float. I'll ping its maintainer....