我想阻止figure*
转到下一页,并显示在该部分的顶部。下面是代码,我还提供了一个overleaf 仅供查看链接。
这过去的问题也是相关的,但是\twocolumn[{%
稍后使用建议的中断用法(它会强制分页,因此您需要返回到图*后验)。
我也尝试摆弄 \FloatBarrier,但没有成功。
有什么建议吗?非常感谢。
\documentclass[10pt,twocolumn,letterpaper]{article}
\usepackage[review]{cvpr} % To produce the REVIEW version
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{lipsum}
\newcommand{\loremshort}[1]{{\lipsum[1][0-#1]}}
% FROM: https://aty.sdsu.edu/bibliog/latex/floats.html
% OUTCOME: does not work...
% \input{attempt1.tex}
\def\cvprPaperID{*****} % *** Enter the CVPR Paper ID here
\def\confName{CVPR}
\def\confYear{2023}
\begin{document}
\clearpage
\begin{figure*}[tb!]
\begin{center}
\includegraphics[width=.49\linewidth]{example-image-golden}
\hfill
\includegraphics[width=.49\linewidth]{example-image-golden}
\caption{Why does this figure not want to stay on page 1?}
\end{center}
\end{figure*}
\section{Section}
\loremshort{10}
\end{document}
即使我补充说attempt1.tex
,根据此处讨论的技巧:
% Alter some LaTeX defaults for better treatment of figures:
% See p.105 of "TeX Unbound" for suggested values.
% See pp. 199-200 of Lamport's "LaTeX" book for details.
% General parameters, for ALL pages:
\renewcommand{\topfraction}{0.9} % max fraction of floats at top
\renewcommand{\bottomfraction}{0.8} % max fraction of floats at bottom
% Parameters for TEXT pages (not float pages):
\setcounter{topnumber}{2}
\setcounter{bottomnumber}{2}
\setcounter{totalnumber}{4} % 2 may work better
\setcounter{dbltopnumber}{2} % for 2-column pages
\renewcommand{\dbltopfraction}{0.9} % fit big float above 2-col. text
\renewcommand{\textfraction}{0.07} % allow minimal text w. figs
% Parameters for FLOAT pages (not text pages):
\renewcommand{\floatpagefraction}{0.7} % require fuller float pages
% N.B.: floatpagefraction MUST be less than topfraction !!
\renewcommand{\dblfloatpagefraction}{0.7} % require fuller float pages
大卫的诡计
双列技巧并不令人满意:
\documentclass[10pt,twocolumn,letterpaper]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{lipsum}
\newcommand{\loremshort}[1]{{\lipsum[1][0-#1]}}
\usepackage{blindtext}
\newcommand{\lorem}[1]{{\blindtext[#1]}}
\begin{document}
\section{Introduction}
\lorem{2}
\twocolumn[{
% \begin{figure*}[H]
\begin{center}
\includegraphics[width=.49\linewidth]{example-image-golden}
\hfill
\includegraphics[width=.49\linewidth]{example-image-golden}
\captionof{figure}{Why does this figure not want to stay on page 1?}
\end{center}
% \end{figure*}
}]
\section{Method}
\loremshort{10}
\end{document}
因为它会产生一个硬分页符无论何时使用(类似于 clearpage)。
答案1
两列浮动元素最早会出现在下一页,因为这里没有下一页,所以浮动元素根本无法定位,直到它被隐式的刷新出来\clearpage
。\end{document}
必然\clearpage
将所有浮动元素视为浮动页面上允许的,因为它必须确保它们全部输出。
\documentclass[10pt,twocolumn,letterpaper]{article}
%\usepackage[review]{cvpr} % To produce the REVIEW version
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{capt-of}
\usepackage{lipsum}
\newcommand{\loremshort}[1]{{\lipsum[1][0-#1]}}
% FROM: https://aty.sdsu.edu/bibliog/latex/floats.html
% OUTCOME: does not work...
% \input{attempt1.tex}
\def\cvprPaperID{*****} % *** Enter the CVPR Paper ID here
\def\confName{CVPR}
\def\confYear{2023}
\begin{document}
\twocolumn[{
\begin{center}
\includegraphics[width=.49\linewidth]{example-image-golden}
\hfill
\includegraphics[width=.49\linewidth]{example-image-golden}
\captionof{figure}{Why does this figure not want to stay on page 1?}
\end{center}
}]
\section{Section}
\loremshort{10}
\end{document}