Wednesday, September 10, 2014

! LaTeX Error: Command \iint already defined. Problem between pxfonts and other package e.g. amsmath

Problem cause:
The included packages have the same commands defined instead of redefined.
The solution here was simply to load amsmath first and afterwards pxfonts:


\usepackage[intlimits]{amsmath}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{pxfonts}


However, this might generate the problem, that your entire document text changes.
In my case I just wanted to have fixed/monofont inside the lstlistings.
For that I got rid of the general usepackage and did the following in my lstlisting setup:

basicstyle=\fontfamily{pxtt}\selectfont

1 comment: