1

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?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.