I want to flush my float (after an obviously necessary pre-pagebreak, since otherwise the float would be printed there anyway) and continue the text right below this flushed float with no additional page break after the float. My question is, if I have done this correctly.
The problem:
\documentclass{article}
\usepackage{lipsum}
\usepackage{graphicx}
\begin{document}
\lipsum[1-3]
\begin{figure}[h]
\includegraphics[width=\textwidth]{example-image-a}
\caption{I am a figure}
\end{figure}
\lipsum[2]
\end{document}
I was curious, if there exists something like \flush:
\documentclass{article}
\usepackage{lipsum}
\usepackage{graphicx}
\begin{document}
\lipsum[1-3]
\begin{figure}[h]
\includegraphics[width=\textwidth]{example-image-a}
\caption{I am a figure}
\end{figure}
\flush %error
\lipsum[2]
\end{document}
My current solution:
\documentclass{article}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{float} %does this only affect the single figure with 'H'?
\begin{document}
\lipsum[1-3]
\begin{figure}[H] %is this the right way?
\includegraphics[width=\textwidth]{example-image-a}
\caption{I am a figure}
\end{figure}
%\clearpage %this is wrong
\lipsum[2]
\end{document}
\lipsum[2]appears twice (first time part of1-3. I presume you mean the 2nd instance? – Steven B. Segletes Apr 17 '19 at 15:14\lipsum[2]...just not on page 1. There is no room on page 1 for anHnon-"float" of this size. – Steven B. Segletes Apr 17 '19 at 15:15[h]and changes it to[ht]) – David Carlisle Apr 17 '19 at 16:10[ht]also results in\lipsum[2]being print on the first page, which I do not want (call in mind, that this is a MWE.\lipsum[2]actually is a new section) – user1 Apr 17 '19 at 16:18flafterpackage than rely on latex's error recovery if you don't want floats to float to the top of the current page. – David Carlisle Apr 17 '19 at 16:26flafter? Can't find one on CTAN – user1 Apr 17 '19 at 16:38flafteraffects all floats but not a specific one – user1 Apr 17 '19 at 16:40!and includetor just[!h]which is converted to[!ht]at the next page, then you can use\newpageand all floats should be output as there are no constraints stopping them being output as top floats. – David Carlisle Apr 17 '19 at 17:55