Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm hoping I can get a quick answer to this question, and I don't have time to make a MWE right now. If I have made a sideways table and used it to layout some images nicely, but I would like the overall table to actually be a figure so that it:

  1. is titled "Figure xx",
  2. shows up in the LOF,
  3. counts towards the figure counter, and
  4. no longer counts towards table sum or LOT.

Can this be easily done?

Here's a rough code snippet to show what I mean. I'd like to do something equivalent to taking the following:

\begin{sidewaystable}[htpb]
\begin{tabular}
... table contents ... 
\end{tabular}
\end{sidewaystable}

and turning it into:

\begin{figure}
\begin{sidewaystable}
\begin{tabular}
... table contents ... 
\end{tabular}
\end{sidewaystable}
\end{figure}

However, just wrapping the table in a figure environment like that gives me errors right away at \begin{sidewaystable} saying it's "not in outer par mode." I also think that even if this did compile, it would simultaneously increment table AND figure counters.

share|improve this question
    
Why do you use a table environment inside sidewaystable? sidewaystable creates a floating object similar to table but rotated. Nesting table inside sidewaystable will produce errors. –  Gonzalo Medina Nov 11 '11 at 2:19
    
I only recently started using tables, and have been going off a tutorial online which shows tabular nested inside a table, so I had the impression that in that setup, to rotate it sideways, you replaced table with sidewaystable but kept the nested tabular. The approach I've shown works fine for me with no errors. –  SSilk Nov 11 '11 at 2:23
    
of course, you can nest tabular inside sidewaystable, all right, but please notice that in the code you posted you are nesting table inside sidewaystable, and this will produce errors. Perhaps it was just a typo in your code snippet, but you could fix it. –  Gonzalo Medina Nov 11 '11 at 2:28
    
Yes, you're right. I've updated my example code. Thanks! –  SSilk Nov 11 '11 at 2:55

1 Answer 1

up vote 5 down vote accepted

Use the sidewaysfigure environment instead of sidewaystable:

\documentclass{article}
\usepackage{rotating}

\begin{document}
\listoffigures
\begin{sidewaysfigure}
\centering
\rule{3cm}{3cm}
\caption{test rotated figure}
\label{fig:test}
\end{sidewaysfigure}
\end{document}
share|improve this answer
    
Works perfectly. Thanks! To anyone else making this change: don't forget to (most likely manually) update your references to the table, e.g. changing Table \ref{yourlabel} to Figure \ref{yourlabel}. –  SSilk Nov 11 '11 at 2:21
    
@SSilk If you use the cleveref package then you don't have to worry. –  cmhughes Nov 11 '11 at 3:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.