0

I often want to place figures on the right and let the text flow around it using wrapfig. For small figures this is nearly always an issue because the caption will be smushed together and extend over textwidth edge. Is there any way to fix this (e.g. maybe place it under Fig.)?

\begin{wrapfigure}{r}{0.13\textwidth}
  \vspace{-25pt}
  \begin{center}
    \includegraphics[width=0.13\textwidth]{img/.../sdf_layerAndFileFormat.png}
    \label{fig:metadata}
  \end{center}
    \vspace{-35pt}
  \caption{metadata}
      \vspace{-15pt}
\end{wrapfigure}

enter image description here

Nub
  • 1
  • Welcome to tex.sx. At least some document classes define the appearance of a caption. Therefore, we need to know what document class you're using. For best results, please provide a brief file that exhibits the result you show, starting with \documentclass and ending with `\end{document}. – barbara beeton Mar 23 '20 at 00:00
  • \documentclass[a4paper,12pt]{scrreprt} – Nub Mar 23 '20 at 00:06
  • The requirements to answer your question is not fulfilled yet, but if you cant post your brief code, all we can suggest that, you should increase the width of your figure and caption will be fitted smoothly. Greetings :) – Mannie Mar 23 '20 at 00:09
  • You can either enlarge the figure width, or reduce the caption font size. You cannot insist on both! – hesham Mar 23 '20 at 01:38
  • "e.g. maybe place it under Fig.", you mean just in this figure, or all the document figures? – hesham Mar 23 '20 at 01:40
  • Alas, KOMA is not compatible with the caption package (see https://tex.stackexchange.com/questions/22177/can-the-package-caption-be-used-with-komascript-classes), which can easily fix the hanging indentation. – John Kormylo Mar 23 '20 at 03:41

0 Answers0