Discussion:
sidewaystable faces wrong direction
(too old to reply)
cguttman
2008-03-29 03:54:03 UTC
Permalink
Hello,

I use the package "rotate" and the command sidewaystable in my thesis.

How can I place the caption underneath the figure and closest to the spine?
Currently, the table and caption faces outwards, and I prefer to have it face
inside (towards the spine).

I have tried \usepackage[twoside]{rotating}, but to no avail.

Any ideas?

Chris
vvvv
2008-03-29 05:11:41 UTC
Permalink
When you say that the table is "facing outward," are you talking about
the rotation so that the top of the sideways table is at the fore
edge?

For the various commands that rotate the layout, specify the amount of
rotation (in degrees or "left" versus "right).

The rotate package says this:

% Now the user interface for LaTeX: \rotate[type]{text} where
% ``type'' is `l' for left, `r' for right, `u' for upside-down, or
% `f' for flip. `l' is the default.

It sounds like you want an option like "outside" versus "inside" as
opposed to "left" or "right." I don't know of an "outside" option,
but you could try the chngpage.sty package and

\def\myfigurecontents{blah blah}%
\checkoddpage% from chngpage.sty
\ifcpoddpage
\rotate[r]{\myfigurecontents}
\else
\rotate[l]{\myfigurecontents}
\fi

...or vice-versa. I think Peter posted a new chngpage.sty a couple
days ago.

If you are using memoir, the code starts with

\strictpagechecktrue%
\checkoddpage%
\ifoddpage
...


Check your formatting guidelines about placing the page number and
caption (page number usually stays on the same part of the page even
if the text is rotated). To rotate the caption with the text and put
it at the "bottom" of the rotated text, you want to put the \caption
command inside the block of rotated text but below the content that
fills the table.

If you want the caption and the bottom of the normal page and you
don't want to rotate it, then put the caption command outside the
block of text that is rotated but inside the \begin{table} or
\begin{figure} block--and put the \caption{My Caption}
\label{MytblLabel} just before the \end{table} or \end{figure}
command. Once again, your publication guide might have a preference,
and I suspect that the caption should rotate with the table or figure.

I suspect that you are using a single column format, but if you are
using twocolumn, there is a package called ftnright.sty for putting
footnotes on the right--I vaguely remember having to tweak that for my
thesis.
Robin Fairbairns
2008-03-29 09:44:20 UTC
Permalink
Post by cguttman
I use the package "rotate" and the command sidewaystable in my thesis.
How can I place the caption underneath the figure and closest to the spine?
Currently, the table and caption faces outwards, and I prefer to have it face
inside (towards the spine).
I have tried \usepackage[twoside]{rotating}, but to no avail.
Any ideas?
twoside isn't a recognised option for the package.

the rotation is taken from (a) the twoside option to the document
class, and (b) the state of the clockwise/counterclockwise option to
the package. clockwise is the default.

so i guess you need \usepackage[counterclockwise]{rotating}

(i have a revision to the package that documents all this, and adds an
alias anticlockwise, which i find more natural. trouble is, the
documentation isn't finished. :-} )
--
Robin Fairbairns, Cambridge
cguttman
2008-03-29 21:09:05 UTC
Permalink
Post by Robin Fairbairns
Post by cguttman
I use the package "rotate" and the command sidewaystable in my thesis.
How can I place the caption underneath the figure and closest to the spine?
Currently, the table and caption faces outwards, and I prefer to have it face
inside (towards the spine).
I have tried \usepackage[twoside]{rotating}, but to no avail.
Any ideas?
twoside isn't a recognised option for the package.
the rotation is taken from (a) the twoside option to the document
class, and (b) the state of the clockwise/counterclockwise option to
the package. clockwise is the default.
so i guess you need \usepackage[counterclockwise]{rotating}
(i have a revision to the package that documents all this, and adds an
alias anticlockwise, which i find more natural. trouble is, the
documentation isn't finished. :-} )
Hi Robin,

where did you get the latest rotating package from?

Thanks, Chris
Robin Fairbairns
2008-03-29 21:54:11 UTC
Permalink
Post by cguttman
Post by Robin Fairbairns
Post by cguttman
I use the package "rotate" and the command sidewaystable in my thesis.
How can I place the caption underneath the figure and closest to the spine?
Currently, the table and caption faces outwards, and I prefer to have it face
inside (towards the spine).
I have tried \usepackage[twoside]{rotating}, but to no avail.
Any ideas?
twoside isn't a recognised option for the package.
the rotation is taken from (a) the twoside option to the document
class, and (b) the state of the clockwise/counterclockwise option to
the package. clockwise is the default.
so i guess you need \usepackage[counterclockwise]{rotating}
(i have a revision to the package that documents all this, and adds an
alias anticlockwise, which i find more natural. trouble is, the
documentation isn't finished. :-} )
where did you get the latest rotating package from?
i have two copies available: the comments above were checked with the
version on ctan (which predates me being maintainer, i think).
--
Robin Fairbairns, Cambridge
Jellby
2008-03-29 09:53:06 UTC
Permalink
Post by cguttman
I use the package "rotate" and the command sidewaystable in my thesis.
How can I place the caption underneath the figure and closest to the
spine? Currently, the table and caption faces outwards, and I prefer to
have it face inside (towards the spine).
I have tried \usepackage[twoside]{rotating}, but to no avail.
Ah... so it is "rotating" and not "rotate".

It seems that the rotation direction is hard-coded in the .sty file, I think
you'd need to redefine \***@rotfloat, particularly the lines:

\ifthenelse{\isodd{\R@@page}}{%
\message{right hand page}%
\vfill
\centerline{\rotatebox{90}{\box\***@float@box}}%
}{%
\message{left hand page}%
\centerline{\rotatebox{-90}{\box\***@float@box}}%
\vfill
}%

Copy the whole \***@rotfloat definition in your preamble, put \makeatletter
before it and \makeatother after it, exchange the 90 and -90, and it might
work (I haven't tested it)
--
Ignacio __ Fernández Galván
/ /\
Linux user / / \ PGP Pub Key
#289967 / / /\ \ 0x01A95F99
/ / /\ \ \
http://djelibeibi.unex.es
/________\ \ \
jellby \___________\/ yahoo.com
Robin Fairbairns
2008-03-29 11:40:54 UTC
Permalink
Post by Jellby
Post by cguttman
I use the package "rotate" and the command sidewaystable in my thesis.
How can I place the caption underneath the figure and closest to the
spine? Currently, the table and caption faces outwards, and I prefer to
have it face inside (towards the spine).
I have tried \usepackage[twoside]{rotating}, but to no avail.
Ah... so it is "rotating" and not "rotate".
It seems that the rotation direction is hard-coded in the .sty file, I think
\message{right hand page}%
\vfill
}{%
\message{left hand page}%
\vfill
}%
before it and \makeatother after it, exchange the 90 and -90, and it might
work (I haven't tested it)
why do it? given you've obviously looked at the code, what's up with
the facilities of the package? do they not work?
--
Robin Fairbairns, Cambridge
Jellby
2008-03-29 13:55:15 UTC
Permalink
Post by Robin Fairbairns
\makeatletter before it and \makeatother after it, exchange the 90 and
-90, and it might work (I haven't tested it)
why do it? given you've obviously looked at the code, what's up with
the facilities of the package? do they not work?
Well... some weeks ago I've been trying that and it seemed to me [clockwise]
or [counterclockwise] did nothing with a twoside document. Maybe it was
some mistake on my part, maybe it was some outdated package in my system...
I didn't pursue this further because at the end I decided for a oneside
document and the default rotation was OK.

If I was wrong, my apologies for the mistake (I actually wrote and sent my
message without reading your other answer).
--
Ignacio __ Fernández Galván
/ /\
Linux user / / \ PGP Pub Key
#289967 / / /\ \ 0x01A95F99
/ / /\ \ \
http://djelibeibi.unex.es
/________\ \ \
jellby \___________\/ yahoo.com
Jellby
2008-03-29 17:47:15 UTC
Permalink
Post by Jellby
Well... some weeks ago I've been trying that and it seemed to me
[clockwise] or [counterclockwise] did nothing with a twoside document.
I tried a minimal test, and indeed, it does nothing:

\documentclass{book}
\usepackage{rotating} %with or without [counterclockwise], it's the same
\listfiles
\begin{document}
\begin{sidewaystable}
Odd page
\end{sidewaystable}
\clearpage
\begin{sidewaystable}
Even page
\end{sidewaystable}
\clearpage
\end{document}

and \listfiles gives:

book.cls 2005/09/16 v1.4f Standard LaTeX document class
bk10.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
rotating.sty 1997/09/26 v2.13 Rotation package
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
graphics.sty 2006/02/20 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2005/08/28 v1.4 graphics configuration of teTeX/TeXLive
pdftex.def 2007/12/04 v0.04i Graphics/color for pdfTeX
ifthen.sty 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
--
Ignacio __ Fernández Galván
/ /\
Linux user / / \ PGP Pub Key
#289967 / / /\ \ 0x01A95F99
/ / /\ \ \
http://djelibeibi.unex.es
/________\ \ \
jellby \___________\/ yahoo.com
Robin Fairbairns
2008-03-29 21:50:42 UTC
Permalink
Post by Jellby
Post by Jellby
Well... some weeks ago I've been trying that and it seemed to me
[clockwise] or [counterclockwise] did nothing with a twoside document.
\documentclass{book}
\usepackage{rotating} %with or without [counterclockwise], it's the same
\listfiles
\begin{document}
\begin{sidewaystable}
Odd page
\end{sidewaystable}
\clearpage
\begin{sidewaystable}
Even page
\end{sidewaystable}
\clearpage
\end{document}
book.cls 2005/09/16 v1.4f Standard LaTeX document class
bk10.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
rotating.sty 1997/09/26 v2.13 Rotation package
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
graphics.sty 2006/02/20 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2005/08/28 v1.4 graphics configuration of teTeX/TeXLive
pdftex.def 2007/12/04 v0.04i Graphics/color for pdfTeX
ifthen.sty 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
using essentially the same (rotating 2.13, other packages similar
vintages to yours), the thing says "left hand page" for both figures,
first pass, but distinguishes left and right on the second pass, after
the labels have been resolved.

i really don't understand what's going wrong for you.

there's a file examples.tex in the distribution: run that (until it
stops whingeing about leabels) and it gives any number of examples of
the thing working. uses cat.eps in the distribution.

note that the results of all these things look dire in xdvi.
--
Robin Fairbairns, Cambridge
cguttman
2008-03-30 04:42:14 UTC
Permalink
Post by Robin Fairbairns
Post by Jellby
Post by Jellby
Well... some weeks ago I've been trying that and it seemed to me
[clockwise] or [counterclockwise] did nothing with a twoside document.
\documentclass{book}
\usepackage{rotating} %with or without [counterclockwise], it's the same
\listfiles
\begin{document}
\begin{sidewaystable}
Odd page
\end{sidewaystable}
\clearpage
\begin{sidewaystable}
Even page
\end{sidewaystable}
\clearpage
\end{document}
book.cls 2005/09/16 v1.4f Standard LaTeX document class
bk10.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
rotating.sty 1997/09/26 v2.13 Rotation package
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
graphics.sty 2006/02/20 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2005/08/28 v1.4 graphics configuration of teTeX/TeXLive
pdftex.def 2007/12/04 v0.04i Graphics/color for pdfTeX
ifthen.sty 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
using essentially the same (rotating 2.13, other packages similar
vintages to yours), the thing says "left hand page" for both figures,
first pass, but distinguishes left and right on the second pass, after
the labels have been resolved.
i really don't understand what's going wrong for you.
there's a file examples.tex in the distribution: run that (until it
stops whingeing about leabels) and it gives any number of examples of
the thing working. uses cat.eps in the distribution.
note that the results of all these things look dire in xdvi.
Thanks. I have run the example (several times). My interest is on Table 2 and
Table 3. In the original example and when I use ghostview, these two figures
fact the same directions. If I add the option "counterclockwise", then Table 2
faces as in original, and Table 3 faces to other direction. This is a bit
confusing. Should, for each option -- counterclockwise and clockwise, the tables
not face into opposite directions?

I am not sure what is going on. But I spent the whole day having my
sidewaytables face inside (towards spine) not outside.

For the time being, I have applied a hack by making sure that all tables are on
an even page, and then I use the option figuresright. This makes the
sidewaytables face inside. But I am still hoping for a better solution...!!

Chris
Jellby
2008-03-30 08:58:43 UTC
Permalink
Post by Robin Fairbairns
using essentially the same (rotating 2.13, other packages similar
vintages to yours), the thing says "left hand page" for both figures,
first pass, but distinguishes left and right on the second pass, after
the labels have been resolved.
i really don't understand what's going wrong for you.
I run the file with pdflatex and checked the result with acroread.

Indeed, it needs at least two runs to properly recognize the pages, I was
aware of that. The two floats are rotated in opposite directions, that's
OK. The problem is that one can reverse the direction of both floats. The
"Odd page" is rotated counterclockwise and the "Even page" is rotated
clockwise, there seems to be no working option to make it the other way
around.

[figuresleft] and [figuresright] make all floats turn the same way, but
[counterclockwise] does not seem to do anything, not even with [oneside
{book}, then two floats are rotated counterclockwise anyway.
--
Ignacio __ Fernández Galván
/ /\
Linux user / / \ PGP Pub Key
#289967 / / /\ \ 0x01A95F99
/ / /\ \ \
http://djelibeibi.unex.es
/________\ \ \
jellby \___________\/ yahoo.com
cguttman
2008-03-29 21:11:09 UTC
Permalink
Post by Jellby
Post by cguttman
I use the package "rotate" and the command sidewaystable in my thesis.
How can I place the caption underneath the figure and closest to the
spine? Currently, the table and caption faces outwards, and I prefer to
have it face inside (towards the spine).
I have tried \usepackage[twoside]{rotating}, but to no avail.
Ah... so it is "rotating" and not "rotate".
It seems that the rotation direction is hard-coded in the .sty file, I think
\message{right hand page}%
\vfill
}{%
\message{left hand page}%
\vfill
}%
before it and \makeatother after it, exchange the 90 and -90, and it might
work (I haven't tested it)
Hello Jellby,

I tried your code, and indeed it rotates the tables into the right direction.
However, it does actually place them outside the page, ie, above the page. I can
only see 10% of the table. Your idea might be a start though.

But as Robin mentioned, perhaps an updated package is the answer.

Thanks, Chris
Jellby
2008-03-30 09:03:12 UTC
Permalink
Post by cguttman
I tried your code, and indeed it rotates the tables into the right
direction. However, it does actually place them outside the page, ie,
above the page. I can only see 10% of the table. Your idea might be a
start though.
True, you have to move the \vfill too, try this:

\ifthenelse{\isodd{\R@@page}}{%
\message{right hand page}%
\centerline{\rotatebox{-90}{\box\***@float@box}}%
\vfill
}{%
\message{left hand page}%
\vfill
\centerline{\rotatebox{90}{\box\***@float@box}}%
}%

Or you can put \NOT\isodd instead of \isodd (an leave the rest as in the
original).
--
Ignacio __ Fernández Galván
/ /\
Linux user / / \ PGP Pub Key
#289967 / / /\ \ 0x01A95F99
/ / /\ \ \
http://djelibeibi.unex.es
/________\ \ \
jellby \___________\/ yahoo.com
cguttman
2008-03-30 10:54:14 UTC
Permalink
Excellent. Gracias! It works.

I agree with you. It is odd not to have the option to turn the direction of the
figures. I feel they should point inside (towards the spine) in any case.

Chris
Post by Jellby
Post by cguttman
I tried your code, and indeed it rotates the tables into the right
direction. However, it does actually place them outside the page, ie,
above the page. I can only see 10% of the table. Your idea might be a
start though.
\message{right hand page}%
\vfill
}{%
\message{left hand page}%
\vfill
}%
Or you can put \NOT\isodd instead of \isodd (an leave the rest as in the
original).
Loading...