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
> 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
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
%%%%%% 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.
To reply by email, change LookInSig to luecking
>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