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?
3 Answers
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}
- 8,838
-
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 02 '16 at 21:13
-
It is here: http://tex.stackexchange.com/questions/326897/vertical-alignment-of-a-turned-cell – Amir Sep 03 '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}
- 111
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.
- 4,201
-
1If you're using
graphicscommands (and there's no reason not to) you might as well just use\rotatebox– Seamus Jan 19 '12 at 17:49

\begin{turn}{-90}or\begin{turn}{270}work? – knut Jan 19 '12 at 16:39