Typically a figure is placed at the end or beginning of a section. How can I place a figure after I refer to it in a paragraph and after the current line?
1 Answer
The [ht]
option of figure
should be sufficient for this. And, of course, avoid paragraph breaks (blank lines) before and after the figure
environment, if you want the figure to appear mid-paragraph.
\documentclass[10pt]{article}
\usepackage[nopar]{lipsum}
\begin{document}
\lipsum[1]
Here is before my figure.
\begin{figure}[ht]
\centering
\framebox(100,100){Test}
\caption{blah blah}
\end{figure}
Here is after my figure.
\lipsum[1]
\end{document}