summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-05-23 18:48:12 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-05-23 18:48:12 +0000
commit2d0f72acd5b33d13c12b024b38d637e43e6acad6 (patch)
treea5cd467addd3f8d051efea07669380d2efbee23c /Master
parentc875a5a47283ef47bd7d7cfc36c9efb36f9f886c (diff)
rotating v2.15 2008/05/16
git-svn-id: svn://tug.org/texlive/trunk@8313 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/rotating/README19
-rw-r--r--Master/texmf-dist/doc/latex/rotating/examples.dvibin39176 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/rotating/examples.tex2
-rwxr-xr-xMaster/texmf-dist/doc/latex/rotating/rotating.pdfbin0 -> 106401 bytes
-rw-r--r--Master/texmf-dist/source/latex/rotating/examples.ex2
-rw-r--r--Master/texmf-dist/source/latex/rotating/makefile7
-rw-r--r--Master/texmf-dist/source/latex/rotating/manifest6
-rw-r--r--Master/texmf-dist/source/latex/rotating/readme9
-rw-r--r--Master/texmf-dist/source/latex/rotating/rotating.dtx533
-rw-r--r--Master/texmf-dist/tex/latex/rotating/rotating.sty175
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
11 files changed, 544 insertions, 211 deletions
diff --git a/Master/texmf-dist/doc/latex/rotating/README b/Master/texmf-dist/doc/latex/rotating/README
new file mode 100644
index 00000000000..1a190b7ee56
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/rotating/README
@@ -0,0 +1,19 @@
+rotating
+
+A package built on the standard LaTeX graphics package, which performs
+all the different sorts of rotation one might like, including complete
+floating figures/tables and their captions. The commented source
+contains the manual, and there is a set of tests in examples.tex. The
+file examples.tex doubles as a (somewhat disorganised) tutorial for
+use of the package.
+
+Install by running TeX on rotating.ins and place `rotating.sty'
+"where LaTeX can find it" -- see
+ http://www.tex.ac.uk/cgi-bin/texfaq2html?label=inst-wlcf
+for guidance on such installation.
+
+Alternatively, a .tds.ins file is available on the CTAN install tree:
+install that at the root of your TEXMF-LOCAL tree.
+
+Robin Fairbairns
+2008-05-19
diff --git a/Master/texmf-dist/doc/latex/rotating/examples.dvi b/Master/texmf-dist/doc/latex/rotating/examples.dvi
deleted file mode 100644
index 8e729c5ade8..00000000000
--- a/Master/texmf-dist/doc/latex/rotating/examples.dvi
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/rotating/examples.tex b/Master/texmf-dist/doc/latex/rotating/examples.tex
index 7d629718d4e..6d8bb2a800e 100644
--- a/Master/texmf-dist/doc/latex/rotating/examples.tex
+++ b/Master/texmf-dist/doc/latex/rotating/examples.tex
@@ -1,7 +1,7 @@
\errorcontextlines32
\documentclass[twoside]{report}
\renewcommand{\thepage}{\thechapter-\arabic{page}}
-\usepackage{rotating}
+\usepackage[chatter]{rotating}
\usepackage{epsfig}
\usepackage{fancyvrb}
\makeatletter
diff --git a/Master/texmf-dist/doc/latex/rotating/rotating.pdf b/Master/texmf-dist/doc/latex/rotating/rotating.pdf
new file mode 100755
index 00000000000..2f4a9f7ad89
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/rotating/rotating.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/rotating/examples.ex b/Master/texmf-dist/source/latex/rotating/examples.ex
deleted file mode 100644
index dd0e05d5392..00000000000
--- a/Master/texmf-dist/source/latex/rotating/examples.ex
+++ /dev/null
@@ -1,2 +0,0 @@
-\epsfig{figure=cat.eps,width=1in,%
-angle=-56}
diff --git a/Master/texmf-dist/source/latex/rotating/makefile b/Master/texmf-dist/source/latex/rotating/makefile
deleted file mode 100644
index 208e1e25332..00000000000
--- a/Master/texmf-dist/source/latex/rotating/makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-all:
- tex rotating.ins
- latex rotating.dtx
-
-clean:
- -rm *.dvi *.aux *.log *.tmp *.toc *.lof *.lot *.idx *.ex
- -rm rotating.sty
diff --git a/Master/texmf-dist/source/latex/rotating/manifest b/Master/texmf-dist/source/latex/rotating/manifest
deleted file mode 100644
index 578b50ce7f3..00000000000
--- a/Master/texmf-dist/source/latex/rotating/manifest
+++ /dev/null
@@ -1,6 +0,0 @@
-cat.eps PostScript file used in examples
-examples.tex long test file
-makefile
-manifest
-rotating.dtx commented source
-rotating.ins TeX script to strip source
diff --git a/Master/texmf-dist/source/latex/rotating/readme b/Master/texmf-dist/source/latex/rotating/readme
deleted file mode 100644
index c8dcbee38fe..00000000000
--- a/Master/texmf-dist/source/latex/rotating/readme
+++ /dev/null
@@ -1,9 +0,0 @@
-A package built on the standard \LaTeX\ graphics package, and performs
-all the different sorts of rotation one might like, including complete
-figures and captions. The commented source contains the manual, and
-there is a set of tests in examples.tex.
-
-Install by running \TeX\ on rotating.ins and place `rotating.sty'
-where \LaTeX\ can find it.
-
-
diff --git a/Master/texmf-dist/source/latex/rotating/rotating.dtx b/Master/texmf-dist/source/latex/rotating/rotating.dtx
index c008c925b94..cf77f9c8197 100644
--- a/Master/texmf-dist/source/latex/rotating/rotating.dtx
+++ b/Master/texmf-dist/source/latex/rotating/rotating.dtx
@@ -1,96 +1,174 @@
-\def\RInfo{1997/09/26, v2.13}
%
% \iffalse
-%% File: rotating.dtx Copyright (C) 1995--1999
-% Sebastian Rahtz and Leonor Barroca
-% <s.rahtz@elsevier.co.uk>
%
-% This package may be distributed under the terms of the LaTeX Project Public
-% License, as described in lppl.txt in the base LaTeX distribution.
-% Either version 1.0 or, at your option, any later version.
+% $Id: rotating.dtx,v 1.12 2008/05/16 22:49:45 rf10 Exp rf10 $
%
-% This package is distributed in the hope that it will be useful,
-% but WITHOUT ANY WARRANTY; without even the implied warranty of
-% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+%% File: rotating.dtx
+%% Copyright 1995--1999 Sebastian Rahtz and Leonor Barroca
+%% Copyright 2001-2003,2007,2008 Robin Fairbairns
+%% Mail contact: rf10@cam.ac.uk
%
-% A package to provide a rotation environment, and
-% rotating floats and captions
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Robin Fairbairns.
+%
+% This work consists of the files rotating.dtx and rotating.ins,
+% and the derived file rotating.sty, and testing material
+% examples.tex and cat.eps
%
-%<*driver>
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+%<*dtx>
+\ProvidesFile{rotating.dtx}%
+%</dtx>
+%<package>\ProvidesPackage{rotating}%
+ [2008/05/16 v2.15
+%<package> rotated objects in LaTeX%
+%<*dtx>
+ rotating package source file%
+%</dtx>
+ ]% $Id: rotating.dtx,v 1.12 2008/05/16 22:49:45 rf10 Exp rf10 $
+%<*dtx>
\documentclass{ltxdoc}
+\GetFileInfo{rotating.dtx}
\begin{document}
- \title{A style option for rotated objects in \LaTeX}
- \author{Sebastian Rahtz \and Leonor Barroca}
- \author{Leonor Barroca}
- \date{printed today}
+ \title{A package for rotated objects in \LaTeX\thanks{This file has
+ version number \fileversion, last revised \filedate}}
+ \author{Robin Fairbairns\thanks{Contact: rf10@cam.ac.uk}
+ \and Sebastian Rahtz \and Leonor Barroca}
+ \date{printed \today}
\maketitle
\tableofcontents
- \listoffigures
- \listoftables
+% \listoffigures
+% \listoftables
\DocInput{rotating.dtx}
\end{document}
-%</driver>
+%</dtx>
% \fi
-% \CheckSum{388}
+% \CheckSum{470}
% \begin{abstract}
% This article documents a \LaTeX\ package, `rotating.sty',
-% which perform all the different sorts of
-% rotation one might like, including complete figures.
+% which performs most sorts of
+% rotation one might like, including rotation of complete floating
+% figures and tables.
% \end{abstract}
-% \section{History}
%
-% Version 2.0 is a complete re-write, with most of the work now
-% being done by the \LaTeXe\ graphics package.
+% \section{Introduction}
%
-% Version 2.1 provides a `clockwise' option to reinstate the behaviour
-% described in the `\LaTeX\ Companion'
+% The package provides:
+% \begin{itemize}
+% \item two new environments, \texttt{sidewaystable} and
+% \texttt{sidewaysfigure}, each of which produces a single page-size
+% float with contents rotated $\pm90$\,degrees; and
+% \item a variety of other rotation-related commands and environments.
+% \end{itemize}
%
-% Version 2.2 just intercepts the standard float macros instead
-% of copying and changing the. The `twoside' option is obeyed.
+% \section{Usage}
%
-% Version 2.5 corrects problems in sideways figures.
+% \subsection{Package options}
%
-% Version 2.6 is a rewrite of the sideways floats via Frank Mittelbach
-% (to whom many thanks for lookingat the mangy code).
+% Sideways figures and tables always take up the whole page. In
+% single-sided documents, they may be rotated so that the bottom of
+% the figures is on the left (package option
+% `\texttt{counterclockwise}') or the right (package option
+% `\texttt{clockwise}'). The default is to turn so that the bottom is
+% on the right (option `\texttt{clockwise}').
%
-% Version 2.7 is checked for \LaTeX\ of December 94, and adds the option
-% of twoside behaviour independent of the general twoside.
+% Option `\texttt{anticlockwise}' is an alias for
+% `\texttt{counterclockwise}'.
%
-% Version 2.8 cleans up some mistakes pointed out by Harald Axel Sommerfeldt.
-% Version 2.9 cleans up some (more) mistakes pointed out by Harald Axel Sommerfeldt.
-% \section{Usage}
-% This style option provides three \LaTeX\ environments:
+% If the `\texttt{twoside}' option has been given to the main document
+% class (either explicitly, or implicitly as in the default for book
+% class), the package will rotate sideways figures according to the
+% page number (this requires at least two passes through \LaTeX{}).
+% If you want the `\texttt{twoside}' option, but want the figures
+% always in one direction, use the `\texttt{figuresright}' or
+% `\texttt{figuresleft}' options to the package.
+%
+% The package can produce a lot of logging information; the
+% amount of information is controlled by the package options
+% `\texttt{quiet}' (fewest messages; default), `\texttt{log}' and
+% `\texttt{chatter}' (most messages).
+%
+% All other options are passed to the \texttt{graphicx} package when
+% it is loaded to provide rotation functions.
+%
+% \subsection{Float environments}
+%
+% The environments \texttt{sidewaystable} and \texttt{sidewaysfigure}
+% introduce landscape-form floating tables and figures, respectively.
+% (Each of the environments has a ``starred'' version, such as
+% \texttt{sidewaystable*}, for a single-column float in a double-column
+% area of the document.)
+%
+% New rotated environments may be declared using the combined
+% facilities of the float and rotfloat packages.
+%
+% \subsection{Other environments and commands}
+% The package provides other \LaTeX\ environments:
% \begin{description}
-% \item[sideways] prints the contents turned through 90 degrees
-% counterclockwise
-% \item[turn] prints the contents turned through an arbitrary angle
-% \item[rotate] prints the contents turned through an arbitrary angle
-% but does \emph{not} leave any space for the result
+% \item[\mdseries\ttfamily sideways] prints the contents of the
+% environment turned through 90 degrees counterclockwise;
+% \item[\mdseries\ttfamily turn] prints the contents turned through an
+% arbitrary angle (the argument to the environment);
+% \item[\mdseries\ttfamily rotate] prints the contents turned through
+% an arbitrary angle but does \emph{not} leave any space for the result
% \end{description}
-% A full set of examples are given in the file |examples.tex|
-% Now we present the documented code.
-% \section{Setup}
+%
+% The command \cs{turnbox}\marg{angle}\marg{matter to turn} is a macro
+% version of the \texttt{rotate} environment.
+%
+% A set of examples is given in the file \texttt{examples.tex}
+%
+% \subsection{Positioning}
+%
+% Floats appear one to a page, and are positioned by spacer skips that
+% appear (logically) above and below the floating object. The skips,
+% \cs{rotFPtop} and \cs{rotFPbot}, are initialised from the standard
+% \LaTeX{} (internal) \cs{@fptop} and \cs{@fpbot} skips. As a result,
+% by default, rotated floats appear horizontally centred on their
+% float pages.
+%
+% Some sensible values for the registers are:
+% \par\noindent
+% \begin{tabular}{@{}llp{3in}@{}}
+% \cs{rotFPtop} & \cs{rotFPbot} & Effect \\
+% \hline
+% 0pt plus 1fil & 0pt plus 1fil & figure/table appears in middle
+% (default value) \\
+% 0pt & 0pt plus 1fil & figure/table appears with its top
+% nearest the edge of the page \\
+% 0pt plus 1fil & 0pt plus 2fil & figure/table's bottom appears
+% twice as far from the edge as the
+% top does
+% \end{tabular}
+%
% \StopEventually{}
+%
+% \section{Setup}
+% Now we present the documented code. First, package options.
+%
+% Note that the \texttt{clockwise} and \texttt{counterclockwise}
+% options are present for compatibility only.
% \begin{macrocode}
%<*package>
-\ProvidesPackage{rotating}[\RInfo\space Rotation package]
-\NeedsTeXFormat{LaTeX2e}
-\newif\if@rot@twoside
-\DeclareOption{clockwise}{% this is for compatibility
+\DeclareOption{clockwise}{%
\AtBeginDocument{\setkeys{Grot}{units=360}}%
}
\DeclareOption{counterclockwise}{%
\AtBeginDocument{\setkeys{Grot}{units=-360}}%
}
+\DeclareOption{anticlockwise}{\ds@counterclockwise}
% \end{macrocode}
-% 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'.
+% Control figure orientation
% \begin{macrocode}
\DeclareOption{figuresleft}{%
\@rot@twosidefalse
@@ -100,21 +178,76 @@
\@rot@twosidefalse
\def\rot@LR{-1}%
}
-\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{graphics}}
-\ExecuteOptions{clockwise}
+% \end{macrocode}
+%
+% control messages:
+% \begin{macrocode}
+\newif\ifrot@messages
+\DeclareOption{quiet}{%
+ \rot@messagesfalse
+ \let\rot@message\@gobble % pro tem -- should suppress altogether
+}
+\DeclareOption{log}{%
+ \rot@messagestrue
+ \def\rot@message{\PackageInfo{rotating}}%
+}
+\DeclareOption{chatter}{%
+ \rot@messagestrue
+ \def\rot@message{\PackageWarning{rotating}}%
+}
+% \end{macrocode}
+%
+% \begin{macro}{\if@rot@twoside}
+% \begin{macro}{\rot@LR}
+% A couple of commands for passing rotation direction around
+% \begin{macrocode}
+\newif\if@rot@twoside
\if@twoside
\@rot@twosidetrue
\else
\@rot@twosidefalse
\fi
\def\rot@LR{-1}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% Pass any unknown options to the \textsf{graphicx} package, and
+% set up defaults and process the options.
+% \begin{macrocode}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{graphicx}}
+\ExecuteOptions{clockwise,quiet}
\ProcessOptions
+% \end{macrocode}
+%
+% Other initialisation
+% \begin{macrocode}
\RequirePackage{graphicx}
\RequirePackage{ifthen}
+% \end{macrocode}
+%
+% \begin{macro}{\rotdriver}
+% The command \cs{rotdriver} allows a user to specify an initialisation file,
+% a sort of non-automatically-loaded driver (in the graphics, hyperref
+% sense).
+% \begin{macrocode}
\def\rotdriver#1{\makeatletter\input{#1.def}\makeatother}
+% \end{macrocode}
+% \end{macro}
+%
+% The \texttt{r@tfl@t} counter is used when generating `labels' for
+% determining what side of the page the float is on, in twoside mode.
+% \begin{macrocode}
\newcounter{r@tfl@t}
\setcounter{r@tfl@t}{0}
% \end{macrocode}
+%
+% Positioning skips (see above).
+% \begin{macrocode}
+\newskip\rotFPtop \rotFPtop=\@fptop
+\newskip\rotFPbot \rotFPbot=\@fpbot
+% \end{macrocode}
+%
% \section{Turning and rotation environments}
% \begin{macro}{sideways}
% Environment to turn the contents through 90 degrees.
@@ -130,6 +263,7 @@
}
% \end{macrocode}
% \end{macro}
+%
% \begin{macro}{turn}
% Rotate the contents of the environment, leaving the appropriate space
% \begin{macrocode}
@@ -181,6 +315,9 @@
% to parameterize this to do other rotations if needed (the mind
% boggles\ldots)
%
+% \begin{macro}{\@rotfloat}
+% \begin{macro}{\@xrotfloat}
+% \begin{macro}{\rot@float@box}
% First a generalised `rotfloat' environment. We need to intercept
% \LaTeX's float macros, in order to change the assumed width of a
% float being |\columnwidth|. We want it to work on a width of
@@ -203,14 +340,19 @@
\@float{#1}[#2]%
% \end{macrocode}
% Set the float contents in
-% a box of |\textheight| instead of |\columnwidth|.
+% a box of width \cs{textheight} instead of \cs{columnwidth}.
% \begin{macrocode}
\begin{lrbox}\rot@float@box
\begin{minipage}\textheight
}
% \end{macrocode}
-% We call the |\end@float| macro having previously rotated
-% the box |\@currbox|
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\end@rotfloat}
+% We call \LaTeX's \cs{end@float} macro having previously rotated
+% the box \cs{@currbox}.
% The rotation is either clockwise or
% anti-clockwise, depending on whether the page is odd or even;
% in oneside mode it is always odd.
@@ -218,15 +360,14 @@
\def\end@rotfloat{%
% \end{macrocode}
% If we are going to know whether pages are odd or even,
-% we need to use the a variant |\pageref| mechanism, and labels. But
-% Labels won't work \emph{unless} the user has put in a
-% caption. Beware!
+% we need to use the a variant \cs{pageref} mechanism and our own
+% specialised labels.
% \begin{macrocode}
\end{minipage}\end{lrbox}%
- \global\addtocounter{r@tfl@t}{1}%
+ \stepcounter{r@tfl@t}%
\rot@label{RF\ther@tfl@t}%
- \message{Adding sideways figure on }%
- \def\R@@page{\pageref{RF\ther@tfl@t}}%
+ \rot@pageref{RF\ther@tfl@t}{\R@@page}%
+ \rot@mess@toks{Adding sideways \@captype\space on page \R@@page\space}
\wd\rot@float@box\z@
\ht\rot@float@box\z@
\dp\rot@float@box\z@
@@ -237,23 +378,41 @@
% \begin{macrocode}
\setkeys{Grot}{units=360}%
\if@rot@twoside
- \def\R@@page{\pageref{RF\ther@tfl@t}}%
\else
\let\R@@page\rot@LR
\fi
\ifthenelse{\isodd{\R@@page}}{%
- \message{right hand page}%
- \vfill
- \centerline{\rotatebox{90}{\box\rot@float@box}}%
- }{%
- \message{left hand page}%
- \centerline{\rotatebox{-90}{\box\rot@float@box}}%
- \vfill
- }%
- }%
- \end@float
+ \if@rot@twoside
+ \rot@mess@toks\expandafter{\the\rot@mess@toks right hand page}%
+ \fi
+ \vfill
+ \@@line{%
+ \hskip\rotFPtop
+ \rotatebox{90}{\box\rot@float@box}%
+ \hskip\rotFPbot
+ }%
+ }{%
+ \if@rot@twoside
+ \rot@mess@toks\expandafter{\the\rot@mess@toks left hand page}%
+ \fi
+ \@@line{%
+ \hskip\rotFPbot
+ \rotatebox{-90}{\box\rot@float@box}%
+ \hskip\rotFPtop
+ }%
+ \vfill
+ }%
+ \rot@message{\the\rot@mess@toks}
+ }%
+ \end@float
}
% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\sidewaysfigure}
+% \begin{macro}{\endsidewaysfigure}
+% \begin{macro}{\sidewaystable}
+% \begin{macro}{\endsidewaystable}
% The following definitions set up two environments,
% \texttt{sidewaystable} and \texttt{sidewaysfigure}, which uses this
% type of float. Naturally, users may need to change these to suit
@@ -267,6 +426,13 @@
\def\sidewaystable{\@rotfloat{table}}
\let\endsidewaystable\end@rotfloat
% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@rotdblfloat}
+% \begin{macro}{\end@rotdblfloat}
% Handling double column floats
% \begin{macrocode}
\def\@rotdblfloat{%
@@ -279,37 +445,74 @@
\begin{lrbox}\rot@float@box
\begin{minipage}\textheight
}
-\def\end@rotdblfloat{%
- \end{minipage}\end{lrbox}%
- \global\addtocounter{r@tfl@t}{1}%
- \rot@label{RF\ther@tfl@t}%
- \message{Adding sideways figure on }%
- \def\R@@page{\pageref{RF\ther@tfl@t}}%
- \@tempdima\ht\rot@float@box
- \advance\@tempdima by \dp\rot@float@box
-\typeout{BOX wd: \the\wd\rot@float@box, ht: \the\ht\rot@float@box, dp: \the\dp\rot@float@box: so shift by .5 of \the\@tempdima}%
- \wd\rot@float@box\z@
- \ht\rot@float@box\z@
- \dp\rot@float@box\z@
- \vbox to \textheight{%
+\def\@rotdblfloat{%
+% \end{macrocode}
+% If we are going to know whether pages are odd or even,
+% we need to use the \cs{pageref} mechanism, and labels. But
+% Labels won't work \emph{unless} the user has put in a
+% caption. Beware!
+% \begin{macrocode}
+ \end{minipage}\end{lrbox}%
+ \stepcounter{r@tfl@t}%
+ \rot@label{RF\ther@tfl@t}%
+ \rot@pageref{RF\ther@tfl@t}{\R@@page}%
+ \rot@mess@toks{Adding sideways \@captype\space on page \R@@page\space}
+ \@tempdima\ht\rot@float@box
+ \advance\@tempdima by \dp\rot@float@box
+% \ifrot@messages
+% \rot@message{BOX wd: \the\wd\rot@float@box,
+% ht: \the\ht\rot@float@box, dp: \the\dp\rot@float@box:
+% so shift by .5 of \the\@tempdima}%
+% \fi
+ \wd\rot@float@box\z@
+ \ht\rot@float@box\z@
+ \dp\rot@float@box\z@
+ \vbox to \textheight{%
+% \end{macrocode}
+% We need to know for sure which direction rotation is going to
+% be in, so locally reset the graphics units.
+% \begin{macrocode}
\setkeys{Grot}{units=360}%
\if@rot@twoside
- \def\R@@page{\pageref{RF\ther@tfl@t}}%
\else
\let\R@@page\rot@LR
\fi
\ifthenelse{\isodd{\R@@page}}{%
- \message{right hand page}%
- \vfill
- \hbox to\textwidth{\hfill\rotatebox{90}{\box\rot@float@box}\hfill}%
- }{%
- \message{left hand page}%
- \hbox to \textwidth{\hfill\rotatebox{-90}{\box\rot@float@box}\hfill}%
- \vfill
- }%
- }%
- \end@dblfloat
+ \ifrot@messages
+ \if@rot@twoside
+ \rot@mess@toks\expandafter{\the\rot@mess@toks right hand page}%
+ \fi
+ \fi
+ \vfill
+ \@@line{%
+ \hskip\rotFPtop
+ \rotatebox{90}{\box\rot@float@box}%
+ \hskip\rotFPbot
+ }%
+ }{%
+ \ifrot@messages
+ \if@rot@twoside
+ \rot@mess@toks\expandafter{\the\rot@mess@toks left hand page}%
+ \fi
+ \fi%
+ \@@line{%
+ \hskip\rotFPbot
+ \rotatebox{-90}{\box\rot@float@box}%
+ \hskip\rotFPtop
+ }%
+ \vfill
+ }%
+ \rot@message{\the\rot@mess@toks}%
+ }%
+ \end@dblfloat
}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{environment}{sidewaysfigure*}
+% \begin{environment}{sidewaystable*}
+% \begin{macrocode}
\newenvironment{sidewaystable*}
{\@rotdblfloat{table}}
{\end@rotdblfloat}
@@ -318,37 +521,76 @@
{\end@rotdblfloat}
% \end{macrocode}
-% Note that we used |\rot@label|, not |\label|; this
-% variant writes the \emph{true} page number, not the
-% value of |\thepage|. It also involves a variant |\protected@write|
-% for reasons which I do not fully understand. Let it stand.
+% \end{environment}
+% \end{environment}
+%
+% \begin{macro}{\rot@label}
+% \begin{macro}{\rot@thepage}
+% \begin{macro}{\rot@pageref}
+% \begin{macro}{\rot@protected@write}
+% \begin{macro}{\if@rot@refundefined}
+% Note that we used \cs{rot@label}, not \cs{label}; this
+% variant writes (just) the \emph{true} page number, not the
+% value of \cs{thepage}; this ``true'' value then needs special
+% treatment in \cs{protected@write}, just as
+% \cs{thepage} already has.
+% \cs{rot@pageref}\marg{generated label name}\marg{cs to set to
+% pageno} then returns the labelled page's number (or 0 if label not
+% yet defined). If label not defined, flags using
+% \cs{rot@refundefinedtrue} for end-document to pick up. (later...)
% \begin{macrocode}
-\long\def \r@protected@write#1#2#3{%
- \begingroup
- \let\therpage\relax
- #2%
- \let\protect\@unexpandable@protect
- \edef\reserved@a{\write#1{#3}}%
- \reserved@a
- \endgroup
- \if@nobreak\ifvmode\nobreak\fi\fi
-}
-\def\therpage{\arabic{page}}
+\def\rot@thepage{\@arabic\c@page}
\def\rot@label#1{\@bsphack
- \r@protected@write\@auxout{}%
- {\string\newlabel{#1}{{\@currentlabel}{\therpage}}}%
+ \rot@protected@write{\@auxout}{}%
+ {\string\newlabel{#1}{\rot@thepage}}%
\@esphack}
+\def\rot@pageref#1#2{%
+ \expandafter\ifx\csname r@#1\endcsname\relax
+ \global\@rot@refundefinedtrue
+ \def#2{0}%
+ \else
+ \edef#2{\csname r@#1\endcsname}%
+ \fi
+}
+\long\def\rot@protected@write#1#2#3{%
+ \begingroup
+ \let\rot@thepage\relax
+ #2%
+ \let\protect\@unexpandable@protect
+ \edef\reserved@a{\write#1{#3}}%
+ \reserved@a
+ \endgroup
+ \if@nobreak\ifvmode\nobreak\fi\fi
+}
+\newif\if@rot@refundefined
+\global\@rot@refundefinedfalse
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\rot@mess@toks}
+% A token register to build up debugging messages
+% \begin{macrocode}
+\newtoks\rot@mess@toks
% \end{macrocode}
-%\subsection{Rotated captions only}
+% \end{macro}
+%
+% \subsection{Rotated captions only}
+%
+% \begin{macro}{\rotcaption}
+% \begin{macro}{\@makerotcaption}
% Sometimes you may find that the rotation of complete figures does
% not give quite the right result, since they always take up the whole
% page. You may prefer to rotate the caption and the float contents
% separately within a conventional figure. Here we offer a suggestion
-% for a |\rotcaption| command, which inserts the caption rotated
+% for a \cs{rotcaption} command, which inserts the caption rotated
% by 90 degrees. It is essentially a copy of the normal captioning
% code.
-% Styles which define the |\@makecaption| command may also need
-% to define |\@makerotcaption|.
+% Packages which define the \cs{@makecaption} command may also need
+% to define \cs{@makerotcaption}.
% \begin{macrocode}
\def\rotcaption{\refstepcounter\@captype\@dblarg{\@rotcaption\@captype}}
\long\def\@rotcaption#1[#2]#3{%
@@ -371,8 +613,45 @@
\fi
\hspace{12pt}%
}
-% \end{macrocode}
%</package>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \section{History}
+%
+% Version 2.0 is a complete re-write, with most of the work now
+% being done by the \LaTeXe\ graphics package.
+%
+% Version 2.1 provides a `clockwise' option to reinstate the behaviour
+% described in the `\LaTeX\ Companion'
+%
+% Version 2.2 just intercepts the standard float macros instead
+% of copying and changing the. The `twoside' option is obeyed.
+%
+% Version 2.5 corrects problems in sideways figures.
+%
+% Version 2.6 is a rewrite of the sideways floats via Frank Mittelbach
+% (to whom many thanks for looking at the mangy code).
+%
+% Version 2.7 is checked for \LaTeX\ of December 94, and adds the option
+% of twoside behaviour independent of the general twoside.
+%
+% Version 2.8 cleans up some mistakes pointed out by Harald Axel
+% Sommerfeldt.
+%
+% Version 2.9 cleans up some (more) mistakes pointed out by Harald
+% Axel Sommerfeldt.
+%
+% Version 2.13a permits positioning of rotated floats in the same way
+% as they are positioned in `normal' floats.
+%
+% Version 2.14 is the first to be published anywhere as the outcome of
+% maintenance by Robin Fairbairns.
+%
+% Version 2.15 deals with page-numbering bug for auto-float-rotation,
+% and tidying of messages; published to ctan
+%
% \Finale
\endinput
%
diff --git a/Master/texmf-dist/tex/latex/rotating/rotating.sty b/Master/texmf-dist/tex/latex/rotating/rotating.sty
index a94d0240f40..cba64105ffb 100644
--- a/Master/texmf-dist/tex/latex/rotating/rotating.sty
+++ b/Master/texmf-dist/tex/latex/rotating/rotating.sty
@@ -11,17 +11,22 @@
%% However, no permission is granted to distribute a modified version of
%% this file under its original name.
%%
-\def\RInfo{1997/09/26, v2.13}
-%% File: rotating.dtx Copyright (C) 1995--1999
-\ProvidesPackage{rotating}[\RInfo\space Rotation package]
+%% File: rotating.dtx
+%% Copyright 1995--1999 Sebastian Rahtz and Leonor Barroca
+%% Copyright 2001-2003,2007,2008 Robin Fairbairns
+%% Mail contact: rf10@cam.ac.uk
\NeedsTeXFormat{LaTeX2e}
-\newif\if@rot@twoside
-\DeclareOption{clockwise}{% this is for compatibility
+\ProvidesPackage{rotating}%
+ [2008/05/16 v2.15
+ rotated objects in LaTeX%
+ ]% $Id: rotating.dtx,v 1.12 2008/05/16 22:49:45 rf10 Exp rf10 $
+\DeclareOption{clockwise}{%
\AtBeginDocument{\setkeys{Grot}{units=360}}%
}
\DeclareOption{counterclockwise}{%
\AtBeginDocument{\setkeys{Grot}{units=-360}}%
}
+\DeclareOption{anticlockwise}{\ds@counterclockwise}
\DeclareOption{figuresleft}{%
\@rot@twosidefalse
\def\rot@LR{0}%
@@ -30,20 +35,36 @@
\@rot@twosidefalse
\def\rot@LR{-1}%
}
-\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{graphics}}
-\ExecuteOptions{clockwise}
+\newif\ifrot@messages
+\DeclareOption{quiet}{%
+ \rot@messagesfalse
+ \let\rot@message\@gobble % pro tem -- should suppress altogether
+}
+\DeclareOption{log}{%
+ \rot@messagestrue
+ \def\rot@message{\PackageInfo{rotating}}%
+}
+\DeclareOption{chatter}{%
+ \rot@messagestrue
+ \def\rot@message{\PackageWarning{rotating}}%
+}
+\newif\if@rot@twoside
\if@twoside
\@rot@twosidetrue
\else
\@rot@twosidefalse
\fi
\def\rot@LR{-1}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{graphicx}}
+\ExecuteOptions{clockwise,quiet}
\ProcessOptions
\RequirePackage{graphicx}
\RequirePackage{ifthen}
\def\rotdriver#1{\makeatletter\input{#1.def}\makeatother}
\newcounter{r@tfl@t}
\setcounter{r@tfl@t}{0}
+\newskip\rotFPtop \rotFPtop=\@fptop
+\newskip\rotFPbot \rotFPbot=\@fpbot
\def\sideways{%
\Grot@setangle{90}%
\setbox\z@\hbox\bgroup\ignorespaces}
@@ -92,31 +113,43 @@
}
\def\end@rotfloat{%
\end{minipage}\end{lrbox}%
- \global\addtocounter{r@tfl@t}{1}%
+ \stepcounter{r@tfl@t}%
\rot@label{RF\ther@tfl@t}%
- \message{Adding sideways figure on }%
- \def\R@@page{\pageref{RF\ther@tfl@t}}%
+ \rot@pageref{RF\ther@tfl@t}{\R@@page}%
+ \rot@mess@toks{Adding sideways \@captype\space on page \R@@page\space}
\wd\rot@float@box\z@
\ht\rot@float@box\z@
\dp\rot@float@box\z@
\vbox to \textheight{%
\setkeys{Grot}{units=360}%
\if@rot@twoside
- \def\R@@page{\pageref{RF\ther@tfl@t}}%
\else
\let\R@@page\rot@LR
\fi
\ifthenelse{\isodd{\R@@page}}{%
- \message{right hand page}%
- \vfill
- \centerline{\rotatebox{90}{\box\rot@float@box}}%
- }{%
- \message{left hand page}%
- \centerline{\rotatebox{-90}{\box\rot@float@box}}%
- \vfill
- }%
- }%
- \end@float
+ \if@rot@twoside
+ \rot@mess@toks\expandafter{\the\rot@mess@toks right hand page}%
+ \fi
+ \vfill
+ \@@line{%
+ \hskip\rotFPtop
+ \rotatebox{90}{\box\rot@float@box}%
+ \hskip\rotFPbot
+ }%
+ }{%
+ \if@rot@twoside
+ \rot@mess@toks\expandafter{\the\rot@mess@toks left hand page}%
+ \fi
+ \@@line{%
+ \hskip\rotFPbot
+ \rotatebox{-90}{\box\rot@float@box}%
+ \hskip\rotFPtop
+ }%
+ \vfill
+ }%
+ \rot@message{\the\rot@mess@toks}
+ }%
+ \end@float
}
\def\sidewaysfigure{\@rotfloat{figure}}
\let\endsidewaysfigure\end@rotfloat
@@ -132,36 +165,51 @@
\begin{lrbox}\rot@float@box
\begin{minipage}\textheight
}
-\def\end@rotdblfloat{%
- \end{minipage}\end{lrbox}%
- \global\addtocounter{r@tfl@t}{1}%
- \rot@label{RF\ther@tfl@t}%
- \message{Adding sideways figure on }%
- \def\R@@page{\pageref{RF\ther@tfl@t}}%
- \@tempdima\ht\rot@float@box
- \advance\@tempdima by \dp\rot@float@box
-\typeout{BOX wd: \the\wd\rot@float@box, ht: \the\ht\rot@float@box, dp: \the\dp\rot@float@box: so shift by .5 of \the\@tempdima}%
- \wd\rot@float@box\z@
- \ht\rot@float@box\z@
- \dp\rot@float@box\z@
- \vbox to \textheight{%
+\def\@rotdblfloat{%
+ \end{minipage}\end{lrbox}%
+ \stepcounter{r@tfl@t}%
+ \rot@label{RF\ther@tfl@t}%
+ \rot@pageref{RF\ther@tfl@t}{\R@@page}%
+ \rot@mess@toks{Adding sideways \@captype\space on page \R@@page\space}
+ \@tempdima\ht\rot@float@box
+ \advance\@tempdima by \dp\rot@float@box
+ \wd\rot@float@box\z@
+ \ht\rot@float@box\z@
+ \dp\rot@float@box\z@
+ \vbox to \textheight{%
\setkeys{Grot}{units=360}%
\if@rot@twoside
- \def\R@@page{\pageref{RF\ther@tfl@t}}%
\else
\let\R@@page\rot@LR
\fi
\ifthenelse{\isodd{\R@@page}}{%
- \message{right hand page}%
- \vfill
- \hbox to\textwidth{\hfill\rotatebox{90}{\box\rot@float@box}\hfill}%
- }{%
- \message{left hand page}%
- \hbox to \textwidth{\hfill\rotatebox{-90}{\box\rot@float@box}\hfill}%
- \vfill
- }%
- }%
- \end@dblfloat
+ \ifrot@messages
+ \if@rot@twoside
+ \rot@mess@toks\expandafter{\the\rot@mess@toks right hand page}%
+\fi
+ \fi
+ \vfill
+ \@@line{%
+ \hskip\rotFPtop
+ \rotatebox{90}{\box\rot@float@box}%
+ \hskip\rotFPbot
+ }%
+ }{%
+ \ifrot@messages
+ \if@rot@twoside
+ \rot@mess@toks\expandafter{\the\rot@mess@toks left hand page}%
+\fi
+ \fi%
+ \@@line{%
+ \hskip\rotFPbot
+ \rotatebox{-90}{\box\rot@float@box}%
+ \hskip\rotFPtop
+ }%
+ \vfill
+ }%
+ \rot@message{\the\rot@mess@toks}%
+ }%
+ \end@dblfloat
}
\newenvironment{sidewaystable*}
{\@rotdblfloat{table}}
@@ -170,21 +218,32 @@
{\@rotdblfloat{figure}}
{\end@rotdblfloat}
-\long\def \r@protected@write#1#2#3{%
- \begingroup
- \let\therpage\relax
- #2%
- \let\protect\@unexpandable@protect
- \edef\reserved@a{\write#1{#3}}%
- \reserved@a
- \endgroup
- \if@nobreak\ifvmode\nobreak\fi\fi
-}
-\def\therpage{\arabic{page}}
+\def\rot@thepage{\@arabic\c@page}
\def\rot@label#1{\@bsphack
- \r@protected@write\@auxout{}%
- {\string\newlabel{#1}{{\@currentlabel}{\therpage}}}%
+ \rot@protected@write{\@auxout}{}%
+ {\string\newlabel{#1}{\rot@thepage}}%
\@esphack}
+\def\rot@pageref#1#2{%
+ \expandafter\ifx\csname r@#1\endcsname\relax
+ \global\@rot@refundefinedtrue
+ \def#2{0}%
+ \else
+ \edef#2{\csname r@#1\endcsname}%
+ \fi
+}
+\long\def\rot@protected@write#1#2#3{%
+ \begingroup
+ \let\rot@thepage\relax
+ #2%
+ \let\protect\@unexpandable@protect
+ \edef\reserved@a{\write#1{#3}}%
+ \reserved@a
+ \endgroup
+ \if@nobreak\ifvmode\nobreak\fi\fi
+}
+\newif\if@rot@refundefined
+\global\@rot@refundefinedfalse
+\newtoks\rot@mess@toks
\def\rotcaption{\refstepcounter\@captype\@dblarg{\@rotcaption\@captype}}
\long\def\@rotcaption#1[#2]#3{%
\addcontentsline{\csname ext@#1\endcsname}{#1}{%
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index b54456efc0e..565e43b2cda 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -158,7 +158,7 @@ my @WorkingTLP = qw(
qcm qstest quotmark qtree
r_und_s randbild rccol rcs rcsinfo recipecard
refstyle regcount register resume robustcommand
- robustindex rsc rtkinenc rtklage
+ robustindex rotating rsc rtkinenc rtklage
sagetex sauerj sauterfonts savefnmark savesym savetrees scale
scalebar schedule scientificpaper sciposter screenplay script
sdrt sectionbox sectsty semantic semaphor seminar semioneside