0

I have a two column layout on this document and I want my image to spread across the two columns, so I've done {figure*} but when I compile my document this image is inputted on to a completely separate page. I want it to be at the top of the page with its caption underneath it and then the main body text continuing on underneath the caption. I've tried [h!] and other commands but nothing is working. Any suggestions? Thank you for your help.

Alana
  • 1

1 Answers1

0

Try to use stfloats package:

\documentclass[twocolumn]{article}
\usepackage{lipsum}
\usepackage{graphicx}
 \usepackage{stfloats}

\begin{document} \begin{figure}[t] \includegraphics[width=\linewidth]{example-image-duck} \caption{May caption} \end{figure}

\lipsum[1-4] \end{document}

enter image description here

Is this what you looking for?

Zarko
  • 296,517
  • It is what i'm looking for but when i input it into my document it still doesn't work. I get error messages to say don't use the stfloats package and that my document can't have two classes. It also messes up all of my other images in my document. Any other ideas? Sorry, I'm really new to latex! – Alana Nov 26 '22 at 22:13
  • 1
    @Alana, that is why we usually ask for MWE (Minimal Working Example). We haven't any information about your document nor know, how you include proposed solution in your document. Please show us a small but complete document which reproduce your errors and contain my solution. – Zarko Nov 26 '22 at 22:32