Discussion:
converting amsmath to iopart
(too old to reply)
Roy
2011-01-29 19:10:38 UTC
Permalink
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
so bad)
* \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
Permalink
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 files 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 figure captions); an extra style file iopams.sty is provided
to load these packages and provide extra definitions for bold Greek
letters.
Post by Roy
===================================================================
So, it would appear that you merely need to do:

\usepackage{iopams}
--
Stephen Harker ***@adfa.edu.au
PEMS http://sjharker.customer.netspace.net.au/
***@ADFA
Dan
2011-01-29 22:33:18 UTC
Permalink
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.
You are leaving something out. I downloaded iopart and support files
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
Permalink
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 \begin{equation}.. \end{equation},
and added \nonumber commands.

I'd be more comfortable without these hacks.
Dan Luecking
2011-01-31 17:59:38 UTC
Permalink
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 \begin{equation}.. \end{equation},
and added \nonumber commands.
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
Permalink
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
Permalink
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
Permalink
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!!!!!!
Imad
2017-05-02 15:47:07 UTC
Permalink
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
c***@gmail.com
2018-07-26 19:35:53 UTC
Permalink
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
Thanks a lot for this Dan!
a***@gmail.com
2018-12-04 12:26:25 UTC
Permalink
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
It worked for me too. Thank you so much...
k***@gmail.com
2019-02-04 14:37:30 UTC
Permalink
Thank you so much for the solution. One thing I noticed after applying the solution is that all the equations are not left aligned as specified by IOP Publishers. Is there a way to solve this? Or the publishers won't mind this equation alignment?
a***@gmail.com
2020-06-19 11:49:24 UTC
Permalink
Post by Dan Luecking
\expandafter\let\csname equation*\endcsname\relax
\expandafter\let\csname endequation*\endcsname\relax
YOUFAN HE
2021-05-12 13:00:22 UTC
Permalink
在 2020年6月19日星期五 UTC+2 下午1:49:28,<***@gmail.com> 写道:
\expandafter\let\csname equation*\endcsname\relax
\expandafter\let\csname endequation*\endcsname\relax

%\@namedef{equation*}{\[}
%\@namedef{endequation*}{\]}

Sincerely thanks for both approaches, they work and are a huge help for me.
muhib ullah
2021-12-10 05:39:35 UTC
Permalink
Post by Dan Luecking
\expandafter\let\csname equation*\endcsname\relax
\expandafter\let\csname endequation*\endcsname\relax
Sincerely thanks for both approaches, they work and are a huge help for me.
thank you so much. it worked for me either.
Jose Agustin Lozano Torres
2022-06-16 04:14:54 UTC
Permalink
Wonderful!!

I had the same problem. I was looking for the solution and I found this post!
I fixed the problem!
Post by muhib ullah
Post by Dan Luecking
\expandafter\let\csname equation*\endcsname\relax
\expandafter\let\csname endequation*\endcsname\relax
Sincerely thanks for both approaches, they work and are a huge help for me.
thank you so much. it worked for me either.
j***@gmail.com
2012-06-27 15:59:27 UTC
Permalink
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
Permalink
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
Permalink
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
Permalink
Oh hell yeah! Command equation already defined success!
p***@gmail.com
2018-07-20 17:36:49 UTC
Permalink
Post by Dan Luecking
\expandafter\let\csname equation*\endcsname\relax
\expandafter\let\csname endequation*\endcsname\relax
Cheers!
Jack
Thank you very much. It worked
m***@gmail.com
2020-05-14 10:40:32 UTC
Permalink
在 2011年1月29日星期六 UTC+1下午8:10:38,Roy写道:
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.
* \eqref un-defined (iopart has an equivalent \eref, so this isn't
so bad)
* \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
Thankyou!!!!!!!
with this method
"
\expandafter\let\csname equation*\endcsname\relax
\expandafter\let\csname endequation*\endcsname\relax"
I have solved the IOPart problem
Loading...