3

I'm using the elsarticle document class on ShareLaTeX, and it is giving five errors that don't make much sense to me.

My code is

\documentclass{elsarticle}
\usepackage{pifont, natbib, geometry, fleqn, graphicx, txfonts,hyperref}
\usepackage{amssymb,amsmath,parskip}

\title{plasma paper}
\author{Garrett Young}

\begin{document}

\maketitle

\section{Introduction}
Lorentz force equations:
\begin{equation}
    \mathbf{F} = \mathbf{-\mathit{e}(E + v \times B)} = m\frac{d\mathbf{v}}{dt}
\end{equation}
\end{document}

And the errors are

/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsmath.sty, line 505
LaTeX Error: Command \iint 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.505 ...d{\iint}{\DOTSI\protect\MultiIntegral{2}}

Your command was ignored.
Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.
 /usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsmath.sty, line 506
LaTeX Error: Command \iiint 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.506 ...{\iiint}{\DOTSI\protect\MultiIntegral{3}}

Your command was ignored.
Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.
 /usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsmath.sty, line 507
LaTeX Error: Command \iiiint 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.507 ...\iiiint}{\DOTSI\protect\MultiIntegral{4}}

Your command was ignored.
Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.
 /usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsmath.sty, line 508
LaTeX Error: Command \idotsint 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.508 ...dotsint}{\DOTSI\protect\MultiIntegral{0}}

Your command was ignored.
Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.
 /usr/local/texlive/2015/texmf-dist/tex/latex/base/fleqn.sty
inputting `fleqn.clo' instead of obsolete `fleqn.sty'.

The content shows up correctly. I don't really know what's wrong. Any help would be appreciated.

1 Answer 1

4

There are a number of symbols defined inside txfonts that are also defined in amsmath, so you can just make these available again:

\usepackage{txfonts}
\let\iint\relax
\let\iiint\relax
\let\iiiint\relax
\let\idotsint\relax
\usepackage{amsmath}

However, the following is better:

\documentclass{elsarticle}

\usepackage{newtxtext,newtxmath}
\usepackage{amsmath}

\begin{document}

Lorem ipsum \ldots

\end{document}

From the newtx README:

The bun­dle splits tx­fonts.sty (from the TX fonts dis­tri­bu­tion) into two in­de­pen­dent pack­ages, newtx­text.sty and newtx­math.sty, each with fixes and enhancements.

It seems like the fixes might include the symbol definitions being removed.

2
  • Thank you, this works beautifully - +1. Do you have any idea about the warning (" /usr/local/texlive/2015/texmf-dist/tex/latex/base/fleqn.sty inputting fleqn.clo instead of obsolete fleqn.sty")? Aug 20, 2016 at 18:42
  • @heather: Yes. Use flesh as a document class or package option, not by loading the package explicitly.
    – Werner
    Aug 20, 2016 at 19:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .