The sidewaystable
float always occupies a page by itself. You can use the normal table
float and rotate only the table inside or both the table and the caption. I'd prefer the first way. Don't use the h
option:
\documentclass{article}
\usepackage{graphicx,booktabs}
\usepackage{lipsum}
\begin{document}
\lipsum[1-3]
\begin{table}[tp] % NO h HERE!
\centering
\rotatebox{90}{%
\small
\begin{tabular}{lp{7.5cm}}
\toprule
\textbf{A} & \textbf{Text} \\
\midrule
X & \lipsum*[2] \\
Y & \lipsum*[2] \\
\bottomrule
\end{tabular}%
}
\caption{Some caption that shouldn't be rotated}\label{tab:r}
\end{table}
\lipsum[4-9]
\begin{table}[tp]% NO h HERE!
\centering
\rotatebox{90}{%
\begin{minipage}{9cm}
\small\centering
\begin{tabular}{lp{7.5cm}}
\toprule
\textbf{A} & \textbf{Text} \\
\midrule
X & \lipsum*[2] \\
Y & \lipsum*[2] \\
\bottomrule
\end{tabular}%
\caption{Some caption that shouldn't be rotated}\label{tab:s}
\end{minipage}%
}
\end{table}
\lipsum[10-15]
\end{document}


sidewaystable
float always use a full page. You should usetable
and rotate only thetabular
.