LaTeX 오류: $ 누락

LaTeX 오류: $ 누락

내 LaTeX 파일에 몇 가지 수학 방정식이 있으며 일반적으로 $수학 모드로 들어가기 위해 이를 로 표시합니다. 더 긴 방정식의 경우 을 사용 \begin{math} ...하지만 어떤 이유로 인해 $.

\begin{center}
\begin{math}
\example{ \Delta G = \Delta H - T\Delta S }
\label{1st_ex}
\end{math}
\end{center}

나에게 준다

Missing $ inserted <inserted text> $ l.302 \example {\Delta ....

삽입해도 $여전히 오류가 발생합니다.

예제 함수는

%list of equations
\usepackage[titles]{tocloft}
\newcommand{\listexamplename}{List of Equations}
\newlistof{example}{exp}{\listexamplename}
\newcommand{\example}[1]{%
\refstepcounter{example}
\par\noindent\text{Equation \theexample. #1}
\addcontentsline{exp}{example}
{\protect\numberline{\thechapter.\theexample}#1}\par}

답변1

귀하의 질문에서 얻을 수 있는 정보만을 토대로 방정식을 작성하는 세 가지 방법이 있다고 말씀드리겠습니다.

\documentclass{article}
\begin{document}

\begin{equation}
    \Delta G = \Delta H - T\Delta S 
\label{eq:1st_ex}
\end{equation}

$\Delta G = \Delta H - T\Delta S $

\[\Delta G = \Delta H - T\Delta S \]

\end{document}

그러면 다음과 같은 출력이 생성됩니다.

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

관련 정보