[comp.text.tex] Rotating \caption along with a Table or Figure

cen466p@vaxc.cc.monash.edu.au (02/01/91)

Hello TeXperts. Using DVIPS and rotate.tex I was able to rotate a table. But I
could not rotate the title (\caption) of the table. At the moment, the table is
in landscape mode but the caption comes as if it is portrait. i.e the title is
in one side of the table rather than above or below it. It looks very odd. I am
sure, some of you would have encountered this problem. Do you know or heard of
any solution to fix this (i.e., rotate the whole thing including the caption of
the table into landscape). If needed, I can send a simple sample file I got from
comp.text.tex. I tried a wild guess by putting the \caption also inside the
\hbox{ } but LaTeX complains about it. The error message is appended. If the
whole table \begin{table} ... \end{table} is put inside the \hbox also have the
same problem.

I would also like to know whether a fix, if available, is equally applicable for
Figures too. TaS in Advance.

Partha

-------------------------------  Error Message ----------------------------
! Not in outer par mode.
\@latexerr ...for immediate help.}\errmessage {#1}
                                                  \endgroup
\@xfloat ...ef \@captype {#1}\ifinner \@parmoderr
                                                  \@floatpenalty \z@ \else \...
<to be read again>
                   \caption
l.6    \caption
               {title}

ian@sibyl.eleceng.ua.OZ (Ian Dall) (02/07/91)

In article <1991Feb1.104322.86250@vaxc.cc.monash.edu.au> cen466p@vaxc.cc.monash.edu.au writes:
>Hello TeXperts. Using DVIPS and rotate.tex I was able to rotate a table. But I
>could not rotate the title (\caption) of the table.

I use,

\begin{figure}
\centerline{
\begin{rotate}
\vbox{\centerline{\input{figs/nl-red-lat}}
\caption{Reduced Generalized Lattice Filter.\label{nl-red-lat}}}
\end{rotate}
}
\end{figure}

This should also work for tables. I use a style file "rot.sty" I wrote based
on rotate.tex. It is availabel for annonymous ftp from augean.ua.oz.au.
The file name is "pub/misc/rot.tar.Z" I *think*.

Essentially, \begin{rotate} takes an optional argument of l,r,f or u
which basically does the same the same as \rotl, \rotr, \rotf and
\rotu except that it also does the \setbox stuff automatically. It
also swaps the values of \hsize and \vsize which is useful for
captions and anything set in "LR mode" (actually I think this swapping
should only happen for the case of l or r and it does it always since
l is what you want it shouldn't matter).
-- 
Ian Dall          I'm not into isms, but hedonism is the most
                  harmless I can think of. -- Phillip Adams
  ACSnet: ian@sibyl.eleceng.ua.oz
internet: ian@sibyl.eleceng.ua.oz.au