I want to include a figure that spans the whole page of a twocolumn document. I've tried this link: How do I make a figure that spans a spread of two pages, but it results in the figure being onn the next page. I've also tried begin{figure*}[h], but the figure ends up being at the end of the document. I want the figure to be at the top of the page.
Asked
Active
Viewed 3,652 times
2
2 Answers
2
figure*-environments will always be placed at earliest on the next page. So you either need to move the code in your document. Or you can try the stfloats which will place the figure on the current page if it is defined in the first column.
\documentclass[twocolumn]{article}
\usepackage[showframe]{geometry}% http://ctan.org/pkg/geometry
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\usepackage{stfloats}
\begin{document}
\section{Start of document}
\lipsum[1-2]
\begin{figure*}
\includegraphics[width=\textwidth,height=4cm]{example-image}
\caption{This is a example.}
\end{figure*}
\lipsum[3-10]
\end{document}
Ulrike Fischer
- 327,261
1
If it is only about the picture and it should not be floatable you can also try this (it will force(!) the picture to the top by definition):
\documentclass[twocolumn]{article}
\usepackage{lipsum}
\usepackage[demo]{graphicx}
\newcommand\ImageOnTop[2][]{%
\def\toppic{\includegraphics[#1]{#2}\vspace{2em}}
\twocolumn[\toppic]
}
\begin{document}
\ImageOnTop[width=\textwidth, height=4cm]{testpic}
\lipsum[1-10]
\end{document}
Note. 1) \ImageOnTop will force a pagebreak too. 2) A caption could be easily included.
Ruben
- 13,448


\textwidthor better: over both columns of your document? – Ruben Apr 15 '16 at 08:13