I need to edit my previous question about caption width below the figure. The goal is to have a caption exactly the same width as the figure. I was recommended to use caption package and the command \captionsetup{width=x}
to make the width of the caption the same as the width of the figure by specifying x equal to the width of the figure. However, I am doing a presentation and it seems that this is not working here, when I do this, caption is still much wider than the figure as you can see in the image attached below.
Also, I want to use the command \setbeamertemplate{caption}{\raggedright\insertcaption\par}
to get rid of the "Figure:" before the caption and this is not working either now, but if I exclude \usepackage{caption}
from my preamble, it is working fine. Here is my code now:
\PassOptionsToPackage{table}{xcolor}
\documentclass[xcolor=svgnames]{beamer}
%\PassOptionsToPackage{svgnames}{xcolor}
%\documentclass[xcolor=table]{beamer}
%
% Choose how your presentation looks.
%
% For more themes, color themes and font themes, see:
% http://deic.uab.es/~iblanes/beamer_gallery/index_by_theme.html
%
\mode<presentation>
{
\usetheme{Warsaw} % or try Darmstadt, Madrid, Warsaw, ...
\usecolortheme{default} % or try albatross, beaver, crane, ...
\usefonttheme{default} % or try serif, structurebold, ...
\setbeamertemplate{navigation symbols}{}
% \setbeamertemplate{caption}[numbered]
%\setbeamercolor{section in head/foot}{bg=NavyBlue}
}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{amsmath}
\usepackage{xcolor}
\usepackage{tabu}
\usepackage{booktabs}% for better rules in the table
\usepackage{ragged2e}
\usepackage{rotating}
\usepackage{caption}
\title[Thesis Defense]{Name of the thesis}
\subtitle{Thesis Defense}
\author{}
\institute{}
\date{January 31, 2018}
\begin{document}
\setbeamertemplate{caption}{\raggedright\insertcaption\par}
\setbeamerfont{caption}{size=\tiny}
\begin{frame}[plain]
\titlepage
\end{frame}
\begin{frame}{Motivation}
\begin{figure}
\centering
\captionsetup{width=90mm}
\small{Appreciation of house prices and policy rate} \par
%\label{fig:circulation}
\includegraphics[width=90mm,height=0.5\textheight,keepaspectratio]{WuXia_rate_Real_HPI}
\caption{\textit{Shaded area marks the pre-crisis period in which effective federal funds rate was below the Taylor rule rate.}}
%\begin{source} National central banks \end{source}
\end{figure}
\begin{itemize}
\item
\item
\end{itemize}
\end{frame}
\end{document}