[Tex/LaTex] Put image in column

formattinggraphics

Is there a way to cover a column of a two column page with an image (all the page height, no caption)? This should leave the rest of the page as is – just move the text of the column a bit further down. I've tried wrapfig but it seems that it messes up both text columns – leaves some text in both of them.

Best Answer

Evidently the [p] option for floats will work for a single column rather than needing an entire page. The advantage of using a float is that text will flow past it.

I used tikz to do the overlay and to determine which column it is in. This works because tikz saves the origin location in the aux file. Don't forget to run it twice.

\documentclass[twocolumn]{article}
\usepackage{tikz}
\usepackage{mwe}
\usepackage{showframe} 

\newlength{\tempdima}

\begin{document}
\lipsum[1]
\begin{figure}[p]
\rule{0pt}{\textheight}% fill column with strut
\begin{tikzpicture}[remember picture, overlay]
\pgfextractx{\tempdima}{\pgfpointdiff{\pgfpointanchor{current page}{center}}{\pgfpointorigin}}%
\ifdim\tempdima>0pt \relax
  \node[below left,inner sep=0pt] at (current page.north east) 
    {\includegraphics[width={\dimexpr 0.5\paperwidth-0.5\columnsep},height=\paperheight]{example-image}};
\else
  \node[below right,inner sep=0pt] at (current page.north west) 
    {\includegraphics[width={\dimexpr 0.5\paperwidth-0.5\columnsep},height=\paperheight]{example-image}};
\fi
\end{tikzpicture}
\end{figure}
\lipsum[2-6]
\end{document}

full page with frame