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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

    \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       &                   &                       &           &       \\
\caption{Comparação de Gerenciadores de Documento}

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

share|improve this question
up vote 2 down vote accepted

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

enter image description here

\usepackage{rotating}% http://ctan.org/pkg/rotating
    \hline  Nome        & Linguagem & Full-Text Indexing & Some text & Workflow & Some text \\
    \hline  Quotero     & Java      & Sim                &           &          &           \\
    \hline  OpenKM      & Java      &                    &           &          &           \\
    \hline  xinco DMS   & PHP       &                    &           &          &           \\
  \caption{My caption}
share|improve this answer
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.

share|improve this answer

Your Answer


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.