1

I try to create new sideways float using rotating.sty but caption have problem also endfloat sidewaysphoto not working please help me

\documentclass[twocolumn]{article}
\usepackage[demo]{graphicx}
\usepackage{float}
\usepackage{endfloat}
\usepackage{rotating}

\newcommand{\lipsum}{Lorem ipsum dolor sit amet, consectetur adipiscing elit. In malesuada consequat mollis. Duis viverra vestibulum quam id vehicula. Donec vel tellus a orci adipiscing euismod. Suspendisse lacinia metus lorem. Vivamus pellentesque, lacus quis blandit tincidunt, elit nunc ullamcorper enim, ut laoreet metus risus sed neque. Sed ac nibh ante, pellentesque vehicula sem. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi vel libero leo. Donec aliquam placerat arcu, et ultrices leo semper et. Curabitur dignissim, eros vitae dignissim porta, velit arcu vehicula tortor, vel blandit sapien magna in risus.}%

\newfloat{photo}{htbp}{lop}
\floatname{photo}{Photo}
\DeclareDelayedFloat{photo}{Photo}

\newfloat{sidewaysphoto}{htbp}{lop}
\floatname{sidewaysphoto}{sidewaysphoto}

\DeclareDelayedFloat{sidewaysphoto}{sidewaysphoto}

\makeatletter
\def\sidewaysphoto{\@rotfloat{photo}}
\let\endsidewaysphoto\end@rotfloat

\newenvironment{sidewaysphoto*}
               {\@rotdblfloat{photo}}
               {\end@rotdblfloat}

\makeatother

\begin{document}
\lipsum
\begin{sidewaysphoto}
    \centering
    \includegraphics{myPhoto}
    \caption{xxxxxxxMy Photo 1}
\end{sidewaysphoto}

\begin{photo}
    \centering
    \includegraphics{myPhoto}
    \caption{My Photo 1}
\end{photo}

\begin{photo}
    \centering
    \includegraphics{myPhoto}
    \caption{My Photo 1}
\end{photo}

\end{document}       
1

Adding new floats and environments is explained in the endfloat manual.

\documentclass[twocolumn]{article}
\usepackage[demo]{graphicx}

\let\normalcaption=\caption
\usepackage{float}
\let\caption=\normalcaption

\usepackage{rotating}
\usepackage{endfloat}
\newcommand{\lipsum}{Lorem ipsum dolor sit amet, consectetur adipiscing elit. In malesuada consequat mollis. Duis viverra vestibulum quam id vehicula. Donec vel tellus a orci adipiscing euismod. Suspendisse lacinia metus lorem. Vivamus pellentesque, lacus quis blandit tincidunt, elit nunc ullamcorper enim, ut laoreet metus risus sed neque. Sed ac nibh ante, pellentesque vehicula sem. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi vel libero leo. Donec aliquam placerat arcu, et ultrices leo semper et. Curabitur dignissim, eros vitae dignissim porta, velit arcu vehicula tortor, vel blandit sapien magna in risus.}%


\newfloat{map}{tbp}{lomap}
\floatname{map}{Map}
%\DeclareDelayedFloat{map}{Maps}

\newfloat{photo}{htbp}{lop}
\floatname{photo}{Photo}
%\DeclareDelayedFloat{photo}{Photo}
\newfloat{scheme}{htbp}{scheme}
\floatname{scheme}{scheme}


\makeatletter
\def\sidewaysphoto{\@rotfloat{photo}}
\let\endsidewaysphoto\end@rotfloat

\newenvironment{sidewaysphoto*}
               {\@rotdblfloat{photo}}
               {\end@rotdblfloat}

\makeatother

\DeclareDelayedFloat{map}[mmm]{Maps}
\DeclareDelayedFloat{photo}[ppp]{Photos}
\DeclareDelayedFloatFlavor{sidewaysphoto}{photo}

\begin{document}
\lipsum
\begin{sidewaysphoto}
    \centering
    \includegraphics{myPhoto}
    \caption{xxxxxxxMy Photo 1}
\end{sidewaysphoto}

\lipsum
\begin{photo}
    \centering
    \includegraphics{myPhoto}
    \caption{My Photo 2}
\end{photo}
\lipsum
\begin{figure}
    \centering
    \includegraphics{myFigure}
    \caption{My Figure}
\end{figure}
\lipsum
\begin{map}
    \centering
    \includegraphics{myMap}
    \caption{My Map}
\end{map}
\lipsum
\end{document} 
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.