<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\errorcontextlines32
\documentclass[twoside]{report}
\usepackage[chatter]{rotating}
\usepackage{fancyvrb}
\makeatletter
\newsavebox{\@display}
\newcommand\@@Display[1]{%
 \sbox\@display{%
  \begin{minipage}[b]{.45\textwidth}%
  #1\end{minipage}%
 }\raisebox{\depth}{\usebox{\@display}}%
}

\newcommand\@@VDisplay[1]{%
 \sbox\@display{%
   \begin{minipage}[b]{.45\textwidth}%
     \BVerbatimInput[fontsize=\small]{#1}%
   \end{minipage}}%
   \usebox{\@display}%
}
\newcommand\SideBySide[2]{%
\bgroup\def\baselinestretch{1}%
 \trivlist\item[]%
 \leavevmode
 \makebox[\textwidth][l]{\@@Display{#1}\hspace{1em}%
                             \@@VDisplay{#2}}%
 \endtrivlist
 \egroup
}
\newcommand\BeginExample{%
  \nobreak
  \VerbatimEnvironment
  \catcode`\&lt;=12
  \begin{VerbatimOut}{\jobname.ex}%
}
\newcommand{\EndExample}{\end{VerbatimOut}}

\newenvironment{example}
 {\nobreak
  \VerbatimEnvironment
  \catcode`\&lt;=12
  \begin{VerbatimOut}{\jobname.ex}%
 }
 {\end{VerbatimOut}
  \SideBySide {\input{\jobname.ex}}%
                {\jobname.ex}}
\makeatother
%-------------------------------------------------------
\def\degrees{{\small$^{\mathrm{o}}$}}
%-------------------------------------------------------

\begin{document}

\title{Test of `rotating' package}
\author{Sebastian Rahtz and Leonor Barroca\thanks{Now maintained as part of the \LaTeX\ graphics bundle.}}
\date{November 19th 1994\thanks{Updated for graphics bundle 2016/05/22}}
\maketitle

`Rotating' provides a generalised rotation environment, where the text
will be rotated (anti-clockwise) by the number of degrees specified as
a parameter to the environment, but no special arrangement is made to
find space for the result.

\begin{example}
Start here
\begin{rotate}{-56}
Save whales
\end{rotate}
End here
\end{example}

A complete example of rotating text without leaving space
would the `Save the whale' text
written at 10 degree intervals round the compass. We use
`rlap' to ensure that all the texts are printed at the same point.
Just to show that \TeX\ can handle PostScript muckings-about
properly\ldots
\begin{example}
\newcount\wang
\newsavebox{\wangtext}
\newdimen\wangspace
\def\wheel#1{\savebox{\wangtext}{#1}%
\wangspace\wd\wangtext
\advance\wangspace by 1cm%
\centerline{%
\rule{0pt}{\wangspace}%
\rule[-\wangspace]{0pt}{\wangspace}%
\wang=-180\loop\ifnum\wang&lt;180
\rlap{\begin{rotate}{\the\wang}%
\rule{1cm}{0pt}#1\end{rotate}}%
\advance\wang by 10\repeat}}
\wheel{Save the whale}
\end{example}

If the user
desires \LaTeX\ to leave space for the rotated box, then `turn' is used:
\begin{example}
 Start here \begin{turn}{56}%
   Save the whale
  \end{turn} end here
\end{example}
The environment `Sideways' is a  special case, setting the rotation to $-90$,
and leaving the correct space for the rotated box.
\begin{example}
Start here
\begin{sideways}%
Save the whale
\end{sideways}
End here
\end{example}

If you deal with whole paragraphs of text, you realize that \TeX\
boxes are not as simple as they sometimes look: they have a height
{\em and} a depth. So when you rotate, you rotate about the point on
the left-hand edge of the box that meets the baseline. The results can
be unexpected, as shown in the full set of  paragraph rotations in
Figures \ref{angles1} and \ref{angles2}. If you really want to turn a
paragraph so that it appears to rotate about the {\em real} bottom of
the \TeX\ box,
you have to adjust the box in the normal \LaTeX\ way:
\begin{example}
\newsavebox{\foo}
\savebox{\foo}{\parbox{1in}{Save
the whales Save the whale
Save the whale
Save the whale}}%
Start
\begin{turn}{45}\usebox{\foo}\end{turn}
End
\end{example}
\begin{example}
\savebox{\foo}{\parbox[b]{1in}{Save
the whales Save the whale
Save the whale
Save the whale}}%
Start
\begin{turn}{45}\usebox{\foo}\end{turn}
End
\end{example}

\def\testrot#1{%
\savebox{\foo}{\parbox{1in}{Save
the whales Save the whale Save the whale Save the whale}}%
\framebox{---\begin{turn}{#1}\framebox{\usebox{\foo}}\end{turn}---}}%

\begin{figure*}
\begin{tabular}{|c|c|c|}
\hline
\testrot{0} &amp;\testrot{-40}&amp;\testrot{-80}\\
0\degrees &amp; -40\degrees &amp; -80\degrees \\
\hline
\testrot{-120}&amp;\testrot{-160}&amp;\testrot{-200}\\
120\degrees &amp; -160\degrees &amp; -200\degrees \\
\hline
\testrot{-240}&amp;\testrot{-280}&amp;\testrot{-320}\\
-240\degrees &amp; -280\degrees &amp; -320\degrees \\
\hline
\end{tabular}
\caption{Rotation of paragraphs between 0 and -320 degrees \label{angles1}}
\end{figure*}

\begin{figure*}
\begin{tabular}{|c|c|c|}
\hline
\testrot{-180} &amp;\testrot{40}&amp;\testrot{80}\\
-180\degrees &amp; 40\degrees &amp; 80\degrees \\
\hline
\testrot{120}&amp;\testrot{160}&amp;\testrot{200}\\
120\degrees &amp; 160\degrees &amp; 200\degrees \\
\hline
\testrot{240}&amp;\testrot{280}&amp;\testrot{320}\\
240\degrees &amp; 280\degrees &amp; 320\degrees \\
\hline
\end{tabular}
\caption{Rotation of paragraphs between 0 and 320 degrees\label{angles2}}
\end{figure*}


We can set tabular material in this way; at the same time, we
demonstrate that the rotation can be nested:
\begin{example}
\begin{sideways}
\rule{1in}{0pt}
\begin{tabular}{|lr|}
\em Word &amp; \begin{rotate}{90}%
Occurrences\end{rotate}
\\
\hline
hello &amp; 33\\
goodbye &amp; 34\\
\hline
\end{tabular}
\end{sideways}
\end{example}

\begin{example}
\begin{quote}
\rule{0pt}{1.5in}\begin{tabular}{rrr}
\begin{rotate}{45}Column 1\end{rotate}&amp;
\begin{rotate}{45}Column 2\end{rotate}&amp;
\begin{rotate}{45}Column 3\end{rotate}\\
\hline
1&amp; 2&amp; 3\\
4&amp; 5&amp; 6\\
7&amp; 8&amp; 9\\
\hline
\end{tabular}
\end{quote}
\end{example}

\begin{example}
\begin{quote}
\begin{tabular}{rrr}
\begin{turn}{45}Column 1\end{turn}&amp;
\begin{turn}{45}Column 2\end{turn}&amp;
\begin{turn}{45}Column 3\end{turn}\\
\hline
1&amp; 2&amp; 3\\
4&amp; 5&amp; 6\\
7&amp; 8&amp; 9\\
\hline
\end{tabular}
\end{quote}
\end{example}

\begin{example}
\begin{quote}
\rule{0pt}{1.5in}\begin{tabular}{rrr}
\begin{rotate}{45}Column 1\end{rotate}
\rule{.5cm}{0pt}&amp;
\begin{rotate}{45}Column 2\end{rotate}
\rule{.5cm}{0pt}&amp;
\begin{rotate}{45}Column 3\end{rotate}
\rule{.5cm}{0pt}\\
\hline
1&amp; 2&amp; 3\\
4&amp; 5&amp; 6\\
7&amp; 8&amp; 9\\
\hline
\end{tabular}
\end{quote}
\end{example}

\begin{example}
\begin{sideways}
\begin{tabular}{|l|c|c|c|c|c|p{1in}|}
\hline
&amp;&amp;\multicolumn{4}{c}{NUMBER OF SITES}\vline &amp;ACCEPT or\\
\cline{3-6} &amp;STUDY AREA&amp;&amp;\multicolumn{3}{c}{%
IN BOUNDARY ZONE}\vline&amp;REJECT\\
\cline{4-6}&amp;&amp;&amp;&amp;\multicolumn{2}{c}{EXPECTED}
\vline&amp;NULL\\
\cline{5-6}&amp;&amp;TOT&amp;OBS&amp;FROM&amp;TO&amp;HYPOTH\\
\cline{2-7}
&amp;FULL SAMPLE&amp;41&amp;31&amp;10.3&amp;27.0&amp;REJECT\\
&amp;SAMPLE AREA 1&amp;23&amp;16&amp;4.3&amp;16.7&amp;ACCEPT\\
&amp;SAMPLE AREA 2&amp;18&amp;15&amp;2.8&amp;13.7&amp;REJECT\\
&amp;RUSHEN&amp;13&amp;9&amp;1.2&amp;10.4&amp;ACCEPT\\
&amp;ARBORY&amp;10&amp;7&amp;0.6&amp;8.8&amp;ACCEPT\\
&amp;MAROWN&amp;10&amp;8&amp;0.4&amp;8.6&amp;ACCEPT\\
\rule{0.5cm}{0pt}
\begin{rotate}{90}PRIMARY UNITS%
\end{rotate}\rule{0.5cm}{0pt}
&amp;SANTON&amp;8&amp;7&amp;0.0&amp;7.3&amp;ACCEPT\\
\hline
\end{tabular}
\end{sideways}
\end{example}

If you are interested in setting rotated material in tables or
figures, this presents no problem. Figure \ref{fig1} shows how
PostScript files which are being incorporated using can be
rotated at will, while Figure \ref{fig2} shows, in contrast, how
`includegraphics' itself handles rotation. It is also possible to rotate the
whole of the figure environment, including caption,
by using the `sidewaysfigure' ands `sidewaystable' environments
in place of `figure' and `table'.

Sideways figures and tables always take up the whole page. They can be
rotated so that the bottom ot the figures is on the left or the right;
the default is to always turn to the right. If the `twoside' option
has been given to the main document class, this package then starts
rotating sideways figures according to the page number (this requires
two passes through \LaTeX{} at least). If you want the `twoside'
option, but want the figures always in one direction, use the
`figuresright' or `riguresleft' options to `rotating'.

The code used to produce figures
\ref{rotfloat1}--\ref{rotfloat4} is as follows:
\begin{description}

\item[Figure \ref{rotfloat1}]
{\small\begin{verbatim}
\begin{sidewaystable}
\centering
\caption{This is a narrow  table, which should be centred vertically
on the final page.\label{rotfloat1}}
  \begin{tabular}{|ll|}
\hline
    a &amp; b \\
    c &amp; d \\
    e &amp; f \\
    g &amp; h \\
    i &amp; j \\
\hline
  \end{tabular}
\end{sidewaystable}
\end{verbatim}
}

\item[Figure \ref{rotfloat2}]
{\scriptsize\begin{verbatim}
\begin{sidewaystable}
\centering
\begin{tabular}{|llllllllp{1in}lp{1in}|}
\hline
Context   &amp;Length   &amp;Breadth/   &amp;Depth   &amp;Profile   &amp;Pottery   &amp;Flint   &amp;Animal   &amp;Stone   &amp;Other    &amp;C14 Dates \\
  &amp;         &amp;Diameter   &amp;        &amp;          &amp;          &amp;        &amp;
Bones&amp;&amp;&amp;\\
\hline
&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;\\
\multicolumn{10}{|l}{\bf Grooved Ware}&amp;\\
784       &amp;---        &amp;0.9m       &amp;0.18m   &amp;Sloping U &amp;P1       &amp;$\times$46  &amp;  $\times$8      &amp;&amp;       $\times$2 bone&amp;  2150$\pm$ 100 BC\\
785       &amp;---        &amp;1.00m      &amp;0.12    &amp;Sloping U &amp;P2--4    &amp;$\times$23  &amp;  $\times$21     &amp; Hammerstone &amp;---&amp;---\\
962       &amp;---        &amp;1.37m      &amp;0.20m   &amp;Sloping U &amp;P5--6    &amp;$\times$48  &amp;  $\times$57*    &amp; ---&amp;     ---&amp;1990 $\pm$ 80 BC (Layer 4) 1870 $\pm$90 BC (Layer 1)\\
983       &amp;0.83m      &amp;0.73m      &amp;0.25m   &amp;Stepped U &amp;---      &amp;$\times$18  &amp;  $\times$8      &amp; ---&amp; Fired clay&amp;---\\
&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;\\
\multicolumn{10}{|l}{\bf Beaker}&amp;\\
552       &amp;---        &amp;0.68m      &amp;0.12m   &amp;Saucer    &amp;P7--14   &amp;---           &amp; ---       &amp; ---       &amp;---        &amp;---\\
790       &amp;---        &amp;0.60m      &amp;0.25m   &amp;U         &amp;P15      &amp;$\times$12    &amp; ---       &amp; Quartzite-lump&amp;---    &amp;---\\
794       &amp;2.89m      &amp;0.75m      &amp;0.25m   &amp;Irreg.    &amp;P16      &amp;$\times$3     &amp; ---       &amp; ---       &amp;---        &amp;---\\
\hline
\end{tabular}

\caption[Grooved Ware and Beaker Features, their Finds and
Radiocarbon Dates]{Grooved Ware and Beaker Features, their
Finds and Radiocarbon Dates; For a breakdown of the Pottery
Assemblages see Tables I and III; for
the Flints see Tables II and IV; for the
Animal Bones see Table V.}\label{rotfloat2}
\end{sidewaystable}
\end{verbatim}
}

\item[Figure \ref{rotfloat3}]
{\small\begin{verbatim}
\begin{table}
\centering
\rotcaption{Minimum number of individuals; effect of rotating table
and caption separately}\label{rotfloat3}%
\begin{sideways}
\begin{tabular}[b]{cccccccccp{1cm}}
\hline
Phase&amp;Total&amp;Cattle&amp;Sheep&amp;Pig&amp;Red Deer&amp;Horse&amp;Dog&amp;Goat&amp;Other\\
\hline
&amp;1121&amp;54&amp;12&amp;32&amp;1&amp;1&amp;1&amp;1&amp;1 polecat\\
3&amp;8255&amp;58&amp;6&amp;35&amp;1&amp;1&amp;1&amp;1&amp;1 roe deer, 1 hare, 1 cat, 1 otter\\
4&amp;543&amp;45&amp;6&amp;45&amp;4&amp;1&amp;1&amp;---&amp;---\\
\hline
&amp;9919&amp;157&amp;24&amp;112&amp;6&amp;3&amp;3&amp;2&amp;5\\
\hline
\end{tabular}
\end{sideways}
\end{table}
\end{verbatim}
}

\item[Figure \ref{rotfloat4}]
{\small\begin{verbatim}
\begin{sidewaysfigure}
  \centering
  \includegraphics[width=.8\textheight,height=.4\textwidth]{cat}
\caption{A pathetically squashed rotated pussycat}\label{rotfloat4}
\end{sidewaysfigure}
\end{verbatim}
}
\end{description}

\begin{figure}
\begin{example}
---\begin{turn}{156}
\includegraphics[width=1in]{cat}
\end{turn}---
\end{example}

\begin{example}
---\begin{sideways}
\includegraphics[width=1in]{cat}
\end{sideways}---
\end{example}

\begin{example}
---\includegraphics[width=1in]{cat}---
\end{example}
\caption{A normal, and sideways, pictures within a figure\label{fig1}}
\end{figure}

\begin{figure}
\begin{example}
\includegraphics[width=1in,%
angle=-56]{cat}
\end{example}

\caption{Figures rotated with `includegraphics'\label{fig2}}
\end{figure}
\begin{sidewaystable}
\centering
\caption{This is a narrow  table, which should be centred vertically
on the final page.\label{rotfloat1}}
  \begin{tabular}{|ll|}
\hline
    a &amp; b \\
    c &amp; d \\
    e &amp; f \\
    g &amp; h \\
    i &amp; j \\
\hline
  \end{tabular}
\end{sidewaystable}



\begin{sidewaystable}
\centering
\begin{tabular}{|llllllllp{1in}lp{1in}|}
\hline
Context   &amp;Length   &amp;Breadth/   &amp;Depth   &amp;Profile   &amp;Pottery   &amp;Flint   &amp;Animal   &amp;Stone   &amp;Other    &amp;C14 Dates \\
  &amp;         &amp;Diameter   &amp;        &amp;          &amp;          &amp;        &amp;
Bones&amp;&amp;&amp;\\
\hline
&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;\\
\multicolumn{10}{|l}{\bf Grooved Ware}&amp;\\
784       &amp;---        &amp;0.9m       &amp;0.18m   &amp;Sloping U &amp;P1       &amp;$\times$46  &amp;  $\times$8      &amp;&amp;       $\times$2 bone&amp;  2150$\pm$ 100 BC\\
785       &amp;---        &amp;1.00m      &amp;0.12    &amp;Sloping U &amp;P2--4    &amp;$\times$23  &amp;  $\times$21     &amp; Hammerstone &amp;---&amp;---\\
962       &amp;---        &amp;1.37m      &amp;0.20m   &amp;Sloping U &amp;P5--6    &amp;$\times$48  &amp;  $\times$57*    &amp; ---&amp;     ---&amp;1990 $\pm$ 80 BC (Layer 4) 1870 $\pm$90 BC (Layer 1)\\
983       &amp;0.83m      &amp;0.73m      &amp;0.25m   &amp;Stepped U &amp;---      &amp;$\times$18  &amp;  $\times$8      &amp; ---&amp; Fired clay&amp;---\\
&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;\\
\multicolumn{10}{|l}{\bf Beaker}&amp;\\
552       &amp;---        &amp;0.68m      &amp;0.12m   &amp;Saucer    &amp;P7--14   &amp;---           &amp; ---       &amp; ---       &amp;---        &amp;---\\
790       &amp;---        &amp;0.60m      &amp;0.25m   &amp;U         &amp;P15      &amp;$\times$12    &amp; ---       &amp; Quartzite-lump&amp;---    &amp;---\\
794       &amp;2.89m      &amp;0.75m      &amp;0.25m   &amp;Irreg.    &amp;P16      &amp;$\times$3     &amp; ---       &amp; ---       &amp;---        &amp;---\\
\hline
\end{tabular}

\caption[Grooved Ware and Beaker Features, their Finds and
Radiocarbon Dates]{Grooved Ware and Beaker Features, their
Finds and Radiocarbon Dates; For a breakdown of the Pottery
Assemblages see Tables I and III; for
the Flints see Tables II and IV; for the
Animal Bones see Table V.}\label{rotfloat2}
\end{sidewaystable}

\begin{table}
\centering
\hbox{
\rotcaption{Minimum number of individuals; effect of rotating table
and caption separately}\label{rotfloat3}%
\begin{sideways}
\begin{tabular}[t]{cccccccccp{1cm}}
\hline
Phase&amp;Total&amp;Cattle&amp;Sheep&amp;Pig&amp;Red Deer&amp;Horse&amp;Dog&amp;Goat&amp;Other\\
\hline
&amp;1121&amp;54&amp;12&amp;32&amp;1&amp;1&amp;1&amp;1&amp;1 polecat\\
3&amp;8255&amp;58&amp;6&amp;35&amp;1&amp;1&amp;1&amp;1&amp;1 roe deer, 1 hare, 1 cat, 1 otter\\
4&amp;543&amp;45&amp;6&amp;45&amp;4&amp;1&amp;1&amp;---&amp;---\\
\hline
&amp;9919&amp;157&amp;24&amp;112&amp;6&amp;3&amp;3&amp;2&amp;5\\
\hline
\end{tabular}
\end{sideways}
}
\end{table}


\begin{sidewaysfigure}
  \centerline{\includegraphics[width=.8\textheight,height=.4\textwidth]{cat}}
\caption{A pathetically squashed rotated pussycat (1)}
\end{sidewaysfigure}

\begin{sidewaysfigure}
  \centerline{\includegraphics[width=.8\textheight,height=.4\textwidth]{cat}}
\caption{A pathetically squashed rotated pussycat (2)}
\end{sidewaysfigure}

\begin{sidewaysfigure}
  \centerline{\includegraphics[width=.8\textheight,height=.4\textwidth]{cat}}
\caption{A pathetically squashed rotated pussycat (3)}
\end{sidewaysfigure}

\begin{sidewaysfigure}
  \centerline{\includegraphics[width=.8\textheight,height=.4\textwidth]{cat}}
\caption{A pathetically squashed rotated pussycat (4)}
\end{sidewaysfigure}

\begin{sidewaysfigure}
  \centerline{\includegraphics[width=.8\textheight,height=.4\textwidth]{cat}}
\caption{A pathetically squashed rotated pussycat}\label{rotfloat4}
\end{sidewaysfigure}

\end{document}
</pre></body></html>