| 1 |
% rotman.tex User Manual for isorot package |
| 2 |
\documentclass[11pt]{article} |
| 3 |
\usepackage{isorot} |
| 4 |
|
| 5 |
%\makeatletter |
| 6 |
\ifx\pdfoutput\undefined\else |
| 7 |
\pdfoutput=1 |
| 8 |
\fi |
| 9 |
%\makeatother |
| 10 |
|
| 11 |
\setlength{\textheight}{8.0in} |
| 12 |
\setlength{\textwidth}{6.0in} |
| 13 |
\setlength{\oddsidemargin}{0.25in} |
| 14 |
\setlength{\evensidemargin}{0.25in} |
| 15 |
\setlength{\marginparwidth}{0.6in} |
| 16 |
\setcounter{secnumdepth}{4} |
| 17 |
\setcounter{tocdepth}{4} |
| 18 |
|
| 19 |
% |
| 20 |
% remainder of preamble is some special macro definitions |
| 21 |
\makeatletter |
| 22 |
% the \meta{} command |
| 23 |
% |
| 24 |
\begingroup |
| 25 |
\obeyspaces% |
| 26 |
\catcode`\^^M\active% |
| 27 |
\gdef\meta{\begingroup\obeyspaces\catcode`\^^M\active% |
| 28 |
\let^^M\do@space\let \do@space% |
| 29 |
\def\-{\egroup\discretionary{-}{}{}\hbox\bgroup\it}% |
| 30 |
\m@ta}% |
| 31 |
\endgroup |
| 32 |
\def\m@ta#1{\leavevmode\hbox\bgroup\texttt{<}\textit{#1}\/\texttt{>}\egroup |
| 33 |
\endgroup} |
| 34 |
\def\do@space{\egroup\space |
| 35 |
\hbox\bgroup\it\futurelet\next\sp@ce} |
| 36 |
\def\sp@ce{\ifx\next\do@space\expandafter\sp@@ce\fi} |
| 37 |
\def\sp@@ce#1{\futurelet\next\sp@ce} |
| 38 |
% |
| 39 |
\makeatother |
| 40 |
|
| 41 |
% |
| 42 |
\makeatletter |
| 43 |
% |
| 44 |
% the \latex command |
| 45 |
\newcommand{\latex}{\LaTeX} |
| 46 |
\newcommand{\tex}{\TeX} |
| 47 |
% |
| 48 |
% the \file{} command |
| 49 |
% |
| 50 |
\newcommand{\file}[1]{\textsf{#1}} |
| 51 |
% |
| 52 |
% example and note environments |
| 53 |
\newenvironment{example}{\begin{quotation}\small\textbf{Example: }}{\par\end{quotation}} |
| 54 |
\newenvironment{note}{\begin{quotation}\small\textbf{Note: }}{\par\end{quotation}} |
| 55 |
|
| 56 |
% internal refs |
| 57 |
\newcommand{\tref}[1]{Table~\ref{#1}} |
| 58 |
\newcommand{\fref}[1]{Figure~\ref{#1}} |
| 59 |
|
| 60 |
% index a command |
| 61 |
\newcommand{\bs}{\symbol{'134}} |
| 62 |
\newcommand{\ixcom}[1]{\index{#1/ @{\tt \protect\bs #1}}} |
| 63 |
% index an environment |
| 64 |
\newcommand{\ixenv}[1]{\index{#1 @{\tt #1} (environment)}} |
| 65 |
% index a starred environment |
| 66 |
\newcommand{\ixenvs}[1]{\index{#1s @{\tt #1*} (environment)}} |
| 67 |
% index an option |
| 68 |
\newcommand{\ixopt}[1]{\index{#1 @{\tt #1} (option)}} |
| 69 |
% index a package |
| 70 |
\newcommand{\ixpack}[1]{\index{#1 @\file{#1} (package)}} |
| 71 |
% index a class |
| 72 |
\newcommand{\ixclass}[1]{\index{#1 @\file{#1} (class)}} |
| 73 |
% index in typewriter font |
| 74 |
\newcommand{\ixtt}[1]{\index{#1@{\tt #1}}} |
| 75 |
% index LaTeX |
| 76 |
\newcommand{\ixltx}{\index{latex@\latex}} |
| 77 |
% index LaTeX 2e |
| 78 |
\newcommand{\ixltxe}{\index{latex2e@\latex 2e}} |
| 79 |
% index LaTeX v2.09 |
| 80 |
\newcommand{\ixltxv}{\index{latex209@\latex{} v2.09}} |
| 81 |
\makeatother |
| 82 |
% |
| 83 |
% end of preamble |
| 84 |
% |
| 85 |
|
| 86 |
\title{The \file{isorot} Package User Manual} |
| 87 |
\author{Peter Wilson\\ \texttt{[email protected]}} |
| 88 |
\date{15 February 2000} |
| 89 |
|
| 90 |
\begin{document} |
| 91 |
\pagenumbering{roman} |
| 92 |
\maketitle |
| 93 |
|
| 94 |
\begin{abstract} |
| 95 |
The facilities in the \file{isorot} package are described. The package |
| 96 |
was initially designed for use with the \file{iso} class but can be used |
| 97 |
with the `normal' classes as well. The package enables the rotation of |
| 98 |
document elements, like text or tables of figures. |
| 99 |
\end{abstract} |
| 100 |
\tableofcontents |
| 101 |
\listoffigures |
| 102 |
\listoftables |
| 103 |
\clearpage |
| 104 |
\pagestyle{headings} |
| 105 |
\pagenumbering{arabic} |
| 106 |
|
| 107 |
|
| 108 |
\section{Introduction} |
| 109 |
|
| 110 |
The \file{isorot} package enables the rotation of document elements on |
| 111 |
a page. It uses the \latex{} \verb|\special| command to perform its |
| 112 |
effects, and thus can only be used |
| 113 |
with a limited number of \TeX{} to print routes. The facilities |
| 114 |
available are summarized in \tref{tab4}. |
| 115 |
|
| 116 |
\file{isorot} is a modification of the \file{rotation.sty} file |
| 117 |
created by Rahtz and Barroca~\cite{rahtz}. Further examples of the usage |
| 118 |
of their style are given in Goosens \emph{et al}~\cite{goosens}. The |
| 119 |
package also uses David Carlisle's \file{graphicx} and \file{lscape} |
| 120 |
packages. |
| 121 |
|
| 122 |
\begin{note}Several examples of the effects of the commands described herein |
| 123 |
are shown. In many cases the results are not pretty. This should act as |
| 124 |
a warning that using rotational elements requires more care than |
| 125 |
most other document elements.\end{note} %end note |
| 126 |
|
| 127 |
\begin{sidewaystable} |
| 128 |
\ixcom{rotdriver} \ixcom{clockwise} \ixcom{counterclockwise} |
| 129 |
\ixcom{figuresright} \ixcom{figuresleft} \ixcom{rotcaption} |
| 130 |
\ixcom{controtcaption} |
| 131 |
\ixenv{sideways} \ixenv{turn} \ixenv{rotate} \ixenv{sidewaystable} |
| 132 |
\ixenv{sidewaysfigure} \ixenv{landscape} |
| 133 |
\centering |
| 134 |
\caption{The rotation facilities} \label{tab4} |
| 135 |
\begin{tabular}{|l|l|} \hline |
| 136 |
\textbf{Facility} & \textbf{Effect} \\ \hline |
| 137 |
\multicolumn{2}{|c|}{\textbf{Commands}} \\ \hline |
| 138 |
\verb|\rotdriver{<driver>}| & |
| 139 |
declare the name of the dvi to Postscript translator (default {\tt dvips}) \\ |
| 140 |
\verb|\clockwise| & |
| 141 |
sets rotation direction clockwise for positive angles (the default) \\ |
| 142 |
\verb|\counterclockwise| & |
| 143 |
sets rotation direction counterclockwise for positive angles \\ |
| 144 |
\verb|\figuresright| & |
| 145 |
sets rotation direction for sideways floats counterclockwise (the default) \\ |
| 146 |
\verb|\figuresleft| & |
| 147 |
sets rotation direction for sideways floats clockwise \\ |
| 148 |
\verb|\rotcaption| & |
| 149 |
like the \verb|caption| command, but rotates the caption through 90 degrees \\ |
| 150 |
\verb|\controtcaption| & |
| 151 |
like the \verb|contcaption| command, but rotates the caption through 90 degrees \\ \hline |
| 152 |
\multicolumn{2}{|c|}{\textbf{Environments}} \\ \hline |
| 153 |
\verb|sideways| & |
| 154 |
rotates the contents through 90 degrees counterclockwise \\ |
| 155 |
\verb|turn| & |
| 156 |
rotates the contents through the given angle \\ |
| 157 |
\verb|rotate| & |
| 158 |
rotates the contents through the given angle, but no space allowed for the result\\ |
| 159 |
\verb|sidewaystable| & |
| 160 |
like the \verb|table| environment, but rotated 90 degrees \\ |
| 161 |
\verb|sidewaystable*| & |
| 162 |
twocolumn version of \verb|sidewaystable| \\ |
| 163 |
\verb|sidewaysfigure| & |
| 164 |
like the \verb|figure| environment, but rotated 90 degrees \\ |
| 165 |
\verb|sidewaysfigure*| & |
| 166 |
twocolumn version of \verb|sidewaysfigure| \\ |
| 167 |
\verb|landscape| & |
| 168 |
prints all enclosed pages in landscape mode \\ \hline |
| 169 |
\end{tabular} |
| 170 |
\end{sidewaystable} |
| 171 |
|
| 172 |
\section{Options} |
| 173 |
|
| 174 |
The \file{isorot} facility has one option, |
| 175 |
namely \verb|debugshow|\ixopt{debugshow}. Calling this option produces |
| 176 |
messages on the screen and in the \file{log} file regarding the actions |
| 177 |
being taken. |
| 178 |
|
| 179 |
\begin{note} This option is principally of interest to the maintainer |
| 180 |
of the facility. \end{note} |
| 181 |
|
| 182 |
The font used for the captions of rotated figures or tables is controlled |
| 183 |
by the \verb|rotcapfont| command. Under normal circumstances this is a null |
| 184 |
command but when used with the \file{iso} class it is defined as: \\ |
| 185 |
\verb|\newcommand{\rotcapfont}{\captionsisize\bf}| \\ |
| 186 |
where \verb|\captionsize| is defined in the class. You can renew |
| 187 |
\verb|\rotcapfont| to change the caption font to your liking. |
| 188 |
|
| 189 |
\section{DVI drivers} |
| 190 |
|
| 191 |
The \file{isorot} facility supports only a limited number of |
| 192 |
dvi to postscript translators. The default translator is \emph{dvips}. |
| 193 |
The following command must be put in |
| 194 |
the preamble of the document if \emph{dvips} is not being used: |
| 195 |
\verb|\rotdriver{<drivername>}|,\ixcom{rotdriver} where |
| 196 |
\verb|<drivername>| is one of the following:\footnote{I have been able to |
| 197 |
try the {\tt dvips} driver |
| 198 |
but not the others. If anyone has experience with the other drivers, or has |
| 199 |
extended the range of drivers, I would like to be given the results.} %end footnote |
| 200 |
|
| 201 |
\begin{enumerate} |
| 202 |
\item \verb|dvipdf| for the \emph{dvipdf} |
| 203 |
translator;\ixtt{dvipdf} |
| 204 |
\item \verb|dvips| for Tom Rockicki's \emph{dvips} |
| 205 |
translator;\ixtt{dvips} |
| 206 |
\item \verb|dvipsone| for Y\&Y's \emph{dvipsone} |
| 207 |
translator;\ixtt{dvipsone} |
| 208 |
\item \verb|dvitops| for James Clark's \emph{dvitops} |
| 209 |
translator;\ixtt{dvitops} |
| 210 |
\item \verb|dviwindo| for Y\&Y's \emph{dviwindo} |
| 211 |
translator;\ixtt{dviwindo} |
| 212 |
\item \verb|pctex32| for Personal TeX's PC TeX for 32 bit Windows |
| 213 |
(\emph{pctex32}) |
| 214 |
translator;\ixtt{pctex32} |
| 215 |
\item \verb|pctexps| for Personal TeX's PC PTI Laser/PS (\emph{pctexps}) |
| 216 |
translator;\ixtt{pctexps} |
| 217 |
\item \verb|pubps| for the Arbortext's \emph{pubps} |
| 218 |
translator.\ixtt{pubps} |
| 219 |
\item \verb|textures| for Blue Sky's \emph{Textures} |
| 220 |
translator;\ixtt{textures} |
| 221 |
|
| 222 |
\end{enumerate} |
| 223 |
|
| 224 |
The \file{isorot} package can also be used in documents processed |
| 225 |
by pdfLaTeX. |
| 226 |
|
| 227 |
\section{Rotational directions} |
| 228 |
|
| 229 |
\file{isorot} enables the textual and other elements of a document |
| 230 |
to be rotated from their normal horizontal layout. In some cases elements |
| 231 |
can be rotated through arbitrary angles, whereas in others only 90 degree |
| 232 |
rotation is possible. |
| 233 |
|
| 234 |
By default, a rotation through a positive number of |
| 235 |
degrees corresponds to a clockwise rotation. The command |
| 236 |
\verb|\counterclockwise|\ixcom{counterclockwise} |
| 237 |
sets the following rotations to be counterclockwise for positive angles. |
| 238 |
The command \verb|\clockwise|\ixcom{clockwise} |
| 239 |
sets the following rotations to be clockwise for positive angles. |
| 240 |
These commands can be used to toggle the rotational behavior. |
| 241 |
|
| 242 |
|
| 243 |
Rotated floating environments are normally rotated so that they are |
| 244 |
printed with a counterclockwise rotation (i.e. the original bottom of the float |
| 245 |
is placed at the right hand side of the paper), |
| 246 |
which is what is normally required. |
| 247 |
This behavior can be altered by the command |
| 248 |
\verb|\figuresleft|,\ixcom{figuresleft} |
| 249 |
which will give the reverse effect. The command |
| 250 |
\verb|\figuresright|\ixcom{figuresright} |
| 251 |
will set the behavior to the default. |
| 252 |
These commands can be used to toggle the rotational behavior of |
| 253 |
floats. |
| 254 |
|
| 255 |
|
| 256 |
\section{Rotation of text} |
| 257 |
|
| 258 |
The \verb|sideways|\ixenv{sideways} |
| 259 |
environment rotates the contents of the environment |
| 260 |
by 90 degrees counterclockwise, and leaves space for the result. |
| 261 |
|
| 262 |
The \verb|\begin{turn}{|\meta{angle}\verb|}|\ixenv{turn} |
| 263 |
environment rotates the contents by the given number |
| 264 |
of degrees in the direction specified by the most recent of the |
| 265 |
\verb|\clockwise|\ixcom{clockwise} or |
| 266 |
\verb|\counterclockwise|\ixcom{counterclockwise} |
| 267 |
commands, leaving space for the result. |
| 268 |
|
| 269 |
The \verb|\begin{rotate}{|\meta{angle}\verb|}|\ixenv{rotate} |
| 270 |
environment rotates the contents by the given number |
| 271 |
of degrees in the direction specified by the most recent of the |
| 272 |
\verb|\clockwise|\ixcom{clockwise} or |
| 273 |
\verb|\counterclockwise|\ixcom{counterclockwise} |
| 274 |
commands, but no arrangements are made for leaving space for the result. |
| 275 |
|
| 276 |
|
| 277 |
\begin{example}Some simple rotations: \label{ex:1} |
| 278 |
|
| 279 |
This code |
| 280 |
\begin{verbatim} |
| 281 |
Default rotation direction: \\ |
| 282 |
A |
| 283 |
\begin{sideways}% |
| 284 |
B C |
| 285 |
\end{sideways} |
| 286 |
D E F G H I J K L M |
| 287 |
\begin{turn}{-90}% |
| 288 |
Minus 90 turn |
| 289 |
\end{turn} |
| 290 |
N O P |
| 291 |
\begin{rotate}{90}% |
| 292 |
Plus 90 rotate |
| 293 |
\end{rotate} |
| 294 |
Q \\ |
| 295 |
and continue on with another line after rotations. |
| 296 |
\end{verbatim} |
| 297 |
produces the following (note how space is allowed for the \verb|turn|ed |
| 298 |
text, whereas the \verb|rotate|d text runs into the text below). |
| 299 |
|
| 300 |
Default rotation direction: \\ |
| 301 |
A |
| 302 |
\begin{sideways}% |
| 303 |
B C |
| 304 |
\end{sideways} |
| 305 |
D E F G H I J K L M |
| 306 |
\begin{turn}{-90}% |
| 307 |
Minus 90 turn |
| 308 |
\end{turn} |
| 309 |
N O P |
| 310 |
\begin{rotate}{90}% |
| 311 |
Plus 90 rotate |
| 312 |
\end{rotate} |
| 313 |
Q \\ |
| 314 |
and continue on with another line after rotations. |
| 315 |
\end{example} % end example |
| 316 |
\begin{example}This example shows the effect of using the |
| 317 |
\verb|\counterclockwise|\ixcom{counterclockwise} |
| 318 |
command. |
| 319 |
|
| 320 |
This code |
| 321 |
\begin{verbatim} |
| 322 |
Flip rotation direction: \\ |
| 323 |
\counterclockwise |
| 324 |
A |
| 325 |
\begin{sideways}% |
| 326 |
B C |
| 327 |
\end{sideways} |
| 328 |
D E F G H I J K L M |
| 329 |
\begin{turn}{-90}% |
| 330 |
Minus 90 turn |
| 331 |
\end{turn} |
| 332 |
N O P |
| 333 |
\begin{rotate}{90}% |
| 334 |
Plus 90 rotate |
| 335 |
\end{rotate} |
| 336 |
Q \\ |
| 337 |
Set rotation direction back to default value. |
| 338 |
\clockwise |
| 339 |
\end{verbatim} |
| 340 |
|
| 341 |
produces the following, which should be compared with example~\ref{ex:1}. |
| 342 |
|
| 343 |
Flip rotation direction: \\ |
| 344 |
\counterclockwise |
| 345 |
A |
| 346 |
\begin{sideways}% |
| 347 |
B C |
| 348 |
\end{sideways} |
| 349 |
D E F G H I J K L M |
| 350 |
\begin{turn}{-90}% |
| 351 |
Minus 90 turn |
| 352 |
\end{turn} |
| 353 |
N O P |
| 354 |
\begin{rotate}{90}% |
| 355 |
Plus 90 rotate |
| 356 |
\end{rotate} |
| 357 |
Q \\ |
| 358 |
Set rotation direction back to default value. |
| 359 |
\clockwise |
| 360 |
\end{example} % end example |
| 361 |
|
| 362 |
|
| 363 |
Although the examples so far have only shown the rotation of text, boxes |
| 364 |
can also be rotated. |
| 365 |
|
| 366 |
\begin{example}Rotating a box. |
| 367 |
|
| 368 |
This code |
| 369 |
\begin{verbatim} |
| 370 |
\newsavebox{\foo} |
| 371 |
\newlength{\fool} |
| 372 |
\settowidth{\fool}{Hurrah for ISO.} |
| 373 |
\savebox{\foo}{\parbox{\fool}{Hurrah for ISO. Hurrah for ISO. |
| 374 |
Hurrah for ISO. Hurrah for ISO.}} |
| 375 |
Start |
| 376 |
\usebox{\foo} |
| 377 |
\& |
| 378 |
\begin{turn}{-45}\usebox{\foo}\end{turn} |
| 379 |
\& |
| 380 |
\begin{turn}{45}\usebox{\foo}\end{turn} |
| 381 |
End |
| 382 |
\end{verbatim} |
| 383 |
produces: |
| 384 |
|
| 385 |
\newsavebox{\foo} |
| 386 |
\newlength{\fool} |
| 387 |
\settowidth{\fool}{Hurrah for ISO.} |
| 388 |
\savebox{\foo}{\parbox{\fool}{Hurrah for ISO. Hurrah for ISO. |
| 389 |
Hurrah for ISO. Hurrah for ISO.}} |
| 390 |
Start |
| 391 |
\usebox{\foo} |
| 392 |
\& |
| 393 |
\begin{turn}{-45}\usebox{\foo}\end{turn} |
| 394 |
\& |
| 395 |
\begin{turn}{45}\usebox{\foo}\end{turn} |
| 396 |
End |
| 397 |
|
| 398 |
\end{example} %end example |
| 399 |
|
| 400 |
Elements can be rotated through arbitrary angles, and also rotated |
| 401 |
elements can be nested inside other rotated elements. |
| 402 |
|
| 403 |
|
| 404 |
\begin{example}Repeated rotation: |
| 405 |
|
| 406 |
The following example code shows that text can be rotated through any angle. |
| 407 |
The result is shown in \fref{fig:wheel}. |
| 408 |
\begin{verbatim} |
| 409 |
\newcount\prwc |
| 410 |
\newsavebox{\prwtext} |
| 411 |
\newdimen\prwspace |
| 412 |
\def\wheel#1#2{% |
| 413 |
\savebox{\prwtext}{#1\begin{sideways}#2\end{sideways}}% |
| 414 |
\prwspace\wd\prwtext% |
| 415 |
\advance\prwspace by 1cm% |
| 416 |
\centerline{% |
| 417 |
\rule{0pt}{\prwspace}% |
| 418 |
\rule[-\prwspace]{0pt}{\prwspace}% |
| 419 |
\prwc=-180\loop\ifnum\prwc<180 |
| 420 |
\rlap{\begin{rotate}{\the\prwc}% |
| 421 |
\rule{1cm}{0pt}\usebox{\prwtext}\end{rotate}}% |
| 422 |
\advance\prwc by 20\repeat}} |
| 423 |
\begin{figure} |
| 424 |
\wheel{Express yourself ---}{Hooray for STEP!} |
| 425 |
\caption{Example rotation through multiple angles} |
| 426 |
\label{fig:wheel} |
| 427 |
\end{figure} |
| 428 |
\end{verbatim} |
| 429 |
|
| 430 |
\newcount\prwc |
| 431 |
\newsavebox{\prwtext} |
| 432 |
\newdimen\prwspace |
| 433 |
\def\wheel#1#2{% |
| 434 |
\savebox{\prwtext}{#1\begin{sideways}#2\end{sideways}}% |
| 435 |
\prwspace\wd\prwtext% |
| 436 |
\advance\prwspace by 1cm% |
| 437 |
\centerline{% |
| 438 |
\rule{0pt}{\prwspace}% |
| 439 |
\rule[-\prwspace]{0pt}{\prwspace}% |
| 440 |
\prwc=-180\loop\ifnum\prwc<180 |
| 441 |
\rlap{\begin{rotate}{\the\prwc}% |
| 442 |
\rule{1cm}{0pt}\usebox{\prwtext}\end{rotate}}% |
| 443 |
\advance\prwc by 20\repeat}} |
| 444 |
\begin{figure} |
| 445 |
\vspace*{1cm} |
| 446 |
\wheel{Express yourself ---}{Hooray for STEP!} |
| 447 |
\vspace*{1cm} |
| 448 |
\caption{Example rotation through multiple angles} |
| 449 |
\label{fig:wheel} |
| 450 |
\end{figure} |
| 451 |
\end{example} %end example |
| 452 |
|
| 453 |
Later in the manual, Figures~\ref{fig:angles1} and~\ref{fig:angles2} |
| 454 |
also show rotations through a |
| 455 |
range of angles, both positive and negative. |
| 456 |
|
| 457 |
\begin{example}Nested rotations. \label{ex:sidetabular} |
| 458 |
|
| 459 |
This code |
| 460 |
\begin{verbatim} |
| 461 |
Here is some text before a \verb|sideways| environment. |
| 462 |
And some more, and more and more garble gobble cluck |
| 463 |
click clack clock cluck and so on and on and on. |
| 464 |
\begin{center} |
| 465 |
\begin{sideways} |
| 466 |
\rule{1in}{0pt} |
| 467 |
\begin{tabular}{|lr|} |
| 468 |
\begin{rotate}{-45}\emph{Word}\end{rotate} & \begin{rotate}{-90}% |
| 469 |
Occurrences\end{rotate} |
| 470 |
\\ |
| 471 |
\hline |
| 472 |
hello & 33 \\ |
| 473 |
goodbye & 34 \\ |
| 474 |
\hline |
| 475 |
\end{tabular} |
| 476 |
\end{sideways} |
| 477 |
\end{center} |
| 478 |
Here is some text after a \verb|sideways| environment. |
| 479 |
And some more, and more and more garble gobble cluck |
| 480 |
click clack clock cluck and so on and on and on. |
| 481 |
\end{verbatim} |
| 482 |
produces: |
| 483 |
|
| 484 |
Here is some text before a \verb|sideways| environment. |
| 485 |
And some more, and more and more garble gobble cluck |
| 486 |
click clack clock cluck and so on and on and on. |
| 487 |
\begin{center} |
| 488 |
\begin{sideways} |
| 489 |
%\rule{1in}{0pt} |
| 490 |
\begin{tabular}{|lr|} |
| 491 |
\begin{rotate}{-45}\emph{Word}\end{rotate} & \begin{rotate}{-90}% |
| 492 |
Occurrences\end{rotate} \\ \hline |
| 493 |
hello & 33 \\ |
| 494 |
goodbye & 34 \\ \hline |
| 495 |
\end{tabular} |
| 496 |
\end{sideways} |
| 497 |
\end{center} |
| 498 |
Here is some text after a \verb|sideways| environment. |
| 499 |
And some more, and more and more garble gobble cluck |
| 500 |
click clack clock cluck and so on and on and on. |
| 501 |
\end{example} %end example |
| 502 |
|
| 503 |
|
| 504 |
|
| 505 |
\section{Rotations of tables and figures} |
| 506 |
|
| 507 |
The previous examples have demonstrated the rotation of textual elements. |
| 508 |
For instance, the last one showed that tabular material can be rotated using |
| 509 |
the \verb|sideways|\ixenv{sideways} |
| 510 |
environment. (Actually, any of the previously |
| 511 |
mentioned environments could have been used instead.) |
| 512 |
Two further environments are provided which rotate a \latex{} float through |
| 513 |
90 degrees. These are: |
| 514 |
\begin{itemize} |
| 515 |
\item \verb|sidewaystable|\ixenv{sidewaystable}, which |
| 516 |
corresponds to the standard \latex{} \verb|table|\ixenv{table} |
| 517 |
environment; and |
| 518 |
\item \verb|sidewaysfigure|\ixenv{sidewaysfigure}, which |
| 519 |
corresponds to the standard \latex{} \verb|figure|\ixenv{figure} |
| 520 |
environment. |
| 521 |
\end{itemize} |
| 522 |
There are also starred versions of these, namely |
| 523 |
\verb|sidewaystable*|\ixenvs{sidewaystable} and |
| 524 |
\verb|sidewaysfigure*|\ixenvs{sidewaysfigure}, for use in twocolumn mode. |
| 525 |
However, the correspondence with the standard environments is not strictly |
| 526 |
complete as a sideways float is alway placed on a page by itself. |
| 527 |
|
| 528 |
The direction of rotation may be controlled by the |
| 529 |
\verb|\figuresright|\ixcom{figuresright} and |
| 530 |
\verb|\figuresleft|\ixcom{figuresleft} commands. |
| 531 |
|
| 532 |
\begin{example}Table~\ref{tab4} was produced by the code below: \label{ex:4} |
| 533 |
|
| 534 |
\begin{verbatim} |
| 535 |
\begin{sidewaystable} |
| 536 |
\centering |
| 537 |
\caption{The rotation facilities} \label{tab4} |
| 538 |
\begin{tabular}{|l|l|} \hline |
| 539 |
\textbf{Facility} & \textbf{Effect} \\ \hline |
| 540 |
\multicolumn{2}{|c|}{\textbf{Commands}} \\ \hline |
| 541 |
\verb|\rotdriver{<driver>}| & |
| 542 |
declare the name of the dvi to Postscript translator (default {\tt dvips}) \\ |
| 543 |
...... |
| 544 |
\verb|sidewaysfigure| & |
| 545 |
like the \verb|figure| environment, but rotated 90 degrees \\ \hline |
| 546 |
\end{tabular} |
| 547 |
\end{sidewaystable} |
| 548 |
\end{verbatim} |
| 549 |
\end{example} % end example |
| 550 |
|
| 551 |
|
| 552 |
|
| 553 |
\section{Rotation of float captions and bodies} |
| 554 |
|
| 555 |
Sometimes it may be useful to rotate a caption independently of the |
| 556 |
rotation of a figure or table. The command |
| 557 |
\verb|\rotcaption|\ixcom{rotcaption} is analogous |
| 558 |
to the normal \verb|\caption|\ixcom{caption} command, |
| 559 |
and inserts the caption rotated |
| 560 |
by 90~degrees. There is also the companion command |
| 561 |
\verb|\controtcaption|\ixcom{controtcaption}, analagous to the |
| 562 |
\verb|\contcaption|\ixcom{contcaption} command, |
| 563 |
for continuation captions. |
| 564 |
|
| 565 |
%\newsavebox{\picbox} |
| 566 |
|
| 567 |
\begin{figure} |
| 568 |
\centering |
| 569 |
\caption{Example figure with a standard caption.} \label{fig:nocrot} |
| 570 |
\setlength{\unitlength}{0.2in} |
| 571 |
\footnotesize |
| 572 |
\begin{picture}(17,2) |
| 573 |
\thicklines |
| 574 |
\put(0,0){\begin{picture}(4,1) |
| 575 |
\put(1.5,0.5){\oval(3,1)} |
| 576 |
\put(1.5,0.5){\makebox(0,0){2,5 (1)}} |
| 577 |
\put(3,0.5){\line(1,0){1.0}} |
| 578 |
\put(4.25,0.5){\circle{0.5}} |
| 579 |
\end{picture}} |
| 580 |
|
| 581 |
\put(4.5,0){\begin{picture}(8,1) |
| 582 |
\put(0,0){\dashbox{0.25}(4,1){date}} |
| 583 |
\put(4,0.5){\line(1,0){3.5}} |
| 584 |
\put(7.75,0.5){\circle{0.5}} |
| 585 |
\put(6,1){\makebox(0,0){A[1:3]}} |
| 586 |
\end{picture}} |
| 587 |
|
| 588 |
\put(12.5,0){\begin{picture}(4,1) |
| 589 |
\put(0,0){\framebox(4,1){INTEGER}} |
| 590 |
\put(3.75,0){\line(0,1){1}} |
| 591 |
\end{picture}} |
| 592 |
\end{picture} |
| 593 |
\normalsize |
| 594 |
\setlength{\unitlength}{1pt} |
| 595 |
\end{figure} |
| 596 |
|
| 597 |
|
| 598 |
\begin{example}Float with a regular caption. |
| 599 |
|
| 600 |
Figure~\ref{fig:nocrot} is produced by the code below: |
| 601 |
\begin{verbatim} |
| 602 |
\begin{figure} |
| 603 |
\centering |
| 604 |
\caption{Example figure with a standard caption.} \label{fig:nocrot} |
| 605 |
\setlength{\unitlength}{0.2in} |
| 606 |
\footnotesize |
| 607 |
\begin{picture}(17,2) |
| 608 |
\thicklines |
| 609 |
\put(0,0){\begin{picture}(4,1) |
| 610 |
\put(1.5,0.5){\oval(3,1)} |
| 611 |
\put(1.5,0.5){\makebox(0,0){2,5 (1)}} |
| 612 |
\put(3,0.5){\line(1,0){1.0}} |
| 613 |
\put(4.25,0.5){\circle{0.5}} |
| 614 |
\end{picture}} |
| 615 |
\put(4.5,0){\begin{picture}(8,1) |
| 616 |
\put(0,0){\dashbox{0.25}(4,1){date}} |
| 617 |
\put(4,0.5){\line(1,0){3.5}} |
| 618 |
\put(7.75,0.5){\circle{0.5}} |
| 619 |
\put(6,1){\makebox(0,0){A[1:3]}} |
| 620 |
\end{picture}} |
| 621 |
\put(12.5,0){\begin{picture}(4,1) |
| 622 |
\put(0,0){\framebox(4,1){INTEGER}} |
| 623 |
\put(3.75,0){\line(0,1){1}} |
| 624 |
\end{picture}} |
| 625 |
\end{picture} |
| 626 |
\normalsize |
| 627 |
\setlength{\unitlength}{1pt} |
| 628 |
\end{figure} |
| 629 |
\end{verbatim} |
| 630 |
\end{example} % end example |
| 631 |
|
| 632 |
\begin{example}Float with a rotated caption. |
| 633 |
|
| 634 |
Figure~\ref{fig:crot} is produced by the code below: |
| 635 |
\begin{verbatim} |
| 636 |
\begin{figure} |
| 637 |
\centering |
| 638 |
\rotcaption{Figure~\protect\ref{fig:nocrot} with a rotated caption.} |
| 639 |
\label{fig:crot} |
| 640 |
\setlength{\unitlength}{0.2in} |
| 641 |
\footnotesize |
| 642 |
\begin{picture}(17,2) |
| 643 |
... |
| 644 |
\end{picture} |
| 645 |
\normalsize |
| 646 |
\setlength{\unitlength}{1pt} |
| 647 |
\end{figure} |
| 648 |
\end{verbatim} |
| 649 |
\end{example} % end example |
| 650 |
|
| 651 |
|
| 652 |
\begin{figure} |
| 653 |
\centering |
| 654 |
\rotcaption{Figure~\protect\ref{fig:nocrot} with a rotated caption.} |
| 655 |
\label{fig:crot} |
| 656 |
\setlength{\unitlength}{0.2in} |
| 657 |
\footnotesize |
| 658 |
\begin{picture}(17,2) |
| 659 |
\thicklines |
| 660 |
\put(0,0){\begin{picture}(4,1) |
| 661 |
\put(1.5,0.5){\oval(3,1)} |
| 662 |
\put(1.5,0.5){\makebox(0,0){2,5 (1)}} |
| 663 |
\put(3,0.5){\line(1,0){1.0}} |
| 664 |
\put(4.25,0.5){\circle{0.5}} |
| 665 |
\end{picture}} |
| 666 |
\put(4.5,0){\begin{picture}(8,1) |
| 667 |
\put(0,0){\dashbox{0.25}(4,1){date}} |
| 668 |
\put(4,0.5){\line(1,0){3.5}} |
| 669 |
\put(7.75,0.5){\circle{0.5}} |
| 670 |
\put(6,1){\makebox(0,0){A[1:3]}} |
| 671 |
\end{picture}} |
| 672 |
\put(12.5,0){\begin{picture}(4,1) |
| 673 |
\put(0,0){\framebox(4,1){INTEGER}} |
| 674 |
\put(3.75,0){\line(0,1){1}} |
| 675 |
\end{picture}} |
| 676 |
\end{picture} |
| 677 |
\normalsize |
| 678 |
\setlength{\unitlength}{1pt} |
| 679 |
\end{figure} |
| 680 |
|
| 681 |
As can be seen from \fref{fig:crot} the advisability of rotating a caption |
| 682 |
depends on the size of the body of the float. It may be better in certain |
| 683 |
cases to leave the caption in its regular position and rotate the body of |
| 684 |
the float instead. |
| 685 |
|
| 686 |
\def\prwrot#1{% |
| 687 |
\settowidth{\fool}{ISOROT} |
| 688 |
\savebox{\foo}{\parbox{\fool}{ISOROT ISOROT ISOROT ISOROT}}% |
| 689 |
\framebox{---\begin{turn}{#1}\framebox{\usebox{\foo}}\end{turn}---}}% |
| 690 |
\def\degrees{{\small$^{o}$}} |
| 691 |
|
| 692 |
\begin{figure} |
| 693 |
\centering |
| 694 |
\begin{tabular}{|c|c|c|} \hline |
| 695 |
\prwrot{0} &\prwrot{-40}&\prwrot{-80}\\ |
| 696 |
0\degrees & -40\degrees & -80\degrees \\ \hline |
| 697 |
\prwrot{-120}&\prwrot{-160}&\prwrot{-200}\\ |
| 698 |
-120\degrees & -160\degrees & -200\degrees \\ \hline |
| 699 |
\prwrot{-240}&\prwrot{-280}&\prwrot{-320}\\ |
| 700 |
-240\degrees & -280\degrees & -320\degrees \\ \hline |
| 701 |
\end{tabular} |
| 702 |
\caption{Rotation of paragraphs between 0 and -320 degrees} \label{fig:angles1} |
| 703 |
\end{figure} |
| 704 |
|
| 705 |
|
| 706 |
\begin{example}Regular caption and float. |
| 707 |
|
| 708 |
Figure~\ref{fig:angles1} is a regular figure and caption. It is produced by |
| 709 |
the following code: |
| 710 |
\begin{verbatim} |
| 711 |
\def\prwrot#1{% |
| 712 |
\settowidth{\fool}{ISOROT} |
| 713 |
\savebox{\foo}{\parbox{\fool}{ISOROT ISOROT ISOROT ISOROT}}% |
| 714 |
\framebox{---\begin{turn}{#1}\framebox{\usebox{\foo}}\end{turn}---}}% |
| 715 |
\def\degrees{{\small$^{o}$}} |
| 716 |
\end{verbatim} |
| 717 |
|
| 718 |
\begin{verbatim} |
| 719 |
\begin{figure} |
| 720 |
\centering |
| 721 |
\begin{tabular}{|c|c|c|} \hline |
| 722 |
\prwrot{0} &\prwrot{-40}&\prwrot{-80}\\ |
| 723 |
0\degrees & -40\degrees & -80\degrees \\ \hline |
| 724 |
\prwrot{-120}&\prwrot{-160}&\prwrot{-200}\\ |
| 725 |
-120\degrees & -160\degrees & -200\degrees \\ \hline |
| 726 |
\prwrot{-240}&\prwrot{-280}&\prwrot{-320}\\ |
| 727 |
-240\degrees & -280\degrees & -320\degrees \\ \hline |
| 728 |
\end{tabular} |
| 729 |
\caption{Rotation of paragraphs between 0 and -320 degrees} \label{fig:angles1} |
| 730 |
\end{figure} |
| 731 |
\end{verbatim} |
| 732 |
\end{example} % end example |
| 733 |
|
| 734 |
|
| 735 |
\begin{figure} |
| 736 |
\centering |
| 737 |
\begin{sideways} |
| 738 |
\begin{tabular}{|c|c|c|} \hline |
| 739 |
\prwrot{0} &\prwrot{40}&\prwrot{80}\\ |
| 740 |
0\degrees & 40\degrees & 80\degrees \\ \hline |
| 741 |
\prwrot{120}&\prwrot{160}&\prwrot{200}\\ |
| 742 |
120\degrees & 160\degrees & 200\degrees \\ \hline |
| 743 |
\prwrot{240}&\prwrot{280}&\prwrot{320}\\ |
| 744 |
240\degrees & 280\degrees & 320\degrees \\ \hline |
| 745 |
\end{tabular} |
| 746 |
\end{sideways} |
| 747 |
\caption[Rotation of paragraphs between 0 and 320 degrees]% |
| 748 |
{Rotation of paragraphs between 0 and 320 degrees (with figure |
| 749 |
body turned sideways)}\label{fig:angles2} |
| 750 |
\end{figure} |
| 751 |
|
| 752 |
\begin{example}Regular caption and rotated float body. |
| 753 |
|
| 754 |
Figure~\ref{fig:angles2} is a regular figure and caption where the figure |
| 755 |
contents have been rotated. It was produced by the following code. |
| 756 |
\begin{verbatim} |
| 757 |
\begin{figure} |
| 758 |
\centering |
| 759 |
\begin{sideways} |
| 760 |
\begin{tabular}{|c|c|c|} \hline |
| 761 |
\prwrot{0} &\prwrot{40}&\prwrot{80}\\ |
| 762 |
0\degrees & 40\degrees & 80\degrees \\ \hline |
| 763 |
\prwrot{120}&\prwrot{160}&\prwrot{200}\\ |
| 764 |
120\degrees & 160\degrees & 200\degrees \\ \hline |
| 765 |
\prwrot{240}&\prwrot{280}&\prwrot{320}\\ |
| 766 |
240\degrees & 280\degrees & 320\degrees \\ \hline |
| 767 |
\end{tabular} |
| 768 |
\end{sideways} |
| 769 |
\caption[Rotation of paragraphs between 0 and 320 degrees]% |
| 770 |
{Rotation of paragraphs between 0 and 320 degrees (with figure |
| 771 |
body turned sideways)}\label{fig:angles2} |
| 772 |
\end{figure} |
| 773 |
\end{verbatim} |
| 774 |
\end{example} % end example |
| 775 |
|
| 776 |
\begin{landscape} |
| 777 |
\section{Landscaping} |
| 778 |
|
| 779 |
\latex{} normally prints in portrait mode. |
| 780 |
The \verb|landscape|\ixenv{landscape} environment |
| 781 |
prints all the enclosed stuff in landscape mode, except for headers |
| 782 |
and footers which are not rotated. |
| 783 |
|
| 784 |
\begin{example} Landscaping |
| 785 |
|
| 786 |
The source for this part of the document is: |
| 787 |
\begin{verbatim} |
| 788 |
\begin{landscape} |
| 789 |
\section{Landscaping} |
| 790 |
|
| 791 |
\latex{} normally prints in portrait mode. The ... |
| 792 |
... |
| 793 |
... long, wide tables. |
| 794 |
\end{landscape} |
| 795 |
\end{verbatim} |
| 796 |
\end{example} |
| 797 |
|
| 798 |
The environment starts by clearing the current page and then switches |
| 799 |
to portrait mode. At the end of the environment the current page is cleared |
| 800 |
and the next page is back to normal portrait mode. |
| 801 |
|
| 802 |
All the other rotation commands and environments produce boxes and |
| 803 |
\latex{} will not break a box across a page. The \verb|landscape| environemt |
| 804 |
does not produce a box and so many pages can be printed in landscape mode |
| 805 |
with \latex{} taking care of the page breaking for you. |
| 806 |
|
| 807 |
Landscape mode is not particularly useful for normal text as the |
| 808 |
lines are far too long for comfortable reading. Where it can be useful |
| 809 |
is where you have a table that is too wide to fit on a portrait page, so |
| 810 |
needs to be rotated, yet is also too long to fit on the page when it is |
| 811 |
rotated. The \file{supertabular}\ixpack{supertabular}, |
| 812 |
the \file{longtable}\ixpack{longtable}, |
| 813 |
and the \file{xtab}\ixpack{xtab} |
| 814 |
packages provide facilities for automatically breaking long tables across |
| 815 |
pages. Any of these can be used in conjunction with landscaping to both |
| 816 |
rotate and automatically page break long, wide tables. |
| 817 |
\end{landscape} |
| 818 |
|
| 819 |
|
| 820 |
%%%%%%%%%%%%%% |
| 821 |
%\end{document} |
| 822 |
%%%%%%%%%%%%% |
| 823 |
|
| 824 |
\bibliographystyle{alpha} |
| 825 |
\begin{thebibliography}{GMS94} |
| 826 |
|
| 827 |
\bibitem[GMS94]{goosens} |
| 828 |
Michel Goossens, Frank Mittelbach and Alexander Samarin. |
| 829 |
\newblock \textit{The LaTeX Companion}. |
| 830 |
\newblock Addison-Wesley Publishing Co. 1994. |
| 831 |
|
| 832 |
\bibitem[RB92]{rahtz} |
| 833 |
Sebastian Rahtz and Leonor Barroca. |
| 834 |
\newblock \textit{A style option for rotated objects in LaTeX}. |
| 835 |
\newblock TUGBoat, volume 13, number 2, pp 156--180, July 1992. |
| 836 |
|
| 837 |
\end{thebibliography} |
| 838 |
|
| 839 |
\end{document} |
| 840 |
|
| 841 |
\begin{references} |
| 842 |
\reference{LAMPORT, L.,}{LaTeX --- A Document Preparation System,} |
| 843 |
{Addison-Wesley Publishing Co., 2nd edition, 1994.} \label{lamport} |
| 844 |
\reference{WILSON, P.R.,}{LaTeX files for typesetting ISO standards: |
| 845 |
Source code,} |
| 846 |
{NISTIR, National Institute of Standards and Technology, |
| 847 |
Gaithersburg, MD 20899. June 1996.} \label{isoe} |
| 848 |
\reference{WILSON, P.R.,}{LaTeX package files for ISO~10303: User manual,} |
| 849 |
{NISTIR, National Institute of Standards and Technology, |
| 850 |
Gaithersburg, MD 20899. June 1996.} \label{stepsty} |
| 851 |
\reference{RAHTZ, S., and BARROCA, L.,}{A style option for rotated |
| 852 |
objects in \latex,}{ TUGBoat, volume 13, number 2, pp 156--180, |
| 853 |
July 1992.} \label{rahtz} |
| 854 |
\reference{GOOSSENS, M., MITTELBACH, F. and SAMARIN, A.,}{% |
| 855 |
The LaTeX Companion,} |
| 856 |
{Addison-Wesley Publishing Co., 1994.} \label{goosens} |
| 857 |
\reference{GOOSSENS, M., and RAHTZ, S.,}{% |
| 858 |
The LaTeX Web Companion --- Integrating TeX, HTML and XML,} |
| 859 |
{Addison-Wesley Publishing Co., 1999.} \label{lwebcom} |
| 860 |
\reference{CHEN, P. and HARRISON, M.A.,}{Index preparation and |
| 861 |
processing,}{Software--Practice and Experience, 19(9):897--915, |
| 862 |
September 1988.} \label{chen} |
| 863 |
\reference{KOPKA, H. and DALY, P.W.,}{A Guide to LaTeX,} |
| 864 |
{Addison-Wesley Publishing Co., 1993.} \label{kopka} |
| 865 |
\reference{WALSH, N.,}{Making TeX Work,}{O'Reilly \& Associates, Inc., |
| 866 |
103 Morris Street, Suite A, Sebastopol, CA 95472. 1994. } \label{walsh} |
| 867 |
\reference{ISO 8879:1986,}{Information processing --- |
| 868 |
Text and office systems --- |
| 869 |
Standard Generalized Markup Language (SGML).}{} \label{sgml} |
| 870 |
\reference{GOLDFARB, C.F.,}{The SGML Handbook,} |
| 871 |
{Oxford University Press, 1990.} \label{goldfarb} |
| 872 |
\reference{BRYAN, M.,}{SGML --- An Author's Guide to the Standard Generalized |
| 873 |
Markup Language,}{Addison-Wesley Publishing Co., 1988. } \label{bryan} |
| 874 |
\reference{PHILLIPS, L. and LUBELL, J.,}{An SGML Environment for STEP,}% |
| 875 |
{NISTIR 5515, National Institute of Standards and Technology, |
| 876 |
Gaithersburg, MD 20899. November 1994.} \label{pandl} |
| 877 |
\reference{WILSON, P. R.,}{LTX2X: A LaTeX to X Auto-tagger,}% |
| 878 |
{NISTIR, National Institute of Standards and Technology, |
| 879 |
Gaithersburg, MD 20899. June 1996.} \label{ltx2x} |
| 880 |
\reference{RESSLER, S.,}{The National PDES Testbed Mail Server User's Guide,} |
| 881 |
{NSTIR 4508, National Institute of Standards and Technology, |
| 882 |
Gaithersburg, MD 20899. January 1991.} \label{ressler} |
| 883 |
\reference{RINAUDOT, G.R.,}{STEP On Line Information Service (SOLIS),} |
| 884 |
{NISTIR 5511, National Institute of Standards and Technology, |
| 885 |
Gaithersburg, MD 20899. October 1994. } \label{rinaudot} |
| 886 |
\reference{KROL, E.,}{The Whole Internet --- User's Guide \& Catalog,} |
| 887 |
{O'Reilly \& Associates, Inc., |
| 888 |
103 Morris Street, Suite A, Sebastopol, CA 95472. 1993. } \label{krol} |
| 889 |
\reference{WILSON, P.R.,}{The hyphenat package,}% |
| 890 |
{1999. (Available from CTAN)} \label{bib:hyphenat} |
| 891 |
\reference{WILSON, P.R.,}{The xtab package,}% |
| 892 |
{1998. (Available from CTAN)} \label{bib:xtab} |
| 893 |
\end{references} |
| 894 |
|
| 895 |
|
| 896 |
|
| 897 |
\end{document} |