The sidewaystable
environment doesn't limit you to one table per page. As long as the tabular
(or tabular*
, etc.) environments fit in a single (rotated) page, you can have more than one of these environments on a page typeset in a sidewaystable
construct.
For instance, the following code places two simple tabular*
environments one below the other (or, if you will, side by side...) on one page. Note that they can be given captions and be cross-referenced like any other tabular construct.
\documentclass{article}
\usepackage{rotating,booktabs}
\begin{document}
Cross-references to tables \ref{tab:1} and \ref{tab:2}.
\begin{sidewaystable}
\caption{First table} \label{tab:1}
\smallskip
\begin{tabular*}{\textwidth}{c @{\extracolsep{\fill}} *{9}{c}}
\toprule
a & b & c & d & e & f & g & h & i & j \\
\bottomrule
\end{tabular*}
\bigskip\bigskip % provide some separation between the two tables
\caption{Second table} \label{tab:2}
\smallskip
\begin{tabular*}{\textwidth}{c @{\extracolsep{\fill}} *{9}{c}}
\toprule
a & b & c & d & e & f & g & h & i & j \\
\bottomrule
\end{tabular*}
\end{sidewaystable}
\end{document}
You can't really nest floating environments (it doesn't make sense logically). That's the main problem, and may stem from the fact that you think you need a table
environment in order to place a tabular
. That's not the case. You're probably after the following:
\documentclass{article}
\usepackage{braket}
\begin{document}
\begin{table}[ht]
\centering
\begin{tabular}[t]{| c | c |}
\hline
State & $1$-step \\ \hline
$\ket{n, \leftarrow, 0}$ & $\leftarrow$ \\
$\ket{n, \leftarrow, 1}$ & $\rightarrow$ \\
$\ket{n, \rightarrow, 0}$ & $\rightarrow$ \\
$\ket{n, \rightarrow, 1}$ & $\leftarrow$ \\
\hline
\end{tabular}\hfill%
\begin{tabular}[t]{| c | c |}
\hline
State & $2$-step \\ \hline
$\ket{n, \leftarrow, \leftarrow, 0}$ & $\leftarrow$ \\
$\ket{n, \leftarrow, \leftarrow, 1}$ & $\rightarrow$ \\
$\ket{n, \leftarrow, \rightarrow, 0}$ & $\rightarrow$ \\
$\ket{n, \leftarrow, \rightarrow, 1}$ & $\leftarrow$ \\
\hline
\end{tabular}\hfill%
\begin{tabular}[t]{| c | c |}
\hline
State & $3$-step \\ \hline
$\ket{n, \leftarrow, \leftarrow, \leftarrow, 0}$ & $\leftarrow$ \\
$\ket{n, \leftarrow, \leftarrow, \leftarrow, 1}$ & $\rightarrow$ \\
$\ket{n, \leftarrow, \leftarrow, \rightarrow, 0}$ & $\rightarrow$ \\
$\ket{n, \leftarrow, \leftarrow, \rightarrow, 1}$ & $\leftarrow$ \\
\hline
\end{tabular}
\caption{Directions}
\end{table}
\end{document}
You may also be interested in a booktabs
implementation:
\documentclass{article}
\usepackage{braket,booktabs}
\begin{document}
\begin{table}[ht]
\centering
\begin{tabular}[t]{c c}
\toprule
State & $1$-step \\ \midrule
$\ket{n, \leftarrow, 0}$ & $\leftarrow$ \\
$\ket{n, \leftarrow, 1}$ & $\rightarrow$ \\
$\ket{n, \rightarrow, 0}$ & $\rightarrow$ \\
$\ket{n, \rightarrow, 1}$ & $\leftarrow$ \\
\bottomrule
\end{tabular}\hfill%
\begin{tabular}[t]{c c}
\toprule
State & $2$-step \\ \midrule
$\ket{n, \leftarrow, \leftarrow, 0}$ & $\leftarrow$ \\
$\ket{n, \leftarrow, \leftarrow, 1}$ & $\rightarrow$ \\
$\ket{n, \leftarrow, \rightarrow, 0}$ & $\rightarrow$ \\
$\ket{n, \leftarrow, \rightarrow, 1}$ & $\leftarrow$ \\
\bottomrule
\end{tabular}\hfill%
\begin{tabular}[t]{c c}
\toprule
State & $3$-step \\ \midrule
$\ket{n, \leftarrow, \leftarrow, \leftarrow, 0}$ & $\leftarrow$ \\
$\ket{n, \leftarrow, \leftarrow, \leftarrow, 1}$ & $\rightarrow$ \\
$\ket{n, \leftarrow, \leftarrow, \rightarrow, 0}$ & $\rightarrow$ \\
$\ket{n, \leftarrow, \leftarrow, \rightarrow, 1}$ & $\leftarrow$ \\
\bottomrule
\end{tabular}
\caption{Directions}
\end{table}
\end{document}
As an aside: You could have placed the entire table into a single tabular
as well.
Best Answer
if both tables really do fit on one page, then just include them in a single float.
if you put a blank line and some vertical space, say
\medskip
, between the first\end{tabular}
and the second\begin{tabular}
they should be set one above the other, not side by side.you'll need to force them to start on a new page. this can be done by
within this scope, if you have more than one page of tables, you can use
\newpage
. in fact, you can even uselongtable
(provided you\usepackage{longtable}
).