# error command \iint already defined

I constantly receive this message, but I do not use the amsmath pacakge

/usr/local/texlive/2018/texmf-dist/tex/latex/amsmath/amsmath.sty, line 645

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 for immediate help. ...

l.645 ...d{\iint}{\DOTSI\protect\MultiIntegral{2}}


Your command was ignored. Type I to replace it with another command, or to continue without it.

That is my preambule

\documentclass[a4paper, 12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[top=3cm, bottom=2cm, left=3cm, right=2cm]{geometry}
\usepackage{times}
\usepackage[onehalfspacing]{setspace}
\usepackage[T1]{fontenc}
\usepackage[brazil]{babel}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{colortbl}
\usepackage{comment}
\usepackage{enumerate}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{indentfirst}
\usepackage{tocbibind}
\usepackage{booktabs}
\usepackage{subfigure}
\usepackage{tikz}
\usepackage{pxfonts}
\usepackage{cancel}
\usepackage{gensymb}
\usepackage{dsfont}
\usepackage{mathtools}
\usepackage{textcomp}
\usepackage[labelfont=bf]{caption}
\usepackage{longtable}


Someone could help me?

• probably one of the packages you load already loads amsmath itself – Alessandro Cuttin Oct 4 '19 at 13:30
• mathtools loads amsmath – daleif Oct 4 '19 at 13:30
• @Alex you changed the format of your code when you edited. It's less readable now than it was. – Alexandre Quenon Oct 4 '19 at 13:32
• Also pay attention to conflicts between packages. For instance, you load colortbl after xcolor, which is not allowed according to the xcolor documentation. Instead you should only load xcolor with the table option, like this: \usepackage[table]{xcolor} – Alexandre Quenon Oct 4 '19 at 13:40
• Not sure why you are using times and pxfonts? – MadyYuvi Oct 4 '19 at 13:44

Your preamble is long and a bit confused. Also contradictory: with \usepackage{times} it makes little sense to load pxfonts that provides Palatino for math (and overrides times).

Here's a reorganized version

\documentclass[a4paper, 12pt]{article}

% page format
\usepackage[top=3cm, bottom=2cm, left=3cm, right=2cm]{geometry}

% character set, language and fonts
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[brazil]{babel}

\usepackage{newpxtext,newpxmath} % better than pxfonts
\usepackage{textcomp}

% spacing and general setup
\usepackage[onehalfspacing]{setspace}
\usepackage{indentfirst}
\usepackage{tocbibind}

% math
%\usepackage{gensymb} % probably not necessary
\usepackage{dsfont}
\usepackage{cancel}

% general tools
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{comment}
\usepackage[labelfont=bf]{caption}
\usepackage{subcaption}
%\usepackage{subfigure}% obsolete!
\usepackage{enumerate} % perhaps better enumitem
\usepackage{multicol}

% graphics
\usepackage{tikz}

% tables
\usepackage{colortbl}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{longtable}

\begin{document}

test

\end{document}


If you decide to load pxfonts notwithstanding its shortcomings, then you need to move the “math” section in front of the “fonts” section.

Be aware that subfigure has been obsolete for a long time. Either load subfig (which has a slightly different syntax, but mainly \subfigure and \subtable are replaced by the generic \subfloat) or the recommended subcaption package.

In any case, try and see what packages you are really using and remove the calls to those that aren't needed.

• thank you so much! I´ve been learning a lot with your comment. In deed, some packages are really confuse to me yet. I´ve been working in my report´s lab with stack support. Thank you! – Alex Guimarães Oct 4 '19 at 15:31

\documentclass[a4paper, 12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[top=3cm, bottom=2cm, left=3cm, right=2cm]{geometry}
\usepackage{times}
\usepackage[onehalfspacing]{setspace}
\usepackage[T1]{fontenc}
\usepackage[brazil]{babel}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{colortbl}
\usepackage{comment}
\usepackage{enumerate}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{indentfirst}
\usepackage{tocbibind}
\usepackage{booktabs}
\usepackage{subfigure}
\usepackage{tikz}
\usepackage{cancel}
\usepackage{gensymb}
\usepackage{dsfont}
\usepackage{mathtools}
\usepackage{pxfonts}
\usepackage{textcomp}
\usepackage[labelfont=bf]{caption}
\usepackage{longtable}


Here, I've kept pxfonts after mathtools will solve it...