6

I run into a problem when running sidewaysfigure in amsart. The code below illustrates

\documentclass[a4paper,reqno]{amsart}
%\documentclass{article}
\usepackage{graphicx}
\usepackage[figuresright]{rotating}

\begin{document}

\begin{sidewaysfigure}
\centering
\rule{0.75\textheight}{0.5\textheight}
\caption{dummy figure}
\end{sidewaysfigure}

\end{document}

When I compile this in amsart the black square is not allinged correctly (the top is cut off). When I compile in article the problem goes away.

I would rather stick to amsart so am wondering if anyone has encountered this issue before / knows of a fix? I've used a combination of landscape and afterpage, which doesn't cause this issue but can lead to pretty random gaps appearing in the text and some other funnies with more figures involved, so I'd rather stick to sidewaysfigure if possible.

Thanks in advance for your help. Pawel

1
  • 1
    a solution using the lscape package is offered in the ams author faq. however, it's somewhat more complicated than the answer given by @egreg, so his answer will be considered for addition to the faq suggestions. in general, if a problem is encountered using one of the ams document classes, it's not a bad idea to check the author faq. Oct 4, 2013 at 12:46

2 Answers 2

10

I solved the issue a couple of years ago for sidewaystable, but the problem is just the same for the GuIT forum Tabelle rotating e elenchi nelle celle and the solution to the incompatibility between amsart and rotating can be adapted:

\documentclass[a4paper,reqno]{amsart}
\usepackage{graphicx}
\usepackage[figuresright]{rotating}
\newenvironment{amssidewaysfigure}
  {\begin{sidewaysfigure}\vspace*{.5\textwidth}\begin{minipage}{\textheight}\centering}
  {\end{minipage}\end{sidewaysfigure}}

\begin{document}

\begin{amssidewaysfigure}
\centering
\rule{0.75\textheight}{0.5\textheight}
\caption{dummy figure}
\end{amssidewaysfigure}

\end{document}

enter image description here

If you prefer keeping the environment's name, the usual trick works:

\documentclass[a4paper,reqno]{amsart}
\usepackage{graphicx}
\usepackage[figuresright]{rotating}

\let\ORGsidewaysfigure\sidewaysfigure
\let\ORGendsidewaysfigure\endsidewaysfigure
\renewenvironment{sidewaysfigure}
  {\ORGsidewaysfigure\vspace*{.5\textwidth}\begin{minipage}{\textheight}\centering}
  {\end{minipage}\ORGendsidewaysfigure}

\begin{document}

\begin{sidewaysfigure}
\centering
\rule{0.75\textheight}{0.5\textheight}
\caption{dummy figure}
\end{sidewaysfigure}

\end{document}

Save a copy of the original commands and redefine the environment as shown.

1
  • Thank you very much - this does exactly what I was after! As a minor comment, I was also using the fullpage package, so needed to tweak the {.5\textwidth} to {.65\textwidth} but overall - it works like a charm! Thanks.
    – Pawel
    Oct 4, 2013 at 10:10
2

In articles in general, if you really need to rotate your figure, it might be advised to rotate only the figure and not the caption:

\documentclass[a4paper,reqno]{amsart}
\usepackage{graphicx}
\usepackage{rotating}

\begin{document}

\begin{figure}
  \centering
  \begin{sideways}
  \rule{0.75\textheight}{0.5\textheight}
  \end{sideways}
  \caption{dummy figure}
\end{figure}

\end{document}

As well, if you consider publishing in one of AMS journals, you should not use any "dirty tricks" that would make it work, since there are frowned upon by journal typesetters. The best thing would probably be to ask their tech support in that case.

1
  • Thanks for your help, this did the trick - except for the fact that I did want the caption orientation to match that of the figure. Thanks either way, though!
    – Pawel
    Oct 4, 2013 at 10:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .