# How can I ensure paragraph text in a figure has no side effects?

I want to include a centred image with a caption and a paragraph above it (on the same page). To achieve this, I've got roughly the following setup:

\documentclass{article}

\usepackage{graphicx}
\usepackage{caption}
\usepackage{float}

\begin{document}
\begin{figure}[H]
My paragraph

\centering

\includegraphics[width=\linewidth]{my_image}

\vspace*{-4mm}
\caption*{My caption}
\end{figure}
\end{document}


My current solution to the problem, as can be seen above, is to include the paragraph within the figure. I place the centering after the paragraph text to ensure the image is centred but not the paragraph. As it is currently, though, the paragraph doesn't utilise paragraph indentation: the first line of text is flush with the left margin. I am unaware if there are any other side effects to this implementation. How can I ensure that paragraph text within a figure behaves as regular paragraph text?

• Using paragraph within the figure environment goes against the idea of figure environment. You are already forcing the position of this float with float package and H option; Then why not simply write the paragraph above the figure environment? – Cyriac Antony Sep 25 '19 at 9:54