# Rotate table with caption: “Not in outer par mode. \begin{table}[h]”

I would like to rotate one table with caption however it returns me an error

Missing \endgroup inserted ...omparação de Gerenciadores de Documento}
Undefined control sequence \end{sideways}
Undefined control sequence \end{sideways}
Undefined control sequence \end{sideways}
Undefined control sequence \end{sideways}
\begin{table} on input line 18 ended by \end{sideways}. \end{sideways}
Too many }'s
Extra \endgroup


I am using the code below

\begin{table}[h]
\begin{sideways}
\begin{tabular}{|c|c|c|c|c|c|}
\hline  Nome        & Linguagem & Full-Text Indexing & Controle de Versão & Workflow & Controle de Usuários \\
\hline  Quotero     & Java      &  Sim              &                       &           &       \\
\hline  OpenKM      & Java      &                   &                       &           &       \\
\hline  xinco DMS   & PHP       &                   &                       &           &       \\
\hline
\end{tabular}
\end{sideways}
\end{table}


How can I solve that error? It only happens if I have the caption.

-

In order to rotate the entire table, including the caption, use the sidewaystable environment:

\documentclass{article}
\usepackage{rotating}% http://ctan.org/pkg/rotating
\begin{document}
\begin{sidewaystable}[ht]
\centering
\begin{tabular}{|c|c|c|c|c|c|}
\hline  Nome        & Linguagem & Full-Text Indexing & Some text & Workflow & Some text \\
\hline  Quotero     & Java      & Sim                &           &          &           \\
\hline  OpenKM      & Java      &                    &           &          &           \\
\hline  xinco DMS   & PHP       &                    &           &          &           \\
\hline
\end{tabular}
\caption{My caption}
\end{sidewaystable}
\end{document}

-
except, of course, that rafael wants an [h] float. in the absence of a mwe, it's going to be a bit time-consuming to work out what's actually going on. i suspect that what he wants isn't actually possible, but faced with his precis of what's going on, i couldn't say for sure. –  wasteofspace Apr 4 '12 at 6:41

werner is right: the only straightforward route to a float with rotated text is to use the sidewaystable environment; however, as i pointed out in my comment, that is not what you seemed to want.

since you have not explained what you wanted to do with this strange float, it's not clear what to recommend. even if your float fits on its page, the appearance is going to be odd; far better to make it a sidewaystable, as werner suggested imo.

the specific problem you face is that \begin{sideways} starts something like an \mbox and \caption doesn't work in that, since it uses a vertical skip.

-