Is there a safe and sound way to let the insides of a float environment know on which column the float is placed?
Here is an examples that fails:
\documentclass[twocolumn]{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{graphicx}
\usepackage{float}
\usepackage{xparse}
\makeatletter
\NewDocumentCommand{\blindfigure}{O{}}{
\begin{figure}[#1]
\includegraphics[width=\linewidth,height=.35\linewidth]{example-image-a}
\caption{\if@firstcolumn I'm on the left\else I'm on the right\fi}
\end{figure}
}
\makeatother
\begin{document}
\blindtext
\blindfigure[H]
\blindtext
\blindfigure[H]
\blindtext
\blindfigure[H]
\end{document}
The second float is reflowed to the second column so it gets tricked:
I'd love to have a solution that works with all float targets (hHtbp!).

\captioncommand. – Apr 23 '16 at 14:57figureenvironment is processed, not when it is placed. – egreg Apr 23 '16 at 15:24figureis processed before the placement, so theoretically I have no access to placement information from the inside. One way could be hijacking the float mechanism and rewiring it intoprocess+fake placement+reprocess w/placement data+placement. That really sounds daunting, though. I was hoping for some clever trick. – Paolo Brasolin Apr 23 '16 at 15:31twocolumnalgorithm abox-shifting, i.e. the box with the figure is typeset and nothing can be changed afterwards? – Apr 23 '16 at 15:41