Discussion:
converting amsmath to iopart
Roy
2011-01-29 19:10:38 UTC
Raw Message
I have a manuscript I've been working on a long time. I always use
the amsmath packages, but I just decided to submit to an IOP journal,
and trying to use the iopart class file is giving me many headaches
before it gets through the first page of actual text.

So far, here are the complaints:

1) If I have in my preamble
\documentclass{iopart}
...
\usepackage{amsmath}

then I get an error that

./abbrevs.tex:46: LaTeX Error: Command \eqref already defined.
Or name \end... illegal, see p.192 of the manual.

2) So I remove ams-math, and several other amsmath things break:
* \eqref un-defined (iopart has an equivalent \eref, so this isn't
* \begin{split}...\end{split} undefined
* \lvert and \rvert and their relatives are undefined
* \DeclareMathOperator is undefined. This can be fixed with
\usepackage{amsopn}

3) Several of the macros I created with \newcommand, turn out to be
pre-defined in iopart.cls, but I don't know what they mean in that
class, so I don't know if it's safe to overwrite them with
\renewcommands.

Does anybody have any good advice for relatively painless conversion
from amsmath to iopart?

Thanks,
Roy
Stephen Harker
2011-01-29 21:47:42 UTC
Raw Message
Post by Roy
I have a manuscript I've been working on a long time. I always use
the amsmath packages, but I just decided to submit to an IOP journal,
and trying to use the iopart class file is giving me many headaches
before it gets through the first page of actual text.
1) If I have in my preamble
\documentclass{iopart}
...
\usepackage{amsmath}
then I get an error that
./abbrevs.tex:46: LaTeX Error: Command \eqref already defined.
Or name \end... illegal, see p.192 of the manual.
[...]
Does anybody have any good advice for relatively painless conversion
from amsmath to iopart?
In my (old) copy of the iop class, there was a document ioplau2e.tex
with some possibly relevant information. Finding this meant doing
some digging as the name is hardly intuitive! I hope the following
cut and pasted from that file is still relevant.
Post by Roy
===================================================================
iopart can be used with other package ﬁles such as those loading the
AMS extension fonts msam and msbm (these fonts provide the blackboard
bold alphabet and various extra maths symbols as well as symbols
useful in ﬁgure captions); an extra style ﬁle iopams.sty is provided
to load these packages and provide extra deﬁnitions for bold Greek
letters.
Post by Roy
===================================================================
So, it would appear that you merely need to do:

\usepackage{iopams}
--
PEMS http://sjharker.customer.netspace.net.au/
Dan
2011-01-29 22:33:18 UTC
Raw Message
I have a manuscript I've been working on a long time.  I always use
the amsmath packages, but I just decided to submit to an IOP journal,
and trying to use the iopart class file is giving me many headaches
before it gets through the first page of actual text.
1) If I have in my preamble
\documentclass{iopart}
...
\usepackage{amsmath}
then I get an error that
./abbrevs.tex:46: LaTeX Error: Command \eqref already defined.
Or name \end... illegal, see p.192 of the manual.
from
http://authors.iop.org/atom/usermgmt.nsf/AuthorServices
and tried the file

\documentclass{iopart}
\usepackage{amsmath}
\begin{document}
Test
\end{document}

I didn't get this error at all, only his one:

! LaTeX Error: Command \equation* already defined.
Or name \end... illegal, see p.192 of the manual.

Also, your error seems to come from the file abbrevs.tex, which is
not input by either iopart.cls or amsmath.

One of two things is happening: the conflict with \eqref is caused by
something else in your document that you haven't mentioned, or your
version of iopart is different from mine. The copy I got says:

\ProvidesClass{iopart}[1996/06/10 v0.0 IOP Journals LaTeX article
class]
Which seems pretty old, but came from the pulisher's web site.

Dan
Roy
2011-01-31 08:39:22 UTC
Raw Message
Oops, I copied and pasted the wrong error. The test-file you suggest
still gives me this error:

%%%%%% BEGIN QUOTE FROM .log FILE %%%%%%%%%
/usr/local/texlive/2010/texmf-dist/tex/latex/amsmath/amsmath.sty:2665:
LaTeX Error: Command \equation* already defined.
Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...

l.2665 }
%%%%%% END QUOTE FROM .log FILE %%%%%%%%%

But, I can hit "enter" once and everything compiles fine--almost.
The two problems that remain:

Using the {equation*} environment gives errors, stemming from the
above.

I can replace the \begin{equation*}...\end{equation*} with $$...$$ and
it compiles, but I now get error messages that hang the TeX engine
when I have this construction:

$$\begin{split}...\end{split}$$

The errors are of the "extra }" type, and I can't get past them by
hitting "enter"

For now, I've replaced them with $$..$$,

I'd be more comfortable without these hacks.
Dan Luecking
2011-01-31 17:59:38 UTC
Raw Message
Post by Roy
Oops, I copied and pasted the wrong error. The test-file you suggest
%%%%%% BEGIN QUOTE FROM .log FILE %%%%%%%%%
LaTeX Error: Command \equation* already defined.
Or name \end... illegal, see p.192 of the manual.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.2665 }
%%%%%% END QUOTE FROM .log FILE %%%%%%%%%
But, I can hit "enter" once and everything compiles fine--almost.
Using the {equation*} environment gives errors, stemming from the
above.
I can replace the \begin{equation*}...\end{equation*} with $$...$$ and
it compiles, but I now get error messages that hang the TeX engine
$$\begin{split}...\end{split}$$
The errors are of the "extra }" type, and I can't get past them by
hitting "enter"
For now, I've replaced them with $$..$$,
I'd be more comfortable without these hacks.
To reply by email, change LookInSig to luecking
Dan Luecking
2011-01-31 18:15:48 UTC
Raw Message
Post by Roy
Oops, I copied and pasted the wrong error. The test-file you suggest
%%%%%% BEGIN QUOTE FROM .log FILE %%%%%%%%%
LaTeX Error: Command \equation* already defined.
Or name \end... illegal, see p.192 of the manual.
If this is the only error message from amsmath, you
can avoid it with the following, which disables
iopart's definition of equation* and lets amsmath
define it anew:

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

Put these just before \usepackage{amsmath}

Alternatively, edit iopart.cls and remove these two
lines (lines 778 and 779 in my copy):
\@namedef{equation*}{$} \@namedef{endequation*}{$}
They only equate the equation* environment to $...$,
which just makes them needlessly longer to type, and
doesn't work well with subenvironments like split.

By contrast, the equation* environment of amsmath is
built to work well with the various amsmath subenvironments.

Dan
To reply by email, change LookInSig to luecking
g***@gmail.com
2014-05-23 14:43:37 UTC
Raw Message
Post by Dan Luecking
If this is the only error message from amsmath, you
can avoid it with the following, which disables
iopart's definition of equation* and lets amsmath
\expandafter\let\csname equation*\endcsname\relax
\expandafter\let\csname endequation*\endcsname\relax
Put these just before \usepackage{amsmath}
Dan
Thank you for this !! works perfectly and saved me a lot of time =)
e***@hotmail.com
2015-03-19 00:38:51 UTC
Raw Message
On Mon, 31 Jan 2011 00:39:22 -0800 (PST), Roy
Post by Roy
Oops, I copied and pasted the wrong error. The test-file you suggest
%%%%%% BEGIN QUOTE FROM .log FILE %%%%%%%%%
LaTeX Error: Command \equation* already defined.
Or name \end... illegal, see p.192 of the manual.
If this is the only error message from amsmath, you
can avoid it with the following, which disables
iopart's definition of equation* and lets amsmath
\expandafter\let\csname equation*\endcsname\relax
\expandafter\let\csname endequation*\endcsname\relax
Put these just before \usepackage{amsmath}
Alternatively, edit iopart.cls and remove these two
They only equate the equation* environment to $...$,
which just makes them needlessly longer to type, and
doesn't work well with subenvironments like split.
By contrast, the equation* environment of amsmath is
built to work well with the various amsmath subenvironments.
Dan
To reply by email, change LookInSig to luecking
thank you so much for this!!!!!!
thank you so much for this!!!!!!
thank you so much for this!!!!!!
thank you so much for this!!!!!!
thank you so much for this!!!!!!
thank you so much for this!!!!!!
2017-05-02 15:47:07 UTC
Raw Message
Thanks a lot! It saved me a lot of work.
Post by Dan Luecking
Post by Roy
Oops, I copied and pasted the wrong error. The test-file you suggest
%%%%%% BEGIN QUOTE FROM .log FILE %%%%%%%%%
LaTeX Error: Command \equation* already defined.
Or name \end... illegal, see p.192 of the manual.
If this is the only error message from amsmath, you
can avoid it with the following, which disables
iopart's definition of equation* and lets amsmath
\expandafter\let\csname equation*\endcsname\relax
\expandafter\let\csname endequation*\endcsname\relax
Put these just before \usepackage{amsmath}
Alternatively, edit iopart.cls and remove these two
They only equate the equation* environment to $...$,
which just makes them needlessly longer to type, and
doesn't work well with subenvironments like split.
By contrast, the equation* environment of amsmath is
built to work well with the various amsmath subenvironments.
Dan
To reply by email, change LookInSig to luecking
j***@gmail.com
2012-06-27 15:59:27 UTC
Raw Message
Oh my gosh, thank you for this:

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

Cheers!
Jack
o***@gmail.com
2012-09-07 12:17:28 UTC
Raw Message
Same problem!!

same solution for me..

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

thanks
Post by Dan Luecking
\expandafter\let\csname equation*\endcsname\relax
\expandafter\let\csname endequation*\endcsname\relax
Cheers!
Jack
s***@gmail.com
2012-12-18 15:58:29 UTC
Raw Message
WOO! I had the same problem and this fixed it right away! thank you very much
\expandafter\let\csname equation*\endcsname\relax
\expandafter\let\csname endequation*\endcsname\relax

That worked immediately!
Post by o***@gmail.com
Same problem!!
same solution for me..
\expandafter\let\csname equation*\endcsname\relax
\expandafter\let\csname endequation*\endcsname\relax
thanks
Post by Dan Luecking
\expandafter\let\csname equation*\endcsname\relax
\expandafter\let\csname endequation*\endcsname\relax
Cheers!
Jack
bob
2013-01-01 03:05:39 UTC