1

I'm writing a two-column article in which I want to have a long equation appear as a wide one-column equation at the bottom of a page. According to what I found online, I have to use figure* to do that. I have also some normal figures at the same page that I want to appear in one column. Now, the problem is when I use figure* to have that long equation at the bottom of the page, it causes the other figures on the same page to go to the next page. When I move the place of the figure* in the code, it goes to the next page, and again moves the figures of that page to go to the next page! It seems that figure and figure* cannot appear at the same page.

Is there any solution to that?

This is part of the code with the three figures that I want to appear at the same page:

\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}
6
  • Please show us some actual code, starting with the \documentclass directive, that replicates the issue you’re looking to fix.
    – Mico
    Oct 11, 2020 at 3:14
  • Thanks @Mico. I copied the code.
    – Ali
    Oct 11, 2020 at 3:34
  • Thanks for posting some code. I've taken the liberty of adding a few \usepackage instructions as well as \begin{document} and \end{document} directives in order to make the code (minimally) compilable. Please check if these changes are ok.
    – Mico
    Oct 11, 2020 at 3:46
  • Yes, that's ok. I have used those packages in the original code.
    – Ali
    Oct 11, 2020 at 3:53
  • 1
    Put equation in the float is not good idea. It can happens that it will be push on the next page. See, if you can break your equation into more lines and has it in one column.
    – Zarko
    Oct 11, 2020 at 7:33

2 Answers 2

1

This uses two bottom floats to show the equation. It only works if you don't use bottom floats for anything else and don't use tables at all. You could create a new float type using the newfloat package.

\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

Standard double column floats can go on the same page as single column floats but can not go at the bottom of the page. there are packages to allow bottom float but floating equations has several disadvantages especially if you use figure* which forces them to keep in sequence with figures but not with equations. It is slightly better to declare a new float type, but I would use a non floating equation and just arrange by hand that there is space left in the second column to make room:

enter image description here

I also removed all the negative vertical spacing which just makes the images overlap the captions.

\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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .