# Triple integral in mathpazo

Using

\iiint


seems to work fine to generator a triple integral. However, it doesn't seem to work if I include

\include{mathpazo}


in the preamble. Any solutions for this? I am using the Palatino font for the main text. The MWE is as follows:

\documentclass[a4paper,10pt,reqno,oldfontcommands]{memoir}
\usepackage[T1]{fontenc}
\usepackage{fouriernc}
\usepackage{mathpazo}
\usepackage[centertags]{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{mathrsfs}

\newcommand*\dif{\mathop{}\!\mathrm{d}}

\begin{document}

\section{A Section}

This should be a triple integral:
\begin{align}
\iiint\limits_V \dif V \, (\nabla\phi)^2 = 0.
\label{eqn:triple_integral}
\end{align}

\end{document}

• @marmot, yes I actually have \usepackage{mathpazo}. I already have amsmath loaded. – Sid Aug 6 '18 at 15:47
• Please, make a minimal example that produces the error. – egreg Aug 6 '18 at 15:55

The mathpazo package, which provides Palatino-clone text and math fonts, hasn't been updated in a long time. As you've discovered, it also lacks macros to generate double- and triple-integral symbols.

An up-to-date alternative to mathpazo is the newpxtext and newpxmath pair of packages. A side-benefit of loading newpxmath is that it provides a \iiint macro by default -- as well as several other, compatibly styled integral symbols.

Since newpxmath loads the amsmath package automatically (if it hasn't been loaded already), there's no need to load amsmath in separate instruction. Likewise, unless the noamssymbols option is set, the newpxmath package loads the pxfonts version of amssymb -- no need to load the amssymb package separately either

\documentclass{article}
\usepackage{newpxtext,newpxmath}
\begin{document}
$\int \oint \iint \iiint \displaystyle\int \oint \iint \iiint$

The quick brown fox jumps over the lazy dog.
\end{document}


Addendum, posted after the OP provided a full MWE: The newpxmath and newpxtext packages must be loaded after amsmath.

\documentclass[a4paper]{memoir}
\usepackage[T1]{fontenc}
%\usepackage{fouriernc} % not compatible with Palatino
\usepackage{amsmath}    % is loaded automatically by 'newpxmath' package
%\usepackage{amssymb}   % no need to load this package either
\usepackage{amsthm}
\usepackage{mathrsfs}
\usepackage{newpxtext,newpxmath}

\newcommand*\dif{\mathop{}\!\mathrm{d}}

\begin{document}
\setcounter{chapter}{2} % just for this example
\section{A Section}

This should be a triple integral:
$$\label{eqn:triple_integral} \iiint\limits_V \! \dif V \, (\nabla\phi)^2 = 0.$$
\end{document}

• What you provide works. However, if I adjust the MWE above to replace mathpazo with the packages you suggest, I get an error in compilation: "Option clash for package amsmath". – Sid Aug 6 '18 at 16:27
• That works great. Just a final question on this: Why is fouriernc not compatible with Palatino? I am not well versed with the font packages on LaTeX. – Sid Aug 6 '18 at 16:49
• @Sid - I meant to write, "visually not compatible". Fourier is rather different from Palatino. I can see no reason for trying to mix-and-mismatch them. – Mico Aug 6 '18 at 16:51
• It is worth mentioning that amssymb should not be loaded if newpxmath is used, as the newpxmath package option amssymbols loads pxfonts version of the AMS symbols. This assumes, of course, that the user wants to use Palatino-compatible math font. – Ruixi Zhang Aug 6 '18 at 17:07
• @RuixiZhang - Thanks! I've commented out the instruction in question. – Mico Aug 6 '18 at 18:59

Using xelatex or lualatex makes things easier:

\documentclass[a4paper]{memoir}
\usepackage{amsthm}
\usepackage{unicode-math}
\setmainfont{TeX Gyre Pagella}
\setmathfont{TeX Gyre Pagella Math}

\newcommand*\dif{\mathop{}\!\mathrm{d}}

\begin{document}
\setcounter{chapter}{2} % just for this example
\section{A Section}
This should be a triple integral:
$$\label{eqn:triple_integral} \iiint\limits_V \! \dif V \, (\nabla\phi)^2 = 0.$$
\end{document}


• +1. You may want to be a tad more explicit what it is about LuaLaTeX or XeLaTeX that "makes things easier". – Mico Aug 6 '18 at 19:59

The error is in loading fouriernc, which is for using New Century Schoolbook, rather than Palatino. Load either it or mathpazo, not both.

The centertags option is active by default for amsmath.

\documentclass[a4paper,10pt,reqno,oldfontcommands]{memoir}
\usepackage[T1]{fontenc}
\usepackage{mathpazo}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{mathrsfs}

\newcommand*\dif{\mathop{}\!\mathrm{d}}

\begin{document}

\section{A Section}

This should be a triple integral:
$$\iiint\limits_V (\nabla\phi)^2 \dif V = 0. \label{eqn:triple_integral}$$

\end{document}


A different option is to use newpx (amsthm should be loaded before it) and amssymb should be removed.

\documentclass[a4paper,10pt,reqno,oldfontcommands]{memoir}
\usepackage[T1]{fontenc}
\usepackage{amsthm}
\usepackage{newpxtext,newpxmath}
\usepackage{mathrsfs}

\newcommand*\dif{\mathop{}\!\mathrm{d}}

\begin{document}

\section{A Section}

This should be a triple integral:
$$\iiint\limits_V (\nabla\phi)^2 \dif V = 0. \label{eqn:triple_integral}$$

\end{document}


• This compiles fine. However, I reduced the MWE too minimally. I must be loading another package that is conflicting with these updates since the integral signs are still missing. I have update my MWE to contain more information. – Sid Aug 6 '18 at 23:06
• I had an \usepackage{fourier} sneaking in the preamble too. This I believe was the conflict since the integral signs do appear now. – Sid Aug 6 '18 at 23:09
• Omitting \usepackage{amsthm} leads to the appearance of erroneous 'plain plain plain definition plain plain' string of words at the beginning to the thesis. I can only assume it plays some additional role to that covered by newpxmath – Sid Aug 6 '18 at 23:34
• @Sid You can omit amsmath, not amsthm, as shown in my code. Of course, fourier should be removed, too, as its effect is similar to that of fouriernc. – egreg Aug 7 '18 at 8:23

A good. modern replacement for mathpple/mathpazo/pxfonts/newpxmath is Asana Math, which was originally based on Young Ryu’s pxfonts.

\documentclass[a4paper,10pt,reqno,oldfontcommands]{memoir}
\usepackage[centertags]{amsmath}
\usepackage{unicode-math}

\defaultfontfeatures{Scale=MatchLowercase}
\setmainfont{TeX Gyre Pagella}[Scale = 1.0, Ligatures={Common, TeX}]
\setmathfont{Asana Math}
% If you’re using mathrsfs, you probably want to use \mathscr, but you also
% load amssymb.  The following line sets up a \mathcal and \mathbfcal similar
% to the ones from ammsymb, in addition to \mathscr and \mathbfscr similar to
% rsfs.
\setmathfont[range={cal,bfcal}, Alternate]{Asana Math}

% URW Classico is a free clone of Optima, which matches the free clones of
% Palatino well.
%\setsansfont{URWClassico}[
%   UprightFont = *-Regular ,
%   BoldFont = *-Bold ,
%   ItalicFont = *-Italic ,
%   BoldItalicFont = *-BoldItalic ,
%   Extension = .ttf ]

%\setmonofont{Inconsolata} % A humanist monospaced font.

\newcommand*\dif{\mathop{}\mathrm{d}}

\begin{document}

\section{A Section}

This should be a triple integral:
\begin{align}
\iiint\limits_V \dif V \, (\nabla\phi)^2 = 0.
\label{eqn:triple_integral}
\end{align}

\end{document}


For comparison, mathpazo with a double integral:

\documentclass[a4paper,10pt,reqno,oldfontcommands]{memoir}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[utf8]{inputenc} % The default since 2018.

\usepackage[centertags]{amsmath}
\usepackage{amssymb}
\usepackage{mathrsfs}
\usepackage{mathpazo}

\newcommand*\dif{\mathop{}\mathrm{d}}

\begin{document}

\section{A Section}

This should be a triple integral:
\begin{align}
\iint\limits_V \dif V \, (\nabla\phi)^2 = 0.
\label{eqn:triple_integral}
\end{align}

\end{document}


My recommendation is to use unicode-math whenever you can, and legacy font packages when you have to. Any modern math font has more symbols with more consistency and more flexibility than any combination of legacy packages. If you’re stuck with PDFTeX, I suggest replacing \usepackage{mathpazo} with \usepackage{newpxtext, newpxmath}.