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

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

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

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

enter image description here

\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}
share|improve this answer
1  
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
add comment

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
add comment

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.