Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

converting amsmath to iopart

8,249 views
Skip to first unread message

Roy

unread,
Jan 29, 2011, 2:10:38 PM1/29/11
to
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

unread,
Jan 29, 2011, 4:47:42 PM1/29/11
to
Roy <sara...@gmail.com> writes:

> 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.

> [...]


> 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.

>===================================================================
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.
>===================================================================

So, it would appear that you merely need to do:

\usepackage{iopams}

--
Stephen Harker s.ha...@adfa.edu.au
PEMS http://sjharker.customer.netspace.net.au/
UNSW@ADFA

Dan

unread,
Jan 29, 2011, 5:33:18 PM1/29/11
to
On Jan 29, 1:10 pm, Roy <sarah...@gmail.com> wrote:
> 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.

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

unread,
Jan 31, 2011, 3:39:22 AM1/31/11
to
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

unread,
Jan 31, 2011, 12:59:38 PM1/31/11
to
On Mon, 31 Jan 2011 00:39:22 -0800 (PST), Roy <sara...@gmail.com>
wrote:

To reply by email, change LookInSig to luecking

Dan Luecking

unread,
Jan 31, 2011, 1:15:48 PM1/31/11
to
On Mon, 31 Jan 2011 00:39:22 -0800 (PST), Roy <sara...@gmail.com>
wrote:

>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.

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

jack....@gmail.com

unread,
Jun 27, 2012, 11:59:27 AM6/27/12
to
Oh my gosh, thank you for this:

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

Cheers!
Jack

oscar...@gmail.com

unread,
Sep 7, 2012, 8:17:28 AM9/7/12
to

Same problem!!

same solution for me..

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

thanks

shadow...@gmail.com

unread,
Dec 18, 2012, 10:58:29 AM12/18/12
to
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!

bob

unread,
Dec 31, 2012, 10:05:39 PM12/31/12
to
Oh hell yeah! Command equation already defined success!

gerar...@gmail.com

unread,
May 23, 2014, 10:43:37 AM5/23/14
to
On Monday, January 31, 2011 1:15:48 PM UTC-5, Dan Luecking wrote:
>
> 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}

>
> Dan


Thank you for this !! works perfectly and saved me a lot of time =)

elmal...@hotmail.com

unread,
Mar 18, 2015, 8:39:00 PM3/18/15
to
El lunes, 31 de enero de 2011, 12:15:48 (UTC-6), Dan Luecking escribió:
> On Mon, 31 Jan 2011 00:39:22 -0800 (PST), Roy
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

unread,
May 2, 2017, 11:47:10 AM5/2/17
to
Thanks a lot! It saved me a lot of work.

pop.aba...@gmail.com

unread,
Jul 20, 2018, 1:36:54 PM7/20/18
to
Thank you very much. It worked

camopo...@gmail.com

unread,
Jul 26, 2018, 3:35:59 PM7/26/18
to
On Monday, January 31, 2011 at 4:15:48 PM UTC-2, Dan Luecking wrote:
> On Mon, 31 Jan 2011 00:39:22 -0800 (PST), Roy
Thanks a lot for this Dan!

ashishm...@gmail.com

unread,
Dec 4, 2018, 7:26:31 AM12/4/18
to
It worked for me too. Thank you so much...

krishna...@gmail.com

unread,
Feb 4, 2019, 9:37:37 AM2/4/19
to
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?

men...@gmail.com

unread,
May 14, 2020, 6:40:36 AM5/14/20
to
在 2011年1月29日星期六 UTC+1下午8:10:38,Roy写道:
Thankyou!!!!!!!
with this method
"
\expandafter\let\csname equation*\endcsname\relax
\expandafter\let\csname endequation*\endcsname\relax"
I have solved the IOPart problem

anib...@gmail.com

unread,
Jun 19, 2020, 7:49:28 AM6/19/20
to

Thanks for these:

YOUFAN HE

unread,
May 12, 2021, 9:00:25 AM5/12/21
to
在 2020年6月19日星期五 UTC+2 下午1:49:28,<anib...@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

unread,
Dec 10, 2021, 12:39:38 AM12/10/21
to
thank you so much. it worked for me either.

Jose Agustin Lozano Torres

unread,
Jun 16, 2022, 12:15:00 AM6/16/22
to
Wonderful!!

I had the same problem. I was looking for the solution and I found this post!
I fixed the problem!
0 new messages