我正在使用带有 dblfloatfix 包的双列环境。但我的图形移动到了下一页。如何准确地将其固定在页面的顶部或底部。此外,我正在使用 {figure*} 环境。我读到双列环境无法解决这个问题。是这样吗?我该怎么办。我需要在双列环境中写下论文。
`\documentclass[twocolumn, 11pt]{article}`
\usepackage{dblfloatfix}
\usepackage{caption, subcaption}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{fancyhdr}
\pagestyle{fancy}
\rhead{\thepage}
%\usepackage{float}
\usepackage{amsmath}
\begin{figure*}[!tbp]
\includegraphics[width=0.49\textwidth]{1000.PNG}
%\hspace{0.0005\textwidth}
\includegraphics[width=0.49\textwidth]{10.PNG}
%\\[.5\baselineskip]
\smallskip
\includegraphics[width=0.49\textwidth]{500.PNG}
%\hspace{0.0005\linewidth}
\includegraphics[width=0.49\textwidth]{0.PNG}
\caption{Figures}
\end{figure*}`
答案1
那么使用multicols
包而不是twocolumn
选项怎么样:
\documentclass{article}
\usepackage{lipsum}
\usepackage{multicol}
\usepackage{subfig}
\usepackage{graphicx}
\begin{document}
\begin{multicols}{2}
\lipsum[1-1]
\end{multicols}
\begin{figure}[h]
\centering
\subfloat[Caption of a]{\label{fig:a}\includegraphics[width=0.4\linewidth]{example-image-a}}\qquad
\subfloat[Caption of b]{\label{fig:b}\includegraphics[width=0.4\linewidth]{example-image-b}}\\
\subfloat[Caption of c]{\label{fig:c}\includegraphics[width=0.4\textwidth]{example-image-c}}\qquad%
\subfloat[Caption of a]{\label{fig:d}\includegraphics[width=0.4\textwidth]{example-image-a}}%
\caption{Caption of figure}
\label{fig:myfig}
\end{figure}
\begin{multicols}{2}
\lipsum[3-4]
\end{multicols}
\end{document}
或者使用带有包的相同示例ltxgrid
:
\documentclass{article}
\usepackage[latin]{babel}
\usepackage{subfig}
\usepackage{graphicx}
\usepackage{ltxgrid}
\usepackage{lipsum}
\columnsep1.5em
\begin{document}
\onecolumngrid
\begin{figure*}[tb]
\centering
\subfloat[Caption of a]{\label{fig:a}\includegraphics[width=0.45\linewidth]{example-image-a}}\qquad
\subfloat[Caption of b]{\label{fig:b}\includegraphics[width=0.45\linewidth]{example-image-b}}\\
\subfloat[Caption of c]{\label{fig:c}\includegraphics[width=0.45\textwidth]{example-image-c}}\qquad%
\subfloat[Caption of a]{\label{fig:d}\includegraphics[width=0.45\textwidth]{example-image-a}}%
\caption[Caption]{Caption of figure}
\label{fig:myfig}
\end{figure*}
\twocolumngrid
\lipsum[1-2]
\lipsum*[3]
\end{document}