Skip to content

LaTeX newfloat package with rotating or wrapfig (again)

This document does not compile anymore:

\documentclass{article}

\usepackage{rotating}
\usepackage{wrapfig}

\usepackage{newfloat}
\DeclareFloatingEnvironment{test}

\begin{document}

\begin{sidewaystest}
\caption{Test}
Some text.
\end{sidewaystest}

\end{document}

But this one does:

\documentclass{article}

\usepackage{newfloat}
\DeclareFloatingEnvironment{test}

\usepackage{rotating}
\usepackage{wrapfig}

\begin{document}

\begin{sidewaystest}
\caption{Test}
Some text.
\end{sidewaystest}

\end{document}

But both ones should compile.

Furthermore this one should give a warning only:

\documentclass{article}

\usepackage{newfloat}
\DeclareFloatingEnvironment{test}

\usepackage{rotating}
\usepackage{wrapfig}

% Currently this results in an error but I think a warning would be more appropriate:
\newcommand\wraptest{whatever}

\begin{document}

\begin{sidewaystest}
\caption{Test}
Some text.
\end{sidewaystest}

\end{document}
Edited by Axel Sommerfeldt