My problem is quite similar to the one described in Problems with landscape mode and Title on the same page. The hvfloats solution suggested there does not work for me, however, because I use multiple subtables. But let me start from the beginning:
In the appendix of my thesis I want to add a wide table that needs to be set in landscape mode. Normally I'd just use the sidewaystable environment, but that leaves the first page of the appendix completely empty except for the chapter heading
\documentclass[a4paper] {scrbook}
\usepackage{rotating}
\usepackage{subcaption}
\begin{document}
\appendix \cleardoublepage
\chapter{Some Data Tables}
\begin{sidewaystable}
\hspace*{\fill}
\begin{subtable}{.3\textwidth}
\rule{\linewidth}{12cm}
\end{subtable}
%
\hspace*{\fill}
%
\begin{subtable}{.3\textwidth}
\rule{\linewidth}{12cm}
\end{subtable}
\hspace*{\fill}
\caption{Table with interesting data}
\end{sidewaystable}
\end{document}
The purpose of the three \hspace*{\fill} is just to center the resulting tables properly on the page.
Realising that sidewaystable refers to \textheight I also tried to temporarily adjust that
\def \textheightTmp \textheight
\def \textheight 0.8\textheightTmp
\begin{sidewaystable}
[...]
\end{sidewaystable}
\def \textheight \textheightTmp
but this lead to the following error
Appendix A.
! Package caption Error: \setcaptionsubtype outside float.
See the caption package documentation for explanation. Type H for immediate help. ...
l.15 \begin{subtable}{.3\textwidth}
As I mentioned at the beginning, hvfloats does not work either because of the subtables
\documentclass[a4paper] {scrbook}
\usepackage{hvfloat}
\usepackage{subcaption}
\begin{document}
\appendix \cleardoublepage
\chapter{Some Data Tables}
\hvFloat[capPos=b,rotAngle=90,nonFloat]{table}{%
\hspace*{\fill}
\begin{subtable}{.3\textwidth}
\rule{\linewidth}{12cm}
\end{subtable}
%
\hspace*{\fill}
%
\begin{subtable}{.3\textwidth}
\rule{\linewidth}{12cm}
\end{subtable}
\hspace*{\fill}
}{Table with interesting data}{}
\end{document}
This results in the error:
Appendix A.
! Package caption Error: \setcaptionsubtype outside float.
See the caption package documentation for explanation. Type H for immediate help. ...
l.23 }{Table with interesting data}{}
What I want is a rotated table (with subtables) and caption that is placed on the same page as the chapter heading. Space isn't an issue, the table would fit on the page.
Is there any way to do this?
hvfloatdoes work properly when I replacesubtablewithminipageand set the subcaptions manually with\captionof{subtable}. But then there are 3 new problems:- spacing is not correct (too much space between table and subcaption and between subcaption and caption)
- the subcaption format is not consistent with that of regular
- all (some?) the
– TableKing Jul 02 '13 at 13:22subtableshspacecommands are ignored and the tables are off center and very close togetherhvfloatand just loading the package is enough to distort the caption spacing of tables that comprise subtables :-( – TableKing Jul 02 '13 at 23:06