![出了点问题——可能缺少 \item。\end{frame} 错误](https://linux22.com/image/358134/%E5%87%BA%E4%BA%86%E7%82%B9%E9%97%AE%E9%A2%98%E2%80%94%E2%80%94%E5%8F%AF%E8%83%BD%E7%BC%BA%E5%B0%91%20%5Citem%E3%80%82%5Cend%7Bframe%7D%20%E9%94%99%E8%AF%AF.png)
这里出了什么问题?我收到一个错误:
Something's wrong--perhaps a missing \item. \end{frame}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
\begin{frame}
\begin{figure}[h!]
\centering
\includegraphics[width=0.8\textwidth,]{dane_zamkniecie.eps}
\caption{Close prices from 1950-01-03 to 2013-12-05\\}
\label{fig6}
\end{figure}
\end{frame}
\end{document}
答案1
主要有两个解决方案。第一个是@moewe在评论中给出的。
另一种方法是加载 caption 包(\usepackage{caption}
),这样可以消除错误。如果您想在标题中添加换行符(这也许是您的初衷),这是最好的选择。
如果您不想加载另一个包,但仍想在图形后添加更多空间,我建议使用\vspace{}
在图形之后。但这仅适用于一个图形。如果您想更改每个图形的间距,请使用@Fran 的建议,然后设置\belowcaptionskip
。查看更多相关信息这里。