LaTeX 錯誤:環境範例未定義

LaTeX 錯誤:環境範例未定義

我需要在 IEEEtran 範本中使用關鍵字example,但出現此錯誤:

Error: LaTeX Error: Environment example undefined.
Error: LaTeX Error: \begin{document} ended by \end{example}.

這是我的測試腳本:

\documentclass[conference]{IEEEtran}

\begin{document}

\begin{example} Here is my example \end{example}

\end{document}

您能澄清一下我該如何解決這個問題嗎?

答案1

您必須使用 定義類似定理的環境\newtheorem

\documentclass[conference]{IEEEtran}
\newtheorem{example}{Example}
\begin{document}
\begin{example} Here is my example \end{example}
\end{document}

在此輸入影像描述

相關內容