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}

여기에 이미지 설명을 입력하세요

관련 정보