# Floating figure to column height

I am often fitting with the problem of floats pushed to their own page, recurring in different context. Floats moved to own page has never been an optimal layout, if it was possible to forbid it permanently, I would like to know how.

In this particular case I want to have a floating figure taking the full column. The MWE is as follows

\documentclass[twocolumn]{article}
\usepackage{blindtext}
\usepackage{graphicx}

%FIGURES PLACEMENT
\renewcommand{\floatpagefraction}{1}
\renewcommand{\topfraction}{1}
\renewcommand{\bottomfraction}{1}
\renewcommand{\dbltopfraction}{1}
\renewcommand{\textfraction}{0} % allow minimal text w. figs
%   Parameters for FLOAT pages (not text pages):
\renewcommand{\floatpagefraction}{0.999}    % require fuller float pages % N.B.: floatpagefraction MUST be less than topfraction !!
\renewcommand{\dblfloatpagefraction}{0.999} % require fuller float pages

\begin{document}
\Blindtext
%
\begin{figure}[t]
\begin{minipage}[t][0.97\textheight][t]{\linewidth}%
\resizebox{\linewidth}{!}{%
\fbox{%
\begin{minipage}[t][\textheight][t]{\linewidth}%
Figure
\end{minipage}%
}%
}%
\end{minipage}%
\end{figure}

\end{document}


The float is flushed to its own page despite I seemingly set different control parameters to prevent this. I want it to take one column side by side with text, floating.

The float is meant to actually contain several related figures or algorithms with their captions, which I want to present as one panel. This part I know how to do.

The problem is that it gets flushed to a page of floats. To make it the designated top floating placement I have to tweak the height down but not too much to have a visual misalignment or hanging lines of text appearing under the figure. This is appears to be tricky and messes up when there are other small figures around. It gets flushed to an own page every now and then.

The big question is, why not just use a [p] float? A [t] float will not move any preceding text to the next page/column either.

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

%FIGURES PLACEMENT
\renewcommand{\floatpagefraction}{1}
\renewcommand{\topfraction}{1}
\renewcommand{\bottomfraction}{1}
\renewcommand{\dbltopfraction}{1}
\renewcommand{\textfraction}{0} % allow minimal text w. figs
%   Parameters for FLOAT pages (not text pages):
\renewcommand{\floatpagefraction}{0.999}    % require fuller float pages % N.B.: floatpagefraction MUST be less than topfraction !!
\renewcommand{\dblfloatpagefraction}{0.999} % require fuller float pages

\setlength{\textfloatsep}{0pt}

\begin{document}
\lipsum[1]

\begin{figure}[t]
\begin{minipage}[t][0.97\textheight][t]{\linewidth}%
\resizebox{\linewidth}{!}{%
\fbox{%
\begin{minipage}[t][\textheight][t]{\linewidth}%
Figure
\end{minipage}%
}%
}%
\end{minipage}%
\end{figure}

\lipsum[2-8]

\end{document}


For a demonstration, if you increase 14\baselineskip to 15\baselineskip the top float gets pushed to the next column.

\documentclass[twocolumn]{article}
\usepackage{lipsum}
\usepackage{showframe}

\begin{document}
\lipsum[1-2]
\begin{figure}[t]
\fbox{%
\begin{minipage}[t][14\baselineskip][c]{\dimexpr \linewidth-2\fboxsep-2\fboxrule}%
\centering Figure
\end{minipage}%
}%
\end{figure}

\lipsum[3-8]

\end{document}

• Did not fully get it. The second example I understood, it is good to know, but I did not mean that I would mind which column it is. The first example sets \setlength{\textfloatsep}{0pt} which looks like a fix, but will it affect only the float after it in the source code or all of them? The question about [p] I did not get, p is a page of floats, a complete page, not a column, right? Nov 19, 2019 at 16:14
• About [p]: I meant there would be more text continuing and I do not want the float to go to the very end of the document or to start a new column in the middle of the document Nov 19, 2019 at 16:19
• No, [p] only applies to a single column for figure (but not figure*). Nov 19, 2019 at 16:25
• Oh I see. Did not know [p] works this way. I was assuming that when [t] placement fails the figure gets to the page of floats the same way as if it was requested with [p]. But apparently it is not the case. The former creates ugly gaps but the later does not. This solves this problem and seems to be also how the other answer works. Thanks Nov 19, 2019 at 16:46
• [p] worked perfect for me, to get three figures in a single column. Aug 15, 2021 at 17:00
\documentclass[twocolumn]{article}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{hvfloat}
\usepackage{showframe}
\begin{document}
\lipsum[1]

\begin{figure}[p]
\includegraphics[fullpage]{example-image-a}
\end{figure}

\lipsum[2-8]

\end{document}


• This is helpful. I looked up the hvfloat manual. I think the "multifloat" or "subfloat" options would be more like what I am looking for. I'll have to experiment with them to see if it can do the job and would allow me to place a minipage with content there. Nov 19, 2019 at 16:08
\documentclass[twocolumn]{article}
\usepackage{blindtext}
\usepackage{graphicx}

%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}
\Blindtext[1]
%
\begin{figure}[tp] % selection of position specifiers are important
\fbox{%
\includegraphics[width=\linewidth,height=\textheight]{example-image-duck}
}%
\end{figure}
\Blindtext[3-5]
\end{document}


gives what you looking for:

(red lines denote page layout)

Note, figure should be inserted in text somewhere in the first column that it can be placed in the second column on the same page.