I am doing which should be a simple task, but I cannot fathom why it does not work... I just want a simple caption of a figure I centered, aligned to the left of the figure, right down its lower left corner.
This is my MWE:
\documentclass{beamer}
\mode<presentation> {
\usepackage[labelformat=empty,
font=scriptsize,
skip=0pt,
justification=justified,
singlelinecheck=false]{caption}
}
\begin{document}
\begin{frame}
\begin{center}
\includegraphics[width=.5\linewidth]{example-image}
\captionof{figure}{my caption here}
\end{center}
\end{frame}
\end{document}
Which produces:
How can I have the caption right below the bottom left corner of my image? And why does the code above not work?
Please note the solution should also work within a \figure environment to add captions to tikzpictures...
Thanks!
EDIT: I TRIED justification=justified,singlelinecheck=false AS SUGGESTED HERE, BUT STILL NO SUCCESS...
\documentclass{beamer}
\usepackage[labelformat=empty,font=scriptsize,skip=0pt,
justification=raggedright,singlelinecheck=false]{caption}
\begin{document}
\begin{frame}
\begin{center}
\includegraphics[width=.5\linewidth]{example-image}
\captionof{figure}{my caption here}
\end{center}
\end{frame}
\end{document}





figurethe image wouldn't be centered by default. So you would need an additional environment to center it. – Schweinebacke Jan 29 '17 at 11:37\centeringwould center the whole frame not only the picture.centercould be used, but why not usingfigure?centerwould be physical markup,figureis semantic markup. Semantic markup should be preferred, because you can change all figures at once in the preamble of the document. It would make more sense to redefinefigureto be a centeredmeasuredfigurethan to put allmeasuredfigureinto acenter-environment. But I do not recommend to do so, because if you would have a very small image, ameasuredfigurecould be very ugly. – Schweinebacke Jan 29 '17 at 11:48justification=raggedleftinstead ofjustification=raggedright. – Schweinebacke Feb 01 '17 at 12:48figureenvironment using\captionsetupor for allmeasuredfigureenvironments using the optional argument of\captionsetupin the document preamble. See thecaptionmanual for more information on how to configure it locally or globally. – Schweinebacke Feb 01 '17 at 14:28