My last page of an article is similar to the one below.
On the second column, the fig. 4 is not placed on the top and the algorithm is not placed just below the fig. 4.
How can I fix this? The figure and algorithm are not quite related so I don't want to put them in the same float.
I believe that if I add text (or many lines of text) then it will work but I want to ensure they're not centered even when there is no text or litte text.

The solution here work for figure but not the algorithm.


enter image description here


\begin{tabular}{LL}#1 & #2\end{tabular}}


    \caption{a caption}
    \label{fig:a label}

    \caption{a caption}
    \label{fig:a label}

    \caption{a caption}
    \label{fig:a label}

    \caption{a caption}
    \label{fig:a label}

\caption{Insertion-Sort køretid}\label{AlgRun}
    \Procedure{insertion-sort}{$A,n$}   \Comment \cpair{c_1}{n=0}
        \State $inversions = 0$         \Comment \cpair{c_1}{n=1}
        \State \textit{L}[0..\textit{n} - 1] be a new array.
            \State L[q] = A[q]
            \State $key = L[j]$
            \State $i = j - 1$
            \While{$ i \geq 0$ \textbf{and} $L[i] > key$}
                \State L[ i + 1] = L[ i ]
                \State $j = i - 1$
                \State $inversions = inversions + 1$
            $L[i + 1] = key$

1 Answer 1


The documentation for the IEEEtran document class discusess balancing the columns of the last page in section XIV (page 16). It suggests some workarounds.

One of them it mentions is using \enlargethispage with a negative value.

In your sample document, putting something like \enlargethispage{-0.2in} anywhere prior to \begin{algorithm} seems to have the desired effect.

balancing figures with IEEEtran

Because your actual document probably uses different figures, etc., and is different in other ways, you may have to play around with different dimensions for the command, and different placements.


You must log in to answer this question.

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