LaTeX/Rotations
Many DVI viewers do not support rotating of text and tables. The text will be displayed normally. You must convert your DVI file to a PDF document and view it in a PDF viewer to see the rotation in effect. Take care however that printing from those PDF files may rotate the respective page again in the same direction under certain circumstances. This behaviour can be influenced by the settings of your dvi2pdf converter, look at your manual for further information. |
The rotating package
[edit | edit source]The package rotating gives you the possibility to rotate any object of an arbitrary angle. Once you have loaded it with the standard command in the preamble:
\usepackage{rotating}
|
you can use three new environments:
\begin{sideways}
|
it will rotate the whole argument by 90 degrees counterclockwise. Moreover:
\begin{turn}{30}
|
it will turn the argument of 30 degrees. You can give any angle as an argument, whether it is positive or negative. It will leave the necessary space to avoid any overlapping of text.
\begin{rotate}{30}
|
like turn, but it will not add any extra space.
If you want to make a float sideways so that the caption is also rotated, you can use
\begin{sidewaysfigure}
|
or
\begin{sidewaystable}
|
Note, though, they will be placed on a separate page.
If you would like to rotate a TikZ picture you could use sideways together with minipage.
\begin{figure}
\begin{sideways}
\begin{minipage}{17.5cm}
\input{../path/to/picture}
\end{minipage}
\end{sideways}
\centering
\caption[Caption]{Caption.}
\label{pic:picture}
\end{figure}
|
You can also use the \rotatebox
command. Let's rotate a tabular inside a table for example:
\begin{table}[p]
\centering
\rotatebox{90}{
\begin{minipage}{\textheight}
\begin{tabular}{
|
Options
[edit | edit source]Default is sidewaysfigures/sidewaystables are oriented depending on page number in two-sided documents (takes two passes).
The rotating package takes the following options.
- counterclockwise/anticlockwise
- In single-sided documents turn sidewaysfigures/sidewaystables counterclockwise.
- clockwise
- In single-sided documents turn sidewaysfigures/sidewaystables clockwise (default).
- figuresright
- In two-sided documents all sidewaysfigures/sidewaystables are same orientation (left of figure, table now bottom of page). This is the style preferred by the Chicago Manual of Style (broadside).
- figuresleft
- In two-sided documents all sidewaysfigures/sidewaystables are same orientation (left of figure, table now at top of page).
The rotfloat package
[edit | edit source]When it is desirable to place the rotated table at the exact location where it appears in the source (.tex) file, rotfloat package may be used. Then one can use
\begin{sidewaystable}[H]
|
just like for normal tables. The H option can not be used without this package.