出了點問題——也許缺少\item。 \end{frame} 錯誤

出了點問題——也許缺少\item。 \end{frame} 錯誤

這裡有什麼問題嗎?我收到一個錯誤:

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 在評論中給出的。

另一種是載入字幕包(\usepackage{caption}),這將消除錯誤。如果您想在標題中添加換行符(這可能是您的初衷),這是最好的選擇。

如果您不想加載另一個套件並且仍然想在圖後添加更多空間,我建議\vspace{}在圖後使用。然而,這僅適用於一個數字。如果您想更改每個圖形的間距,請使用@Fran 的建議,然後設定\belowcaptionskip。查看更多相關信息這裡

相關內容