# figure* environment skips page after figure on first page

I am using the figure* environment for twocolumn images in a twocolumn text document. When placing a onecolumn figure at the end of page one, i want the twocolumn figure (light blue) at the top of page two. But instead it gets to the next page.

I am using the following code:

\documentclass[twocolumn,11pt]{article}
\usepackage{graphicx}
\usepackage{lipsum}

\begin{document}

\lipsum[1-4]
Cu affert noster perfecto sit, ex eirmod perfecto senserit nam, est quem
ipsum ei. Qui minim dolor dicam ad, ea dicant nostrud eleifend has, pro
ad commodo detracto suscipit. Cu affert noster perfecto sit, ex eirmod
perfecto.

\begin{figure}[hb!]
\includegraphics[width=\columnwidth]{example-image}
\caption{random text small caption random text}
\end{figure}

\begin{figure*}[ht!]
\includegraphics[width=\textwidth]{example-image}
\caption{random text small caption random text}
\end{figure*}

\lipsum[1-4]

\end{document}


How do i prevent this?

• \begin*{figure} will start the undefined environment * and then typeset the word figure is that really what you have in your source? – David Carlisle Jul 17 '18 at 14:18
• assuming you have figure* then you should just need to move the figures earlier in the source, but without an example hard to give more specific advice. – David Carlisle Jul 17 '18 at 14:21
• I was in a little rush and made a mistake, the question should now be improved. – Leo Cahron Jul 17 '18 at 14:23
• I tried moving the figures earlier but then the onecolumn figure gets pushed under the towcolumn figure instead of being on the first page. I am trying to create an example, but the issue does not occure using random text packages, so the example code would be full of random text. – Leo Cahron Jul 17 '18 at 14:26
• Try \lipsum[1-2], then the two figures, then \lipsum[3-4]. Anyway, your code, as it stood, did not compile, because it uses two PDF files we don’t have. – GuM Jul 17 '18 at 14:46

As noted in comments you just need to move the figures earlier in the source.

\documentclass[twocolumn,11pt]{article}
\usepackage{graphicx}
\usepackage{lipsum}

\begin{document}

\lipsum[1-4]

\begin{figure}[!b]
\includegraphics[width=\columnwidth]{example-image}
\caption{random text small caption random text}
\end{figure}

\begin{figure*}[!t]
\includegraphics[width=\textwidth]{example-image}
\caption{random text small caption random text}
\end{figure*}

Cu affert noster perfecto sit, ex eirmod perfecto senserit nam, est quem
ipsum ei. Qui minim dolor dicam ad, ea dicant nostrud eleifend has, pro
ad commodo detracto suscipit. Cu affert noster perfecto sit, ex eirmod
perfecto.

\lipsum[1-4]

\end{document}

• Somehow the problem was the placement of the two environments (like you suggested and i tried before) in combination with the [!ht/b] marker. Removing the h to form [!t/b] solved everything – Leo Cahron Jul 17 '18 at 15:06
• @LeoCahron h does nothing for a double column figure. In general you should always have p (or it is very likely the float goes to the end but here you wanted to force b and t respectively so..... – David Carlisle Jul 17 '18 at 15:23

EDIT: My original answer was only a solution for figure not for figure*. My apologies for not realizing the differences between these two.

A previous question had similar problems and the solution provided was to either put the figure* earlier or later in the document to get the desired effect, or to load the fixltx2e package to fix this.

You can give options to the figure environment to tell LaTeX where you would like a figure float to go. You can even overwrite LaTeX parameters that are use for determining a "good" float position.

In your specific case you can do this to get the figure at the top of the page:

\begin{figure}[!t]
...
\end{figure}


t = Position at the top of the page.

! = Override internal parameters LaTeX uses for determining "good" float positions.

Full detail about the placement options is here.

• I do not think this answers the question (which is about the double column figure*) – David Carlisle Jul 17 '18 at 14:20
• You are correct. I have edited my answer to hopefully better answer the question. – Flexo013 Jul 17 '18 at 14:31
• I am sorry for your confusion. But changing the position of figure* does not help. I am currently using pdflatex so i'm not sure why to use fixltx2e. – Leo Cahron Jul 17 '18 at 14:45
• fixltx2e does nothing at all in recent releases, and would not affect the positioning of the double column float in this case even in old releases. – David Carlisle Jul 17 '18 at 14:56