Erro LaTeX: faltando $

Erro LaTeX: faltando $

Eu tenho algumas equações matemáticas em meu arquivo LaTeX e geralmente as denomino para $entrar no modo matemático. Para equações mais longas, usarei, \begin{math} ...mas por algum motivo isso está me dando um erro dizendo que estou faltando um arquivo $.

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

me dá

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

Mesmo se eu inserir $, ainda me dá esse erro.

A função de exemplo é

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

Responder1

Com base apenas nas informações disponíveis na sua pergunta, direi que você tem três maneiras possíveis de escrever a equação:

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

O que produzirá uma saída como esta:

insira a descrição da imagem aqui

informação relacionada