[Tex/LaTex] ‘Runaway argument? ‘ error when using the wx-ijcis class

amsthmerrors

I get the following error message when compiling for a journal article:

Runaway argument?
\relax \ifmmode \@badmath \else \bgroup \let \eqnnum \relax \let \refstepeqcnt 
\ETC.
! Paragraph ended before \@tempa was complete.
<to be read again> 
               \par 
l.435 \newenvironment{proof}[1][\proofname]{\par

See the sample code below. The same file with exactly the same packages works properly with any other class (e.g. article).

\documentclass{ws-ijcis}
\usepackage{amsthm}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{fullpage}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{subfig}
\begin{document}
dfdfd
\end{document}

The journal class file can be found here.

Best Answer

The ws-ijcis is not compatible with amsmath; it defines its own equation* environment. It's not compatible with amsthm either, because it defines a proof environment.

The weird error is due to the fact that you don't load amsmath prior to amsthm, so following a branch in a conditional where a wrong assumption is made on \[ (which is again redefined by the class).

A workaround could be

\documentclass{ws-ijcis}

\expandafter\let\csname equation*\endcsname\relax
\expandafter\let\csname endequation*\endcsname\relax
\let\proof\relax
\let\endproof\relax

\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{fullpage}
\usepackage{graphicx}
\usepackage[caption=false]{subfig} % also caption is incompatible
\begin{document}
dfdfd
\end{document}

but I guess the journal copy editors will not be happy with it. Looking at the class you're supposed to use equation or equation* for one line equations and eqnarray or eqnarray* for multiline displays (the environment is redefined too).

Related Question