Both
\begin{landscape} \begin{table}
and
\begin{sidewaystable}
insist on putting the table on a new page, which is not what I want.
\begin{table} \centering \rotcaption{Foo} \begin{sideways} \begin{tabular}{c}
almost works right, EXCEPT that the caption is left-justified rather than
centered. No amount of \centering seems to change this.
Even \usepackage[center]{caption}, which claims to affect \rotcaption,
doesn't cause the rotated caption to be centered. (Yes, I put
it after \usepackage{rotating}, and it does recognize rotating.)
Any suggestions? I'm sure this must be a common request.
(On dejanews I saw that someone asked a similar question,
but I didn't find a satisfactory reply.)
Thanks!
Seth
> I'm trying to rotate a table, but can't get it to come out quite right.
>
> Both
> \begin{landscape} \begin{table}
> and
> \begin{sidewaystable}
> insist on putting the table on a new page, which is not what I want.
I've been having fun with this myself. One of the manuals suggests using
\begin{sidewaystable} in a minipage environment, but I haven't got this to work
yet. Anybody any better ideas?
--
Jeff
>I'm trying to rotate a table, but can't get it to come out quite right.
>
>Both
>\begin{landscape} \begin{table}
>and
>\begin{sidewaystable}
>insist on putting the table on a new page, which is not what I want.
>\begin{table} \centering \rotcaption{Foo} \begin{sideways} \begin{tabular}{c}
>almost works right, EXCEPT that the caption is left-justified rather than
>centered. No amount of \centering seems to change this.
>Even \usepackage[center]{caption}, which claims to affect \rotcaption,
>doesn't cause the rotated caption to be centered. (Yes, I put
>it after \usepackage{rotating}, and it does recognize rotating.)
>Any suggestions? I'm sure this must be a common request.
>(On dejanews I saw that someone asked a similar question,
>but I didn't find a satisfactory reply.)
>Thanks!
>
>Seth
A naive approach:
leaving the caption left-justified and using:
\hfill caption text goes here \hfill
There is a captions2 package, which should be better.
Seth
--------------------------------------------------------------
\documentclass{amsbook}
\usepackage{rotating}
\usepackage{float}
\usepackage{caption}
\floatplacement{table}{htbp}
\newcommand{\centeredrotcaption}[1]{\begin{minipage}[c]{1.75\baselineskip}
\rotcaption{#1}
\end{minipage}}
\newenvironment{sidewaystabular}[2]{\begin{minipage}[c]{#1\baselineskip}
\begin{sideways}
\begin{tabular}{#2}}
{\end{tabular}
\end{sideways}
\end{minipage}}
\begin{document}
\begin{table}
\caption{Foo}
\begin{tabular}{lcr}
First Column & Second Column & Third Column \\
\hline
AAAAAAAAAAAA & BBBBBBBBBBBBB & CCCCCCCCCCCC \\
AAAAAAAAAAAA & BBBBBBBBBBBBB & CCCCCCCCCCCC \\
AAAAAAAAAAAA & BBBBBBBBBBBBB & CCCCCCCCCCCC \\
AAAAAAAAAAAA & BBBBBBBBBBBBB & CCCCCCCCCCCC \\
\end{tabular}
\end{table}
\begin{table}
\centeredrotcaption{Baring any Unforseen Circumstances}
\begin{sidewaystabular}{5}{lccr}
First Column & Second Column & Third Column & Fourth Column \\
\hline
AAAAAAAAAAAA & BBBBBBBBBBBBB & CCCCCCCCCCCC & DDDDDDDDDDDDD \\
AAAAAAAAAAAA & BBBBBBBBBBBBB & CCCCCCCCCCCC & DDDDDDDDDDDDD \\
AAAAAAAAAAAA & BBBBBBBBBBBBB & CCCCCCCCCCCC & DDDDDDDDDDDDD \\
AAAAAAAAAAAA & BBBBBBBBBBBBB & CCCCCCCCCCCC & DDDDDDDDDDDDD \\
\end{sidewaystabular}
\end{table}