2

how can I rotate text in a tabu environment by 90 degrees? I export my tables from Excel using a plugin and it puts the text which should be rotated into \begin{sideways} ... \end{sideways} but Latex throws an error. Here is my code:

\documentclass[10pt,DIV=12,a4paper,numbers=noenddot]{scrreprt}

\usepackage{tabu}
\usepackage{booktabs}

\begin{document}

\begin{table}

\begin{tabu} to \textwidth {X[L] X[L]}

\toprule 

AAAAAA & BBBBBB \\

% \begin{sideways}AAAAAA\end{sideways} & \begin{sideways}BBBBBB\end{sideways} \\

\end{tabu}

\end{table}

\end{document}
2

The sideways environment comes from the rotating package so the simplest thing to do is probably just add

\usepackage{rotating}

rotating package is mainly a wrapper around the standard graphics package rotation preserving the syntax of a pre-latex2e package, but if you already have generated that markup there is no harm in using it.

  • Yes, it was the package which was missing. Did not know that this function was included in an extra package. I finally just used sideways and it did its job so far :) – Josh Feb 10 '13 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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