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

質問で入手できる情報だけに基づいて、方程式を書く方法は 3 つあると言えます。

\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}

次のような出力が生成されます。

ここに画像の説明を入力してください

関連情報