我尝试使用 spinning.sty 创建新的侧向浮动,但标题有问题,endfloat sidewaysphoto 也不起作用,请帮助我
\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
endfloat 手册中解释了如何添加新的浮点数和环境。
\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}