Beamer 演示:字幕问题

Beamer 演示:字幕问题

我正在制作演示文稿,遇到了两个问题:1) 我需要使用包 subcaption 来制作子图,同时我想使用此站点的命令\setbeamertemplate{caption}{\raggedright\insertcaption\par}删除图标题前的“Figure:”。但是,当我使用包 subcaption 时,后一个命令停止工作,我仍然可以在标题前看到“Figure:” - 参见第一张图片。 在此处输入图片描述

您知道如何使“图:”消失并且仍然使用子标题包吗?

2)为什么下图中标题和图形之间的距离这么长?(代码的最后几行) 在此处输入图片描述 这个图的代码和第一个图的代码相同,所以我不明白为什么标题和图的距离会有如此大的差异。

代码如下:

\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{threeparttable}
\usepackage{subcaption}


\title[Thesis Defense]{Name of thesis}
\subtitle{Thesis Defense}
\author{name}
 \institute{University}
\date{January 31, 2018}

\begin{document}
\setbeamertemplate{caption}{\raggedright\insertcaption\par}
\setbeamerfont{caption}{size=\tiny}
\setlength{\abovecaptionskip}{-2pt}
\setlength{\belowcaptionskip}{6pt}



\begin{frame}[plain]
  \titlepage
\end{frame}

\begin{frame}{Motivation}
\begin{figure}[!t]
\centering

\begin{measuredfigure}
\includegraphics[width=\linewidth,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.}}
\end{measuredfigure}

\end{figure}

\begin{itemize}
\item 
\item 
\end{itemize}

\end{frame}


\begin{frame}{Results - Impulse responses, baseline model}

\begin{figure}[!htb]
\begin{footnotesize}
\centering
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[height=0.3\textheight,width=\linewidth,keepaspectratio]{IRF_baseline_big_November2006}
%  \vspace{-3mm}
%
%  \hspace{5mm} \small{November 2006}
  %\caption{November 2006}
  %\label{fig:}
\end{subfigure}%
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[height=0.3\textheight,width=\linewidth,keepaspectratio]{IRF_baseline_big_July2007}
%  \vspace{-3mm}
%
%  %\caption{}
%  \hspace{5mm} \small{July 2007}
  %\label{fig:}
\end{subfigure}
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[height=0.3\textheight,width=\linewidth,keepaspectratio]{IRF_baseline_small_October2008}
%  \vspace{-6mm}
%
%  %\caption{}
%  \hspace{5mm} \small{October 2008}
  %\label{fig:}
\end{subfigure}%
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[height=0.3\textheight,width=\linewidth,keepaspectratio]{IRF_baseline_big_August2011}
%  \vspace{-6mm}
%
% % \caption{}
% \hspace{5mm} \small{August 2011}
  %\label{fig:}
\end{subfigure}
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[height=0.3\textheight,width=\linewidth,keepaspectratio]{IRF_baseline_small_December2013}
%  \vspace{-6mm}
%
%  %\caption{}
%  \hspace{5mm} \small{December 2013}
  %\label{fig:}
\end{subfigure}%
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[height=0.3\textheight,width=\linewidth,keepaspectratio]{IRF_baseline_small_April2017}
%  \vspace{-6mm}
%
%  %\caption{}
%  \hspace{5mm} \small{April 2017}
  %\label{fig:}
\end{subfigure}
%\label{fig:IRF_baseline}
\end{footnotesize}
\end{figure}

\end{frame}


\begin{frame}{Results - FEVD}

\begin{figure}[!t]
\centering

\begin{measuredfigure}
  \includegraphics[width=\linewidth]{FEVD_baseline_small_April2017}
\caption{Some caption...}
\end{measuredfigure}

\end{figure}


\end{frame}



\end{document}

答案1

除了subcaption使用包之外,您还可以简单地使用 beamers 列机制来放置图像。

请注意,您不需要使用 beamer 或 。\usepackage{graphicx}和被称为默认,因为它们是默认加载的,因此无需再次加载它们。在没有浮动对象的类中,给出浮动说明符(例如 )是没有意义的\usepackage{hyperref}\usepackage{xcolor}\usecolortheme{default}\usefonttheme{default}[!htb]

\PassOptionsToPackage{table}{xcolor}
\documentclass[xcolor=svgnames]{beamer}

\mode<presentation>
{
  \usetheme{Warsaw}  
  \setbeamertemplate{navigation symbols}{}
}

\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{threeparttable}
%\usepackage{subcaption}

\setbeamertemplate{caption}{\raggedright\insertcaption\par}
\setbeamerfont{caption}{size=\tiny}
%\setlength{\abovecaptionskip}{-2pt}
%\setlength{\belowcaptionskip}{6pt}

\title[Thesis Defense]{Name of thesis}
\subtitle{Thesis Defense}
\author{name}
\institute{University}
\date{January 31, 2018}

\begin{document}

\begin{frame}{Results - Impulse responses, baseline model}

\begin{figure}
\setbeamerfont{caption}{size=\footnotesize}
\begin{columns}[onlytextwidth]
    \begin{column}{.45\textwidth}
        \centering
        \includegraphics[height=0.2\textheight,width=\linewidth,keepaspectratio]{example-image}
        \includegraphics[height=0.2\textheight,width=\linewidth,keepaspectratio]{example-image}
        \includegraphics[height=0.2\textheight,width=\linewidth,keepaspectratio]{example-image}
    \end{column}
    \begin{column}{.45\textwidth}
        \centering
        \includegraphics[height=0.2\textheight,width=\linewidth,keepaspectratio]{example-image}
        \includegraphics[height=0.2\textheight,width=\linewidth,keepaspectratio]{example-image}
        \includegraphics[height=0.2\textheight,width=\linewidth,keepaspectratio]{example-image}
    \end{column}    
\end{columns}   
\caption{whatever caption you want}
\end{figure}

\end{frame}

\end{document}

相关内容