3

I have defined a custom floating environment scheme with the rotfloat package, which also defines the corresponding sidewaysscheme* environment. However, when I use this environment in a two-column document class, the resulting float is not horizontally centred, as the following MWE demonstrates:

\documentclass[twocolumn]{article}
\usepackage{rotfloat}
\newfloat{scheme}{tbp}{lop}

\begin{document}
\begin{sidewaysscheme*}
    Test
    \caption{Test}
\end{sidewaysscheme*}
\end{document}

Non-centred sidewaysscheme*

The text and caption are clearly to the right of the correctly centred page number. Changing sidewaysscheme* into sidewaysfigure* does yield a well-centred floating environment. Since the latter is defined by rotating by default, I suspect that somehow rotfloat defines the custom float slightly differently, but I don't know why/how.

I would very much like to know why custom-defined floats don't centre horizontally and how to fix this.

1
  • Rotfloat isn't the only or best package you can use. Rotating or even \rotatebox from graphicx and a minipage will work. Jun 2, 2017 at 13:54

1 Answer 1

1

I still don't know why rotfloat defines the new sidewaysscheme* to behave differently than sidewaysfigure*, but redefining the former to behave like the latter seems to have the desired effect:

\makeatletter
\renewenvironment{sidewaysscheme*}{\@rotdblfloat{scheme}}{\end@rotdblfloat}
\makeatother

You must log in to answer this question.

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