I have some math equations within my LaTeX file and I usually denote these with $ to enter math mode. For longer equations, I will use \begin{math} ... but for some reason this is giving me an error telling me I am missing a $.
\begin{center}
\begin{math}
\example{ \Delta G = \Delta H - T\Delta S }
\label{1st_ex}
\end{math}
\end{center}
gives me
Missing $ inserted <inserted text> $ l.302 \example {\Delta ....
Even if I insert $ it still gives me that error.
The example function is
%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}

$ ... $is just a shorthand for\begin{math} ... \end{math}. For a displayed, numbered, equation, use\begin{equation} ... \end{equation}. – Torbjørn T. Apr 11 '13 at 21:49\exampleis not a standard command. So we do not know how it is defined If it makes a box like\mboxthen the argument of the macro is always set in text mode and you'd need nested$to use\Delta. Howevermathincenterlooks very strange markup. It should be a display math environment such asequationas Torbjørn says. – David Carlisle Apr 11 '13 at 21:53