How to center a figure caption that's too long for a single line? Or at least, make the text in other lines line-up with text after "Slika 1:". It currently looks like this
1 Answer
Use the caption
package.
\documentclass{article}
\usepackage[justification=centering]{caption}% or e.g. [format=hang]
\begin{document}
\begin{figure}
\centering
\rule{1cm}{1cm}
\caption{This caption is very long---in fact, it is so long that it doesn't fit on one line}
\end{figure}
\end{document}
-
-
1I don't know about beamer, but I had a strange document class that also refused to give the correct output with
\usepackage[justification=centering]{caption}
and I simply used\\\centering
in the caption text to get the desired output.– aprioriJul 15, 2019 at 12:48