# Set up sidewaysfigure to have the bottom of the figure toward the spine

I am typesetting a book. There are a couple figures that are wider than they are tall, and appear too small if placed on a page in the usual fashion. I have found that using the sidewaysfigure environment from the rotating package, I can put these figures in landscape orientation taking up entire pages. This is satisfactory except for one issue: in the compiled pdf, the figures are oriented with the bottom away from the spine; I want the bottom toward the spine. If I use the package option figuresright or figuresleft, I can make the figure orientation independent of the page number, but this is not what I want. The clockwise and counterclockwise options do not appear to change anything (which makes sense, since the documentation states that these options are for one-sided documents, but I had hoped).

In using the sidewaysfigure environment from the rotating package in a two-sided document, how do I orient the figures with the bottom toward the spine?

-

Strange that there seems to be no such package option ... so I took the definition of \end@rotfloat and partially swapped the code for left and right hand pages. (And \let \endsidewaysfigure and \endsidewaystable to the new definition of \end@rotfloat.)

\documentclass{book}

\usepackage{rotating}

\makeatletter
\def\end@rotfloat{%
\end{minipage}\end{lrbox}%
\stepcounter{r@tfl@t}%
\rot@label{RF\ther@tfl@t}%
\rot@pageref{RF\ther@tfl@t}{\R@@page}%
\edef\@tempa{Adding sideways \@captype\space on page \R@@page\space}
\rot@mess@toks\expandafter{\@tempa}
\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
\else
\let\R@@page\rot@LR
\fi
\ifthenelse{\isodd{\R@@page}}{%
\if@rot@twoside
\rot@mess@toks\expandafter{\the\rot@mess@toks (right hand page)}%
\fi
% BEGIN OF ORIGINAL LEFT HAND PAGE
\@@line{%
\hskip\rotFPbot
\rotatebox{-90}{\box\rot@float@box}%
\hskip\rotFPtop
}%
\vfill
% END OF ORIGINAL LEFT HAND PAGE
}{%
\if@rot@twoside
\rot@mess@toks\expandafter{\the\rot@mess@toks (left hand page)}%
\fi
% BEGIN OF ORIGINAL RIGHT HAND PAGE
\vfill
\@@line{%
\hskip\rotFPtop
\rotatebox{90}{\box\rot@float@box}%
\hskip\rotFPbot
}%
% END OF ORIGINAL RIGHT HAND PAGE
}%
\rot@message{\the\rot@mess@toks}
}%
\end@float
}
\let\endsidewaysfigure\end@rotfloat
\let\endsidewaystable\end@rotfloat
\makeatother

\begin{document}

\begin{sidewaysfigure}
\centering
\rule{15cm}{1cm}
\caption{First figure}
\end{sidewaysfigure}

\begin{sidewaysfigure}
\centering
\rule{15cm}{1cm}
\caption{Second figure}
\end{sidewaysfigure}

\end{document}

-
There is not a package option because rotated tables should have the top towards the spine. –  egreg Jul 20 '11 at 21:01
@egreg: Yet there are the package options figuresleft and figuresright. –  lockstep Jul 20 '11 at 21:04
What happens in "one-sided" documents has no bearing with typography and this explains the counterclockwise option. :) I suppose that figuresleft and figuresright are thought for documents that have many rotated figures or tables, in particular if they are on a spread. Anyway, nice answer! –  egreg Jul 20 '11 at 21:15
Thanks!________ –  Charles Staats Jul 21 '11 at 1:18
One reference is my A Few Notes on Book Design : try texdoc memdesign to view it. The relevant section is 4.2.2 Mixed portrait and landscape pages. In double sided documents on verso (even) pages the top should be towards the fore edge and on recto (odd) ages the top should be towards the spine. The basic idea is that the reader should always have to turn the book in a consistent direction to read any landscape pages --- to the right is the commonly accepted direction. –  Peter Wilson Jul 26 '12 at 18:38