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.

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}
share|improve this question
    
how about using a rotatebox? –  Rico Feb 10 '13 at 11:14
    
You can try one of the methods outlined in Rotated column titles in tabular or in How to write vertically in a cell –  egreg Feb 10 '13 at 11:14
    
Cool thanks. I will try turn and rotate and see how far I get. Thanks for these two started –  Josh Feb 10 '13 at 11:21
add comment

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
    
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
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.