我正在写一篇双栏文章,我想让一个长方程式在页面底部显示为一个宽的单栏方程式。根据我在网上找到的信息,我必须使用figure*
才能做到这一点。我在同一页上还有一些普通图形,我想让它们出现在一栏中。现在的问题是,当我将figure*
那个长方程式放在页面底部时,它会导致同一页上的其他图形移到下一页。当我figure*
在代码中移动 的位置时,它会转到下一页,并再次移动该页的图形以转到下一页!看来 和figure
不能figure*
出现在同一页。
有没有什么解决办法?
这是我希望在同一页面上出现的三个图形的部分代码:
\documentclass[journal]{IEEEtran}
\usepackage{amsmath}
\usepackage{subfig}
\usepackage[demo]{graphicx} % remove 'demo' option in real document
\begin{document}
\begin{figure}[!t]
\hspace*{-0.3cm}
\centering
\subfloat[]{\includegraphics [height = 26mm] {case1_sin.pdf}}
\hfil
\vspace{-1.5mm}
\hspace*{-0.3cm}
\subfloat[]{\includegraphics [height = 26mm] {case1_mag.pdf}}
\hfil
\vspace{-1.5mm}
\hspace*{-0.3cm}
\subfloat[]{\includegraphics [height = 26mm] {case1_seq.pdf}}
\hfil
\vspace{-1.5mm}
\hspace*{-0.3cm}
\subfloat[]{\includegraphics [height = 26mm] {case1_ph.pdf}}
\vspace{3mm}
\caption{Measurements.}
\label{Case1}
\vspace{-4mm}
\end{figure}
\begin{figure}[!t]
\hspace{-4mm}
\centerline{\includegraphics [height = 30mm] {vect.pdf}}
\caption{Vector diagram.}
\label{vect}
\vspace{-3mm}
\end{figure}
\begin{figure*}[!b]
\hrulefill
\vspace{2mm}
\newcounter{mytempeqncnt}
\setcounter{mytempeqncnt}{\value{equation}}
\setcounter{equation}{7}
\begin{equation}
\begin{aligned}\label{eq8}
\Lambda=1+2+3+4+5+6
\end{aligned}
\end{equation}
\setcounter{equation}{\value{mytempeqncnt}}
\caption{}
\end{figure*}
\end{document}
答案1
这使用两个底部浮点数来显示等式。只有当您不使用底部浮点数进行其他操作并且根本不使用表格时,它才有效。您可以使用 newfloat 包创建新的浮点数类型。
\documentclass[journal]{IEEEtran}
\usepackage{amsmath}
\usepackage{subfig}
\usepackage[demo]{graphicx} % remove 'demo' option in real document
\usepackage{afterpage}
\usepackage{lipsum}% MWE only
\newcounter{mytempeqncnt}
\newsavebox{\bottomeqtbox}
\setcounter{bottomnumber}{1}% IEEE default is 2
\newcommand{\printbottomeqt}{\begin{table}[b]
\leavevmode\rlap{\usebox\bottomeqtbox}
\end{table}\begin{table}[b]% assume bottomnumber=1
\rule{0pt}{\dimexpr \ht\bottomeqtbox+\dp\bottomeqtbox}
\end{table}}
\makeatletter
\newenvironment{bottomeqt}{\begin{lrbox}{\bottomeqtbox}%
\minipage{\textwidth}}
{\endminipage\end{lrbox}\global\setbox\bottomeqtbox=\copy\bottomeqtbox
\if@firstcolumn
\printbottomeqt
\else
\afterpage{\printbottomeqt}%
\fi}
\makeatother
\begin{document}
\begin{figure}[!t]
\centering
\subfloat[]{\includegraphics [height = 26mm] {case1_sin.pdf}}\\[-1pt]
\subfloat[]{\includegraphics [height = 26mm] {case1_mag.pdf}}\\[-1pt]
\subfloat[]{\includegraphics [height = 26mm] {case1_seq.pdf}}\\[-1pt]
\subfloat[]{\includegraphics [height = 26mm] {case1_ph.pdf}}\\[-1pt]
\caption{Measurements.}
\label{Case1}
\end{figure}
\begin{figure}[!t]
\centering% has no effect on \caption
\includegraphics [height = 30mm] {vect.pdf}
\caption{Vector diagram.}
\label{vect}
\end{figure}
\begin{bottomeqt}
\hrulefill
\vspace{2mm}
\setcounter{mytempeqncnt}{\value{equation}}%
\setcounter{equation}{7}
\begin{equation}
\begin{aligned}\label{eq8}
\Lambda=1+2+3+4+5+6
\end{aligned}
\end{equation}
\setcounter{equation}{\value{mytempeqncnt}}
\end{bottomeqt}
Footnote test.\footnote{Footnote test}
\lipsum[1-6]
\end{document}
答案2
标准双列浮点数可以与单列浮点数位于同一页,但不能位于页面底部。有些包允许底部浮动,但浮动方程式有几个缺点,特别是如果您使用figure*
强制它们与图形保持顺序但不与方程式保持顺序的函数。声明一种新的浮点类型会稍微好一些,但我会使用非浮动方程式,并手动安排第二列留出空间以腾出空间:
我还删除了所有负垂直间距,这只会使图像与标题重叠。
\documentclass[journal]{IEEEtran}
\usepackage{amsmath}
\usepackage{subfig}
\usepackage[demo]{graphicx} % remove 'demo' option in real document
\begin{document}
\begin{figure}[!t]
\hspace*{-0.3cm}
\centering
\subfloat[]{\includegraphics [height = 26mm] {case1_sin.pdf}}
\hspace*{-0.3cm}
\subfloat[]{\includegraphics [height = 26mm] {case1_mag.pdf}}
\hspace*{-0.3cm}
\subfloat[]{\includegraphics [height = 26mm] {case1_seq.pdf}}
\hspace*{-0.3cm}
\subfloat[]{\includegraphics [height = 26mm] {case1_ph.pdf}}
\vspace{3mm}
\caption{Measurements.}
\label{Case1}
\end{figure}
\begin{figure}[!t]
\hspace{-4mm}
\centerline{\includegraphics [height = 30mm] {vect.pdf}}
\caption{Vector diagram.}
\label{vect}
\vspace{-3mm}
\end{figure}
\def\zz{text text text text text text text text text text text text
text text text text text text text text text text text text
text text text text text text text text text text text text
text text text text text text text text text text text text}
\zz\par \zz\par \zz\par
\bigskip
\noindent\rlap{%
\begin{minipage}{\textwidth}
\hrulefill
\vspace{2mm}
\setcounter{equation}{7}
\begin{equation}
\begin{aligned}\label{eq8}
\Lambda=1+2+3+4+5+6
\end{aligned}
\end{equation}
\end{minipage}}
\pagebreak % actually column break
\zz\par \zz\par \zz\par \zz\par \zz\par \zz
\zz\par \zz\par \zz\par \zz\par \zz\par \zz\par \zz\par
text text text text text text text text text text text text
text text text text text text text text text text text text
text text
text text text text text text text text text text
\clearpage % force short to leave space for equation
text text text text text text text text text text text text
\zz\par \zz\par \zz\par \zz\par \zz\par \zz\par \zz\par \zz\par
\zz\par \zz\par \zz\par \zz\par \zz\par \zz\par \zz\par \zz\par
\end{document}