# How to write vertically in a cell

I know that with \begin{sideways} ... \end{sideways} I can write a text vertically, but it rotates the text by +90 degrees. What should I do to rotate it by -90 degrees?

• Does \begin{turn}{-90} or \begin{turn}{270} work?
– knut
Jan 19 '12 at 16:39
• So, what's the best option of all these alternatives? Apr 29 '15 at 11:28

You could use the environment turn.

Example:

\documentclass{scrartcl}
\usepackage{rotating}
\begin{document}

\begin{sideways}Test\end{sideways}

\begin{turn}{-90}Test 90\end{turn}

\begin{turn}{270}Test 270\end{turn}

\hrule

Tabular:

\begin{tabular}{ccc}
Normal
&
\begin{turn}{-90}Test 90\end{turn}
&
\begin{turn}{270}Test 270\end{turn}
\end{tabular}

\end{document}


• now, how we are going to center the text here ? tried everything and it didn't work
– Amir
Aug 28 '16 at 17:31
• Can you provide a Minimal Working Example and create a question? How do you want to center the text?
– knut
Sep 2 '16 at 21:13
• It is here: tex.stackexchange.com/questions/326897/…
– Amir
Sep 3 '16 at 22:15

The example from here worked for me for rotating and make it aligned with the column.

\usepackage{array,multirow,graphicx}
\rotatebox{90}{\parbox{2mm}{\multirow{4{*}{yourtexthere}}}


Edit: The complete executable code snippet:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{array,multirow,graphicx}

\begin{document}

\begin{table}[h!]
\caption{Multicolumn table}
%---------------------------------------------------------------------

\begin{tabular}{
|p{\dimexpr.05\linewidth-2\tabcolsep-1.3333\arrayrulewidth}% column 1
|p{\dimexpr.25\linewidth-2\tabcolsep-1.3333\arrayrulewidth}% column 2
|p{\dimexpr.75\linewidth-2\tabcolsep-1.3333\arrayrulewidth}|% column 3
}
\hline
\centering \textbf{}     & \raggedright \textbf{col2}     & \raggedright\arraybackslash \textbf{col3}    \\ \hline
\parbox[t]{2mm}{\multirow{4}{*}{\rotatebox[origin=c]{90}{TB}}}
&
val1.
&
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
\\ \hline
\end{tabular}
\end{table}
\end{document}


You can try the \reflectbox command from the graphics package. If you provide a Minimal Working Example, someone might be able to help with the specifics.

• If you're using graphics commands (and there's no reason not to) you might as well just use \rotatebox Jan 19 '12 at 17:49