I am creating longtable
s rotated sideways with sidewaystable
from rotating
package. I am shocked and irritated to see that it is increasing table reference numbers 2 at a time! If I am adding the \caption{}
s before the longtable
, it is starting from Table No. 1 and the next Table No. is 3. On the other hand, if I am adding \caption{}
after the longtable
, it is starting from Table No. 2 and the next Table No. is 4. Following is an MWE:
\documentclass{book}
\usepackage{longtable}
\usepackage{rotating}
\begin{document}
\begin{sidewaystable}
% \caption{text}
\begin{longtable}{cc}
a & b
\end{longtable}
\caption{text}
\end{sidewaystable}
\begin{sidewaystable}
% \caption{text}
\begin{longtable}{cc}
a & b
\end{longtable}
\caption{text}
\end{sidewaystable}
\end{document}
I want to place my table caption below the table and want the table referencing in the natural order (reset after a chapter). Please help.
PS: I also have tables in tabular
, tabularx
, tabular*
and longtable
(without sidewaystable
) modes in my original document.
firsthead
section, so that readers do not have to turn pages to discover the table title.sidewaystable
can not be broken across pages, so placing alongtable
which can break across pages in such an unbreakable environment does not make much sense. To get alongtable
on a landscape page, uselandscape
frompdflscape
.longtable
format in the the portrait mode. So I rotated that sideways to fit in one page usingsidewaystable
forgetting completely about inappropriate application oflongtable
. This was due to more of an inertial mental block. I have changed that totabular*
and is fine now. Thanks again for your efforts.