Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sideways table, rotcaption

1,718 views
Skip to first unread message

Seth Padowitz

unread,
Jan 4, 1998, 3:00:00 AM1/4/98
to

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

Jeff Ratcliffe

unread,
Jan 7, 1998, 3:00:00 AM1/7/98
to

Seth Padowitz wrote:

> 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


Johannes Niess

unread,
Jan 7, 1998, 3:00:00 AM1/7/98
to

se...@abel.harvard.edu (Seth Padowitz) wrote:

>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 Padowitz

unread,
Jan 15, 1998, 3:00:00 AM1/15/98
to

Many thanks to all those that replied.
Below is what I finally settled on.
It's not ideal, but it seems to work tolerably well.

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}


0 new messages