I wish to import a symbol from newtxmath for use with kpfonts without using up a math alphabet to do it. As seen in this question it is easy to do so if one is willing to waste a math alphabet, but in their answer to this question, egreg seems to say that it is possible to avoid this by using the pifont package.
For reference, this works but uses up a math alphabet:
\documentclass{article}
\usepackage{kpfonts}
\makeatletter
\DeclareSymbolFont{ntxletters}{OML}{ntxmi}{m}{it}
\re@DeclareMathSymbol{\newpartial}{\mathord}{ntxletters}{64}
\makeatother
\begin{document}
\[ \partial \newpartial \]
\end{document}
Following (as far as I can tell correctly) egreg's instructions would lead me to the following:
\documentclass{article}
\usepackage{kpfonts}
\usepackage{pifont}
\makeatletter
\newcommand\Pimathsymbol[3][\mathord]{%
#1{\@Pimathsymbol{#2}{#3}}}
\def\@Pimathsymbol#1#2{\mathchoice
{\@Pim@thsymbol{#1}{#2}\tf@size}
{\@Pim@thsymbol{#1}{#2}\tf@size}
{\@Pim@thsymbol{#1}{#2}\sf@size}
{\@Pim@thsymbol{#1}{#2}\ssf@size}}
\def\@Pim@thsymbol#1#2#3{%
\mbox{\fontsize{#3}{#3}\Pisymbol{#1}{#2}}}
\makeatother
\newcommand{\newpartial}{\Pimathsymbol[\mathord]{ntxmmi}{64}}
\begin{document}
\[ \partial \newpartial \]
\end{document}
This compiles but gives the following error messages:
Some font shapes were not available, defaults substituted.
Font shape `U/ntxmmi/m/n' undefined
(Font) using `U/jkpexa/m/n' instead.
The output is also wrong, substituting a (subscript?) \oiintctrclockwise from kpfonts instead. I suppose this symbol fills the 64 slot of the jkpexa font.
If I understand egreg correctly, this method is not sufficient in the linked question above since the asker wishes to import a symbol from mathabx, and this does not provide .fd files. But as far as I can tell, newtxmath does provide (at least some) .fd files here.
(Note that I am using pdfLaTeX. Not sure if that is significant enough for it to be a tag.)


pifont,newtxandmathptm: From thePSNFSSdocumentation it seemed like it used to supportmathptm, but that this had been replaced bynewtx. I guess I thoughtpifontcould (still) be used as an interface tonewtx, but I suppose not. I don't need a bold version for this particular symbol, but suppose I did, would that be significantly more difficult? (I don't want to ask you for a solution if it is, but in case I ever need to import bold symbols in the future it would be nice to know how difficult it would be.) – Danny Oct 12 '21 at 16:23\bm, though). – egreg Oct 12 '21 at 17:07